Commit 9545ae6c by 谢中龙

我的支付券

parent ffb14807
......@@ -76,6 +76,7 @@ const prod_brand_config = {
canRefundDaysAfterDelivery : 15,//发货后多少天之内可显示申请退款按钮
isNeedGetLocation : true,//是否开启小程序获取位置(提交订单时获取门店信息)
guiderCanScanQrcode : true,//导购是否有扫一扫功能
hasKeFu : true,//是否有客服功能
shareTitle: '【舞象星品荟-社交商城】',
logo: 'https://img3.bigaka.com/prd/3001/202003/20200331/3001842823fb-2601-4b58-a648-79ad799ad425.png',
openRefundTips : true,//是否开启退货须知显示
......@@ -94,6 +95,7 @@ const prod_brand_config = {
contactUsPluginId: 'a6ea55b56eb09ced8f9aeeaa14383b52',
hasTrial: false,
isMall: isMall,
hasKeFu : false,//是否有客服功能
hasLiveVideo: true,//是否有直播功能
orderingMustOpenCard: true,
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
......@@ -112,12 +114,14 @@ const prod_brand_config = {
tunnelToken: '1ea3f0c0dd0c91ee54e546a99beafbfb',
brandId: 2007,
plusIsOpen: false,
hasKeFu : false,//是否有客服功能
contactUsIsOpen: true,
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
canUseWechatAddress: false,//是否使用获取微信地址
contactUsPluginId: '78353bb39251a60b473f3d4ae81b1c39',
hasTrial: false,
isMall: isMall,
hasKeFu : false,//是否有客服功能
hasLiveVideo: true,//是否有直播功能
orderingMustOpenCard: true,
canRefundDaysAfterDelivery: 15,//发货后多少天之内可显示申请退款按钮
......@@ -135,6 +139,7 @@ const prod_brand_config = {
tunnelToken: 'd93a5def7511da3d0f2d171d9c344e91',
brandId: 2008,
plusIsOpen: false,
hasKeFu : false,//是否有客服功能
contactUsIsOpen: false,
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
canUseWechatAddress: false,//是否使用获取微信地址
......@@ -160,6 +165,7 @@ const prod_brand_config = {
plusIsOpen: false,
contactUsIsOpen: false,
contactUsPluginId: '',
hasKeFu : false,//是否有客服功能
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
canUseWechatAddress: false,//是否使用获取微信地址
hasTrial: false,
......@@ -184,6 +190,7 @@ const prod_brand_config = {
contactUsIsOpen: false,//是否开启联系我
contactUsPluginId: '',//联系我们插件PluginID
hasTrial: false,// 是否有体验账号
hasKeFu : false,//是否有客服功能
hasLiveVideo: false,//是否有直播功能
canUseWechatAddress: false,//是否使用获取微信地址
isMall: isMall,// 商城或门户 true 商城 false 门户
......@@ -205,6 +212,7 @@ const prod_brand_config = {
brandId: 2010,
plusIsOpen: false,
contactUsIsOpen: false,
hasKeFu : false,//是否有客服功能
contactUsPluginId: 'f86b306023ec790b70c0b45fcf308b04',
hasTrial: false,
isMall: isMall,
......@@ -227,6 +235,7 @@ const prod_brand_config = {
tunnelToken: '6293879e905cd6504386f5bbc8c61926',
brandId: 2012,
plusIsOpen: false,
hasKeFu : false,//是否有客服功能
contactUsIsOpen: true,
canUseWechatAddress: false,//是否使用获取微信地址
contactUsPluginId: '6d310b33ba27c784fb6872942a57711d',
......@@ -253,6 +262,7 @@ const prod_brand_config = {
contactUsIsOpen: true,
contactUsPluginId: '',
hasTrial: false,
hasKeFu : false,//是否有客服功能
hasLiveVideo: false,//是否有直播功能
isMall: isMall,
canUseWechatAddress: false,//是否使用获取微信地址
......@@ -274,6 +284,7 @@ const prod_brand_config = {
brandId: 2014,
plusIsOpen: false,
contactUsIsOpen: true,
hasKeFu : false,//是否有客服功能
contactUsPluginId: '',
hasLiveVideo: false,//是否有直播功能
hasTrial: false,
......@@ -297,6 +308,7 @@ const prod_brand_config = {
brandId: 2015,
plusIsOpen: false,
contactUsIsOpen: false,
hasKeFu : false,//是否有客服功能
contactUsPluginId: '',
hasTrial: false,
isMall: isMall,
......@@ -321,6 +333,7 @@ const prod_brand_config = {
plusIsOpen: false,
contactUsIsOpen: true,
contactUsPluginId: '',
hasKeFu : false,//是否有客服功能
hasTrial: false,
isMall: isMall,
hasLiveVideo: false,//是否有直播功能
......@@ -346,6 +359,7 @@ const prod_brand_config = {
contactUsPluginId: 'fbe3bb6f88e7331ca719713910c164a2',//联系我插件
hasLiveVideo: false,//是否有直播功能
hasTrial: false,
hasKeFu : false,//是否有客服功能
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
isMall: isMall,
......@@ -369,6 +383,7 @@ const prod_brand_config = {
contactUsPluginId: '50934d036dc2051758f4d934d7100b78',
hasTrial: false,
isMall: isMall,
hasKeFu : false,//是否有客服功能
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
orderingMustOpenCard: true,
......@@ -391,6 +406,7 @@ const prod_brand_config = {
contactUsIsOpen: false,
contactUsPluginId: '',
hasTrial: true,
hasKeFu : false,//是否有客服功能
isMall: isMall,
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
......@@ -417,6 +433,7 @@ const prod_brand_config = {
contactUsIsOpen: false,
contactUsPluginId: '',
hasTrial: false,
hasKeFu : false,//是否有客服功能
isMall: isMall,
canUseWechatAddress: false,//是否使用获取微信地址
touchPointStorageTime: 30 * 60 * 1000,//单位毫秒
......@@ -531,6 +548,7 @@ let canRefundDaysAfterDelivery = PROJECT_ENV == 'prod' ? prod_brand_config[BRANC
let touchPointStorageTime = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].touchPointStorageTime : 1800000;
let openRefundTips = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].openRefundTips : true;
let refundTips = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].refundTips : '温馨提示:退货通过审核后需将清单随包裹一起寄回或纸条备注(订单号与退货商品款号)【请务必审核通过后24小时内填写寄回运单号,拒签到付/顺丰/EMS/天天快递 不影响二次销售】';
let hasKeFu = PROJECT_ENV == 'prod' ? prod_brand_config[BRANCH_ID].hasKeFu : true;
//配置信息导出
const envInfo = (() => {
return {
......@@ -558,6 +576,7 @@ const envInfo = (() => {
touchPointStorageTime: touchPointStorageTime,
openRefundTips : openRefundTips,
refundTips : refundTips,
hasKeFu : hasKeFu,
}
})()
......
......@@ -11,7 +11,8 @@ wxService.page({
data: {
couponDetail:{},
cardno: '',
couponType : '',
couponType : 'default',
payCouponInfo : {},
},
/**
......@@ -20,10 +21,11 @@ wxService.page({
onShow () {
},
onLoad(options) {
wx.hideShareMenu();
const {cardno,type} = options
this.data.couponType = type;
this.data.couponType = type ? type : 'coupon';
this.getCouponDetail(cardno,type)
this.setData({
......@@ -31,7 +33,10 @@ wxService.page({
couponType : type,
});
},
//页面卸载
onUnload(){
wx.removeStorageSync('payCoupon');
},
// 卡券详情
getCouponDetail(id,type){
wx.showLoading({
......@@ -52,7 +57,15 @@ wxService.page({
},
//获取支付券详情
getPayCardInfo(id){
let payCouponInfo = wx.getStorageSync('payCoupon');
if(payCouponInfo){
this.data.payCouponInfo = payCouponInfo;
let notice = payCouponInfo.detailInfo.detailInfo ? JSON.parse(payCouponInfo.detailInfo.detailInfo): [];
payCouponInfo.notice = notice;
this.setData({
payCouponInfo : this.data.payCouponInfo
});
}
},
//获取包邮券详情
getPostalVoucherInfo(id){
......
<!--pages/couponDetail/couponDetail.wxml-->
<view class='page-integral-detail'>
<!-- 普通优惠券 -->
<view class='page-integral-detail' wx:if="{{couponType == 'coupon'}}">
<view class='coupon-wrap'>
<view class='coupon-list'>
<image class='coupon-bg'
......@@ -29,6 +30,35 @@
<!--<button type='primary' class="redeem-now" bindtap="handelPresentCouponCode">出示券码</button>-->
</view>
</view>
<!-- 支付券 -->
<view class='page-integral-detail' wx:if="{{couponType == 1}}">
<view class='coupon-wrap'>
<view class='coupon-list'>
<image class='coupon-bg'
src='https://img3.bigaka.com/prd/3001/202003/20200309/300109875abd-15b0-4de3-9673-18d2d1ee4e20.png' />
<view class='coupon-img'>
<image wx:if="{{payCouponInfo.indexImgUrl}}" src='{{payCouponInfo.indexImgUrl}}' mode="aspectFit"/>
<image wx:else src='https://img3.bigaka.com/prd/3001/202003/20200309/30018086c13a-4579-47ed-a16e-c74cb8010c1d.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{payCouponInfo.coupon_name}}</view>
<view class='coupon-desc fs-28'>{{payCouponInfo.startTime}} 至 {{payCouponInfo.endTime}}</view>
</view>
<view class='coupon-code fs-24' bindtap="handelPresentCouponCode" wx:if="{{!couponType}}">出示券码</view>
<view class='coupon-code fs-24' wx:if="{{couponType == 1}}">支付券</view>
<view class='coupon-code fs-24' wx:if="{{couponType == 2}}">包邮券</view>
</view>
<view class='integral-detail'>
<view class='integral-list' wx:for="{{payCouponInfo.notice}}" wx:key="*this">
<text class='integral-title'>{{item.label}}</text>
<text class='integral-desc wpl'>{{item.value}}</text>
</view>
</view>
</view>
</view>
<!--goHome-->
<go-home/>
<floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/>
......
......@@ -40,7 +40,7 @@ wxService.page({
this.getCouponList(1,10,1)
}else if( current == 1){
//微信支付券
this.getPayCouponList();
}
else if(current == 2){
//包邮券
......@@ -59,11 +59,14 @@ wxService.page({
onShow () {
// 可使用 已失效
this.getCouponList(1,10,1);
//获取支付券
this.getPayCouponList();
},
//跳转到卡券详情
handelPresentCouponDetail(e) {
let {cardno,type} = e.currentTarget.dataset
let {cardno,type,item} = e.currentTarget.dataset
if(type){
wx.setStorageSync('payCoupon', item);
wxService.router(`/pages/couponDetail/couponDetail`).search({cardno:cardno,type:type});
}
else{
......@@ -91,11 +94,9 @@ wxService.page({
if(!res) return false
const {result,data} = res.data
if(result == 0){
console.log(res)
wx.hideLoading()
// 处理时间显示
if(!data.content) return false
data.content.forEach(item=> {
item.startTime = item.startTime.substring(0,10)
item.endTime = item.endTime.substring(0,10)
......@@ -110,6 +111,26 @@ wxService.page({
wx.hideLoading();
})
},
//获取支付券列表
getPayCouponList(){
wxService.get(`/coupon/wechatCoupon/queryCouponList`).then(res => {
if(res){
let list = res.data.data ? res.data.data.arr : [];
this.data.payCouponList = list;
list.forEach(item => {
let detailInfo = item.detailInfo ? item.detailInfo : null;
if(detailInfo){
item.indexImgUrl = detailInfo.indexImgUrl;
item.couponName = detailInfo.couponName;
}
});
this.setData({
payCouponList : this.data.payCouponList
});
}
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
......
......@@ -64,16 +64,17 @@
data-cardNo="{{item.cardNo}}"
data-id="{{item.couponId}}"
data-type="1"
data-item="{{item}}"
bindtap="handelPresentCouponDetail"
>
<image class='coupon-bg'
src='https://img3.bigaka.com/prd/3001/202003/20200309/300109875abd-15b0-4de3-9673-18d2d1ee4e20.png' />
<view class='coupon-img'>
<image wx:if="{{item.takeCouponBgimg}}" class='coupon-bg' src='{{item.takeCouponBgimg}}' />
<image wx:else src='https://img3.bigaka.com/prd/3001/202003/20200309/30018086c13a-4579-47ed-a16e-c74cb8010c1d.png' />
<image wx:if="{{item.indexImgUrl}}" class='coupon-bg' src='{{item.indexImgUrl}}' mode="aspectFit"/>
<image wx:else src='https://img3.bigaka.com/prd/3001/202003/20200309/30018086c13a-4579-47ed-a16e-c74cb8010c1d.png' mode="aspectFit"/>
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-name fs-28'>{{item.coupon_name}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
......
......@@ -128,42 +128,28 @@
<view>首页</view>
</navigator>-->
<view bindtap="handelToHome" class='get-formId--btn footer-icon'>
<image src="/assets/imgs/7_1_0/home_un.png" mode="widthFix" />
<image src="/assets/imgs/7_1_0/home_un-red.png" mode="widthFix" />
<view>首页</view>
</view>
</form>
<form
class='get-formId'
bindsubmit="nav"
report-submit
name='nav'
>
<navigator class='get-formId--btn footer-icon' open-type="navigate" url="/pages/cart/cart">
<image class="contact-share-img" src="/assets/imgs/7_1_0/cart_un.png" />
<form class='get-formId' bindsubmit="nav" report-submit name='nav'>
<navigator class='get-formId--btn footer-icon' open-type="navigate" style="opacity:1;" url="/pages/cart/cart">
<image class="contact-share-img" src="/assets/imgs/7_1_0/cart_un-red.png" />
<view class="add-car-text">购物车</view>
</navigator>
</form>
<!-- <form
class='get-formId'
bindsubmit="nav"
report-submit
name='home'
>
<navigator class="get-formId--btn footer-icon">
<image src="https://hwimagecdn.ihotwind.cn/hotwind-mini/images/hotnewicon/bottom-kefu.png" mode="widthFix" />
<view class="tab-text">分享</view>
</navigator>
</form> -->
<form class='get-formId' bindsubmit="nav" report-submit name='home' wx:if="{{hasKeFu}}">
<button class="get-formId--btn footer-icon" open-type="contact" session-from="udesk|{{udesk.nick_name}}|{{udesk.avatar}}"
send-message-title="{{productInfo.productName}}" show-message-card="true" send-message-img="{{productInfo.indexUrl}}">
<image src="/assets/imgs/7_1_0/bottom-kefu-red.png" mode="widthFix"></image>
<view class="tab-text">客服</view>
</button>
</form>
</view>
<block>
<view class="footer-buttons clearfix">
<block>
<form
class='get-formId get-formId--form'
bindsubmit="addCart"
report-submit
name='nav'
>
<form class='get-formId get-formId--form' bindsubmit="addCart" report-submit name='nav'>
<button disabled="{{fromZc || productInfo.productStatus != 2}}"
class="cart-button get-formId--btn {{(fromZc || productInfo.productStatus != 2) ? 'btn-default' : 'btn-cart'}}" formType="submit">加入购物车</button>
</form>
......
......@@ -613,6 +613,7 @@ class WXService extends Http {
config.data.canRefundDaysAfterDelivery = envInfo.canRefundDaysAfterDelivery;
config.data.openRefundTips = envInfo.openRefundTips;
config.data.refundTips = envInfo.refundTips;
config.data.hasKeFu = envInfo.hasKeFu;
//默认
config.data.loading = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment