Merge branch 'develop' into 'master'

Develop

See merge request jianweie/coreshoppro!5
This commit is contained in:
大灰灰
2022-10-13 09:32:37 +00:00
19 changed files with 277 additions and 55 deletions

View File

@@ -584,6 +584,12 @@ namespace CoreCms.Net.Configuration
/// </summary>
public const string ShowCalendar = "showCalendar";
/// <summary>
/// 显示自定义表单按钮
/// </summary>
public const string ShowCustomForm = "showCustomForm";
/// <summary>
/// 显示首页弹窗
/// </summary>

View File

@@ -57,6 +57,7 @@ namespace CoreCms.Net.Configuration
di.Add(SystemSettingConstVars.ShowGroupBuying, new DictionaryKeyValues() { sKey = "显示团购按钮", sValue = "2" });
di.Add(SystemSettingConstVars.ShowSolitaire, new DictionaryKeyValues() { sKey = "显示接龙按钮", sValue = "2" });
di.Add(SystemSettingConstVars.ShowCalendar, new DictionaryKeyValues() { sKey = "显示签到按钮", sValue = "2" });
di.Add(SystemSettingConstVars.ShowCustomForm, new DictionaryKeyValues() { sKey = "显示自定义表单按钮", sValue = "2" });
di.Add(SystemSettingConstVars.ShowIndexPopupWindow, new DictionaryKeyValues() { sKey = "显示首页弹窗", sValue = "2" });

View File

