作者 王楠

滨海

@@ -22,6 +22,11 @@ Component({ @@ -22,6 +22,11 @@ Component({
22 wx.makePhoneCall({ 22 wx.makePhoneCall({
23 phoneNumber: wx.getStorageSync('tel') 23 phoneNumber: wx.getStorageSync('tel')
24 }) 24 })
  25 + },
  26 + tokefu(){
  27 + wx.navigateTo({
  28 + url: '/pages/kefu/kefu',
  29 + })
25 } 30 }
26 } 31 }
27 }) 32 })
1 <view class="concat_box"> 1 <view class="concat_box">
2 - <image src="/images/icon_65.png" class="item" />  
3 - <button open-type="contact" plain="true" class="dadianhua"></button> 2 + <button bindtap="tokefu" class="item" plain="true">
  3 + <image src="/images/icon_65.png" />
  4 + </button>
4 <view class="item" catchtap="tel"> 5 <view class="item" catchtap="tel">
5 <image src="/images/bodadianhua_icon.png" /> 6 <image src="/images/bodadianhua_icon.png" />
6 </view> 7 </view>
@@ -37,7 +37,8 @@ @@ -37,7 +37,8 @@
37 "pages/coupon", 37 "pages/coupon",
38 "pages/pinpaibox/pinpaibox", 38 "pages/pinpaibox/pinpaibox",
39 "pages/jumplink/jumplink", 39 "pages/jumplink/jumplink",
40 - "pages/birthday/birthday" 40 + "pages/birthday/birthday",
  41 + "pages/kefu/kefu"
