Commit 7ef7e73e by 谢中龙

优化部分功能

parent 2688d89e
...@@ -108,7 +108,7 @@ const prod_brand_config = { ...@@ -108,7 +108,7 @@ const prod_brand_config = {
plusIsOpen: true, //是否开启plus plusIsOpen: true, //是否开启plus
contactUsIsOpen: true,//是否开启联系我 contactUsIsOpen: true,//是否开启联系我
contactUsPluginId: '766c50920993bf9c41c6c3d2761a2df5',//联系我们插件PluginID contactUsPluginId: '766c50920993bf9c41c6c3d2761a2df5',//联系我们插件PluginID
hasTrial: true, // 是否有体验账号 hasTrial: false, // 是否有体验账号
isMall: isMall,// 商城或门户 true 商城 false 门户 isMall: isMall,// 商城或门户 true 商城 false 门户
orderingMustOpenCard : false, //下单是否必须卡开 orderingMustOpenCard : false, //下单是否必须卡开
}, },
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
buttonStyle="light" buttonStyle="light"
buttonText="0" buttonText="0"
bubbleColor="cb3c3c" bubbleColor="cb3c3c"
bind:completemessage="completemessage" bind:completemessage="completemessage"
plugid='{{contactUsPluginId}}' /> plugid='{{contactUsPluginId}}' />
<!-- 766c50920993bf9c41c6c3d2761a2df5 --> <!-- 766c50920993bf9c41c6c3d2761a2df5 -->
<!-- 泰华 a6ea55b56eb09ced8f9aeeaa14383b52 --> <!-- 泰华 a6ea55b56eb09ced8f9aeeaa14383b52 -->
......
...@@ -9,6 +9,22 @@ page{ ...@@ -9,6 +9,22 @@ page{
top: 76%; top: 76%;
z-index: 2; z-index: 2;
} }
/* .cell--bubble{
width:40px !important;
height:40px !important;
border-radius:24px;
text-align:center;
line-height:40px !important;
display:inline-block;
background-color: rgba(0, 0, 0, 0.5) !important;
}
.cell--light_without_border{
width:16px !important;
height:14px !important;
} */
.bottom-fixed{ .bottom-fixed{
padding-bottom: 40rpx; padding-bottom: 40rpx;
} }
......
...@@ -11,7 +11,8 @@ wxService.page({ ...@@ -11,7 +11,8 @@ wxService.page({
couponId : '', couponId : '',
paramIsError : false, paramIsError : false,
useStoreId : '', useStoreId : '',
couponInfo : {} couponInfo : {},
subStoreData : []
}, },
/** /**
...@@ -38,9 +39,9 @@ wxService.page({ ...@@ -38,9 +39,9 @@ wxService.page({
//获取当前登录用户的storeId //获取当前登录用户的storeId
getCurrentStoreId(){ getCurrentStoreId(){
//获取当前登录用户的storeid //获取当前登录用户的storeid
let member = wx.getStorageSync('_baseUserInfo') ? wx.getStorageSync('_baseUserInfo') : null; let member = wx.getStorageSync('guidBaseInfo') ? wx.getStorageSync('guidBaseInfo') : null;
if (member) { if (member) {
this.data.useStoreId = member.member.storeId; this.data.useStoreId = member.shoppingGuideStoreId;
} else { } else {
this.setData({ this.setData({
paramIsError: true paramIsError: true
...@@ -69,8 +70,16 @@ wxService.page({ ...@@ -69,8 +70,16 @@ wxService.page({
this.data.couponInfo.notice = this.data.couponInfo.notice.filter(item => item.type != 1); this.data.couponInfo.notice = this.data.couponInfo.notice.filter(item => item.type != 1);
} }
let subStoreData = [];
if (this.data.couponInfo.couponDetail){
subStoreData = this.data.couponInfo.couponDetail.useCondition ? this.data.couponInfo.couponDetail.useCondition.subStoreData : [];
}
this.data.subStoreData = subStoreData;
this.setData({ this.setData({
couponInfo: this.data.couponInfo couponInfo: this.data.couponInfo,
subStoreData: this.data.subStoreData
}); });
} }
}).finally(() => { }).finally(() => {
...@@ -94,6 +103,14 @@ wxService.page({ ...@@ -94,6 +103,14 @@ wxService.page({
//核销优惠券 //核销优惠券
writeOffCoupon(){ writeOffCoupon(){
if (!this.data.useStoreId){
wx.showToast({
title: '未获取到导购门店信息',
icon : 'none'
});
return ;
}
wx.showLoading({ wx.showLoading({
title: '核销中..', title: '核销中..',
}); });
......
...@@ -28,6 +28,14 @@ ...@@ -28,6 +28,14 @@
<view class='rg-desc'>{{item.value}}</view> <view class='rg-desc'>{{item.value}}</view>
</view> </view>
</view> </view>
<!-- 适用门店 -->
<view class='use-stores' wx:if="{{subStoreData.length > 0}}">
<view class='use-store-title'>适用门店</view>
<view class='store-item' wx:for="{{subStoreData}}" wx:for-index="idx" wx:for-item="item" wx:key="{{idx}}">
<view>{{item.name}}</view>
<view class='store-code'>{{item.code}}</view>
</view>
</view>
</view> </view>
<!-- 核销按钮 --> <!-- 核销按钮 -->
<view class='off'> <view class='off'>
......
...@@ -234,4 +234,33 @@ view{ ...@@ -234,4 +234,33 @@ view{
.comfirm .confirm-body .c-bottom view:active{ .comfirm .confirm-body .c-bottom view:active{
opacity: 0.7; opacity: 0.7;
}
.use-stores{
background: #ffffff;
margin-top: 10rpx;
padding: 20rpx;
}
.use-stores .use-store-title{
font-size: 28rpx;
color: #333333;
font-weight: bold;
}
.use-stores .store-item{
padding: 20rpx 0;
border-bottom: solid 2rpx #eeeeee;
color: #333333;
font-size: 24rpx;
}
.use-stores .store-item .store-code{
font-size: 22rpx;
color: #999999;
margin-top: 5rpx;
}
.use-stores .store-item:last-child{
border-bottom: none;
} }
\ No newline at end of file
...@@ -53,6 +53,7 @@ wxService.page({ ...@@ -53,6 +53,7 @@ wxService.page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log('guidBaseInfo----', wx.getStorageSync('guidBaseInfo'))
this.getCouponList(); this.getCouponList();
this.getGoodsList(); this.getGoodsList();
}, },
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image> <image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'> <view class='goods-rg-info'>
<view class='goods-title'>{{item.productName}}</view> <view class='goods-title'>{{item.productName}}</view>
<view class='goods-second-title'>这个是说明</view> <!-- <view class='goods-second-title'>这个是说明</view> -->
<view class='goods-price'> <view class='goods-price'>
<view class='price'> <view class='price'>
<view class='plus'> <view class='plus'>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image> <image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'> <view class='goods-rg-info'>
<view class='goods-title'>{{item.productName}}</view> <view class='goods-title'>{{item.productName}}</view>
<view class='goods-second-title'>这个是商品的描述</view> <!-- <view class='goods-second-title'>这个是商品的描述</view> -->
<view class='goods-price'> <view class='goods-price'>
<view class='price'> <view class='price'>
<view class='plus'> <view class='plus'>
......
...@@ -7,6 +7,7 @@ wxService.page({ ...@@ -7,6 +7,7 @@ wxService.page({
*/ */
data: { data: {
path: '', path: '',
title : '',
h5WhitePages: [ h5WhitePages: [
'/mp6Y/begin.html', '/mp6Y/begin.html',
'/mp6Y/index.html', '/mp6Y/index.html',
...@@ -18,10 +19,17 @@ wxService.page({ ...@@ -18,10 +19,17 @@ wxService.page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
const url = options.url let url = options.url;
console.log(options)
if (url) { if (url) {
url = decodeURIComponent(url);
this.data.title = options.title;
wx.setNavigationBarTitle({
title: this.data.title,
});
this.setData({ this.setData({
path: `${decodeURIComponent(url)}` path: url
}) })
} }
}, },
...@@ -43,14 +51,6 @@ wxService.page({ ...@@ -43,14 +51,6 @@ wxService.page({
// } // }
// } // }
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
...@@ -58,33 +58,6 @@ wxService.page({ ...@@ -58,33 +58,6 @@ wxService.page({
}, },
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
...@@ -93,7 +66,7 @@ wxService.page({ ...@@ -93,7 +66,7 @@ wxService.page({
// 需要 encodeURIComponent path // 需要 encodeURIComponent path
const { path } = this.data const { path } = this.data
const enCodeUrl = encodeURIComponent(path) const enCodeUrl = encodeURIComponent(path)
let sharePath = `/subPackage/page/pages/h5/h5page?url=${enCodeUrl}` let sharePath = `/subPackage/page/pages/h5/h5page?url=${enCodeUrl}&title=${this.data.title}`
return { return {
// title: '分享给好友', // title: '分享给好友',
path: sharePath, path: sharePath,
......
{ {
"navigationBarTitleText": "h5" "navigationBarTitleText": ""
} }
\ No newline at end of file
...@@ -66,7 +66,7 @@ HandlerLink.prototype = { ...@@ -66,7 +66,7 @@ HandlerLink.prototype = {
// 跳转路径中包括http的跳转到h5页面中,用web-view去加载h5页面 // 跳转路径中包括http的跳转到h5页面中,用web-view去加载h5页面
if (/http/gi.test(item.link.url)) { if (/http/gi.test(item.link.url)) {
const enCodeUrl = encodeURIComponent(item.link.url) const enCodeUrl = encodeURIComponent(item.link.url)
return `/subPackage/page/pages/h5/h5page?url=${enCodeUrl}` return `/subPackage/page/pages/h5/h5page?url=${enCodeUrl}&title=${item.link.name}`
} }
return `/${item.link.url}` return `/${item.link.url}`
} else if (type == 7) { } else if (type == 7) {
...@@ -137,7 +137,7 @@ HandlerLinkRow.prototype = { ...@@ -137,7 +137,7 @@ HandlerLinkRow.prototype = {
// 跳转路径中包括http的跳转到h5页面中,用web-view去加载h5页面 // 跳转路径中包括http的跳转到h5页面中,用web-view去加载h5页面
if (/http/gi.test(item.link.url)) { if (/http/gi.test(item.link.url)) {
const enCodeUrl = encodeURIComponent(item.link.url) const enCodeUrl = encodeURIComponent(item.link.url)
return `/subPackage/page/pages/h5/h5page?url=${enCodeUrl}` return `/subPackage/page/pages/h5/h5page?url=${enCodeUrl}&title=${item.link.name}`
} }
return `/${item.link.url}` return `/${item.link.url}`
} else if (type == 7) { } else if (type == 7) {
......
...@@ -334,6 +334,15 @@ class WXService extends Http { ...@@ -334,6 +334,15 @@ class WXService extends Http {
item.content = item.content item.content = item.content
} }
} }
//展示开卡页的
if (item.contentType == 12){
if (item.contentId) {
let content = JSON.parse(item.content)
item.contentArr = [content]
} else {
item.content = item.content
}
}
} }
//更新本地触点对象信息 //更新本地触点对象信息
......
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