@@ -328,7 +328,10 @@ const install = (Vue, vm) => {
let getInviteQRCode = (params, config = {}) => http.post('/Api/Store/GetInviteQrCode', params, { custom: { methodName: 'store.getinviteqrcode', needToken: false } });
// 生成海报
let createPoster = (params, config = {}) => http.post('/Api/User/GetPoster', params, { custom: { methodName: 'user.getposter', needToken: false } });
//============================================================//万能表单
//获取表单列表
let getFormList = (params, config = {}) => http.post('/Api/Form/GetList', params, { custom: { methodName: 'form.getformdetial', needToken: false } });
//获取表单详情
let getFormDetial = (params, config = {}) => http.post('/Api/Form/GetFormDetial', params, { custom: { methodName: 'form.getformdetial', needToken: false } });
//============================================================//提交表单
let addSubmitForm = (params, config = {}) => http.post('/Api/Form/AddSubmit', params, { custom: { methodName: 'form.addsubmit', needToken: false } });
@@ -571,6 +574,7 @@ const install = (Vue, vm) => {
getInviteQRCode,
createPoster,
getFormDetial,
getFormList,
addSubmitForm,
lotteryConfig,
lottery,

View File

@@ -1,37 +1,38 @@
<template>
<view class="goodsBox coreshop-margin-bottom-10 coreshop-padding-top-5 coreshop-bg-white">
<view class="goodsBox coreshop-margin-bottom-10 coreshop-padding-top-5">
<!-- 列表平铺两列三列 -->
<view v-if="coreshopdata.parameters.column == '2' && coreshopdata.parameters.display == 'list' || coreshopdata.parameters.column == '3' && coreshopdata.parameters.display == 'list'" v-bind:class="'column'+coreshopdata.parameters.column">
<view class="coreshop-margin-left-5 coreshop-margin-right-5 coreshop-margin-top-10 coreshop-margin-bottom-10 " v-if="coreshopdata.parameters.lookTitle == 'true'">
<coreshop-section font-size="15" :title="coreshopdata.parameters.title" v-if="coreshopdata.parameters.title != '' && coreshopdata.parameters.lookTitle == 'true'" @click="coreshopdata.parameters.lookMore == 'true' ? goGoodsList({catId: coreshopdata.parameters.classifyId,brandId:coreshopdata.parameters.brandId}) :''" :arrow="coreshopdata.parameters.lookMore == 'true'" :sub-title="coreshopdata.parameters.lookMore == 'true'?'更多':''"></coreshop-section>
</view>
<view class="" v-if="count">
<u-grid :col="coreshopdata.parameters.column" :border="false" align="left">
<u-grid-item :custom-style="{padding: '0px'}" v-for="(item, index) in coreshopdata.parameters.list" :key="index">
<view class="good_box" @tap="goGoodsDetail(item.id)">
<u--image :src="item.image" mode="widthFix" width="100%" :height="coreshopdata.parameters.column==2?'164px':'104px'" radius="10"></u--image>
<view class="good_title u-line-2">
{{item.name}}
<view class=" coreshop-margin-bottom-10 coreshop-margin-top-10" v-if="count">
<custom-waterfalls-flow :value="coreshopdata.parameters.list" :column="coreshopdata.parameters.column" @wapperClick="wapperClick" @imageClick="imageClick">
<!-- #ifdef MP-WEIXIN -->
<view class="goods" v-for="(item,index) in coreshopdata.parameters.list" :key="index" slot="slot{{index}}">
<view class="coreshop-padding-top-6 coreshop-padding-bottom-3 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
<view class="coreshop-multiple-line-clamp">
<text class="coreshop-font-14">{{item.name}}</text>
</view>
<view class="good-price coreshop-display-block">
{{item.price}} <span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-5 coreshop-text-gray">{{item.mktprice}}</span>
<view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center coreshop-margin-bottom-5">
<view class="coreshop-text-red coreshop-font-weight-bold">
<text class="coreshop-font-12">¥</text>
<text class="coreshop-font-16">{{item.price}}</text>
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-6 coreshop-text-gray" v-if="coreshopdata.parameters.column==2">{{item.mktprice}}</span>
</view>
<view>
<text class="coreshop-font-10 coreshop-text-gray">{{item.buyCount+'人付款'}}</text>
</view>
</view>
<view class="good-tag-recommend" v-if="item.isRecommend">
推荐
</view>
<view class="good-tag-hot" v-if="item.isHot">
热门
</view>
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
<view class="coreshop-flex coreshop-font-11 coreshop-margin-top-10 coreshop-padding-top-10 coreshop-solid-top coreshop-margin-bottom-5" :class="coreshopdata.parameters.column>2?'coreshop-flex-direction-column':'coreshop-flex-direction-row'" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
<view>
{{ pointShowName}}兑换价:
</view>
<view class="coreshop-text-red">
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ item.price - item.pointsDeduction}}
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ $common.formatMoney(item.price - item.pointsDeduction, 2, '')}}
</view>
</view>
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5 coreshop-margin-bottom-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
<view>
购买赠送:
</view>
@@ -40,28 +41,50 @@
</view>
</view>
</view>
</u-grid-item>
</u-grid>
</view>
<view v-else-if="!count && !coreshopdata.parameters.listAjax">
<u-grid col="3" border="false" align="left">
<u-grid-item :custom-style="{padding: '0px'}" v-for="item in 3" :key="item">
<view class="good_box">
<view class="good_title u-line-2">
</view>
<view class="good-price">
0
</view>
<view class="good-tag-recommend">
推荐
</view>
<view class="good-tag-hot">
热门
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<template v-slot:default="item">
<view class="goods">
<view class="coreshop-padding-top-6 coreshop-padding-bottom-3 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
<view class="coreshop-multiple-line-clamp">
<text class="coreshop-font-14">{{item.name}}</text>
</view>
<view class="coreshop-margin-top-8 coreshop-flex coreshop-justify-between coreshop-align-center coreshop-margin-bottom-5">
<view class="coreshop-text-red coreshop-font-weight-bold">
<text class="coreshop-font-12">¥</text>
<text class="coreshop-font-16">{{item.price}}</text>
<span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-6 coreshop-text-gray" v-if="coreshopdata.parameters.column==2">{{item.mktprice}}</span>
</view>
<view>
<text class="coreshop-font-10 coreshop-text-gray">{{item.buyCount+'人付款'}}</text>
</view>
</view>
<view class="coreshop-flex coreshop-font-11 coreshop-margin-top-10 coreshop-padding-top-10 coreshop-solid-top coreshop-margin-bottom-5" :class="coreshopdata.parameters.column>2?'coreshop-flex-direction-column':'coreshop-flex-direction-row'" v-if="pointSwitch==1 && pointExchangeModel==2 && pointShowExchangePrice==1 && item.pointsDeduction > 0">
<view>
{{ pointShowName}}兑换价:
</view>
<view class="coreshop-text-red">
{{pointDiscountedProportion * item.pointsDeduction }}{{ pointShowName}}+{{ $common.formatMoney(item.price - item.pointsDeduction, 2, '')}}
</view>
</view>
<view class="coreshop-flex coreshop-flex-direction-row coreshop-font-11 coreshop-margin-top-5 coreshop-margin-bottom-5" v-if="pointSwitch==1 && pointGetModel==2 && pointShowPoint==1 && item.points > 0">
<view>
购买赠送:
</view>
<view class="coreshop-text-red">
{{item.points}}{{ pointShowName}}
</view>
</view>
</view>
</view>
</u-grid-item>
</u-grid>
</template>
<!-- #endif -->
</custom-waterfalls-flow>
</view>
<view v-else-if="!count && !coreshopdata.parameters.listAjax">
</view>
</view>
@@ -211,7 +234,13 @@
methods: {
change(e) {
this.current = e.detail.current;
}
},
wapperClick(item) {
this.goGoodsDetail(item.id)
},
imageClick(item) {
this.goGoodsDetail(item.id)
},
},
created() {
this.count = this.coreshopdata.parameters.list.length > 0;

View File

@@ -159,7 +159,14 @@
"path": "details/details",
"style": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "万能表单"
"navigationBarTitleText": "表单详情"
}
},
{
"path": "list/list",
"style": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "表单列表"
}
}
]

