From 8ece27c90bf9114a2b5f008cffb7786c7a94bb94 Mon Sep 17 00:00:00 2001 From: yvan.ni <765199919@qq.com> Date: Thu, 6 Aug 2020 10:34:53 +0800 Subject: [PATCH] 1. 美导顾问 2. 超时退款后的订单的显示退款的问题 --- app.json | 6 ++++-- pages/user/choice_guide/choice_guide.js | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/user/choice_guide/choice_guide.json | 7 +++++++ pages/user/choice_guide/choice_guide.wxml | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/user/choice_guide/choice_guide.wxss | 17 +++++++++++++++++ pages/user/order_detail/order_detail.wxml | 5 +++-- pages/user/order_list/order_list.wxml | 5 +++-- pages/user/userinfo/userinfo.js | 32 +++++++++++++++++++++++++++++++- pages/user/userinfo/userinfo.wxml | 20 +++++++++++++++++--- 9 files changed, 255 insertions(+), 10 deletions(-) create mode 100644 pages/user/choice_guide/choice_guide.js create mode 100644 pages/user/choice_guide/choice_guide.json create mode 100644 pages/user/choice_guide/choice_guide.wxml create mode 100644 pages/user/choice_guide/choice_guide.wxss diff --git a/app.json b/app.json index 06d4421..bfcbcdd 100644 --- a/app.json +++ b/app.json @@ -1,6 +1,7 @@ { "pages": [ - "pages/index/index/index", + + "pages/index/index/index", "pages/justTest/justTest", "pages/goods/categoryList/categoryList", "pages/cart/cart/cart", @@ -85,7 +86,8 @@ "pages/user/assistance/assistance", "pages/video/index", "pages/template/index", - "pages/store/index" + "pages/store/index", + "pages/user/choice_guide/choice_guide" ], "plugins": { "live-player-plugin": { diff --git a/pages/user/choice_guide/choice_guide.js b/pages/user/choice_guide/choice_guide.js new file mode 100644 index 0000000..c7361e7 --- /dev/null +++ b/pages/user/choice_guide/choice_guide.js @@ -0,0 +1,108 @@ +var a = getApp(), + os = a.globalData.setting, + util = require("../../../utils/util.js"), + ut = util; +Page({ + data: { + url: os.url, + iurl: os.imghost, + total: 0, //数据的总量 + ismore: 0,//数据是否加载完毕 + page:1, + pageSize:10, + isload:0, + show_pop:0, + sele_item:null, + + }, + //------初始化加载---------- + onLoad: function(t) {}, + + onShow: function() { + this.get_list(); + }, + + //--点击分享事件--- + onShareAppMessage: function(t) { + return o.share; + }, + + get_list: function() { + var th = this, e = th; + var r_data={ + storeId: os.stoid, + page: th.data.page, + pageSize: th.data.pageSize + }; + + if(th.data.datet!="" && th.data.datet){ + r_data.Sdate=th.data.datet; + } + if(th.data.dates!="" && th.data.dates){ + r_data.Edate=th.data.dates; + } + if(th.data.input_val!="" && th.data.input_val){ + r_data.MobileTel=th.data.input_val; + } + if(getApp().globalData.userInfo.pickup_id){ + r_data.pickupId=getApp().globalData.userInfo.pickup_id; + } + getApp().request.promiseGet("/api/weshop/users/staff/page", { + data:r_data + }).then(res => { + th.setData({isload:1}); + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { + th.data.page++;//当前页数+1 + var arr1 = th.data.list;//获取明细数组 + var arr2 = res.data.data.pageData;//获取当前查询数据 + if(!arr1) arr1=[]; + + var arr3 = [...arr1, ...arr2];//把当前查询数组拼接到原本数组后面 + var ismore = 0; + if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断 + th.setData({ + list: arr3, + total: res.data.data.total, + ismore: ismore, + }) + } + }) + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + if (this.data.total <= this.data.pageSize) return; + if (this.data.ismore) { + t.my_warnning("加载完啦!", 0, this);return + }; + this.get_list(); + }, + + //返回 + back:function () { + wx.navigateBack({ delta: 1}) + }, + + pop_sele:function (e) { + var index=e.currentTarget.dataset.index; + var item=this.data.list[index]; + this.setData({show_pop:1,sele_item:item}); + }, + close_pop:function () { + this.setData({show_pop:0}); + }, + //选择了导购,就跳转到会员中心页面 + go_user_info:function () { + var item=this.data.sele_item; + getApp().globalData.choice_guide=item; + getApp().goto("/pages/user/userinfo/userinfo"); + }, + + + + + +}); \ No newline at end of file diff --git a/pages/user/choice_guide/choice_guide.json b/pages/user/choice_guide/choice_guide.json new file mode 100644 index 0000000..e610f01 --- /dev/null +++ b/pages/user/choice_guide/choice_guide.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "选择美导", + "enablePullDownRefresh": false, + "usingComponents": { + "warn": "/components/long_warn/long_warn" + } +} \ No newline at end of file diff --git a/pages/user/choice_guide/choice_guide.wxml b/pages/user/choice_guide/choice_guide.wxml new file mode 100644 index 0000000..f4eb36c --- /dev/null +++ b/pages/user/choice_guide/choice_guide.wxml @@ -0,0 +1,65 @@ + + + + + + + + 查询 + + + + + + + + + + + + + {{item.StaffName}} + {{item.Remark1}} + + + + + 选择 + + + + + + + + + + + 暂无顾问明细 + + + 返回 + + + + + + + + \ No newline at end of file diff --git a/pages/user/choice_guide/choice_guide.wxss b/pages/user/choice_guide/choice_guide.wxss new file mode 100644 index 0000000..fca6187 --- /dev/null +++ b/pages/user/choice_guide/choice_guide.wxss @@ -0,0 +1,17 @@ +.big_box{padding: 0 20rpx } +.head_pic{ width: 160rpx; height: 160rpx; border-radius: 50%} +.pic2{ width: 100rpx; height: 100rpx; } + +.item{border-bottom: 0.01rem solid #eeeeee; padding: 20rpx 0;} +.choice_btn{ width: 130rpx; height: 50rpx; border-radius: 50rpx; + border:1rpx solid #cb3549; color: #cb3549; +} +.box{ position: fixed; z-index: 6666; bottom: 0; left: 0;background-color: #fff;width: 100%;} +.t_choice_btn{ width: 160rpx; height: 50rpx; background-color:#169bd5; border-radius: 10rpx; color: #fff } + +.sear_all{ width: 93%; margin: 0 auto; height: 80rpx; margin-top: 20rpx } +.sear_all .inp_div,.sear_all .sear_btn{ height: 80rpx; line-height: 80rpx } +.inp_div{ width: 80%; overflow: hidden;background-color: #f2f2f2} +.sear_all .inp_div input{ margin-left: 54rpx; width: 100%; height: 100%; border: 0; border-radius: 0; } +.sear_btn{ width: 20%;background-color: #ff6768; text-align: center;color: #fff; font-size: 32rpx} +.find_img{width: 44rpx; height: 44rpx; position: absolute; left: 8rpx; top: 18rpx; z-index: 10} \ No newline at end of file diff --git a/pages/user/order_detail/order_detail.wxml b/pages/user/order_detail/order_detail.wxml index 51db5fc..2f03c70 100644 --- a/pages/user/order_detail/order_detail.wxml +++ b/pages/user/order_detail/order_detail.wxml @@ -18,7 +18,8 @@ 门店:{{order.pickname}} {{order.order_status_detail}} - + + @@ -35,7 +36,7 @@ ×{{item.goods_num}} - + 申请退款 + - + @@ -67,7 +68,7 @@ - + 申请退款 退款中 重新退款 diff --git a/pages/user/userinfo/userinfo.js b/pages/user/userinfo/userinfo.js index 47ea48c..e780aff 100644 --- a/pages/user/userinfo/userinfo.js +++ b/pages/user/userinfo/userinfo.js @@ -67,6 +67,8 @@ Page({ is_zy: 0, //是否执行onshow is_lable_set: "", //是否启用我的兴趣标签 check_label: [], //我选择的兴趣标签 + fir_guide_id:null, //存储会员详情接口出来的美导ID + }, //通过路径跳转到其他页面 goto: function(e) { @@ -80,7 +82,9 @@ Page({ var sms_conf = ee.switch_list; sms_conf = JSON.parse(sms_conf); th.setData({ - is_lable_set: sms_conf.user_label_set + is_lable_set: sms_conf.user_label_set, //是不是会员标签设置 + guide_title:sms_conf.guide_consultant, //系统参数 导购标题 + guide_change_time:sms_conf.guide_change_time //每月能修改几次 }) if (sms_conf.user_label_set) { th.query_checklabels(); @@ -627,6 +631,14 @@ Page({ var e = this; if (this.data.is_zy) return false; this.wait_for_store_config(); + + //如果有传值进行跳转的话 + var choice_guide=null; + if(getApp().globalData.choice_guide){ + choice_guide=JSON.parse(JSON.stringify(getApp().globalData.choice_guide)); + getApp().globalData.choice_guide=null; + } + var req = t; req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, { success: function(src) { @@ -644,6 +656,13 @@ Page({ a.address=""; } + e.data.fir_guide_id=a.staffId; + if(choice_guide){ + a.staffName=choice_guide.StaffName; + a.staffId=choice_guide.Id; + } + + e.setData({ phone: a.mobile, user: a, @@ -656,6 +675,7 @@ Page({ isstcsp: a.vipnopwd, iscalendar:a.islunar }); + } }) a.getUserInfo(function(a) { @@ -832,6 +852,11 @@ Page({ islunar:th.data.iscalendar, birthday:th.data.datet } + //往上提交美导的ID + if(th.data.fir_guide_id!=th.data.user.staffId){ + datas.staffId=th.data.user.staffId; + } + getApp().request.put("/api/weshop/users/updateUserInfo", { data: datas, success: function(res) { @@ -862,5 +887,10 @@ Page({ return o.share; }, + //-- 跳转到获取导购的列表 -- + go_get_guide:function () { + getApp().goto("/pages/user/choice_guide/choice_guide"); + } + }); \ No newline at end of file diff --git a/pages/user/userinfo/userinfo.wxml b/pages/user/userinfo/userinfo.wxml index 6a949b3..5faca99 100644 --- a/pages/user/userinfo/userinfo.wxml +++ b/pages/user/userinfo/userinfo.wxml @@ -184,15 +184,26 @@ + 所属门店 - {{stoname}} - + {{stoname}} + + + + + + {{guide_title}} + + {{user.staffName?user.staffName:"*选择顾问"}} + + + @@ -218,6 +229,8 @@ + + 收货地址 @@ -225,11 +238,12 @@ + 绑定时间 {{user.reg_time?filters.replace_time2(user.reg_time):""}} - + -- libgit2 0.21.4