Commit 7ef7e73e by 谢中龙

优化部分功能

parent 2688d89e
......@@ -108,7 +108,7 @@ const prod_brand_config = {
plusIsOpen: true, //是否开启plus
contactUsIsOpen: true,//是否开启联系我
contactUsPluginId: '766c50920993bf9c41c6c3d2761a2df5',//联系我们插件PluginID
hasTrial: true, // 是否有体验账号
hasTrial: false, // 是否有体验账号
isMall: isMall,// 商城或门户 true 商城 false 门户
orderingMustOpenCard : false, //下单是否必须卡开
},
......
......@@ -9,6 +9,22 @@ page{
top: 76%;
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{
padding-bottom: 40rpx;
}
......
......@@ -11,7 +11,8 @@ wxService.page({
couponId : '',
paramIsError : false,
useStoreId : '',
couponInfo : {}
couponInfo : {},
subStoreData : []
},
/**
......@@ -38,9 +39,9 @@ wxService.page({
//获取当前登录用户的storeId
getCurrentStoreId(){
//获取当前登录用户的storeid
let member = wx.getStorageSync('_baseUserInfo') ? wx.getStorageSync('_baseUserInfo') : null;
let member = wx.getStorageSync('guidBaseInfo') ? wx.getStorageSync('guidBaseInfo') : null;
if (member) {
this.data.useStoreId = member.member.storeId;
this.data.useStoreId = member.shoppingGuideStoreId;
} else {
this.setData({
paramIsError: true
......@@ -69,8 +70,16 @@ wxService.page({
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({
couponInfo: this.data.couponInfo
couponInfo: this.data.couponInfo,
subStoreData: this.data.subStoreData
});
}
}).finally(() => {
......@@ -94,6 +103,14 @@ wxService.page({
//核销优惠券
writeOffCoupon(){
if (!this.data.useStoreId){
wx.showToast({
title: '未获取到导购门店信息',
icon : 'none'
});
return ;
}
wx.showLoading({
title: '核销中..',
});
......
......@@ -28,6 +28,14 @@
<view class='rg-desc'>{{item.value}}</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 class='off'>
......
......@@ -235,3 +235,32 @@ view{
.comfirm .confirm-body .c-bottom view:active{
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({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log('guidBaseInfo----', wx.getStorageSync('guidBaseInfo'))
this.getCouponList();
this.getGoodsList();
},
......
......@@ -24,7 +24,7 @@
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'>
<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='price'>
<view class='plus'>
......
......@@ -66,7 +66,7 @@
<image class='goods-lf-icon' src='{{item.productImgUrl}}' mode='aspectFit'></image>
<view class='goods-rg-info'>
<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='price'>
<view class='plus'>
......
......@@ -7,6 +7,7 @@ wxService.page({
*/
data: {
path: '',
title : '',
h5WhitePages: [
'/mp6Y/begin.html',
'/mp6Y/index.html',
......@@ -18,10 +19,17 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const url = options.url
let url = options.url;
console.log(options)
if (url) {
url = decodeURIComponent(url);
this.data.title = options.title;
wx.setNavigationBarTitle({
title: this.data.title,
});
this.setData({
path: `${decodeURIComponent(url)}`
path: url
})
}
},
......@@ -43,14 +51,6 @@ wxService.page({
// }
// }
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
......@@ -58,33 +58,6 @@ wxService.page({
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
......@@ -93,7 +66,7 @@ wxService.page({
// 需要 encodeURIComponent path
const { path } = this.data
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 {
// title: '分享给好友',
path: sharePath,
......
{
"navigationBarTitleText": "h5"
"navigationBarTitleText": ""
}
\ No newline at end of file
......@@ -66,7 +66,7 @@ HandlerLink.prototype = {
// 跳转路径中包括http的跳转到h5页面中,用web-view去加载h5页面
if (/http/gi.test(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}`
} else if (type == 7) {
......@@ -137,7 +137,7 @@ HandlerLinkRow.prototype = {
// 跳转路径中包括http的跳转到h5页面中,用web-view去加载h5页面
if (/http/gi.test(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}`
} else if (type == 7) {
......
......@@ -334,6 +334,15 @@ class WXService extends Http {
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