View File

@@ -154,6 +154,9 @@
<u-album :urls="item.imagesArr" rowCount="4"></u-album>
</view>
<view class="coreshop-text-gray coreshop-margin-top-5 coreshop-font-12">{{ item.createTime || ''}} {{ item.addon || ''}}</view>
<view class="coreshop-bg-gray coreshop-padding-10 coreshop-border-radius-tr-16 coreshop-margin-top-10" v-if="item.sellerContent">
商家回复{{item.sellerContent}}
</view>
</view>
</view>
</view>

View File

@@ -244,6 +244,9 @@
<u-album :urls="item.imagesArr" rowCount="4"></u-album>
</view>
<view class="coreshop-text-gray coreshop-margin-top-5 coreshop-font-12">{{ item.createTime || ''}} {{ item.addon || ''}}</view>
<view class="coreshop-bg-gray coreshop-padding-10 coreshop-border-radius-tr-16 coreshop-margin-top-10" v-if="item.sellerContent">
商家回复{{item.sellerContent}}
</view>
</view>
</view>
</view>

View File

@@ -155,6 +155,9 @@
<u-album :urls="item.imagesArr" rowCount="4"></u-album>
</view>
<view class="coreshop-text-gray coreshop-margin-top-5 coreshop-font-12">{{ item.createTime || ''}} {{ item.addon || ''}}</view>
<view class="coreshop-bg-gray coreshop-padding-10 coreshop-border-radius-tr-16 coreshop-margin-top-10" v-if="item.sellerContent">
商家回复{{item.sellerContent}}
</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,110 @@
<template>
<view>
<u-toast ref="uToast" /><u-no-network></u-no-network>
<u-navbar title="万能表单" safeAreaInsetTop fixed placeholder>
<view class="coreshop-navbar-left-slot" slot="left">
<u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
<u-icon name="home" size="22" @click="goHome"></u-icon>
</view>
<view slot="right">
</view>
</u-navbar>
<block v-if="list.length > 0">
<view class="coreshop-bg-white coreshop-margin-10">
<view class="coreshop-flex coreshop-solid-bottom coreshop-justify-between coreshop-flex-nowrap coreshop-padding-top-10 coreshop-padding-bottom-10 coreshop-padding-left-10 coreshop-padding-right-10" v-for="item in list" :key="item.id" @click="goDetail(item.id)">
<view class="coreshop-flex coreshop-flex-nowrap">
<u--image width="25px" height="25px" :src="item.image" mode="aspectFill" :showLoading="true"></u--image>
<view class="u-line-2 coreshop-padding-left-5 coreshop-font-14">{{item.name}}</view>
</view>
<view class="coreshop-text-gray coreshop-text-right coreshop-justify-end">
<u-icon name="arrow-right-double"></u-icon>
</view>
</view>
</view>
<view>
<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" margin-top="0" margin-bottom="20" class="coreshop-padding-top-10" />
</view>
</block>
<!-- 无数据时默认显示 -->
<view class="coreshop-emptybox" v-else>
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/data.png'" icon-size="150" text="暂无数据" mode="list"></u-empty>
</view>
<!-- 登录提示 -->
<coreshop-login-modal></coreshop-login-modal>
</view>
</template>
<script>
export default {
data() {
return {
page: 1,
limit: 10,
list: [],
status: 'loadmore',
iconType: 'flower',
loadText: {
loadmore: '轻轻上拉',
loading: '努力加载中',
nomore: '实在没有了'
},
};
},
onLoad(options) {
this.getFormList();
},
onReachBottom() {
if (this.status === 'loadmore') {
this.getFormList();
}
},
methods: {
getFormList() {
let data = {
page: this.page,
limit: this.limit,
};
this.status = 'loading';
this.$u.api.getFormList(data).then(res => {
if (res.status) {
if (res.data.length > 0) {
const _list = res.data;
for (var i = 0; i < _list.length; i++) {
if (_list[i].images) {
_list[i].image = _list[i].images.split(',')[0];
}
}
this.list = [...this.list, ..._list];
if (res.data.count > this.list.length) {
this.status = 'loadmore';
this.page++;
} else {
// 数据已加载完毕
this.status = 'nomore';
}
} else {
// 数据已加载完毕
this.status = 'nomore';
}
} else {
// 接口请求出错了
this.$u.toast(res.msg);
}
});
},
goDetail(id) {
this.$u.route('/pages/form/details/details', { id: id });
}
}
};
</script>
<style lang="scss" scoped>
</style>

