1.0.0 • Published 3 years ago
ycy_kefu v1.0.0
商品详情页 wxml
<view class="icon-btn" bindtap='toCustomerService' data-goods="{{CurStock}}">
<image class="img-icon mx-auto mb" src="/images/never/good6.png" style="width:50rpx;height:50rpx;" mode="aspectFit" />
<view class="lh-3 text-xm text-center text-block">客服</view>
</view>
商品详情页 js
toCustomerService(e) {
wx.getStorage({
key: 'member',
success: (res => {
let goods = e.currentTarget.dataset.goods;
wx.navigateTo({
url: `/packageA/pages/customerService_com/customerService/customerService?goods=${JSON.stringify(goods)}&CustomerServiceType=1`,
})
}),
fail: (rej => {
wx.switchTab({
url: `/pages/index/user/user`,
})
})
})
}
app.js
globalData: {
// globalData中加入
TenantCode: ""
//
},
getLogo(cb) {
let that = this;
this.request(
'api/agent/GetAppInfo',
'GET', {},
res => {
if (res.status) {
let resData = res.data;
typeof cb == "function" && cb(resData.AppLogo + '/640');
wx.setStorage({
key: 'logo',
data: resData.AppLogo,
})
// 加入这行
that.globalData.TenantCode = resData.TenantCode;
//
}
typeof cb == "function" && cb();
}, '', false);
},
app.json
"subpackages": [
{
"root": "packageA",
"pages": [
"pages/customerService_com/customerService/customerService"
]
}
app.wxss
.bg-color {
background-color: #66c5c2 !important;
}
.bor-btm-color {
border-bottom: 4rpx solid #66c5c2 !important;
}
.bor-color {
border: 2rpx solid #66c5c2 !important;
}
.text-color {
color: #66c5c2 !important;
}
.search_status-bg_text {
background-color: #66c5c2 !important;
color: #fff !important;
}
1.0.0
3 years ago