Browse Source

新增设置

master
杜叶春 2 years ago
parent
commit
cd1f206ce9
  1. 7
      pages/product/detail.wxml
  2. 30
      pages/set/set.js
  3. 3
      utils/server.js

7
pages/product/detail.wxml

@ -77,14 +77,14 @@
<view style='clear:both;'></view>
<view class='qgx'></view>
<button class='gg_fl' style="font-size: 15px;height: 40px;padding: 0;width: 90%;margin: auto;background: #fff;line-height: 40px;" form-type="submit" type="default" data-type="" data-status="1">
<button class='gg_fl' style="font-size: 15px;height: 40px;padding: 0;width: 90%;margin: auto;background: #fff;line-height: 40px;" bindtap="showAttribute" form-type="submit" type="default" data-type="" data-status="1">
<view style='float: left;font-size: 15px;line-height: 40px;color: #666;'>规格
<text wx:if="{{value}}" style='color:#666;padding-left:15px;'>{{value}}</text>
<text wx:else style='color:#666;padding-left:15px;'>选择 颜色分类</text>
</view>
<!-- <view style='position:absolute;right:0rpx;margin-top:6rpx;'>
<view style='position:absolute;right:0rpx;margin-top:6rpx;'>
<image src='/images/x_right.png' style='width:25rpx;height:25rpx;'></image>
</view> -->
</view>
</button>
<view class='qgx'></view>
<!-- 悬浮客服窗口 -->
@ -126,7 +126,6 @@
</view>
</view>
<!-- 属性选择结束 -->
<view class="shu">
<text class="cun">购买数量</text>
<view class="dian">

30
pages/set/set.js

@ -62,16 +62,30 @@ Page({
}
},
logout: function() {
wx.clearStorage({
success: (res) => {
wx.clearStorageSync('isLogin');
wx.reLaunch({
url: '/pages/login/login',
WXAPI.logout({
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
}).then(res => {
if (res.code == 200) {
wx.clearStorage({
success: (res) => {
wx.clearStorageSync('isLogin');
wx.reLaunch({
url: '/pages/login/login',
})
},
})
},
})
} else {
wx.showToast({
icon: 'loading',
title: res.message,
duration: 2000
});
}
});
},
onShow: function () {
},

3
utils/server.js

@ -62,6 +62,9 @@ module.exports = {
wxLogin: (data) => { //微信一键登录
return requestServer('&action=login&app=user', 'post', data)
},
logout: (data) => { //退出登录
return requestServer('&action=login&app=quit', 'post', data)
},
/* 首页 */
homeIndex: (data) => { //首页
return requestServer('&action=index&app=index', 'post', data)

Loading…
Cancel
Save