View File

@@ -30,7 +30,10 @@
<view class="coreshop-margin-top-10">
<u-album :urls="item.imagesArr" rowCount="4"></u-album>
</view>
<view class="coreshop-text-gray coreshop-margin-top-10 coreshop-font-12">{{ item.createTime || ''}} {{ item.addon || ''}}</view>
<view class="coreshop-text-gray coreshop-margin-top-5 coreshop-font-12">{{ item.createTime || ''}} {{ item.addon || ''}}</view>
<view class="coreshop-bg-gray coreshop-padding-10 coreshop-border-radius-tr-16 coreshop-margin-top-10" v-if="item.sellerContent">
商家回复{{item.sellerContent}}
</view>
</view>
</view>
</view>

View File

@@ -165,6 +165,9 @@
<u-album :urls="item.imagesArr" rowCount="4"></u-album>
</view>
<view class="coreshop-text-gray coreshop-margin-top-5 coreshop-font-12">{{ item.createTime || ''}} {{ item.addon || ''}}</view>
<view class="coreshop-bg-gray coreshop-padding-10 coreshop-border-radius-tr-16 coreshop-margin-top-10" v-if="item.sellerContent">
商家回复{{item.sellerContent}}
</view>
</view>
</view>
</view>

View File

@@ -361,6 +361,12 @@
router: '/pages/activity/checkIn/checkIn/checkIn',
showItem: false
},
customForm: {
name: '万能表单',
icon: 'file-text',
router: '/pages/form/list/list',
showItem: false
},
},
other: {
invite: {
@@ -499,9 +505,10 @@
_this.vas.solitaire.showItem = _this.config.showSolitaire == 1;
//签到
_this.vas.calendar.showItem = _this.config.showCalendar == 1;
//自定义表单
_this.vas.customForm.showItem = _this.config.showCustomForm == 1;
//显示我的发票
_this.utilityMenus.myInvoice.showItem = _this.config.invoiceSwitch == 1;
//获取用户信息
_this.getUserInfo();
},

View File

@@ -1,7 +1,7 @@
<template>
<view>
<u-toast ref="uToast" /><u-no-network></u-no-network>
<u-navbar title="我的积分" safeAreaInsetTop fixed placeholder>
<u-navbar :title="'我的'+pointShowName" safeAreaInsetTop fixed placeholder>
<view class="coreshop-navbar-left-slot" slot="left">
<u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
@@ -30,7 +30,7 @@
<!--<image class="log-img" :src="item.buyer.avatar" mode=""></image>-->
<view class="coreshop-flex coreshop-flex-direction coreshop-align-start">
<view class="log-name coreshop-text-black">{{ item.typeName }}</view>
<view class="log-notice coreshop-text-grey">{{ item.remarks }}</view>
<view class="log-notice coreshop-text-grey">{{ item.remarks.replace(/积分/,pointShowName) }}</view>
</view>
</view>
<view class="item-right coreshop-flex coreshop-flex-direction coreshop-align-end">

View File

@@ -12,11 +12,11 @@
</u-navbar>
<view class="coreshop-bg-white coreshop-solid-top coreshop-padding-left-40 coreshop-padding-right-40 coreshop-padding-top-20 coreshop-padding-bottom-20 coreshop-margin-bottom-10">
<view class="coreshop-text-center coreshop-margin-bottom-10">
<text class="coreshop-text-black">完成</text>
<text class="coreshop-text-orange coreshop-font-40">100%</text>
<text class="coreshop-text-black">加油</text>
<text class="coreshop-text-orange coreshop-font-40">{{percentage}}%</text>
<text class="coreshop-text-black">太棒啦</text>
</view>
<u-line-progress percentage="100" activeColor="#5FB878"></u-line-progress>
<u-line-progress :percentage="percentage" activeColor="#5FB878"></u-line-progress>
</view>
<view class="coreshop-list menu coreshop-bg-white coreshop-padding-15">
<u--form :model="model" :rules="rules" ref="uForm" errorType="message" labelPosition="left" labelWidth="80">
@@ -110,7 +110,9 @@
],
},
index: 2,
submitStatus: false
submitStatus: false,
percentage: 0,
}
},
// 必须要在onReady生命周期因为onLoad生命周期组件可能尚未创建完毕
@@ -211,6 +213,19 @@
_this.model.nickname = res.data.nickName;
_this.model.mobile = res.data.mobile;
if (res.data.birthday) {
_this.percentage += 25;
}
if (res.data.nickName) {
_this.percentage += 25;
}
if (res.data.mobile) {
_this.percentage += 25;
}
if (res.data.avatarImage) {
_this.percentage += 25;
}
if (res.data.sex && res.data.sex == 0) {
_this.model.sex = _this.actionSheetList[2].name;
} else {

View File

@@ -61,7 +61,7 @@
limit: 30,
}
},
onShow() {
onLoad() {
this.getStoreList();
},
methods: {

View File

@@ -144,6 +144,13 @@
<input type="radio" lay-filter="showCalendar" name="showCalendar" value="2" title="不开启" {{d.data.configs['showCalendar']['sValue']==="2" ? 'checked':''}}>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">{{d.data.configs['showCustomForm']['sKey']}}</label>
<div class="layui-input-inline layui-inline-7">
<input type="radio" lay-filter="showCustomForm" name="showCustomForm" value="1" title="开启" {{d.data.configs['showCustomForm']['sValue']==="1" ? 'checked':''}}>
<input type="radio" lay-filter="showCustomForm" name="showCustomForm" value="2" title="不开启" {{d.data.configs['showCustomForm']['sValue']==="2" ? 'checked':''}}>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">&nbsp;</label>
<div class="layui-input-block">

View File

@@ -109,7 +109,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
var showGroupBuying = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowGroupBuying).ObjectToInt(2); //显示团购按钮
var showSolitaire = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowSolitaire).ObjectToInt(2); //显示接龙按钮
var showCalendar = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowCalendar).ObjectToInt(2); //显示签到按钮
var showIndexPopupWindow = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowIndexPopupWindow).ObjectToInt(2); //显示签到按钮
var showIndexPopupWindow = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowIndexPopupWindow).ObjectToInt(2); //显示首页弹窗
var showCustomForm = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShowCustomForm).ObjectToInt(2); //显示自定义表单按钮
var imageMax = 5; //前端上传图片最多几张
var storeSwitch = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.StoreSwitch).ObjectToInt(); //开启门店自提状态
@@ -241,7 +242,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
showGroupBuying,
showSolitaire,
showCalendar,
showIndexPopupWindow
showIndexPopupWindow,
showCustomForm
};
jm.data = model;
return jm;