41 ], 42 ],
42 "subpackages": [ 43 "subpackages": [
43 { 44 {
@@ -77,10 +78,12 @@ @@ -77,10 +78,12 @@
77 ] 78 ]
78 } 79 }
79 ], 80 ],
80 - "preloadRule":{  
81 - "pages/index/index":{  
82 - "network":"all",  
83 - "packages": ["packageA"] 81 + "preloadRule": {
  82 + "pages/index/index": {
  83 + "network": "all",
  84 + "packages": [
  85 + "packageA"
  86 + ]
84 } 87 }
85 }, 88 },
86 "window": { 89 "window": {
@@ -139,7 +139,7 @@ Page({ @@ -139,7 +139,7 @@ Page({
139 let sq = wx.getStorageSync('sq') 139 let sq = wx.getStorageSync('sq')
140 console.log(token) 140 console.log(token)
141 141
142 - if (token == ''||sq==2) { 142 + if (token == '' || sq == 2) {
143 // wx.showToast({ 143 // wx.showToast({
144 // title: '请登录后操作', 144 // title: '请登录后操作',
145 // icon: 'none', 145 // icon: 'none',
@@ -184,7 +184,7 @@ Page({ @@ -184,7 +184,7 @@ Page({
184 let sq = wx.getStorageSync('gh_sq') 184 let sq = wx.getStorageSync('gh_sq')
185 console.log(token) 185 console.log(token)
186 console.log(sq) 186 console.log(sq)
187 - if (token == ''||sq == 2) { 187 + if (token == '' || sq == 2) {
188 // wx.showLoading({ 188 // wx.showLoading({
189 // title: '模块加载中', 189 // title: '模块加载中',
190 // }) 190 // })
@@ -229,7 +229,7 @@ Page({ @@ -229,7 +229,7 @@ Page({
229 let cb_login = wx.getStorageSync('cb_login'); 229 let cb_login = wx.getStorageSync('cb_login');
230 let sq = wx.getStorageSync('cb_sq') 230 let sq = wx.getStorageSync('cb_sq')
231 console.log(token) 231 console.log(token)
232 - if (token == ''||sq==2) { 232 + if (token == '' || sq == 2) {
233 // wx.showLoading({ 233 // wx.showLoading({
234 // title: '模块加载中', 234 // title: '模块加载中',
235 // }) 235 // })
@@ -740,15 +740,15 @@ Page({ @@ -740,15 +740,15 @@ Page({
740 // } else { 740 // } else {
741 // let login_new = wx.getStorageSync('login'); 741 // let login_new = wx.getStorageSync('login');
742 742
743 - // if (style == 2) {  
744 - // wx.navigateTo({  
745 - // url: '/pages/outerChain/outerChain?src=' + e.currentTarget.dataset.src  
746 - // })  
747 - // } else { 743 + if (style == 2) {
  744 + wx.navigateTo({
  745 + url: '/pages/outerChain/outerChain?src=' + e.currentTarget.dataset.src
  746 + })
  747 + } else {
748 wx.navigateTo({ 748 wx.navigateTo({
749 url: '/pages/shop_detail/shop_detail?id=' + id 749 url: '/pages/shop_detail/shop_detail?id=' + id
750 }) 750 })
751 - // } 751 + }
752 // } 752 // }
753 }, 753 },
754 754
@@ -105,7 +105,6 @@ @@ -105,7 +105,6 @@
105 <view class="hotgoodimg"> 105 <view class="hotgoodimg">
106 <image src="{{activity[0].image}}"></image> 106 <image src="{{activity[0].image}}"></image>
107 </view> 107 </view>
108 -  
109 </view> 108 </view>
110 </view> 109 </view>
111 110
@@ -10,7 +10,7 @@ Page({ @@ -10,7 +10,7 @@ Page({
10 /** 10 /**
11 * 生命周期函数--监听页面加载 11 * 生命周期函数--监听页面加载
12 */ 12 */
13 - onLoad: function(options) { 13 + onLoad: function (options) {
14 this.getCodeFun(); 14 this.getCodeFun();
15 15
16 }, 16 },
@@ -19,7 +19,7 @@ Page({ @@ -19,7 +19,7 @@ Page({
19 getCodeFun() { 19 getCodeFun() {
20 let that = this; 20 let that = this;
21 wx.login({ 21 wx.login({
22 - success: function(r) { 22 + success: function (r) {
23 that.setData({ 23 that.setData({
24 code: r.code 24 code: r.code
25 }) 25 })
@@ -32,7 +32,7 @@ Page({ @@ -32,7 +32,7 @@ Page({
32 iv: reg.iv, 32 iv: reg.iv,
33 encryptedData: reg.encryptedData 33 encryptedData: reg.encryptedData
34 }) 34 })
35 - if(that.data.iv){ 35 + if (that.data.iv) {
36 that.get_token() 36 that.get_token()
37 } 37 }
38 38
@@ -49,12 +49,16 @@ Page({ @@ -49,12 +49,16 @@ Page({
49 // 立即授权 49 // 立即授权
50 get_info(e) { 50 get_info(e) {
51 let that = this 51 let that = this
52 - if (e.detail.errMsg == 'getUserInfo:ok'){ 52 + wx.getUserProfile({
  53 + desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
  54 + success: (res) => {
  55 + console.log(res.iv)
53 that.setData({ 56 that.setData({
54 - iv: e.detail.iv,  
55 - encryptedData: e.detail.encryptedData 57 + iv: res.iv,
  58 + encryptedData: res.encryptedData
56 }) 59 })
57 if(that.data.iv){ 60 if(that.data.iv){
  61 +
58 wx.login({ 62 wx.login({
59 success: function(r) { 63 success: function(r) {
60 that.setData({ 64 that.setData({
@@ -67,11 +71,36 @@ Page({ @@ -67,11 +71,36 @@ Page({
67 71
68 } 72 }
69 73
  74 + },
  75 + fail() {
  76 + wx.navigateBack({
  77 + delta: 0,
  78 + })
70 } 79 }
  80 + })
  81 + // if (e.detail.errMsg == 'getUserInfo:ok') {
  82 + // that.setData({
  83 + // iv: e.detail.iv,
  84 + // encryptedData: e.detail.encryptedData
  85 + // })
  86 + // if (that.data.iv) {
  87 + // wx.login({
  88 + // success: function (r) {
  89 + // that.setData({
  90 + // code: r.code
  91 + // })
  92 + // that.get_token()
  93 + // }
  94 + // })
  95 +
  96 +
  97 + // }
  98 +
  99 + // }
71 }, 100 },
72 101
73 -// 获取登录注册信息  
74 - get_token(){ 102 + // 获取登录注册信息
  103 + get_token() {
75 wx.showLoading({ 104 wx.showLoading({
76 title: '加载中', 105 title: '加载中',
77 }) 106 })
@@ -94,6 +123,12 @@ Page({ @@ -94,6 +123,12 @@ Page({
94 wx.setStorageSync('login', r.new_login); 123 wx.setStorageSync('login', r.new_login);
95 wx.setStorageSync('gh_login', r.gh_login); 124 wx.setStorageSync('gh_login', r.gh_login);
96 wx.setStorageSync('cb_login', r.cb_login); 125 wx.setStorageSync('cb_login', r.cb_login);
  126 + wx.setStorageSync('sq', JSON.parse(r.sq1.msg).data)
  127 + wx.setStorageSync('gh_sq', JSON.parse(r.sq2.msg).data)
  128 + wx.setStorageSync('cb_sq', JSON.parse(r.sq3.msg).data)
  129 + wx.navigateBack({
  130 + delta: 0,
  131 + })
97 // wx.setStorageSync('tel', r.tel); 132 // wx.setStorageSync('tel', r.tel);
98 // wx.reLaunch({ 133 // wx.reLaunch({
99 // url: '/pages/index/index' 134 // url: '/pages/index/index'
@@ -101,9 +136,7 @@ Page({ @@ -101,9 +136,7 @@ Page({
101 // wx.reLaunch({ 136 // wx.reLaunch({
102 // url: '/pages/index/index' 137 // url: '/pages/index/index'
103 // }) 138 // })
104 - wx.navigateBack({  
105 - delta: 0,  
106 - }) 139 +
107 // if (r.new_login == 0) { 140 // if (r.new_login == 0) {
108 // // 未绑定手机号 141 // // 未绑定手机号
109 // wx.redirectTo({ 142 // wx.redirectTo({
@@ -137,49 +170,49 @@ Page({ @@ -137,49 +170,49 @@ Page({
137 /** 170 /**
138 * 生命周期函数--监听页面初次渲染完成 171 * 生命周期函数--监听页面初次渲染完成
139 */ 172 */
140 - onReady: function() { 173 + onReady: function () {
141 174
142 }, 175 },
143 176
144 /** 177 /**
145 * 生命周期函数--监听页面显示 178 * 生命周期函数--监听页面显示
146 */ 179 */
147 - onShow: function() { 180 + onShow: function () {
148 181
149 }, 182 },
150 183
151 /** 184 /**
152 * 生命周期函数--监听页面隐藏 185 * 生命周期函数--监听页面隐藏
153 */ 186 */
154 - onHide: function() { 187 + onHide: function () {
155 188
156 }, 189 },
157 190
158 /** 191 /**
159 * 生命周期函数--监听页面卸载 192 * 生命周期函数--监听页面卸载
160 */ 193 */
161 - onUnload: function() { 194 + onUnload: function () {
162 195
163 }, 196 },
164 197
165 /** 198 /**
166 * 页面相关事件处理函数--监听用户下拉动作 199 * 页面相关事件处理函数--监听用户下拉动作
167 */ 200 */
168 - onPullDownRefresh: function() { 201 + onPullDownRefresh: function () {
169 202
170 }, 203 },
171 204
172 /** 205 /**
173 * 页面上拉触底事件的处理函数 206 * 页面上拉触底事件的处理函数
174 */ 207 */
175 - onReachBottom: function() { 208 + onReachBottom: function () {
176 209
177 }, 210 },
178 211
179 /** 212 /**
180 * 用户点击右上角分享 213 * 用户点击右上角分享
181 */ 214 */
182 - onShareAppMessage: function() { 215 + onShareAppMessage: function () {
183 216
184 } 217 }
185 }) 218 })
@@ -9,6 +9,6 @@ @@ -9,6 +9,6 @@
9 </view> 9 </view>
10 </view> 10 </view>
11 <view class="button_box"> 11 <view class="button_box">
12 - <button class="login" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="get_info">立即授权</button> 12 + <button class="login" lang="zh_CN" bindtap="get_info">立即授权</button>
13 <view class="no_login" bindtap="returnPageFun">暂不授权</view> 13 <view class="no_login" bindtap="returnPageFun">暂不授权</view>
14 </view> 14 </view>
@@ -20,8 +20,7 @@ @@ -20,8 +20,7 @@
20 <shop_item list="{{list}}" wx:if="{{list.length>0}}" type="1" actioning='{{actioning}}' check_num="{{check_num}}" bindcheck_type="check_type" bindchange_num="change_num" binddelete_shop="delete_shop" /> 20 <shop_item list="{{list}}" wx:if="{{list.length>0}}" type="1" actioning='{{actioning}}' check_num="{{check_num}}" bindcheck_type="check_type" bindchange_num="change_num" binddelete_shop="delete_shop" />
21 <view class="empty" wx:else>暂无更多数据</view> 21 <view class="empty" wx:else>暂无更多数据</view>
22 </view> 22 </view>
23 -<!-- wx:if="{{list.length>0}}" -->  
24 -<!-- footer --> 23 +
25 <view class="footer" wx:if="{{list.length>0}}"> 24 <view class="footer" wx:if="{{list.length>0}}">
26 <view class="check_box" bindtap="check_all"> 25 <view class="check_box" bindtap="check_all">
27 <image class="check" src="{{checkAll?'/images/check@.png':'/images/check.png'}}" /> 26 <image class="check" src="{{checkAll?'/images/check@.png':'/images/check.png'}}" />
@@ -33,7 +32,5 @@ @@ -33,7 +32,5 @@
33 </view> 32 </view>
34 <view class="submit" bindtap="submit" wx:if="{{editshow}}">结算({{all_num}})</view> 33 <view class="submit" bindtap="submit" wx:if="{{editshow}}">结算({{all_num}})</view>
35 </view> 34 </view>
36 -  
37 - <concat />  
38 </block> 35 </block>
39 <v-tab-bar selected="{{selected}}" text="1" list="{{listarr}}"></v-tab-bar> 36 <v-tab-bar selected="{{selected}}" text="1" list="{{listarr}}"></v-tab-bar>
@@ -37,6 +37,7 @@ page { @@ -37,6 +37,7 @@ page {
37 background: #fff; 37 background: #fff;
38 position: fixed; 38 position: fixed;
39 left: 0; 39 left: 0;
  40 + bottom: calc(100rpx + constant(safe-area-inset-bottom));
40 bottom: calc(100rpx + env(safe-area-inset-bottom)); 41 bottom: calc(100rpx + env(safe-area-inset-bottom));
41 font-size: 26rpx; 42 font-size: 26rpx;
42 font-family: PingFang SC; 43 font-family: PingFang SC;
@@ -18,7 +18,8 @@ @@ -18,7 +18,8 @@
18 <Model_item list="{{shop_arr}}" type='open' /> 18 <Model_item list="{{shop_arr}}" type='open' />
19 19
20 <view class='real_goods' wx:if="{{activelist.length>0}}"> 20 <view class='real_goods' wx:if="{{activelist.length>0}}">
21 - <view class="real_goods_item" wx:for="{{activelist}}" wx:key="index" data-id="{{item.goods_id}}" bindtap="{{item.product.sold==0?'':'look_more'}}" data-type="{{item.type}}"> 21 + <view class="real_goods_item" wx:for="{{activelist}}" wx:key="index" data-id="{{item.goods_id}}"
  22 + bindtap="{{item.product.sold==0?'':'look_more'}}" data-type="{{item.type}}">
22 23
23 <view wx:if="{{item.type==1}}"> 24 <view wx:if="{{item.type==1}}">
24 <view class='real_goods_img'> 25 <view class='real_goods_img'>
@@ -29,7 +30,7 @@ @@ -29,7 +30,7 @@
29 <view class='goods_title'>{{item.goods.name}}</view> 30 <view class='goods_title'>{{item.goods.name}}</view>
30 <view class='goods_flex'> 31 <view class='goods_flex'>
31 <!-- <view class='score'>积分</view> --> 32 <!-- <view class='score'>积分</view> -->
32 - <view class='price'>¥{{item.goods.goods_price}}</view> 33 + <view class='price'>¥{{item.goods_price}}</view>
33 <view class="huaxianprice">¥{{item.goods.line_price}}</view> 34 <view class="huaxianprice">¥{{item.goods.line_price}}</view>
34 </view> 35 </view>
35 <view class='sell'>已卖出{{item.goods.sales}}件</view> 36 <view class='sell'>已卖出{{item.goods.sales}}件</view>
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 "ignore": [] 4 "ignore": []
5 }, 5 },
6 "setting": { 6 "setting": {
7 - "urlCheck": false, 7 + "urlCheck": true,
8 "es6": true, 8 "es6": true,
9 "enhance": false, 9 "enhance": false,
10 "postcss": true, 10 "postcss": true,