Commit 120c72ad9367fe98daebe41e11fc586632aeea31
1 parent
ef0d3dcb
美业卡项
Showing
16 changed files
with
1225 additions
and
205 deletions
app.wxss
| @@ -135,6 +135,7 @@ | @@ -135,6 +135,7 @@ | ||
| 135 | box-sizing: border-box; | 135 | box-sizing: border-box; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | + | ||
| 138 | .c-green { | 139 | .c-green { |
| 139 | color: #7CFC00; | 140 | color: #7CFC00; |
| 140 | } | 141 | } |
| @@ -159,6 +160,14 @@ | @@ -159,6 +160,14 @@ | ||
| 159 | color: #c7c7c7; | 160 | color: #c7c7c7; |
| 160 | } | 161 | } |
| 161 | 162 | ||
| 163 | +.c-6 { | ||
| 164 | + color: #666; | ||
| 165 | +} | ||
| 166 | + | ||
| 167 | +.c-9 { | ||
| 168 | + color: #999; | ||
| 169 | +} | ||
| 170 | + | ||
| 162 | 171 | ||
| 163 | 172 | ||
| 164 | .c-d { | 173 | .c-d { |
| @@ -232,6 +241,11 @@ | @@ -232,6 +241,11 @@ | ||
| 232 | margin-top: 30rpx; | 241 | margin-top: 30rpx; |
| 233 | } | 242 | } |
| 234 | 243 | ||
| 244 | +.mgt40 { | ||
| 245 | + margin-top: 40rpx; | ||
| 246 | +} | ||
| 247 | + | ||
| 248 | + | ||
| 235 | .h68 { | 249 | .h68 { |
| 236 | height: 68rpx; | 250 | height: 68rpx; |
| 237 | } | 251 | } |
| @@ -729,9 +743,9 @@ background: #ffe3e2; | @@ -729,9 +743,9 @@ background: #ffe3e2; | ||
| 729 | /* 图标字体(ty) */ | 743 | /* 图标字体(ty) */ |
| 730 | @font-face { | 744 | @font-face { |
| 731 | font-family: 'iconfont'; /* Project id 2054717 */ | 745 | font-family: 'iconfont'; /* Project id 2054717 */ |
| 732 | - src: url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.woff2?t=1635844276600') format('woff2'), | ||
| 733 | - url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.woff?t=1635844276600') format('woff'), | ||
| 734 | - url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.ttf?t=1635844276600') format('truetype'); | 746 | + src: url('//at.alicdn.com/t/font_2054717_y42sikta7lc.woff2?t=1642407649188') format('woff2'), |
| 747 | + url('//at.alicdn.com/t/font_2054717_y42sikta7lc.woff?t=1642407649188') format('woff'), | ||
| 748 | + url('//at.alicdn.com/t/font_2054717_y42sikta7lc.ttf?t=1642407649188') format('truetype'); | ||
| 735 | } | 749 | } |
| 736 | 750 | ||
| 737 | .iconfont { | 751 | .iconfont { |
| @@ -742,6 +756,18 @@ background: #ffe3e2; | @@ -742,6 +756,18 @@ background: #ffe3e2; | ||
| 742 | -moz-osx-font-smoothing: grayscale; | 756 | -moz-osx-font-smoothing: grayscale; |
| 743 | } | 757 | } |
| 744 | 758 | ||
| 759 | +.icon-shangpin:before { | ||
| 760 | + content: "\e661"; | ||
| 761 | +} | ||
| 762 | + | ||
| 763 | +.icon-bankcard:before { | ||
| 764 | + content: "\e693"; | ||
| 765 | +} | ||
| 766 | + | ||
| 767 | +.icon-tongbu:before { | ||
| 768 | + content: "\e6ca"; | ||
| 769 | +} | ||
| 770 | + | ||
| 745 | .icon-luck:before { | 771 | .icon-luck:before { |
| 746 | content: "\e621"; | 772 | content: "\e621"; |
| 747 | } | 773 | } |
packageA/pages/details_serviceCard/details_serviceCard.js
| 1 | // packageA/pages/details_serviceCard/details_serviceCard.js | 1 | // packageA/pages/details_serviceCard/details_serviceCard.js |
| 2 | +const app = getApp(); | ||
| 3 | +const os = app.globalData.setting; | ||
| 4 | +let self = null; | ||
| 5 | + | ||
| 2 | Page({ | 6 | Page({ |
| 3 | 7 | ||
| 4 | - /** | ||
| 5 | - * 页面的初始数据 | ||
| 6 | - */ | ||
| 7 | - data: { | 8 | + /** |
| 9 | + * 页面的初始数据 | ||
| 10 | + */ | ||
| 11 | + data: { | ||
| 12 | + is_summit_ing: 0, | ||
| 13 | + }, | ||
| 14 | + | ||
| 15 | + /** | ||
| 16 | + * 生命周期函数--监听页面加载 | ||
| 17 | + */ | ||
| 18 | + onLoad: function(options) { | ||
| 19 | + self = this; | ||
| 20 | + this.data.options = options; | ||
| 21 | + app.isLogin().then(function(data) { | ||
| 22 | + self.setData({ | ||
| 23 | + userInfo: data, | ||
| 24 | + }); | ||
| 25 | + self.getConfig(); | ||
| 26 | + }); | ||
| 27 | + }, | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 31 | + */ | ||
| 32 | + onReady: function() { | ||
| 33 | + | ||
| 34 | + }, | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * 生命周期函数--监听页面显示 | ||
| 38 | + */ | ||
| 39 | + onShow: function() { | ||
| 40 | + if (app.globalData.userInfo) { | ||
| 41 | + if (!this.data.isLogin) { | ||
| 42 | + this.setData({ | ||
| 43 | + userInfo: app.globalData.userInfo, | ||
| 44 | + imghost: app.globalData.setting.imghost, | ||
| 45 | + isLogin: true, | ||
| 46 | + }); | ||
| 47 | + | ||
| 48 | + let url = '/api/weshop/recharge/user/page' | ||
| 49 | + let data = { | ||
| 50 | + store_id: app.globalData.setting.stoid, | ||
| 51 | + user_id: this.data.userInfo.user_id, | ||
| 52 | + order_id: this.data.options.order_id, | ||
| 53 | + }; | ||
| 54 | + | ||
| 55 | + // 请求数据 | ||
| 56 | + app.promiseGet(url, { | ||
| 57 | + data: data, | ||
| 58 | + }).then(res => { | ||
| 59 | + if (res.data.code == 0) { | ||
| 60 | + console.log('请求成功', res); | ||
| 61 | + this.setData({ | ||
| 62 | + details: res.data.data.pageData[0], | ||
| 63 | + }); | ||
| 64 | + } else { | ||
| 65 | + throw (res); | ||
| 66 | + }; | ||
| 67 | + }).catch(err => { | ||
| 68 | + wx.showToast({ | ||
| 69 | + title: err.data.data, | ||
| 70 | + icon: 'error', | ||
| 71 | + }); | ||
| 72 | + }); | ||
| 73 | + | ||
| 74 | + }; | ||
| 75 | + }; | ||
| 76 | + }, | ||
| 77 | + | ||
| 78 | + /** | ||
| 79 | + * 生命周期函数--监听页面隐藏 | ||
| 80 | + */ | ||
| 81 | + onHide: function() { | ||
| 82 | + | ||
| 83 | + }, | ||
| 84 | + | ||
| 85 | + /** | ||
| 86 | + * 生命周期函数--监听页面卸载 | ||
| 87 | + */ | ||
| 88 | + onUnload: function() { | ||
| 89 | + | ||
| 90 | + }, | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 94 | + */ | ||
| 95 | + onPullDownRefresh: function() { | ||
| 96 | + | ||
| 97 | + }, | ||
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 页面上拉触底事件的处理函数 | ||
| 101 | + */ | ||
| 102 | + onReachBottom: function() { | ||
| 103 | + | ||
| 104 | + }, | ||
| 105 | + | ||
| 106 | + /** | ||
| 107 | + * 用户点击右上角分享 | ||
| 108 | + */ | ||
| 109 | + onShareAppMessage: function() { | ||
| 110 | + | ||
| 111 | + }, | ||
| 112 | + | ||
| 113 | + | ||
| 114 | + // 内容复制到剪贴板 | ||
| 115 | + copy() { | ||
| 116 | + console.log('点击了复制按钮'); | ||
| 117 | + wx.setClipboardData({ | ||
| 118 | + data: this.data.details.order_sn, | ||
| 119 | + success(res) { | ||
| 120 | + wx.getClipboardData({ | ||
| 121 | + success(res) { | ||
| 122 | + console.log(res.data); | ||
| 123 | + } | ||
| 124 | + }) | ||
| 125 | + } | ||
| 126 | + }) | ||
| 127 | + }, | ||
| 128 | + | ||
| 129 | + | ||
| 130 | + // 图片异常时加载默认图片 | ||
| 131 | + bind_bnerr(e) { | ||
| 132 | + var errImg = e.currentTarget.dataset.errorimg; | ||
| 133 | + var errObj = {}; | ||
| 134 | + errObj[errImg] = 'public/images/default_goods_image_240.gif'; | ||
| 135 | + this.setData(errObj); // this.setData({ details.list[0].img_url}); | ||
| 136 | + }, | ||
| 137 | + | ||
| 138 | + | ||
| 139 | + // 查看商品详情 | ||
| 140 | + viewDetails(e) { | ||
| 141 | + let goods_id = e.currentTarget.dataset.gid; | ||
| 142 | + let url = '/packageA/pages/goodsInfo/goodsInfo?goods_id=' + goods_id; | ||
| 143 | + app.goto(url); | ||
| 144 | + }, | ||
| 145 | + | ||
| 146 | + // 获取系统参数 | ||
| 147 | + getConfig() { | ||
| 148 | + app.getConfig2(function(e) { | ||
| 149 | + // console.log('101',e); | ||
| 150 | + let json_d = JSON.parse(e.switch_list); | ||
| 151 | + self.setData({ | ||
| 152 | + sys_switch: json_d, | ||
| 153 | + // weapp_customertype: json_d.weapp_customertype, | ||
| 154 | + }); | ||
| 155 | + }, 1); | ||
| 156 | + }, | ||
| 157 | + | ||
| 158 | + | ||
| 159 | + // 联系微信客服 | ||
| 160 | + contact_wx() { | ||
| 161 | + var url = this.data.sys_switch.weapp_customertype_url; | ||
| 162 | + var id = this.data.sys_switch.weapp_customertype_appid; | ||
| 163 | + wx.openCustomerServiceChat({ | ||
| 164 | + extInfo: { | ||
| 165 | + url: url | ||
| 166 | + }, | ||
| 167 | + corpId: id, | ||
| 168 | + success(res) {} | ||
| 169 | + }) | ||
| 170 | + }, | ||
| 171 | + | ||
| 172 | + | ||
| 173 | + // 联系电话客服 | ||
| 174 | + contactService() { | ||
| 175 | + app.getConfig(function(t) { | ||
| 176 | + if (t.store_tel == undefined) { | ||
| 177 | + app.request.get('/api/weshop/store/get/' + os.stoid, { | ||
| 178 | + isShowLoading: 1, | ||
| 179 | + data: {}, | ||
| 180 | + success: function(rs) { | ||
| 181 | + app.globalData.config = rs.data.data; | ||
| 182 | + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
| 183 | + app.my_warnning('商家未设置电话', 0, self); | ||
| 184 | + return false; | ||
| 185 | + } | ||
| 186 | + app.confirmBox('请联系客服:' + rs.data.data.store_tel); | ||
| 187 | + } | ||
| 188 | + }) | ||
| 189 | + } else { | ||
| 190 | + app.confirmBox('请联系客服:' + t.store_tel); | ||
| 191 | + } | ||
| 192 | + }); | ||
| 193 | + }, | ||
| 194 | + | ||
| 195 | + | ||
| 196 | + // 评价商品 | ||
| 197 | + access() { | ||
| 198 | + let listLength = this.data.details.list.length; | ||
| 199 | + let order_id = this.data.details.order_id; | ||
| 200 | + let url = ''; | ||
| 201 | + | ||
| 202 | + // 卡项订单跳转到评论页要多加个参数card=1 | ||
| 203 | + // 卡项订单goods_id要带card_id | ||
| 204 | + if (listLength == 1) { | ||
| 205 | + let price = this.data.details.list[0].price; | ||
| 206 | + let card_id = this.data.details.list[0].card_id; | ||
| 207 | + url = | ||
| 208 | + `/packageB/pages/user/add_comment/add_comment?card=1&goods_id=${card_id}&order_id=${order_id}&price=${price}` | ||
| 209 | + }; | ||
| 210 | + if (listLength > 1) { | ||
| 211 | + url = `/packageB/pages/user/comment/comment?card=1&status=0&order_id=${order_id}`; | ||
| 212 | + }; | ||
| 213 | + f | ||
| 214 | + // console.log('url', url); | ||
| 215 | + app.goto(url); | ||
| 216 | + }, | ||
| 217 | + | ||
| 218 | + | ||
| 219 | + // 查看评论 | ||
| 220 | + viewComment() { | ||
| 221 | + let order_id = this.data.details.order_id; | ||
| 222 | + let card_id = this.data.details.list[0].card_id; | ||
| 223 | + let listLength = this.data.details.list.length; | ||
| 224 | + let url = ''; | ||
| 225 | + | ||
| 226 | + // 卡项订单单个商品 | ||
| 227 | + if (listLength == 1) { | ||
| 228 | + url = `/packageB/pages/user/view_comment/view_comment?card=1&goods_id=${card_id}&order_id=${order_id}`; | ||
| 229 | + }; | ||
| 230 | + // 卡项订单多个商品 | ||
| 231 | + if (listLength > 1) { | ||
| 232 | + // status控制评论列表页的activeStatus | ||
| 233 | + url = `/packageB/pages/user/comment/comment?card=1&status=1&order_id=${order_id}`; | ||
| 234 | + }; | ||
| 235 | + | ||
| 236 | + app.goto(url); | ||
| 237 | + }, | ||
| 238 | + | ||
| 239 | + | ||
| 240 | + // 再来一单 | ||
| 241 | + buy2(t) { | ||
| 242 | + let details = this.data.details; | ||
| 243 | + var th = this; | ||
| 244 | + var ind = 1; // 1:加入购物车 | ||
| 245 | + // var ind = t.currentTarget.dataset.openSpecModal_ind; | ||
| 246 | + // var action= t.currentTarget.dataset.action; | ||
| 247 | + var action = 'add'; // | ||
| 248 | + // if(!ind) ind = t.currentTarget.dataset.openspecmodal_ind; | ||
| 249 | + | ||
| 250 | + th.setData({ | ||
| 251 | + open_ind_store: ind | ||
| 252 | + }); | ||
| 253 | + | ||
| 254 | + // if(!th.data.sto_sele_name){ | ||
| 255 | + // getApp().my_warnning('请选择门店', 1, th, 450); | ||
| 256 | + // return false; | ||
| 257 | + // } | ||
| 258 | + | ||
| 259 | + | ||
| 260 | + if (action == "buy") { | ||
| 261 | + //--------------此时操作的数据------------ | ||
| 262 | + // var newd = { | ||
| 263 | + // id: th.data.data.id, | ||
| 264 | + // goods_num: th.data.goodsInputNum, | ||
| 265 | + // pick_id: th.data.sto_sele_id, | ||
| 266 | + // keyid: th.data.sto_sele_keyid, | ||
| 267 | + // }; | ||
| 268 | + // newd['pick_name'] = th.data.sto_sele_name; | ||
| 269 | + // newd['guide_id'] = getApp().globalData.guide_id; | ||
| 270 | + // newd['guide_type']=0; | ||
| 271 | + // th.buyNow(newd); | ||
| 272 | + } else { | ||
| 273 | + | ||
| 274 | + var newd = { | ||
| 275 | + // service_id: th.data.data.id, | ||
| 276 | + // service_sn:th.data.data.service_sn, | ||
| 277 | + // service_name:th.data.data.goods_name, | ||
| 278 | + // goods_num: th.data.goodsInputNum, | ||
| 279 | + // pick_id: th.data.sto_sele_id, | ||
| 280 | + // user_id:oo.user_id, | ||
| 281 | + // store_id:os.stoid, | ||
| 282 | + // money:th.data.data.shop_price, | ||
| 283 | + | ||
| 284 | + service_id: details.list[0].card_id, | ||
| 285 | + service_sn: details.list[0].service_sn, | ||
| 286 | + service_name: details.list[0].service_name, | ||
| 287 | + goods_num: details.list[0].qty, | ||
| 288 | + pick_id: details.list[0].pickup_id, | ||
| 289 | + user_id: this.data.userInfo.user_id, | ||
| 290 | + store_id: app.globalData.setting.stoid, | ||
| 291 | + money: details.list[0].price, | ||
| 292 | + }; | ||
| 293 | + if (getApp().globalData.guide_id) { | ||
| 294 | + newd['guide_id'] = getApp().globalData.guide_id; | ||
| 295 | + newd['guide_type'] = 0; | ||
| 296 | + } | ||
| 297 | + | ||
| 298 | + //----先看会员在购物车中是否加入了该商品----- | ||
| 299 | + app.request.get("/api/weshop/cartService/page", { | ||
| 300 | + data: { | ||
| 301 | + store_id: app.globalData.setting.stoid, | ||
| 302 | + user_id: this.data.userInfo.user_id, | ||
| 303 | + service_id: details.list[0].card_id, | ||
| 304 | + pick_id: details.list[0].pickup_id, | ||
| 305 | + }, | ||
| 306 | + success: function(re) { | ||
| 307 | + | ||
| 308 | + //-------如果购物车中有相关的数据--------- | ||
| 309 | + if (re.data.data.total > 0) { | ||
| 310 | + var item = re.data.data.pageData[0]; | ||
| 311 | + var updata = { | ||
| 312 | + id: item.id, | ||
| 313 | + goods_num: details.list[0].qty + item.goods_num, | ||
| 314 | + money: details.list[0].price, | ||
| 315 | + store_id: app.globalData.setting.stoid, | ||
| 316 | + }; | ||
| 317 | + | ||
| 318 | + if (getApp().globalData.guide_id) { | ||
| 319 | + updata['guide_id'] = getApp().globalData.guide_id; | ||
| 320 | + updata['guide_type'] = 1; | ||
| 321 | + } | ||
| 322 | + getApp().request.put("/api/weshop/cartService/update", { | ||
| 323 | + data: updata, | ||
| 324 | + success: function(t) { | ||
| 325 | + // getApp().my_warnning('加入购物车成功', 1, th, 450); | ||
| 326 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | ||
| 327 | + th.setData({ | ||
| 328 | + cartGoodsNum: c_num | ||
| 329 | + }); | ||
| 330 | + app.goto('/pages/cart/cart/cart'); | ||
| 331 | + // th.closeSpecModal(); | ||
| 332 | + } | ||
| 333 | + }); | ||
| 334 | + } else { | ||
| 335 | + | ||
| 336 | + getApp().request.post("/api/weshop/cartService/save", { | ||
| 337 | + data: newd, | ||
| 338 | + success: function(t) { | ||
| 339 | + // getApp().my_warnning('加入购物车成功', 1, th, 450); | ||
| 340 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | ||
| 341 | + th.setData({ | ||
| 342 | + cartGoodsNum: c_num | ||
| 343 | + }); | ||
| 344 | + app.goto('/pages/cart/cart/cart'); | ||
| 345 | + // th.closeSpecModal(); | ||
| 346 | + } | ||
| 347 | + }); | ||
| 348 | + } | ||
| 349 | + } | ||
| 350 | + }); | ||
| 351 | + | ||
| 352 | + } | ||
| 353 | + }, | ||
| 354 | + | ||
| 355 | + | ||
| 356 | + // 取消订单 | ||
| 357 | + // api/weshop/recharge/update?store_id=&order_id=&order_status=3 | ||
| 358 | + cancle() { | ||
| 359 | + wx.showModal({ | ||
| 360 | + title: '提示', | ||
| 361 | + content: '确定取消订单吗?', | ||
| 362 | + success(res) { | ||
| 363 | + if (res.confirm) { | ||
| 364 | + console.log('用户点击确定'); | ||
| 365 | + let order_id = self.data.details.order_id; | ||
| 366 | + let order_sn = self.data.details.order_sn; | ||
| 367 | + app.request.put('/api/weshop/recharge/update', { | ||
| 368 | + data: { | ||
| 369 | + store_id: os.stoid, | ||
| 370 | + order_id: order_id, | ||
| 371 | + order_sn: order_sn, | ||
| 372 | + order_status: 3, | ||
| 373 | + }, | ||
| 374 | + success: function(res) { | ||
| 8 | 375 | ||
| 9 | - }, | 376 | + //取消成功刷新订单 |
| 377 | + let url = '/api/weshop/recharge/user/page' | ||
| 378 | + let data = { | ||
| 379 | + store_id: app.globalData.setting.stoid, | ||
| 380 | + user_id: self.data.userInfo.user_id, | ||
| 381 | + order_id: self.data.options.order_id, | ||
| 382 | + }; | ||
| 10 | 383 | ||
| 11 | - /** | ||
| 12 | - * 生命周期函数--监听页面加载 | ||
| 13 | - */ | ||
| 14 | - onLoad: function (options) { | 384 | + // 请求数据 |
| 385 | + app.promiseGet(url, { | ||
| 386 | + data: data, | ||
| 387 | + }).then(res => { | ||
| 388 | + if (res.data.code == 0) { | ||
| 389 | + console.log('请求成功', res); | ||
| 390 | + wx.showToast({ | ||
| 391 | + title: '取消成功', | ||
| 392 | + }); | ||
| 393 | + self.setData({ | ||
| 394 | + details: res.data.data.pageData[0], | ||
| 395 | + }); | ||
| 396 | + } else { | ||
| 397 | + throw (res); | ||
| 398 | + }; | ||
| 399 | + }).catch(err => { | ||
| 400 | + wx.showToast({ | ||
| 401 | + title: err.data.data, | ||
| 402 | + icon: 'error', | ||
| 403 | + }); | ||
| 404 | + }); | ||
| 15 | 405 | ||
| 16 | - }, | 406 | + }, |
| 407 | + }) | ||
| 408 | + } else if (res.cancel) { | ||
| 409 | + console.log('用户点击取消'); | ||
| 410 | + } | ||
| 411 | + } | ||
| 412 | + }); | ||
| 413 | + }, | ||
| 17 | 414 | ||
| 18 | - /** | ||
| 19 | - * 生命周期函数--监听页面初次渲染完成 | ||
| 20 | - */ | ||
| 21 | - onReady: function () { | ||
| 22 | 415 | ||
| 23 | - }, | 416 | + // 立即支付 |
| 417 | + pay() { | ||
| 418 | + let order_sn = this.data.details.order_sn; | ||
| 419 | + let store_id = app.globalData.setting.stoid; | ||
| 24 | 420 | ||
| 25 | - /** | ||
| 26 | - * 生命周期函数--监听页面显示 | ||
| 27 | - */ | ||
| 28 | - onShow: function () { | 421 | + app.request.post('/api/weshop/order/pay/createRechargeOrder', { |
| 422 | + data: { | ||
| 423 | + parentSn: order_sn, | ||
| 424 | + store_id: store_id, | ||
| 425 | + }, | ||
| 29 | 426 | ||
| 30 | - }, | 427 | + success: function(res) { |
| 428 | + var n = res.data.data; | ||
| 429 | + self.weixinPay(n, function() { | ||
| 430 | + app.showWarning('支付成功'); | ||
| 431 | + // setTimeout(function() { | ||
| 432 | + // wx.reLaunch({ | ||
| 433 | + // url: '/pages/user/my_service/i_service', | ||
| 434 | + // }) | ||
| 435 | + // }, 1000) | ||
| 436 | + }, function() { | ||
| 437 | + app.showWarning('支付失败'); | ||
| 438 | + // setTimeout(function() { | ||
| 439 | + // wx.reLaunch({ | ||
| 440 | + // url: '/packageA/pages/cardList/cardList', | ||
| 441 | + // }) | ||
| 442 | + // }, 1000) | ||
| 443 | + }); | ||
| 444 | + } | ||
| 445 | + }) | ||
| 446 | + }, | ||
| 31 | 447 | ||
| 32 | - /** | ||
| 33 | - * 生命周期函数--监听页面隐藏 | ||
| 34 | - */ | ||
| 35 | - onHide: function () { | ||
| 36 | 448 | ||
| 37 | - }, | 449 | + //------调起支付框-------- |
| 450 | + weixinPay: function(n, success, fail) { | ||
| 451 | + if (!n) return false; | ||
| 452 | + wx.requestPayment({ | ||
| 453 | + timeStamp: String(n.timeStamp), | ||
| 454 | + nonceStr: n.nonceStr, | ||
| 455 | + package: n.packageValue, | ||
| 456 | + signType: n.signType, | ||
| 457 | + paySign: n.paySign, | ||
| 458 | + success: function(n) { | ||
| 459 | + console.log(n), getApp().showSuccess("支付成功!"); | ||
| 460 | + "function" == typeof success && success(); | ||
| 461 | + wx.redirectTo({ | ||
| 462 | + url: "../deposit/deposit" | ||
| 463 | + }); | ||
| 464 | + }, | ||
| 465 | + fail: function(n) { | ||
| 466 | + console.log(n), "requestPayment:fail" == n.errMsg ? getApp().showWarning("支付失败") : | ||
| 467 | + "requestPayment:fail cancel" == n.errMsg ? getApp().showWarning("您已取消支付") : getApp().showWarning("支付失败:" + n | ||
| 468 | + .errMsg.substr("requestPayment:fail ".length)), | ||
| 469 | + "function" == typeof fail && fail(); | ||
| 470 | + } | ||
| 471 | + }); | ||
| 472 | + }, | ||
| 38 | 473 | ||
| 39 | - /** | ||
| 40 | - * 生命周期函数--监听页面卸载 | ||
| 41 | - */ | ||
| 42 | - onUnload: function () { | ||
| 43 | 474 | ||
| 44 | - }, | ||
| 45 | 475 | ||
| 46 | - /** | ||
| 47 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
| 48 | - */ | ||
| 49 | - onPullDownRefresh: function () { | ||
| 50 | 476 | ||
| 51 | - }, | ||
| 52 | 477 | ||
| 53 | - /** | ||
| 54 | - * 页面上拉触底事件的处理函数 | ||
| 55 | - */ | ||
| 56 | - onReachBottom: function () { | ||
| 57 | 478 | ||
| 58 | - }, | ||
| 59 | 479 | ||
| 60 | - /** | ||
| 61 | - * 用户点击右上角分享 | ||
| 62 | - */ | ||
| 63 | - onShareAppMessage: function () { | ||
| 64 | 480 | ||
| 65 | - } | ||
| 66 | -}) | ||
| 67 | \ No newline at end of file | 481 | \ No newline at end of file |
| 482 | +}) |
packageA/pages/details_serviceCard/details_serviceCard.wxml
| 1 | +<wxs module="filter" src="../../../utils/filter.wxs"></wxs> | ||
| 2 | + | ||
| 1 | <view class="main"> | 3 | <view class="main"> |
| 2 | <view class="bg-white pdh20 bdr12"> | 4 | <view class="bg-white pdh20 bdr12"> |
| 3 | - <!-- 门店名称栏 --> | ||
| 4 | - <view class="flex jc_sb ai_c pdv20"> | ||
| 5 | - <view class="ellipsis-1 pdr40 fs30"><text class="iconfont icon-shop c-red pdr10"></text>门店名称名称名称名称名称名称名称名称名称名称</view> | ||
| 6 | - <text class="c-red shrink0 fs26">待评价</text> | ||
| 7 | - </view> | ||
| 8 | - <!-- 列表栏 --> | ||
| 9 | - <view> | ||
| 10 | - <view class="flex pdv20"> | ||
| 11 | - <view class="pic-box shrink0"><image class="img-block" src="../../images/wx2.png"></image></view> | ||
| 12 | - <view class="pdl20 f1"> | ||
| 13 | - <view class="flex jc_sb ai_c"> | ||
| 14 | - <view class="title ellipsis-2 pdr40">我是商品标题</view> | ||
| 15 | - <text class="rmb c-6">10</text> | 5 | + <block wx:for="{{details.list}}"> |
| 6 | + <!-- 门店名称栏 --> | ||
| 7 | + <view class="flex jc_sb ai_c pdv20"> | ||
| 8 | + <view class="ellipsis-1 pdr40 fs30"><text class="iconfont icon-shop c-red pdr10"></text>{{item.pickup_name}}</view> | ||
| 9 | + <!-- 订单状态 --> | ||
| 10 | + <block> | ||
| 11 | + <text class="c-red shrink0 fs26" wx:if="{{details.order_status == 0}}">待支付</text> | ||
| 12 | + <text class="c-red shrink0 fs26" wx:if="{{details.order_status == 1}}">待评价</text> | ||
| 13 | + <text class="c-red shrink0 fs26" wx:if="{{details.order_status == 2}}">已评价</text> | ||
| 14 | + <text class="c-red shrink0 fs26" wx:if="{{details.order_status == 3}}">已取消</text> | ||
| 15 | + <text class="c-red shrink0 fs26" wx:if="{{details.order_status == 5}}">已作废</text> | ||
| 16 | + </block> | ||
| 17 | + </view> | ||
| 18 | + | ||
| 19 | + <!-- 列表栏 --> | ||
| 20 | + <view> | ||
| 21 | + <!-- <view class="flex pdv20" wx:for="{{details.list}}" bindtap="viewDetails" data-gid="{{item.card_id}}"> --> | ||
| 22 | + <view class="flex pdv20" bindtap="viewDetails" data-gid="{{item.card_id}}"> | ||
| 23 | + <view class="pic-box shrink0"> | ||
| 24 | + <image class="img-block" src="{{imghost + item.img_url}}" binderror="bind_bnerr" lazy-load="{{true}}" data-errorimg="details.list[{{index}}].img_url"></image> | ||
| 16 | </view> | 25 | </view> |
| 17 | - <view class="flex jc_sb ai_c c-9 fs24"> | ||
| 18 | - <text>10个/蓝色</text> | ||
| 19 | - <text>x1</text> | 26 | + <view class="pdl20 f1"> |
| 27 | + <view class="flex jc_sb ai_c"> | ||
| 28 | + <view class="title ellipsis-2 pdr40">{{item.service_name}}</view> | ||
| 29 | + <text class="rmb c-6">{{item.price}}</text> | ||
| 30 | + </view> | ||
| 31 | + <view class="flex jc_sb ai_c c-9 fs24"> | ||
| 32 | + <!-- <text>10个/蓝色</text> --> | ||
| 33 | + <text>x{{item.qty}}</text> | ||
| 34 | + </view> | ||
| 20 | </view> | 35 | </view> |
| 21 | </view> | 36 | </view> |
| 22 | </view> | 37 | </view> |
| 23 | - </view> | 38 | + </block> |
| 39 | + | ||
| 40 | + | ||
| 24 | <!-- 统计栏 --> | 41 | <!-- 统计栏 --> |
| 25 | - <view class="t-r bdt pdv20">共2件商品,合计:<text class="rmb c-red bold fs30">21.00</text></view> | 42 | + <view class="t-r bdt pdv20">共{{filter.count(details.list)}}件商品,合计:<text class="rmb c-red bold fs30">{{details.account}}</text></view> |
| 26 | </view> | 43 | </view> |
| 44 | + | ||
| 45 | + | ||
| 27 | <view class="bg-white pdh20 mgt20 bdr12"> | 46 | <view class="bg-white pdh20 mgt20 bdr12"> |
| 28 | <!-- 订单信息栏 --> | 47 | <!-- 订单信息栏 --> |
| 29 | <view class="pdv20">订单信息</view> | 48 | <view class="pdv20">订单信息</view> |
| 49 | + | ||
| 30 | <view class="flex jc_sb pdb20 ai_c"> | 50 | <view class="flex jc_sb pdb20 ai_c"> |
| 31 | - <view><text class="c-9">订单编号:</text>fwk20221252125222212 </view> | ||
| 32 | - <text class="btn-copy">复制</text> | 51 | + <view><text class="c-9">订单编号:</text>{{details.order_sn}}</view> |
| 52 | + <text class="btn-copy" bindtap="copy">复制</text> | ||
| 33 | </view> | 53 | </view> |
| 34 | - <view class="pdb20"><text class="c-9">下单时间:</text>2021-12-27 18:00:00</view> | 54 | + <view class="pdb20"><text class="c-9">下单时间:</text>{{filter.format_time(details.ctime, 1)}}</view> |
| 55 | + | ||
| 35 | <!-- 联系客服栏 --> | 56 | <!-- 联系客服栏 --> |
| 36 | <view class="flex t-c bdt"> | 57 | <view class="flex t-c bdt"> |
| 37 | - <view class="f1 pd20"><text class="iconfont icon-kefu c29f pdr20"></text>联系客服</view> | ||
| 38 | - <view class="f1 pd20 separator"><text class="iconfont icon-tongbu c-orange pdr20"></text>卡项同步</view> | 58 | + <!-- 客服 --> |
| 59 | + <block> | ||
| 60 | + <button class="f1" wx:if="{{sys_switch.weapp_customertype == 1}}" hover-class="none" open-type="contact" | ||
| 61 | + session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"><text class="iconfont icon-kefu c29f pdr10 fs36"></text>联系客服</button> | ||
| 62 | + <view class="f1 pd20" wx:elif="{{sys_switch.weapp_customertype== 2}}" bindtap="contact_wx"><text class="iconfont icon-kefu c29f pdr10 fs36"></text>联系客服</view> | ||
| 63 | + <view class="f1 pd20" wx:else bindtap="contactService"><text class="iconfont icon-kefu c29f pdr10 fs36"></text>联系客服</view> | ||
| 64 | + </block> | ||
| 65 | + <!-- 卡项同步先不做 --> | ||
| 66 | + <!-- <view class="f1 pd20 separator"><text class="iconfont icon-tongbu c-orange pdr20"></text>卡项同步</view> --> | ||
| 39 | </view> | 67 | </view> |
| 40 | </view> | 68 | </view> |
| 69 | + | ||
| 41 | <!-- 底部按钮栏 --> | 70 | <!-- 底部按钮栏 --> |
| 42 | <view class="btn-bar t-r bg-white pd20"> | 71 | <view class="btn-bar t-r bg-white pd20"> |
| 43 | - <text class="btn btn-border">立即评价</text> | ||
| 44 | - <text class="btn bg-red white mgl20">再来一单</text> | 72 | + <!-- 待支付 --> |
| 73 | + <block wx:if="{{details.order_status == 0}}"> | ||
| 74 | + <text class="btn btn-border" bindtap="cancle">取消订单</text> | ||
| 75 | + <text class="btn bg-red white mgl20" bindtap="pay">立即支付</text> | ||
| 76 | + </block> | ||
| 77 | + <!-- 已支付/未评价 --> | ||
| 78 | + <block wx:if="{{details.order_status == 1}}"> | ||
| 79 | + <text class="btn bg-orange white" bindtap="buy2">再来一单</text> | ||
| 80 | + <text class="btn bg-red white mgl20" bindtap="access">立即评价</text> | ||
| 81 | + </block> | ||
| 82 | + <!-- 已评价 --> | ||
| 83 | + <block wx:if="{{details.order_status == 2}}"> | ||
| 84 | + <text class="btn bg-orange white" bindtap="buy2">再来一单</text> | ||
| 85 | + <text class="btn bg-red white mgl20" bindtap="viewComment">查看评价</text> | ||
| 86 | + </block> | ||
| 45 | </view> | 87 | </view> |
| 46 | </view> | 88 | </view> |
packageA/pages/details_serviceCard/details_serviceCard.wxss
| @@ -18,6 +18,7 @@ page { | @@ -18,6 +18,7 @@ page { | ||
| 18 | border: 2rpx solid #808080; | 18 | border: 2rpx solid #808080; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | + | ||
| 21 | .bg-red { | 22 | .bg-red { |
| 22 | background-image: -webkit-linear-gradient(315deg,#f2140c,#f2270c 70%,#f24d0c); | 23 | background-image: -webkit-linear-gradient(315deg,#f2140c,#f2270c 70%,#f24d0c); |
| 23 | background-image: linear-gradient(135deg,#f2140c,#f2270c 70%,#f24d0c); | 24 | background-image: linear-gradient(135deg,#f2140c,#f2270c 70%,#f24d0c); |
pages/goods/categoryList/categoryList.js
| @@ -67,7 +67,10 @@ Page({ | @@ -67,7 +67,10 @@ Page({ | ||
| 67 | status_show:0, | 67 | status_show:0, |
| 68 | currentTab: 0, //预设当前项的值 | 68 | currentTab: 0, //预设当前项的值 |
| 69 | 69 | ||
| 70 | - load:0, | 70 | + load:0, |
| 71 | + xmlist: null, | ||
| 72 | + | ||
| 73 | + | ||
| 71 | }, | 74 | }, |
| 72 | 75 | ||
| 73 | 76 | ||
| @@ -134,6 +137,7 @@ Page({ | @@ -134,6 +137,7 @@ Page({ | ||
| 134 | 137 | ||
| 135 | if (this.data.is_used_share==0){ | 138 | if (this.data.is_used_share==0){ |
| 136 | this.get_nation(); | 139 | this.get_nation(); |
| 140 | + this.getServiceCategory(); | ||
| 137 | } | 141 | } |
| 138 | 142 | ||
| 139 | //风格三 | 143 | //风格三 |
| @@ -202,7 +206,7 @@ Page({ | @@ -202,7 +206,7 @@ Page({ | ||
| 202 | if(this.data.load) return false; | 206 | if(this.data.load) return false; |
| 203 | 207 | ||
| 204 | getApp().getConfig2(function (e) { | 208 | getApp().getConfig2(function (e) { |
| 205 | - | 209 | + console.log('card------------>>>>', e); |
| 206 | var data=e; | 210 | var data=e; |
| 207 | var switch_list_data = data.switch_list; | 211 | var switch_list_data = data.switch_list; |
| 208 | var switch_list = JSON.parse(switch_list_data); | 212 | var switch_list = JSON.parse(switch_list_data); |
| @@ -215,13 +219,14 @@ Page({ | @@ -215,13 +219,14 @@ Page({ | ||
| 215 | if (e.categoryset.indexOf("," + 1 + ",") != -1) { that.setData({ is_show_pl: 1 }); } | 219 | if (e.categoryset.indexOf("," + 1 + ",") != -1) { that.setData({ is_show_pl: 1 }); } |
| 216 | if (e.categoryset.indexOf("," + 3 + ",") != -1) { that.setData({ is_show_pp: 1 }); } | 220 | if (e.categoryset.indexOf("," + 3 + ",") != -1) { that.setData({ is_show_pp: 1 }); } |
| 217 | if (e.categoryset.indexOf("," + 2 + ",") != -1) { that.setData({ is_show_gb: 1 }); } | 221 | if (e.categoryset.indexOf("," + 2 + ",") != -1) { that.setData({ is_show_gb: 1 }); } |
| 222 | + if (e.categoryset.indexOf("," + 4 + ",") != -1) { that.setData({ is_show_xm: 1 }); } | ||
| 218 | that.setData({ store_config: e,is_do:1 }); | 223 | that.setData({ store_config: e,is_do:1 }); |
| 219 | 224 | ||
| 220 | //---有勾品类--- | 225 | //---有勾品类--- |
| 221 | if (that.data.is_show_pl){ | 226 | if (that.data.is_show_pl){ |
| 222 | that.requestFirstCategoris(); | 227 | that.requestFirstCategoris(); |
| 223 | } | 228 | } |
| 224 | - if (that.data.is_show_gb != 1 && that.data.is_show_pp != 1 && that.data.is_show_pl){ | 229 | + if (that.data.is_show_xm != 1 && that.data.is_show_gb != 1 && that.data.is_show_pp != 1 && that.data.is_show_pl){ |
| 225 | that.data.pl_timer = setInterval(function () { | 230 | that.data.pl_timer = setInterval(function () { |
| 226 | if (that.data.one_level_classify.length>0){ | 231 | if (that.data.one_level_classify.length>0){ |
| 227 | var item=that.data.one_level_classify[0],arr=item.array; | 232 | var item=that.data.one_level_classify[0],arr=item.array; |
| @@ -259,6 +264,7 @@ Page({ | @@ -259,6 +264,7 @@ Page({ | ||
| 259 | if (that.data.is_show_pl) that.setData({ currentTab: 0 }); | 264 | if (that.data.is_show_pl) that.setData({ currentTab: 0 }); |
| 260 | else if (that.data.is_show_gb){ that.setData({ currentTab: 1 });that.get_nation(); } | 265 | else if (that.data.is_show_gb){ that.setData({ currentTab: 1 });that.get_nation(); } |
| 261 | else if (that.data.is_show_pp) {that.setData({ currentTab: 2 });that.get_brand(); } | 266 | else if (that.data.is_show_pp) {that.setData({ currentTab: 2 });that.get_brand(); } |
| 267 | + else if (that.data.is_show_xm) {that.setData({ currentTab: 3 });that.getServiceCategory(); } | ||
| 262 | 268 | ||
| 263 | //----求传参过来的控制----- | 269 | //----求传参过来的控制----- |
| 264 | if (getApp().globalData.cat_type == 1 && that.data.is_show_gb ) { | 270 | if (getApp().globalData.cat_type == 1 && that.data.is_show_gb ) { |
| @@ -267,6 +273,9 @@ Page({ | @@ -267,6 +273,9 @@ Page({ | ||
| 267 | } else if (getApp().globalData.cat_type == 2 && that.data.is_show_pp ) { | 273 | } else if (getApp().globalData.cat_type == 2 && that.data.is_show_pp ) { |
| 268 | that.setData({ currentTab: 2 }); | 274 | that.setData({ currentTab: 2 }); |
| 269 | that.get_brand(); | 275 | that.get_brand(); |
| 276 | + } else if (getApp().globalData.cat_type == 3 && that.data.is_show_xm ) { | ||
| 277 | + that.setData({ currentTab: 3 }); | ||
| 278 | + that.getServiceCategory(); | ||
| 270 | } else if (that.data.is_show_pl) { | 279 | } else if (that.data.is_show_pl) { |
| 271 | that.setData({ currentTab: 0 }); | 280 | that.setData({ currentTab: 0 }); |
| 272 | } | 281 | } |
| @@ -277,7 +286,7 @@ Page({ | @@ -277,7 +286,7 @@ Page({ | ||
| 277 | that.setData({ status_show: 2 }); | 286 | that.setData({ status_show: 2 }); |
| 278 | } | 287 | } |
| 279 | 288 | ||
| 280 | - that.data.load=1; | 289 | + that.data.load=1; |
| 281 | }) | 290 | }) |
| 282 | 291 | ||
| 283 | }, | 292 | }, |
| @@ -402,6 +411,13 @@ Page({ | @@ -402,6 +411,13 @@ Page({ | ||
| 402 | if (e.detail.current == 2 && that.data.groups == null) { | 411 | if (e.detail.current == 2 && that.data.groups == null) { |
| 403 | that.get_brand(); | 412 | that.get_brand(); |
| 404 | } | 413 | } |
| 414 | + | ||
| 415 | + //获取服务卡项 | ||
| 416 | + if (e.detail.current == 3 && that.data.xmlist == null) { | ||
| 417 | + that.getServiceCategory(); | ||
| 418 | + } | ||
| 419 | + | ||
| 420 | + | ||
| 405 | }, | 421 | }, |
| 406 | //-----------点击切换----------- | 422 | //-----------点击切换----------- |
| 407 | clickTab: function (e) { | 423 | clickTab: function (e) { |
| @@ -422,9 +438,15 @@ Page({ | @@ -422,9 +438,15 @@ Page({ | ||
| 422 | if (e.detail.current == 2 && that.data.groups == null) { | 438 | if (e.detail.current == 2 && that.data.groups == null) { |
| 423 | that.get_brand(); | 439 | that.get_brand(); |
| 424 | } | 440 | } |
| 441 | + | ||
| 442 | + //获取服务卡项 | ||
| 443 | + if (e.detail.current == 3 && that.data.xmlist == null) { | ||
| 444 | + that.getServiceCategory(); | ||
| 445 | + } | ||
| 446 | + | ||
| 425 | }, | 447 | }, |
| 426 | 448 | ||
| 427 | - tabLetter(e) { | 449 | + tabLetter(e) { |
| 428 | const index = e.currentTarget.dataset.index; | 450 | const index = e.currentTarget.dataset.index; |
| 429 | this.setData({ | 451 | this.setData({ |
| 430 | selected: index, | 452 | selected: index, |
| @@ -488,8 +510,9 @@ Page({ | @@ -488,8 +510,9 @@ Page({ | ||
| 488 | var lurl = "/pages/goods/goodsList/goodsList?nation_id=" + cid; | 510 | var lurl = "/pages/goods/goodsList/goodsList?nation_id=" + cid; |
| 489 | wx.navigateTo({ url: lurl }); | 511 | wx.navigateTo({ url: lurl }); |
| 490 | }, | 512 | }, |
| 513 | + | ||
| 491 | //获取国别 | 514 | //获取国别 |
| 492 | - get_nation:function(){ | 515 | + get_nation:function() { |
| 493 | var s = this; | 516 | var s = this; |
| 494 | e.get("/api/weshop/nation/page", { | 517 | e.get("/api/weshop/nation/page", { |
| 495 | data: { | 518 | data: { |
| @@ -575,6 +598,33 @@ Page({ | @@ -575,6 +598,33 @@ Page({ | ||
| 575 | } | 598 | } |
| 576 | }); | 599 | }); |
| 577 | }, | 600 | }, |
| 601 | + | ||
| 602 | + | ||
| 603 | + // 获取服务卡项分类 | ||
| 604 | + getServiceCategory: function() { | ||
| 605 | + var s = this; | ||
| 606 | + e.get("/api/weshop/serviceCategory/page", { | ||
| 607 | + data: { | ||
| 608 | + is_show: 1, | ||
| 609 | + store_id:oo.stoid, | ||
| 610 | + pageSize: 1000, | ||
| 611 | + }, | ||
| 612 | + success: function (e) { | ||
| 613 | + var dda = e.data.data.pageData; | ||
| 614 | + s.setData({ | ||
| 615 | + xmlist:dda, | ||
| 616 | + }); | ||
| 617 | + } | ||
| 618 | + }); | ||
| 619 | + }, | ||
| 620 | + | ||
| 621 | + | ||
| 622 | + goServiceCategoryList: function(t) { | ||
| 623 | + var cid = t.currentTarget.dataset.cid; | ||
| 624 | + var lurl = "/packageA/pages/cardList/cardList?cat_id=" + cid; | ||
| 625 | + wx.navigateTo({ url: lurl }); | ||
| 626 | + }, | ||
| 627 | + | ||
| 578 | //---------分享配置-------- | 628 | //---------分享配置-------- |
| 579 | onShareAppMessage: function (e) { | 629 | onShareAppMessage: function (e) { |
| 580 | 630 | ||
| @@ -659,7 +709,7 @@ Page({ | @@ -659,7 +709,7 @@ Page({ | ||
| 659 | let cur = e.currentTarget.dataset.current; | 709 | let cur = e.currentTarget.dataset.current; |
| 660 | if(cur) { | 710 | if(cur) { |
| 661 | if (this.data.currentTab == cur) { | 711 | if (this.data.currentTab == cur) { |
| 662 | - if (this.data.select_classify_on != 220 && this.data.select_classify_on != 223) { | 712 | + if (this.data.select_classify_on != 220 && this.data.select_classify_on != 221 && this.data.select_classify_on != 223) { |
| 663 | return false; | 713 | return false; |
| 664 | } else if (cur != 0) { | 714 | } else if (cur != 0) { |
| 665 | return false; | 715 | return false; |
| @@ -746,6 +796,8 @@ Page({ | @@ -746,6 +796,8 @@ Page({ | ||
| 746 | _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; | 796 | _errObj[_errImg] = "/miniapp/images/default_g_img.gif"; |
| 747 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | 797 | this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; |
| 748 | }, | 798 | }, |
| 799 | + | ||
| 800 | + | ||
| 749 | //选择更多 | 801 | //选择更多 |
| 750 | select_more:function(e){ | 802 | select_more:function(e){ |
| 751 | var cid = e.currentTarget.dataset.cid; | 803 | var cid = e.currentTarget.dataset.cid; |
| @@ -754,6 +806,8 @@ Page({ | @@ -754,6 +806,8 @@ Page({ | ||
| 754 | wx.navigateTo({ url: lurl }); | 806 | wx.navigateTo({ url: lurl }); |
| 755 | 807 | ||
| 756 | }, | 808 | }, |
| 809 | + | ||
| 810 | + | ||
| 757 | //扫一扫 | 811 | //扫一扫 |
| 758 | getScancode:function(){ | 812 | getScancode:function(){ |
| 759 | var _this = this; | 813 | var _this = this; |
| @@ -767,6 +821,8 @@ Page({ | @@ -767,6 +821,8 @@ Page({ | ||
| 767 | } | 821 | } |
| 768 | }) | 822 | }) |
| 769 | }, | 823 | }, |
| 824 | + | ||
| 825 | + | ||
| 770 | onUnload: function () { | 826 | onUnload: function () { |
| 771 | //this.destroyActivityTimer(); | 827 | //this.destroyActivityTimer(); |
| 772 | }, | 828 | }, |
pages/goods/categoryList/categoryList.wxml
| @@ -12,6 +12,8 @@ | @@ -12,6 +12,8 @@ | ||
| 12 | data-current="1" bindtap="clickTab">国家</view> | 12 | data-current="1" bindtap="clickTab">国家</view> |
| 13 | <view wx:if="{{is_show_pp}}" class="swiper-tab-item {{currentTab==2?'active':''}}" | 13 | <view wx:if="{{is_show_pp}}" class="swiper-tab-item {{currentTab==2?'active':''}}" |
| 14 | data-current="2" bindtap="clickTab">品牌</view> | 14 | data-current="2" bindtap="clickTab">品牌</view> |
| 15 | + <view wx:if="{{is_show_xm}}" class="swiper-tab-item {{currentTab==3?'active':''}}" | ||
| 16 | + data-current="3" bindtap="clickTab">项目</view> | ||
| 15 | </view> | 17 | </view> |
| 16 | </view> | 18 | </view> |
| 17 | <view class="search-box " bindtap="goseach"> | 19 | <view class="search-box " bindtap="goseach"> |
| @@ -22,7 +24,7 @@ | @@ -22,7 +24,7 @@ | ||
| 22 | <input bindfocus="goseach" class="search-cont" placeholder="寻找好口碑" type="text"></input> | 24 | <input bindfocus="goseach" class="search-cont" placeholder="寻找好口碑" type="text"></input> |
| 23 | </view> | 25 | </view> |
| 24 | </view> | 26 | </view> |
| 25 | - <block wx:if="{{is_show_pl || is_show_gb || is_show_pp }}"> | 27 | + <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}"> |
| 26 | <swiper current="{{currentTab}}" duration="300" bindanimationfinish="swiperTab" style="height:{{abc}}rpx;margin-bottom:120rpx"> | 28 | <swiper current="{{currentTab}}" duration="300" bindanimationfinish="swiperTab" style="height:{{abc}}rpx;margin-bottom:120rpx"> |
| 27 | <!--------分类----------> | 29 | <!--------分类----------> |
| 28 | <swiper-item > | 30 | <swiper-item > |
| @@ -86,6 +88,26 @@ | @@ -86,6 +88,26 @@ | ||
| 86 | </view> | 88 | </view> |
| 87 | </view> | 89 | </view> |
| 88 | </swiper-item> | 90 | </swiper-item> |
| 91 | + <!-------项目----------> | ||
| 92 | + <swiper-item wx:if="{{is_show_xm}}"> | ||
| 93 | + <scroll-view scroll-y="true" class="fenlei-list" | ||
| 94 | + scroll-with-animation="true" lower-threshold="1" bindscrolltolower="scrolltolower" style="height: {{abc}}rpx;" > | ||
| 95 | + <block wx:for="{{xmlist}}" wx:for-item="fitem" > | ||
| 96 | + <view class='f_item'> | ||
| 97 | + <view class="pic_view" bindtap="goServiceCategoryList" data-cid="{{fitem.id}}" data-pid="0"> | ||
| 98 | + | ||
| 99 | + <image wx:if="{{fitem.showImgType==1}}" binderror="bind_bnerr2" class='fl_img' data-errorimg="catelist[{{index}}].items.image" src='{{fitem.showImg}}'></image> | ||
| 100 | + <image wx:else class='fl_img' binderror="bind_bnerr2" data-errorimg="catelist[{{index}}].items.image" src='{{iurl}}{{fitem.showImg}}'></image> | ||
| 101 | + | ||
| 102 | + <view class='over_view'></view> | ||
| 103 | + <text class='f_item_over_t'>{{fitem.name}}</text></view> | ||
| 104 | + <view class='fenlei_text_v'> | ||
| 105 | + <view class='f_text' wx:for="{{fitem.array}}" wx:for-item="item" bindtap="goServiceCategoryList" data-cid="{{item.id}}" data-pid="{{item.parent_id}}">{{item.name}}</view> | ||
| 106 | + </view> | ||
| 107 | + </view> | ||
| 108 | + </block> | ||
| 109 | + </scroll-view> | ||
| 110 | + </swiper-item> | ||
| 89 | </swiper> | 111 | </swiper> |
| 90 | <view class="no-data" wx:if="{{!is_date}}"> | 112 | <view class="no-data" wx:if="{{!is_date}}"> |
| 91 | <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> | 113 | <image class="cart-image" src="{{iurl}}/miniapp/images/cart-null.png"></image> |
| @@ -103,7 +125,7 @@ | @@ -103,7 +125,7 @@ | ||
| 103 | </block> | 125 | </block> |
| 104 | <!-- 风格2 --> | 126 | <!-- 风格2 --> |
| 105 | <block wx:elif="{{is_used_share == 1}}"> | 127 | <block wx:elif="{{is_used_share == 1}}"> |
| 106 | - <block wx:if="{{is_show_pl || is_show_gb || is_show_pp }}"> | 128 | + <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}"> |
| 107 | <!-- 新版分类头部 --> | 129 | <!-- 新版分类头部 --> |
| 108 | <view class="xc-search-box flex jc_sb ai-center" style="position:fixed;top:0;z-index:99"> | 130 | <view class="xc-search-box flex jc_sb ai-center" style="position:fixed;top:0;z-index:99"> |
| 109 | <!-- <view class="xc-search-inner "> | 131 | <!-- <view class="xc-search-inner "> |
| @@ -129,38 +151,48 @@ | @@ -129,38 +151,48 @@ | ||
| 129 | <!-- 分类项目的类型 --> | 151 | <!-- 分类项目的类型 --> |
| 130 | <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;"> | 152 | <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;"> |
| 131 | <view class="project_type-frame" style="margin-bottom:120rpx;"> | 153 | <view class="project_type-frame" style="margin-bottom:120rpx;"> |
| 132 | - <view wx:if="{{is_show_gb}}" class="{{status_show == 1?'':''}}"> | 154 | + <view wx:if="{{is_show_gb}}" class="{{status_show == 1?'':''}}"> |
| 133 | <!-- <view style="{{status_show == 1?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | 155 | <!-- <view style="{{status_show == 1?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> |
| 134 | - <view bindtap="click_classify" style="{{status_show == 1?'margin-top:0':'margin-top:40rpx'}}" class="fs30 {{select_classify_on==223?'select_classify':''}}"data-index="223"data-name="国家" wx:if="{{is_country}}"> | ||
| 135 | - | ||
| 136 | - <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">国家</view> --> | ||
| 137 | - <view class="tab-bar-item sort-name ellipsis-1" style="">国家</view> | 156 | + <view bindtap="click_classify" style="{{status_show == 1?'margin-top:0':'margin-top:40rpx'}}" class="fs30 {{select_classify_on==223?'select_classify':''}}" data-index="223" data-name="国家" wx:if="{{is_country}}"> |
| 157 | + | ||
| 158 | + <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">国家</view> --> | ||
| 159 | + <view class="tab-bar-item sort-name ellipsis-1" style="">国家</view> | ||
| 138 | 160 | ||
| 161 | + </view> | ||
| 139 | </view> | 162 | </view> |
| 140 | - </view> | ||
| 141 | - <view wx:if="{{is_show_pp}}" class="{{status_show == 2?'':''}}"> | 163 | + |
| 164 | + <view wx:if="{{is_show_pp}}"> | ||
| 142 | <!-- <view style="{{status_show == 2?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | 165 | <!-- <view style="{{status_show == 2?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> |
| 143 | - <view bindtap="click_classify" class="{{select_classify_on==220?'select_classify':''}} fs30" wx:if="{{is_brand}}"data-index="220"data-name="品牌"> | 166 | + <view bindtap="click_classify" class="{{select_classify_on==220?'select_classify':''}} fs30" wx:if="{{is_brand}}" data-index="220" data-name="品牌"> |
| 144 | 167 | ||
| 145 | - <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">品牌</view> --> | ||
| 146 | - <view class="tab-bar-item sort-name ellipsis-1" style="">品牌</view> | ||
| 147 | - </view> | 168 | + <!-- <view class="tab-bar-item sort-name ellipsis-1" style="letter-spacing:50rpx;">品牌</view> --> |
| 169 | + <view class="tab-bar-item sort-name ellipsis-1" style="">品牌</view> | ||
| 170 | + </view> | ||
| 148 | </view> | 171 | </view> |
| 172 | + | ||
| 173 | + <!-- 项目 --> | ||
| 174 | + <view wx:if="{{is_show_xm}}"> | ||
| 175 | + <view bindtap="click_classify" class="fs30 {{select_classify_on==221?'select_classify':''}}" data-index="221" data-name="项目"> | ||
| 176 | + <view class="tab-bar-item sort-name ellipsis-1">项目</view> | ||
| 177 | + </view> | ||
| 178 | + </view> | ||
| 179 | + | ||
| 180 | + | ||
| 181 | + <!-- 品类 --> | ||
| 149 | <view wx:if="{{is_show_pl}}"> | 182 | <view wx:if="{{is_show_pl}}"> |
| 150 | - | ||
| 151 | - <view wx:for="{{one_level_classify}}" wx:for-item="ittms" > | ||
| 152 | - <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> | ||
| 153 | - <!-- 添加左边红色条 --> | ||
| 154 | - <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | ||
| 155 | - <view bindtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} fs30 t-c {{select_classify_on==index&&ittms.items.name.length==2?'':''}} {{select_classify_on==index&&ittms.items.name.length==3?'':''}}"data-index="{{index}}"data-name="{{ittms.items.mobile_name}}"> | ||
| 156 | - | ||
| 157 | - <view class="tab-bar-item sort-name ellipsis-1">{{ittms.items.name}}</view> | ||
| 158 | - </view> | ||
| 159 | - | ||
| 160 | - </view> | 183 | + <view wx:for="{{one_level_classify}}" wx:for-item="ittms"> |
| 184 | + <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> | ||
| 185 | + <!-- 添加左边红色条 --> | ||
| 186 | + <!-- <view style="{{ittms.items.is_show_class == true?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> | ||
| 187 | + <view bindtap="click_classify" data-arr="{{ittms.array}}" data-cid="{{ittms.items.id}}" data-pid="0" class="{{select_classify_on==index?'select_classify width80':''}} fs30 t-c {{select_classify_on==index&&ittms.items.name.length==2?'':''}} {{select_classify_on==index&&ittms.items.name.length==3?'':''}}"data-index="{{index}}"data-name="{{ittms.items.mobile_name}}"> | ||
| 188 | + | ||
| 189 | + <view class="tab-bar-item sort-name ellipsis-1">{{ittms.items.name}}</view> | ||
| 190 | + </view> | ||
| 191 | + </view> | ||
| 192 | + </view> | ||
| 193 | + </view> | ||
| 194 | + | ||
| 161 | </view> | 195 | </view> |
| 162 | - </view> | ||
| 163 | - </view> | ||
| 164 | 196 | ||
| 165 | </view> | 197 | </view> |
| 166 | <!-- 分类项目的内容 --> | 198 | <!-- 分类项目的内容 --> |
| @@ -211,11 +243,32 @@ | @@ -211,11 +243,32 @@ | ||
| 211 | </block> | 243 | </block> |
| 212 | </view> | 244 | </view> |
| 213 | </block> | 245 | </block> |
| 246 | + | ||
| 247 | + <!-- 卡项 --> | ||
| 248 | + <!-- <block wx:if="{{select_classify_on==220&&is_show_xm}}"> --> | ||
| 249 | + <block wx:if="{{select_classify_on==221&&is_show_xm}}"> | ||
| 250 | + <view class="classify_name fs28 flex-space-between"> | ||
| 251 | + <view>{{classify_name}}</view> | ||
| 252 | + </view> | ||
| 253 | + | ||
| 254 | + <view class="classify_content-frame flex flex-wrap" style="padding-bottom: 130rpx;"> | ||
| 255 | + <block wx:for="{{xmlist}}"> | ||
| 256 | + <view class="brand_img_frame" bindtap="goServiceCategoryList" data-cid="{{item.id}}" > | ||
| 257 | + <view class="t-c"> | ||
| 258 | + <image class="brand_img" src="{{item.ico}}" data-errorimg="xmlist[{{index}}].ico" binderror="bind_bnerr_pp" mode="heightFix"></image> | ||
| 259 | + <view class="brand_img_name ellipsis-1 fs24">{{item.name}}</view> | ||
| 260 | + </view> | ||
| 261 | + </view> | ||
| 262 | + </block> | ||
| 263 | + </view> | ||
| 264 | + </block> | ||
| 265 | + | ||
| 214 | <!-- 品类--> | 266 | <!-- 品类--> |
| 215 | - <block wx:if="{{is_show_pl}}"> | ||
| 216 | - <block wx:if="{{select_classify_on!=220&&select_classify_on!=223&&is_level_three!=1}}"> | 267 | + <block wx:if="{{is_show_pl&&select_classify_on == 0}}"> |
| 268 | + <!-- <block wx:if="{{select_classify_on!=221&&select_classify_on!=220&&select_classify_on!=223&&is_level_three!=1}}"> --> | ||
| 269 | + <block wx:if="{{select_classify_on == 0&&is_level_three!=1}}"> | ||
| 217 | <view class="my-container"> | 270 | <view class="my-container"> |
| 218 | - <view class="classify_name fs28 flex-space-between ai-center"data-pid="0"data-cid="{{cat_id}}" bindtap='select_more'> | 271 | + <view class="classify_name fs28 flex-space-between ai-center" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more'> |
| 219 | <view class="classify_title ellipsis-1">{{classify_name}}</view> | 272 | <view class="classify_title ellipsis-1">{{classify_name}}</view> |
| 220 | <view class="flex select_more ai-center" > | 273 | <view class="flex select_more ai-center" > |
| 221 | <view class="red-co fs24" >更多</view> | 274 | <view class="red-co fs24" >更多</view> |
| @@ -241,8 +294,8 @@ | @@ -241,8 +294,8 @@ | ||
| 241 | </block> | 294 | </block> |
| 242 | 295 | ||
| 243 | <!-- 商品 含有3级的--> | 296 | <!-- 商品 含有3级的--> |
| 244 | - <block wx:if="{{select_classify_on!=220&&select_classify_on!=223&&is_level_three==1}}"> | ||
| 245 | - <block wx:for="{{goodslist}}"wx:for-item="goods"wx:for-index="inds"> | 297 | + <block wx:if="{{select_classify_on!=220&&select_classify_on!=221&&select_classify_on!=223&&is_level_three==1}}"> |
| 298 | + <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="inds"> | ||
| 246 | <view> | 299 | <view> |
| 247 | 300 | ||
| 248 | <view class="classify_name fs28 flex-space-between ai-center"data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'> | 301 | <view class="classify_name fs28 flex-space-between ai-center"data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'> |
| @@ -282,7 +335,7 @@ | @@ -282,7 +335,7 @@ | ||
| 282 | </block> | 335 | </block> |
| 283 | <!-- 风格3 --> | 336 | <!-- 风格3 --> |
| 284 | <block wx:elif="{{is_used_share == 2}}"> | 337 | <block wx:elif="{{is_used_share == 2}}"> |
| 285 | - <block wx:if="{{is_show_pl || is_show_gb || is_show_pp }}"> | 338 | + <block wx:if="{{is_show_pl || is_show_gb || is_show_pp || is_show_xm}}"> |
| 286 | <!-- 头部 --> | 339 | <!-- 头部 --> |
| 287 | <view class="xc-search-box flex-center white_b" id="navbar" style="position:fixed;top:0;z-index:99"> | 340 | <view class="xc-search-box flex-center white_b" id="navbar" style="position:fixed;top:0;z-index:99"> |
| 288 | <!-- <view class="share-height t-c" bindtap="getScancode" > | 341 | <!-- <view class="share-height t-c" bindtap="getScancode" > |
| @@ -314,16 +367,27 @@ | @@ -314,16 +367,27 @@ | ||
| 314 | <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;" id="thress_type3"> | 367 | <view class="project_type" style="background-color:#f4f4f4;overflow-y:auto;position:fixed;left:0;z-index:99;top:108rpx;" id="thress_type3"> |
| 315 | <view class="project_type-frame" style="margin-bottom:120rpx;"> | 368 | <view class="project_type-frame" style="margin-bottom:120rpx;"> |
| 316 | <view wx:if="{{is_show_gb}}"> | 369 | <view wx:if="{{is_show_gb}}"> |
| 317 | - <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==223 ? 'active' : ''}}" data-current="223" data-index="223" data-name="国家" wx:if="{{is_country}}"> | 370 | + <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==223 ? 'active' : ''}}" data-index="223" data-name="国家" wx:if="{{is_country}}"> |
| 318 | <text style="">国家</text> | 371 | <text style="">国家</text> |
| 319 | </view> | 372 | </view> |
| 320 | </view> | 373 | </view> |
| 374 | + | ||
| 321 | <view wx:if="{{is_show_pp}}"> | 375 | <view wx:if="{{is_show_pp}}"> |
| 322 | - | ||
| 323 | - <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==220 ? 'active' : ''}}" wx:if="{{is_brand}}" data-current="220" data-index="220" data-name="品牌"> | 376 | + <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==220 ? 'active' : ''}}" wx:if="{{is_brand}}" data-index="220" data-name="品牌"> |
| 324 | <text style="">品牌</text> | 377 | <text style="">品牌</text> |
| 325 | </view> | 378 | </view> |
| 326 | </view> | 379 | </view> |
| 380 | + | ||
| 381 | + | ||
| 382 | + <!-- 卡项 --> | ||
| 383 | + <view wx:if="{{is_show_xm}}"> | ||
| 384 | + <view bindtap="click_classify" class="tab-bar-item {{select_classify_on == 221 ? 'active' : ''}}" data-index="221" data-name="项目"> | ||
| 385 | + <text>项目</text> | ||
| 386 | + </view> | ||
| 387 | + </view> | ||
| 388 | + | ||
| 389 | + | ||
| 390 | + | ||
| 327 | <view wx:if="{{is_show_pl}}"> | 391 | <view wx:if="{{is_show_pl}}"> |
| 328 | <!-- <view wx:for="{{one_level_classify}}" wx:for-item="ittms" class="class_set_height"> --> | 392 | <!-- <view wx:for="{{one_level_classify}}" wx:for-item="ittms" class="class_set_height"> --> |
| 329 | <!-- <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> --> | 393 | <!-- <view class="{{ittms.items.is_show_class == true?'is_show_class':''}}"> --> |
| @@ -356,6 +420,9 @@ | @@ -356,6 +420,9 @@ | ||
| 356 | 420 | ||
| 357 | <!-- </view> --> | 421 | <!-- </view> --> |
| 358 | </view> | 422 | </view> |
| 423 | + | ||
| 424 | + | ||
| 425 | + | ||
| 359 | </view> | 426 | </view> |
| 360 | </view> | 427 | </view> |
| 361 | <!-- 分类项目的内容 --> | 428 | <!-- 分类项目的内容 --> |
| @@ -383,6 +450,8 @@ | @@ -383,6 +450,8 @@ | ||
| 383 | </view> | 450 | </view> |
| 384 | </view> | 451 | </view> |
| 385 | </block> | 452 | </block> |
| 453 | + | ||
| 454 | + | ||
| 386 | <!-- 品牌 --> | 455 | <!-- 品牌 --> |
| 387 | <block wx:if="{{select_classify_on==220&&is_show_pp}}"> | 456 | <block wx:if="{{select_classify_on==220&&is_show_pp}}"> |
| 388 | 457 | ||
| @@ -405,9 +474,31 @@ | @@ -405,9 +474,31 @@ | ||
| 405 | </block> | 474 | </block> |
| 406 | </view> | 475 | </view> |
| 407 | </block> | 476 | </block> |
| 477 | + | ||
| 478 | + | ||
| 479 | + <!-- 卡项 --> | ||
| 480 | + <block wx:if="{{select_classify_on==221&&is_show_xm}}"> | ||
| 481 | + <view class="classify_name fs28 flex-space-between"> | ||
| 482 | + <view>{{classify_name}}</view> | ||
| 483 | + </view> | ||
| 484 | + | ||
| 485 | + <view class="classify_content-frame flex flex-wrap" style="padding-bottom: 130rpx;"> | ||
| 486 | + <block wx:for="{{xmlist}}"> | ||
| 487 | + <view class="brand_img_frame" bindtap="goServiceCategoryList" data-cid="{{item.id}}" > | ||
| 488 | + <view class="t-c"> | ||
| 489 | + <image class="brand_img" src="{{item.ico}}" data-errorimg="xmlist[{{index}}].ico" binderror="bind_bnerr_pp" mode="heightFix"></image> | ||
| 490 | + <view class="brand_img_name ellipsis-1 fs24">{{item.name}}</view> | ||
| 491 | + </view> | ||
| 492 | + </view> | ||
| 493 | + </block> | ||
| 494 | + </view> | ||
| 495 | + </block> | ||
| 496 | + | ||
| 497 | + | ||
| 408 | <!-- 品类--> | 498 | <!-- 品类--> |
| 409 | - <block wx:if="{{is_show_pl}}"> | ||
| 410 | - <block wx:if="{{select_classify_on!=220&&select_classify_on!=223}}"> | 499 | + <block wx:if="{{select_classify_on==0&&is_show_pl}}"> |
| 500 | + <!-- <block wx:if="{{select_classify_on!=220&&select_classify_on!=223}}"> --> | ||
| 501 | + <block wx:if="{{select_classify_on == 0}}"> | ||
| 411 | <view style="width:100%;height:100%;position: relative;"> | 502 | <view style="width:100%;height:100%;position: relative;"> |
| 412 | <view class="classify_name fs28 flex ai-center flex-space-between" id="header" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more' style="box-sizing:border-box;position:fixed;z-index: 999;width:74%;background-color:#ffffff;padding:0 20rpx;"> | 503 | <view class="classify_name fs28 flex ai-center flex-space-between" id="header" data-pid="0" data-cid="{{cat_id}}" bindtap='select_more' style="box-sizing:border-box;position:fixed;z-index: 999;width:74%;background-color:#ffffff;padding:0 20rpx;"> |
| 413 | <view class="classify_title ellipsis-1">{{classify_name}}</view> | 504 | <view class="classify_title ellipsis-1">{{classify_name}}</view> |
pages/index/index/index.json
| @@ -17,10 +17,11 @@ | @@ -17,10 +17,11 @@ | ||
| 17 | "picMax": "/components/diy_picMax/diy_picMax", | 17 | "picMax": "/components/diy_picMax/diy_picMax", |
| 18 | "mvideo": "/components/diy_video/diy_video", | 18 | "mvideo": "/components/diy_video/diy_video", |
| 19 | "service": "/components/diy_service/diy_service", | 19 | "service": "/components/diy_service/diy_service", |
| 20 | - "scan": "/components/diy_scan/diy_scan", | ||
| 21 | - "store_select": "/components/diy_store_select/diy_store_select", | 20 | + "scan": "/components/diy_scan/diy_scan", |
| 21 | + "store_select": "/components/diy_store_select/diy_store_select", | ||
| 22 | "presell": "/components/diy_pregoods/diy_pregoods", | 22 | "presell": "/components/diy_pregoods/diy_pregoods", |
| 23 | - "luckyGo": "/components/diy_luckyGo/diy_luckyGo" | 23 | + "luckyGo": "/components/diy_luckyGo/diy_luckyGo", |
| 24 | + "serviceCard": "/components/diy_serviceCard/diy_serviceCard" | ||
| 24 | }, | 25 | }, |
| 25 | "enablePullDownRefresh": false | 26 | "enablePullDownRefresh": false |
| 26 | } | 27 | } |
| 27 | \ No newline at end of file | 28 | \ No newline at end of file |
pages/index/index/index.wxml
| @@ -522,6 +522,10 @@ | @@ -522,6 +522,10 @@ | ||
| 522 | <luckyGo object="{{item.content}}"></luckyGo> | 522 | <luckyGo object="{{item.content}}"></luckyGo> |
| 523 | </block> | 523 | </block> |
| 524 | 524 | ||
| 525 | + <!-- 服务卡项 --> | ||
| 526 | + <block wx:if="{{item.ename=='servicecategory'}}"> | ||
| 527 | + <serviceCard object="{{item.content}}"></serviceCard> | ||
| 528 | + </block> | ||
| 525 | 529 | ||
| 526 | </view> | 530 | </view> |
| 527 | 531 |
pages/payment/pay_success/pay_success.js
| @@ -24,44 +24,84 @@ Page({ | @@ -24,44 +24,84 @@ Page({ | ||
| 24 | wx.setNavigationBarTitle({ | 24 | wx.setNavigationBarTitle({ |
| 25 | title: '支付成功', | 25 | title: '支付成功', |
| 26 | }); | 26 | }); |
| 27 | - | 27 | + this.setData({ |
| 28 | + options, | ||
| 29 | + }); | ||
| 28 | var type=options.type,order_sn=options.order_sn; | 30 | var type=options.type,order_sn=options.order_sn; |
| 29 | var th=this,order=null; | 31 | var th=this,order=null; |
| 30 | - //如果是等1,就是单个订单的订单号 | ||
| 31 | - if(type==1){ | ||
| 32 | - await getApp().request.promiseGet("/api/weshop/order/page", | ||
| 33 | - {data:{store_id:e.globalData.setting.stoid,order_sn:order_sn}}).then(res=>{ | ||
| 34 | - if(ut.ajax_ok(res)){ | ||
| 35 | - order=res.data.data.pageData[0]; | ||
| 36 | - th.setData({order:order,order_sn:order_sn}) | ||
| 37 | - } | ||
| 38 | - | ||
| 39 | - }) | ||
| 40 | - }else{ | ||
| 41 | - await getApp().request.promiseGet("/api/weshop/order/page", | ||
| 42 | - {data:{store_id:e.globalData.setting.stoid,parent_sn:order_sn}}).then(res=>{ | ||
| 43 | - | ||
| 44 | - if(ut.ajax_ok(res)){ | ||
| 45 | - var allmoney=0,user_money=0; | ||
| 46 | - for(var i in res.data.data.pageData){ | ||
| 47 | - var item=res.data.data.pageData[i]; | ||
| 48 | - allmoney+=item.order_amount; | ||
| 49 | - user_money += item.user_money?item.user_money:0; | ||
| 50 | - } | ||
| 51 | - order=res.data.data.pageData[0]; | ||
| 52 | - th.setData({ order: order, type: 2, allmoney: allmoney, order_sn: order_sn, user_money: user_money}) | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - | ||
| 56 | - }) | ||
| 57 | - } | ||
| 58 | - //--获取门店-- | ||
| 59 | - if(order.exp_type==1) { | ||
| 60 | - await getApp().request.promiseGet("/api/weshop/pickup/get/"+ e.globalData.setting.stoid+"/"+order.pickup_id, | ||
| 61 | - {1:1}).then(res => { | ||
| 62 | - th.setData({pick:res.data.data}) | ||
| 63 | - }); | ||
| 64 | - } | 32 | + |
| 33 | + | ||
| 34 | + // 卡项订单 | ||
| 35 | + if(options.card == 1) { | ||
| 36 | + let url = '/api/weshop/recharge/user/page' | ||
| 37 | + let data = { | ||
| 38 | + store_id: getApp().globalData.setting.stoid, | ||
| 39 | + user_id: getApp().globalData.userInfo.user_id, | ||
| 40 | + order_id: this.data.options.order_id, | ||
| 41 | + }; | ||
| 42 | + | ||
| 43 | + // 请求数据 | ||
| 44 | + getApp().promiseGet(url, { | ||
| 45 | + data: data, | ||
| 46 | + }).then(res => { | ||
| 47 | + if (res.data.code == 0) { | ||
| 48 | + console.log('请求成功', res); | ||
| 49 | + this.setData({ | ||
| 50 | + order: res.data.data.pageData[0], | ||
| 51 | + order_sn: res.data.data.pageData[0].order_sn, | ||
| 52 | + }); | ||
| 53 | + } else { | ||
| 54 | + throw (res); | ||
| 55 | + }; | ||
| 56 | + }).catch(err => { | ||
| 57 | + wx.showToast({ | ||
| 58 | + title: err.data.data, | ||
| 59 | + icon: 'error', | ||
| 60 | + }); | ||
| 61 | + }); | ||
| 62 | + } else { | ||
| 63 | + | ||
| 64 | + //如果是等1,就是单个订单的订单号 | ||
| 65 | + if(type==1){ | ||
| 66 | + await getApp().request.promiseGet("/api/weshop/order/page", | ||
| 67 | + {data:{store_id:e.globalData.setting.stoid,order_sn:order_sn}}).then(res=>{ | ||
| 68 | + if(ut.ajax_ok(res)){ | ||
| 69 | + order=res.data.data.pageData[0]; | ||
| 70 | + th.setData({order:order,order_sn:order_sn}) | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + }) | ||
| 74 | + }else{ | ||
| 75 | + await getApp().request.promiseGet("/api/weshop/order/page", | ||
| 76 | + {data:{store_id:e.globalData.setting.stoid,parent_sn:order_sn}}).then(res=>{ | ||
| 77 | + | ||
| 78 | + if(ut.ajax_ok(res)){ | ||
| 79 | + var allmoney=0,user_money=0; | ||
| 80 | + for(var i in res.data.data.pageData){ | ||
| 81 | + var item=res.data.data.pageData[i]; | ||
| 82 | + allmoney+=item.order_amount; | ||
| 83 | + user_money += item.user_money?item.user_money:0; | ||
| 84 | + } | ||
| 85 | + order=res.data.data.pageData[0]; | ||
| 86 | + th.setData({ order: order, type: 2, allmoney: allmoney, order_sn: order_sn, user_money: user_money}) | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + | ||
| 90 | + }) | ||
| 91 | + } | ||
| 92 | + //--获取门店-- | ||
| 93 | + if(order.exp_type==1) { | ||
| 94 | + await getApp().request.promiseGet("/api/weshop/pickup/get/"+ e.globalData.setting.stoid+"/"+order.pickup_id, | ||
| 95 | + {1:1}).then(res => { | ||
| 96 | + th.setData({pick:res.data.data}) | ||
| 97 | + }); | ||
| 98 | + }; | ||
| 99 | + | ||
| 100 | + | ||
| 101 | + }; | ||
| 102 | + | ||
| 103 | + | ||
| 104 | + | ||
| 65 | }, | 105 | }, |
| 66 | 106 | ||
| 67 | goto: function() { | 107 | goto: function() { |
pages/payment/pay_success/pay_success.wxml
| @@ -25,25 +25,38 @@ | @@ -25,25 +25,38 @@ | ||
| 25 | <view class="payitem flex"> | 25 | <view class="payitem flex"> |
| 26 | <view>实付金额 :</view> | 26 | <view>实付金额 :</view> |
| 27 | <!-- {{filters.toFix()}} --> | 27 | <!-- {{filters.toFix()}} --> |
| 28 | - <view class="pay_money" wx:if="{{type==1}}">{{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元</view> | ||
| 29 | - <view class="pay_money" wx:else>{{filters.toFix(allmoney+user_money,2) }}元</view> | 28 | + <!-- 卡项订单 --> |
| 29 | + <view class="pay_money" wx:if="{{options.card == 1}}">{{filters.toFix(order.account,2) }}元</view> | ||
| 30 | + | ||
| 31 | + <block wx:else> | ||
| 32 | + <view class="pay_money" wx:if="{{type==1}}">{{filters.toFix(order.order_amount+order.user_money+order.pt_tail_money,2)}}元</view> | ||
| 33 | + <view class="pay_money" wx:else>{{filters.toFix(allmoney+user_money,2) }}元</view> | ||
| 34 | + </block> | ||
| 30 | </view> | 35 | </view> |
| 31 | 36 | ||
| 32 | <!-- 支付方式 --> | 37 | <!-- 支付方式 --> |
| 33 | - <view class="payitem flex" wx:if="type==1"> | ||
| 34 | - <view>支付方式 :</view> | ||
| 35 | - <view wx:if="{{order.order_amount>0 && order.user_money>0 }}">微信支付,余额支付</view> | ||
| 36 | - <view wx:elif="{{order.order_amount>0}}">微信支付</view> | ||
| 37 | - <view wx:elif="{{order.user_money>0}}">余额支付</view> | ||
| 38 | - <view wx:else>免单</view> | ||
| 39 | - </view> | ||
| 40 | - <view class="payitem flex" wx:else> | ||
| 41 | - <view>支付方式 :</view> | ||
| 42 | - <view wx:if="{{allmoney>0 && user_money>0 }}">微信支付,余额支付</view> | ||
| 43 | - <view wx:elif="{{allmoney>0}}">微信支付</view> | ||
| 44 | - <view wx:elif="{{user_money>0}}">余额支付</view> | ||
| 45 | - <view wx:else>免单</view> | ||
| 46 | - </view> | 38 | + <view class="payitem flex" wx:if="{{options.card == 1}}"> |
| 39 | + <view>支付方式 :</view> | ||
| 40 | + <view>微信支付</view> | ||
| 41 | + </view> | ||
| 42 | + | ||
| 43 | + <block wx:else> | ||
| 44 | + <view class="payitem flex" wx:if="{{type==1}}"> | ||
| 45 | + <view>支付方式 :</view> | ||
| 46 | + <view wx:if="{{order.order_amount>0 && order.user_money>0 }}">微信支付,余额支付</view> | ||
| 47 | + <view wx:elif="{{order.order_amount>0}}">微信支付</view> | ||
| 48 | + <view wx:elif="{{order.user_money>0}}">余额支付</view> | ||
| 49 | + <view wx:else>免单</view> | ||
| 50 | + </view> | ||
| 51 | + <view class="payitem flex" wx:else> | ||
| 52 | + <view>支付方式 :</view> | ||
| 53 | + <view wx:if="{{allmoney>0 && user_money>0 }}">微信支付,余额支付</view> | ||
| 54 | + <view wx:elif="{{allmoney>0}}">微信支付</view> | ||
| 55 | + <view wx:elif="{{user_money>0}}">余额支付</view> | ||
| 56 | + <view wx:else>免单</view> | ||
| 57 | + </view> | ||
| 58 | + </block> | ||
| 59 | + | ||
| 47 | 60 | ||
| 48 | 61 | ||
| 49 | 62 | ||
| @@ -72,23 +85,42 @@ | @@ -72,23 +85,42 @@ | ||
| 72 | <view class="pay_User fs28" wx:else> | 85 | <view class="pay_User fs28" wx:else> |
| 73 | <view class="payitem flex"> | 86 | <view class="payitem flex"> |
| 74 | <view class="pay_Receiving">门店 :</view> | 87 | <view class="pay_Receiving">门店 :</view> |
| 75 | - <view class="pay_name ellipsis-1">{{pick.pickup_name}}</view> | 88 | + <view class="pay_name ellipsis-1" wx:if="{{options.card == 1}}">{{order.list[0].pickup_name}}</view> |
| 89 | + <view class="pay_name ellipsis-1" wx:else>{{pick.pickup_name}}</view> | ||
| 76 | </view> | 90 | </view> |
| 77 | <view class="payitem flex"> | 91 | <view class="payitem flex"> |
| 78 | <view class="pay_Receiving">门店地址 :</view> | 92 | <view class="pay_Receiving">门店地址 :</view> |
| 79 | - <view class="address ellipsis-2">{{pick.fulladdress}}</view> | 93 | + <view class="pay_name" wx:if="{{options.card == 1}}">{{order.list[0].fulladdress}}</view> |
| 94 | + <view class="address ellipsis-2" wx:else>{{pick.fulladdress}}</view> | ||
| 80 | </view> | 95 | </view> |
| 81 | </view> | 96 | </view> |
| 82 | 97 | ||
| 83 | <!-- 链接 --> | 98 | <!-- 链接 --> |
| 84 | - <view class="fs32"> | ||
| 85 | - <view class="flex-center"> | ||
| 86 | - <navigator class="pay_order flex-center" url="/pages/user/order_list/order_list"> | ||
| 87 | - <view>查看订单</view> | ||
| 88 | - </navigator> | ||
| 89 | - </view> | ||
| 90 | - <view class="flex-center"> | ||
| 91 | - <navigator class="pay_home flex-center" bindtap="goto"> | 99 | + <view class="fs28 pd20 mgt40"> |
| 100 | + <view class="flex"> | ||
| 101 | + | ||
| 102 | + <block wx:if="{{options.card == 1}}"> | ||
| 103 | + <!-- <view class="flex-center"> --> | ||
| 104 | + <navigator class="btn f1 bg-yellow white" url="/packageA/pages/details_serviceCard/details_serviceCard?order_id={{order.order_id}}"> | ||
| 105 | + <view>订单详情</view> | ||
| 106 | + </navigator> | ||
| 107 | + <!-- </view> --> | ||
| 108 | + <!-- <view class="flex-center"> --> | ||
| 109 | + <navigator class="btn f1 bg-red white mgl20" url="/pages/user/my_service/i_service"> | ||
| 110 | + <view>立即预约</view> | ||
| 111 | + </navigator> | ||
| 112 | + <!-- </view> --> | ||
| 113 | + </block> | ||
| 114 | + | ||
| 115 | + <block wx:else> | ||
| 116 | + <navigator class="btn f1 bg-yellow white" url="/pages/user/order_list/order_list"> | ||
| 117 | + <view>查看订单</view> | ||
| 118 | + </navigator> | ||
| 119 | + </block> | ||
| 120 | + | ||
| 121 | + </view> | ||
| 122 | + <view class="mgt30"> | ||
| 123 | + <navigator class="btn border c-6" bindtap="goto"> | ||
| 92 | <view>回到首页</view> | 124 | <view>回到首页</view> |
| 93 | </navigator> | 125 | </navigator> |
| 94 | </view> | 126 | </view> |
pages/payment/pay_success/pay_success.wxss
| @@ -59,26 +59,38 @@ page { | @@ -59,26 +59,38 @@ page { | ||
| 59 | 59 | ||
| 60 | .pay_User .payitem .pay_name { | 60 | .pay_User .payitem .pay_name { |
| 61 | margin-right: 38rpx; | 61 | margin-right: 38rpx; |
| 62 | - max-width: 250rpx; | 62 | + /* max-width: 250rpx; */ |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | -.pay_order { | ||
| 66 | - margin-top: 115rpx; | ||
| 67 | - color: rgb(104, 104, 104); | ||
| 68 | - width: 560rpx; | ||
| 69 | - height: 62rpx; | ||
| 70 | - border-radius: 30rpx; | ||
| 71 | - border: 3rpx solid rgb(209, 209, 209); | 65 | +.btn { |
| 66 | + box-sizing: border-box; | ||
| 67 | + height: 80rpx; | ||
| 68 | + line-height: 80rpx; | ||
| 69 | + /* padding: 10rpx; */ | ||
| 70 | + text-align: center; | ||
| 71 | + border-radius: 40rpx; | ||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | .pay_home { | 74 | .pay_home { |
| 75 | - margin-top: 35rpx; | 75 | + /* margin-top: 35rpx; */ |
| 76 | color: rgb(255, 255, 255); | 76 | color: rgb(255, 255, 255); |
| 77 | - width: 566rpx; | ||
| 78 | - height: 68rpx; | 77 | + /* width: 566rpx; |
| 78 | + height: 68rpx; */ | ||
| 79 | border-radius: 30rpx; | 79 | border-radius: 30rpx; |
| 80 | background-color: rgb(219, 27, 52); | 80 | background-color: rgb(219, 27, 52); |
| 81 | } | 81 | } |
| 82 | .address{ | 82 | .address{ |
| 83 | width: 470rpx; | 83 | width: 470rpx; |
| 84 | -} | ||
| 85 | \ No newline at end of file | 84 | \ No newline at end of file |
| 85 | +} | ||
| 86 | + | ||
| 87 | +.bg-red { | ||
| 88 | + background-color: rgb(219, 27, 52); | ||
| 89 | +} | ||
| 90 | + | ||
| 91 | +.bg-yellow { | ||
| 92 | + background-color: #feca53; | ||
| 93 | +} | ||
| 94 | + | ||
| 95 | +.border { | ||
| 96 | + border: 2rpx solid #ccc; | ||
| 97 | +} |
pages/store/index.wxss
| 1 | -.box{ | 1 | +/* .box{ |
| 2 | padding: 10px; | 2 | padding: 10px; |
| 3 | border-bottom: 10px solid #f5f5f5; | 3 | border-bottom: 10px solid #f5f5f5; |
| 4 | color: #000000; | 4 | color: #000000; |
| @@ -44,5 +44,278 @@ position: relative; | @@ -44,5 +44,278 @@ position: relative; | ||
| 44 | .sear_inp{width: 490rpx; background-color:#eaeaea; height: 80rpx; border-radius:5rpx; margin: 25rpx;} | 44 | .sear_inp{width: 490rpx; background-color:#eaeaea; height: 80rpx; border-radius:5rpx; margin: 25rpx;} |
| 45 | .sear_inp input{width: 400rpx;} | 45 | .sear_inp input{width: 400rpx;} |
| 46 | .select{height: 80rpx; width: 220rpx;background-color:#eaeaea; margin:25rpx; font-size: 28rpx; line-height: 80rpx;text-align: center } | 46 | .select{height: 80rpx; width: 220rpx;background-color:#eaeaea; margin:25rpx; font-size: 28rpx; line-height: 80rpx;text-align: center } |
| 47 | -.sear_btn{ width: 50rpx; height: 100%; display: flex; align-items: center;} | 47 | +.sear_btn{ width: 50rpx; height: 100%; display: flex; align-items: center;} */ |
| 48 | + | ||
| 49 | +.border-bottom { | ||
| 50 | + border-bottom: 2rpx solid #e0e0e0; | ||
| 51 | +} | ||
| 52 | + | ||
| 53 | +.fs22 { | ||
| 54 | + font-size: 22rpx; | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | +.flexShrink-0 { | ||
| 58 | + flex-shrink: 0; | ||
| 59 | +} | ||
| 60 | + | ||
| 61 | +.pt16 { | ||
| 62 | + padding-top: 16rpx; | ||
| 63 | +} | ||
| 64 | + | ||
| 65 | +.maxWidth-340 { | ||
| 66 | + max-width: 340rpx; | ||
| 67 | +} | ||
| 68 | + | ||
| 69 | +.maxWidth-400 { | ||
| 70 | + max-width: 400rpx; | ||
| 71 | +} | ||
| 72 | + | ||
| 73 | + | ||
| 74 | +/* 图标字体 */ | ||
| 75 | +/* @font-face { | ||
| 76 | + font-family: 'iconfont'; | ||
| 77 | + src: url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.eot'); | ||
| 78 | + src: url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.eot?#iefix') format('embedded-opentype'), | ||
| 79 | + url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.woff2') format('woff2'), | ||
| 80 | + url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.woff') format('woff'), | ||
| 81 | + url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.ttf') format('truetype'), | ||
| 82 | + url('//at.alicdn.com/t/font_2054717_8s87fgrotfo.svg#iconfont') format('svg'); | ||
| 83 | +} | ||
| 84 | + | ||
| 85 | +.iconfont { | ||
| 86 | + font-family: "iconfont" !important; | ||
| 87 | + font-size: 28rpx; | ||
| 88 | + font-style: normal; | ||
| 89 | + -webkit-font-smoothing: antialiased; | ||
| 90 | + -moz-osx-font-smoothing: grayscale; | ||
| 91 | +} | ||
| 92 | + | ||
| 93 | +.icon-weizhi:before { | ||
| 94 | + content: "\e615"; | ||
| 95 | + color: #FFBA10; | ||
| 96 | +} | ||
| 97 | + | ||
| 98 | +.icon-arrow_down:before { | ||
| 99 | + content: "\e600"; | ||
| 100 | +} | ||
| 101 | + | ||
| 102 | +.icon-arrow_right:before { | ||
| 103 | + content: "\e61f"; | ||
| 104 | +} */ | ||
| 105 | +/* 图标字体 */ | ||
| 106 | + | ||
| 107 | + | ||
| 108 | + | ||
| 109 | +.icon-weizhi { | ||
| 110 | + color: #FFBA10; | ||
| 111 | +} | ||
| 112 | + | ||
| 113 | +page { | ||
| 114 | + height: 100%; | ||
| 115 | + font-size: 28rpx; | ||
| 116 | +} | ||
| 117 | + | ||
| 118 | +.container { | ||
| 119 | + height: 100%; | ||
| 120 | +} | ||
| 121 | +#map { | ||
| 122 | + /* width: 100%; | ||
| 123 | + height: ; */ | ||
| 124 | + display: block; | ||
| 125 | + width: 100%; | ||
| 126 | + height: 100%; | ||
| 127 | +} | ||
| 128 | +.tab-container.active { | ||
| 129 | + height: calc(100% - 86rpx); | ||
| 130 | +} | ||
| 131 | +.map-container.active ~ .tab-container .list-container { | ||
| 132 | + height: 204rpx; | ||
| 133 | + overflow: hidden; | ||
| 134 | +} | ||
| 135 | +.map-container.active ~ .tab-container .list { | ||
| 136 | + overflow: hidden; | ||
| 137 | +} | ||
| 138 | +.tab-container.active .list-container { | ||
| 139 | + height: calc(100% - 108rpx - 84rpx); | ||
| 140 | + background-color: #F7F7F7; | ||
| 141 | +} | ||
| 142 | + | ||
| 143 | + | ||
| 144 | +.search-container { | ||
| 145 | + display: flex; | ||
| 146 | + align-items: center; | ||
| 147 | + padding: 0 32rpx; | ||
| 148 | + border-bottom: 2rpx solid #F0F0F0; | ||
| 149 | +} | ||
| 150 | + | ||
| 151 | +.city:after { | ||
| 152 | + display: inline-block; | ||
| 153 | + content: '◣'; | ||
| 154 | + font-size: 14rpx; | ||
| 155 | + padding-left: 8rpx; | ||
| 156 | + padding-right: 20rpx; | ||
| 157 | + transform: rotateZ(-45deg); | ||
| 158 | + position: relative; | ||
| 159 | + top: -16rpx; | ||
| 160 | +} | ||
| 161 | + | ||
| 162 | +.input-container { | ||
| 163 | + padding: 12rpx 0; | ||
| 164 | + flex: 1; | ||
| 165 | +} | ||
| 166 | + | ||
| 167 | +.input { | ||
| 168 | + padding: 0 20rpx; | ||
| 169 | + height: 60rpx; | ||
| 170 | + line-height: 60rpx; | ||
| 171 | + border-radius: 30rpx; | ||
| 172 | + background-color: #F3F3F3; | ||
| 173 | +} | ||
| 174 | + | ||
| 175 | +.placeholder { | ||
| 176 | + color: #676767; | ||
| 177 | + font-size: 24rpx; | ||
| 178 | +} | ||
| 179 | + | ||
| 180 | + | ||
| 181 | + | ||
| 182 | + | ||
| 183 | + | ||
| 184 | +/* 切换卡 */ | ||
| 185 | +.tab-title-container { | ||
| 186 | + display: flex; | ||
| 187 | + text-align: center; | ||
| 188 | + border-bottom: 20rpx solid #F7F7F7; | ||
| 189 | +} | ||
| 190 | +.tab-title { | ||
| 191 | + width: 50%; | ||
| 192 | + line-height: 88rpx; | ||
| 193 | + position: relative; | ||
| 194 | +} | ||
| 195 | +.tab-title.active { | ||
| 196 | + font-weight: bold; | ||
| 197 | +} | ||
| 198 | +.tab-title.active::after { | ||
| 199 | + position: absolute; | ||
| 200 | + content: ''; | ||
| 201 | + width: 110rpx; | ||
| 202 | + height: 4rpx; | ||
| 203 | + left: 50%; | ||
| 204 | + bottom: 0; | ||
| 205 | + transform: translateX(-50%); | ||
| 206 | + background-color: #FFBA10; | ||
| 207 | +} | ||
| 208 | + | ||
| 209 | +.map-container { | ||
| 210 | + transition: 0.1s all linear; | ||
| 211 | + background-color: pink; | ||
| 212 | +} | ||
| 213 | + | ||
| 214 | +.map-container.active { | ||
| 215 | + height: calc(100% - 86rpx - 80rpx - 200rpx); | ||
| 216 | + transition: 0.1s all linear; | ||
| 217 | +} | ||
| 218 | + | ||
| 219 | + | ||
| 220 | + | ||
| 221 | + | ||
| 222 | +/* 查看地图 */ | ||
| 223 | +.view-map { | ||
| 224 | + line-height: 80rpx; | ||
| 225 | + text-align: center; | ||
| 226 | + font-size: 24rpx; | ||
| 227 | + color: #000; | ||
| 228 | + border-bottom: 2rpx solid #F0F0F0; | ||
| 229 | +} | ||
| 230 | + | ||
| 231 | + | ||
| 232 | +/* 列表 */ | ||
| 233 | +.list { | ||
| 234 | + height: 100%; | ||
| 235 | +} | ||
| 236 | +.list-item { | ||
| 237 | + padding: 40rpx 28rpx; | ||
| 238 | + border-bottom: 2rpx solid #F0F0F0; | ||
| 239 | + justify-content: space-between; | ||
| 240 | + background-color: #fff; | ||
| 241 | +} | ||
| 242 | +.list-item:last-child { | ||
| 243 | + border-bottom: none; | ||
| 244 | +} | ||
| 245 | +radio .wx-radio-input { | ||
| 246 | + width: 32rpx; | ||
| 247 | + height: 32rpx; | ||
| 248 | +} | ||
| 249 | +radio .wx-radio-input.wx-radio-input-checked { | ||
| 250 | + border-color: #333; | ||
| 251 | + /* border-color: #FFBA10; */ | ||
| 252 | + background-color: white; | ||
| 253 | +} | ||
| 254 | +radio .wx-radio-input.wx-radio-input-checked::before { | ||
| 255 | + display: inline-block; | ||
| 256 | + content: ''; | ||
| 257 | + width: 24rpx; | ||
| 258 | + height: 24rpx; | ||
| 259 | + border-radius: 50%; | ||
| 260 | + background-color: #333; | ||
| 261 | + /* background-color: #FFBA10; */ | ||
| 262 | +} | ||
| 263 | +.name-container { | ||
| 264 | + padding-left: 14rpx; | ||
| 265 | + padding-right: 30rpx; | ||
| 266 | + box-sizing: border-box; | ||
| 267 | +} | ||
| 268 | +.name { | ||
| 269 | + display: flex; | ||
| 270 | + align-items: center; | ||
| 271 | + font-size: 30rpx; | ||
| 272 | + position: relative; | ||
| 273 | +} | ||
| 274 | +.address { | ||
| 275 | + color: #6E6E6E; | ||
| 276 | + font-size: 26rpx; | ||
| 277 | + line-height: 34rpx; | ||
| 278 | + padding-top: 16rpx; | ||
| 279 | + /* padding-right: 40rpx; */ | ||
| 280 | + text-align: justify; | ||
| 281 | +} | ||
| 282 | +.tag { | ||
| 283 | + color: #FF5B5A; | ||
| 284 | + border-radius: 6rpx; | ||
| 285 | + border: 2rpx solid #FF5B5A; | ||
| 286 | + font-size: 22rpx; | ||
| 287 | + padding: 0 4rpx; | ||
| 288 | + flex-shrink: 0; | ||
| 289 | + margin-left: 4rpx; | ||
| 290 | +} | ||
| 291 | + | ||
| 292 | +.distance { | ||
| 293 | + color: #6E6E6E; | ||
| 294 | + font-size: 22rpx; | ||
| 295 | + line-height: 34rpx; | ||
| 296 | + padding-top: 16rpx; | ||
| 297 | + /* word-break: break-all; */ | ||
| 298 | +} | ||
| 299 | + | ||
| 300 | +.icon-arrow_right { | ||
| 301 | + padding-left: 20rpx; | ||
| 302 | +} | ||
| 303 | + | ||
| 304 | +.right { | ||
| 305 | + min-width: 200rpx; | ||
| 306 | + text-align: right; | ||
| 307 | +} | ||
| 308 | + | ||
| 309 | +.icon-arrow_down.active { | ||
| 310 | + display: inline-block; | ||
| 311 | + transform: rotateZ(180deg); | ||
| 312 | +} | ||
| 313 | + | ||
| 314 | + | ||
| 315 | + | ||
| 316 | + | ||
| 317 | + | ||
| 318 | + | ||
| 319 | + | ||
| 320 | + | ||
| 48 | 321 |
pages/user/order_list/order_list.js
| @@ -85,10 +85,12 @@ Page({ | @@ -85,10 +85,12 @@ Page({ | ||
| 85 | var startDate=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); | 85 | var startDate=date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); |
| 86 | 86 | ||
| 87 | 87 | ||
| 88 | - if(t.index) { | 88 | + if(t.index && t.tabindex) { |
| 89 | this.setData({ | 89 | this.setData({ |
| 90 | - currentIndex: t.index | 90 | + currentIndex: t.index, |
| 91 | + tabIndex: t.tabindex, | ||
| 91 | }); | 92 | }); |
| 93 | + this.clickTab(); | ||
| 92 | }; | 94 | }; |
| 93 | 95 | ||
| 94 | this.setData({ | 96 | this.setData({ |
| @@ -144,7 +146,7 @@ Page({ | @@ -144,7 +146,7 @@ Page({ | ||
| 144 | },1) | 146 | },1) |
| 145 | 147 | ||
| 146 | this.resetData(), this.requestOrderList(this.data.activeCategoryId); | 148 | this.resetData(), this.requestOrderList(this.data.activeCategoryId); |
| 147 | - | 149 | + this.clickTab(); |
| 148 | }, | 150 | }, |
| 149 | changeTab: function(t) { | 151 | changeTab: function(t) { |
| 150 | if (this.data.activeCategoryId == t.currentTarget.id) return false; | 152 | if (this.data.activeCategoryId == t.currentTarget.id) return false; |
| @@ -2138,8 +2140,15 @@ Page({ | @@ -2138,8 +2140,15 @@ Page({ | ||
| 2138 | 2140 | ||
| 2139 | // 点击卡项订单二级tabbar | 2141 | // 点击卡项订单二级tabbar |
| 2140 | clickTab(e) { | 2142 | clickTab(e) { |
| 2141 | - console.log('服务卡项index', e.target.dataset.index); | ||
| 2142 | - let currentIndex = e.target.dataset.index; | 2143 | + // console.log('服务卡项index', e.target.dataset.index); |
| 2144 | + let currentIndex = 0; | ||
| 2145 | + if(e) { | ||
| 2146 | + currentIndex = e.target.dataset.index; | ||
| 2147 | + } else { | ||
| 2148 | + currentIndex = this.data.tabIndex | ||
| 2149 | + }; | ||
| 2150 | + | ||
| 2151 | + // let || this.data.tabIndex; | ||
| 2143 | 2152 | ||
| 2144 | let url = '/api/weshop/recharge/user/page'; | 2153 | let url = '/api/weshop/recharge/user/page'; |
| 2145 | let data = { | 2154 | let data = { |
pages/user/order_list/order_list.wxml
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <!-- 一级tabbar --> | 4 | <!-- 一级tabbar --> |
| 5 | <view class="tab-container" bindtap="onClickTab"> | 5 | <view class="tab-container" bindtap="onClickTab"> |
| 6 | <view class="tab {{currentIndex == 0 ? 'active':''}}" data-index="0"><text class="iconfont icon-cloud"></text>线上订单</view> | 6 | <view class="tab {{currentIndex == 0 ? 'active':''}}" data-index="0"><text class="iconfont icon-cloud"></text>线上订单</view> |
| 7 | - <view class="tab {{currentIndex == 2 ? 'active':''}}" data-index="2" style="display: none;"><text class="iconfont icon-bankcard"></text>卡项订单</view> | 7 | + <view class="tab {{currentIndex == 2 ? 'active':''}}" data-index="2"><text class="iconfont icon-bankcard"></text>卡项订单</view> |
| 8 | <view class="tab {{currentIndex == 1 ? 'active':''}}" data-index="1"><text class="iconfont icon-shop"></text>线下订单</view> | 8 | <view class="tab {{currentIndex == 1 ? 'active':''}}" data-index="1"><text class="iconfont icon-shop"></text>线下订单</view> |
| 9 | </view> | 9 | </view> |
| 10 | 10 |
utils/filter.wxs
| @@ -171,7 +171,18 @@ var filters = { | @@ -171,7 +171,18 @@ var filters = { | ||
| 171 | 171 | ||
| 172 | JSONStringify: function(val) { | 172 | JSONStringify: function(val) { |
| 173 | return JSON.stringify(val); | 173 | return JSON.stringify(val); |
| 174 | - } | 174 | + }, |
| 175 | + | ||
| 176 | + // 循环列表计算数量 | ||
| 177 | + count: function(list) { | ||
| 178 | + var sum = 0; | ||
| 179 | + if(list && list.length != 0) { | ||
| 180 | + list.forEach(function(item) { | ||
| 181 | + sum += item.qty; | ||
| 182 | + }); | ||
| 183 | + return sum; | ||
| 184 | + }; | ||
| 185 | + }, | ||
| 175 | 186 | ||
| 176 | 187 | ||
| 177 | 188 | ||
| @@ -194,4 +205,5 @@ module.exports = { | @@ -194,4 +205,5 @@ module.exports = { | ||
| 194 | price: filters.price, | 205 | price: filters.price, |
| 195 | div100: filters.div100, | 206 | div100: filters.div100, |
| 196 | JSONStringify: filters.JSONStringify, | 207 | JSONStringify: filters.JSONStringify, |
| 208 | + count: filters.count, | ||
| 197 | } | 209 | } |
| 198 | \ No newline at end of file | 210 | \ No newline at end of file |
utils/request.js
| @@ -2,6 +2,10 @@ var t = require("util.js"); | @@ -2,6 +2,10 @@ var t = require("util.js"); | ||
| 2 | 2 | ||
| 3 | module.exports = { | 3 | module.exports = { |
| 4 | uniqueId: "", | 4 | uniqueId: "", |
| 5 | + // i: url | ||
| 6 | + // e: method | ||
| 7 | + // s: data | ||
| 8 | + // a: header | ||
| 5 | request: function(e, i, o) { | 9 | request: function(e, i, o) { |
| 6 | var n = this, a = o.header ? o.header : { | 10 | var n = this, a = o.header ? o.header : { |
| 7 | "content-type": "application/x-www-form-urlencoded" | 11 | "content-type": "application/x-www-form-urlencoded" |
| @@ -39,7 +43,9 @@ module.exports = { | @@ -39,7 +43,9 @@ module.exports = { | ||
| 39 | 43 | ||
| 40 | uploadFile: function(t, e) { | 44 | uploadFile: function(t, e) { |
| 41 | var i = this; | 45 | var i = this; |
| 42 | - t = this.modifyUrl(t, e), console.log("app.request", t, e), e.isShowLoading = void 0 === e.isShowLoading || e.isShowLoading, | 46 | + t = this.modifyUrl(t, e), |
| 47 | + // console.log("app.request", t, e), | ||
| 48 | + e.isShowLoading = void 0 === e.isShowLoading || e.isShowLoading, | ||
| 43 | e.isShowLoading && this.showLoading(), wx.uploadFile(Object.assign({}, e, { | 49 | e.isShowLoading && this.showLoading(), wx.uploadFile(Object.assign({}, e, { |
| 44 | url: t, | 50 | url: t, |
| 45 | filePath: e.filePath, | 51 | filePath: e.filePath, |