View File

@@ -42,6 +42,26 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
#region
/// <summary>
/// 获取表单列表
/// </summary>
/// <returns></returns>
[HttpPost]
public async Task<WebApiCallBack> GetList([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
var list = await _formServices.QueryPageAsync(p => p.endDateTime >= DateTime.Now, p => p.sort, OrderByType.Desc, entity.page, entity.limit);
jm.status = true;
jm.data = list;
return jm;
}
#endregion
#region /=============================================================================
/// <summary>
/// 万能表单/获取活动商品详情
@@ -56,7 +76,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
#endregion
#region /=============================================================================
/// <summary>
/// 万能表单/提交表单

View File

@@ -842,7 +842,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
//收藏
var collectionCount = await _goodsCollectionServices.GetCountAsync(p => p.userId == user.id);
if (user.sex != (int)GlobalEnumVars.UserSexTypes. || user.sex != (int)GlobalEnumVars.UserSexTypes. || user.sex != (int)GlobalEnumVars.UserSexTypes.)
if (user.sex != (int)GlobalEnumVars.UserSexTypes. && user.sex != (int)GlobalEnumVars.UserSexTypes. && user.sex != (int)GlobalEnumVars.UserSexTypes.)
{
user.sex = (int)GlobalEnumVars.UserSexTypes.;
}