Commit fcb52b914b39c9c640bafe6228b0b36c5b6a50ed
Merge branch 'dev' into 'test'
Dev See merge request !631
Showing
11 changed files
with
66 additions
and
33 deletions
app.json
| ... | ... | @@ -121,7 +121,6 @@ | 
| 121 | 121 | "pages/hongBaoDetails/hongBaoDetails", | 
| 122 | 122 | "pages/service_record/service_record", | 
| 123 | 123 | "pages/checkin/checkin", | 
| 124 | - "pages/distribution/main/main", | |
| 125 | 124 | "pages/distribution/myteam/myteam", | 
| 126 | 125 | "pages/distribution/order/order", | 
| 127 | 126 | "pages/distribution/commision/commision", | 
| ... | ... | @@ -132,7 +131,15 @@ | 
| 132 | 131 | "pages/distribution/rookie/rookie", | 
| 133 | 132 | "pages/service_share/service_share", | 
| 134 | 133 | "pages/cardList/cardList", | 
| 135 | - "pages/cardDetails/cardDetails" | |
| 134 | + "pages/goodsInfo/goodsInfo", | |
| 135 | + "pages/my_service/appment_main", | |
| 136 | + "pages/my_service/i_service", | |
| 137 | + "pages/my_service/cosmetology_list", | |
| 138 | + "pages/my_service/hist_service", | |
| 139 | + "pages/my_service/tment_details", | |
| 140 | + "pages/my_service/tment_eval", | |
| 141 | + "pages/my_service/tment_order_list", | |
| 142 | + "pages/my_service/beauty_deta" | |
| 136 | 143 | ] | 
| 137 | 144 | |
| 138 | 145 | }], | ... | ... | 
packageA/pages/my_service/appment_main.json
| 1 | 1 | { | 
| 2 | 2 | "navigationBarTitleText": "预约服务", | 
| 3 | - "usingComponents": { | |
| 4 | - "warn": "/components/long_warn/long_warn", | |
| 5 | - "nav_b": "/components/nav_b/nav_b" | |
| 6 | - } | |
| 3 | + "enablePullDownRefresh": false, | |
| 4 | + "usingComponents": { | |
| 5 | + "warn": "/components/long_warn/long_warn", | |
| 6 | + "nav_b": "/components/nav_b/nav_b" | |
| 7 | + } | |
| 7 | 8 | } | 
| 8 | 9 | \ No newline at end of file | ... | ... | 
packageA/pages/my_service/appment_main.wxml
| ... | ... | @@ -83,14 +83,12 @@ | 
| 83 | 83 | <view>注:剩余可预约人数{{tment_count}}人</view> | 
| 84 | 84 | </view> | 
| 85 | 85 | |
| 86 | - <view class="submitMax flex-space-between fs32"> | |
| 87 | - <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list"> | |
| 86 | + <view class="submitMax flex-space-center fs32"> | |
| 87 | + <!-- <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list"> | |
| 88 | 88 | <view>我的预约</view> | 
| 89 | - </navigator> | |
| 89 | + </navigator> --> | |
| 90 | 90 | <form report-submit='true' bindtap="sub_success"> | 
| 91 | - <button form-type="submit" class="sub_appment flex-center"> | |
| 92 | - <view>提交预约</view> | |
| 93 | - </button> | |
| 91 | + <button form-type="submit" class="sub_appment flex-center">帮你预约</button> | |
| 94 | 92 | </form> | 
| 95 | 93 | </view> | 
| 96 | 94 | </view> | ... | ... | 
packageA/pages/my_service/hist_service.js
| ... | ... | @@ -69,6 +69,10 @@ Page({ | 
| 69 | 69 | */ | 
| 70 | 70 | onLoad: function(options) { | 
| 71 | 71 | var th = this; | 
| 72 | + // console.log('xxoptions==>', options); | |
| 73 | + this.setData({ | |
| 74 | + options, | |
| 75 | + }); | |
| 72 | 76 | th.query_hist(); | 
| 73 | 77 | }, | 
| 74 | 78 | /** | 
| ... | ... | @@ -116,7 +120,7 @@ Page({ | 
| 116 | 120 | getApp().request.promiseGet(url, { | 
| 117 | 121 | data: { | 
| 118 | 122 | storeId: a.stoid, | 
| 119 | - userId: d.user_id, | |
| 123 | + userId: this.data.options.userid, | |
| 120 | 124 | beginDate: startTime, | 
| 121 | 125 | endDate: endTime, | 
| 122 | 126 | page: th.data.curpage, | ... | ... | 
packageA/pages/my_service/i_service.js
| ... | ... | @@ -29,13 +29,15 @@ Page({ | 
| 29 | 29 | * 生命周期函数--监听页面加载 | 
| 30 | 30 | */ | 
| 31 | 31 | onLoad: function(options) { | 
| 32 | + console.log('options==>', options); | |
| 32 | 33 | var userinfo = getApp().globalData.userInfo; | 
| 33 | 34 | if (userinfo == null) { | 
| 34 | 35 | //界面必须使用warn 做ID,并调用 | 
| 35 | - return false; | |
| 36 | - } | |
| 36 | + // return false; | |
| 37 | + }; | |
| 37 | 38 | this.setData({ | 
| 38 | - userinfo: userinfo | |
| 39 | + userinfo: userinfo, | |
| 40 | + options, | |
| 39 | 41 | }); | 
| 40 | 42 | var th = this; | 
| 41 | 43 | th.query_service(); | 
| ... | ... | @@ -48,6 +50,7 @@ Page({ | 
| 48 | 50 | var my_confirm = th.selectComponent("#my_confirm"); //组件的id | 
| 49 | 51 | my_confirm.open_cancel(0); | 
| 50 | 52 | }, | 
| 53 | + | |
| 51 | 54 | onReachBottom: function() { | 
| 52 | 55 | var th = this; | 
| 53 | 56 | if (this.data.total <= th.data.pageSize) return; | 
| ... | ... | @@ -65,7 +68,7 @@ Page({ | 
| 65 | 68 | getApp().request.promiseGet(url, { | 
| 66 | 69 | data: { | 
| 67 | 70 | storeId: a.stoid, | 
| 68 | - userId: d.user_id, | |
| 71 | + userId: th.data.options.UserId, | |
| 69 | 72 | page: th.data.curpage, | 
| 70 | 73 | pageSize: th.data.pageSize | 
| 71 | 74 | } | 
| ... | ... | @@ -113,7 +116,7 @@ Page({ | 
| 113 | 116 | data: { | 
| 114 | 117 | serviceId: service_id, | 
| 115 | 118 | storeId: a.stoid, | 
| 116 | - userId: d.user_id | |
| 119 | + userId: th.data.options.UserId, | |
| 117 | 120 | } | 
| 118 | 121 | }).then(res => { | 
| 119 | 122 | wx.hideLoading(); | 
| ... | ... | @@ -190,7 +193,7 @@ Page({ | 
| 190 | 193 | data: { | 
| 191 | 194 | serviceId: service_id, | 
| 192 | 195 | storeId: a.stoid, | 
| 193 | - userId: d.user_id | |
| 196 | + userId: th.data.options.UserId, | |
| 194 | 197 | } | 
| 195 | 198 | }).then(res => { | 
| 196 | 199 | wx.hideLoading(); | 
| ... | ... | @@ -221,7 +224,7 @@ Page({ | 
| 221 | 224 | projectId: project_id, | 
| 222 | 225 | serviceId: service_id, | 
| 223 | 226 | storeId: a.stoid, | 
| 224 | - userId: d.user_id | |
| 227 | + userId: th.data.options.UserId, | |
| 225 | 228 | } | 
| 226 | 229 | }).then(res => { | 
| 227 | 230 | if (res.data.code == 0) { | ... | ... | 
packageA/pages/my_service/i_service.json
packageA/pages/my_service/i_service.wxml
| 1 | 1 | <!-- 背景图片 --> | 
| 2 | 2 | <view catchtap="close"> | 
| 3 | 3 | <image class="backimage" src="{{iurl}}/miniapp/images/yyservice/backimage.png" lazy-load="true"></image> | 
| 4 | - <navigator class="History fs26" url="/packageA/pages/service_record/service_record" style="left:10px;right:auto;">服务记录</navigator> | |
| 5 | - <navigator class="History fs26" url="/pages/user/my_service/hist_service">历史预约</navigator> | |
| 4 | + <navigator class="History fs26" url="/packageA/pages/service_record/service_record" style="left:10px;right:auto;" data-userid="{{options.UserId}}">服务记录</navigator> | |
| 5 | + <navigator class="History fs26" url="/packageA/pages/my_service/hist_service" data-userid="{{options.UserId}}">历史预约</navigator> | |
| 6 | 6 | </view> | 
| 7 | 7 | |
| 8 | 8 | <!-- 预约内容 --> | ... | ... | 
packageA/pages/my_service/my_service.js deleted
packageA/pages/my_service/my_service.wxml deleted
packageA/pages/service_record/service_record.js
| ... | ... | @@ -14,10 +14,11 @@ Page({ | 
| 14 | 14 | endDate: '结束日期', | 
| 15 | 15 | }, | 
| 16 | 16 | |
| 17 | - onLoad: function(t) { | |
| 17 | + onLoad: function(options) { | |
| 18 | 18 | _this = this; | 
| 19 | 19 | |
| 20 | 20 | this.setData({ | 
| 21 | + options, | |
| 21 | 22 | currentDate: this.currentDate(), | 
| 22 | 23 | }); | 
| 23 | 24 | |
| ... | ... | @@ -27,15 +28,23 @@ Page({ | 
| 27 | 28 | }, | 
| 28 | 29 | |
| 29 | 30 | onShow: function() { | 
| 30 | - this.isLogin() | |
| 31 | - .then(function(data) { | |
| 32 | - reqData.url = '/api/weshop/marketing/servicewrite/page'; | |
| 33 | - reqData.data = { | |
| 34 | - storeId: app.globalData.setting.stoid, | |
| 35 | - userId: app.globalData.user_id, | |
| 36 | - }; | |
| 37 | - _this.getData(true, reqData.url, reqData.data); | |
| 38 | - }); | |
| 31 | + reqData.data = { | |
| 32 | + storeId: app.globalData.setting.stoid, | |
| 33 | + }; | |
| 34 | + | |
| 35 | + if(this.data.options.userid) { | |
| 36 | + reqData.data.userId = this.data.options.userid; | |
| 37 | + _this.getData(true, reqData.url, reqData.data); | |
| 38 | + } else { | |
| 39 | + reqData.data.userId = app.globalData.user_id; | |
| 40 | + this.isLogin() | |
| 41 | + .then(function(data) { | |
| 42 | + reqData.url = '/api/weshop/marketing/servicewrite/page'; | |
| 43 | + | |
| 44 | + _this.getData(true, reqData.url, reqData.data); | |
| 45 | + }); | |
| 46 | + }; | |
| 47 | + | |
| 39 | 48 | }, | 
| 40 | 49 | |
| 41 | 50 | ... | ... | 
pages/distribution/distribution.js
| ... | ... | @@ -268,7 +268,17 @@ Page({ | 
| 268 | 268 | mobile: mobile, | 
| 269 | 269 | }, | 
| 270 | 270 | success: function (res) { | 
| 271 | - var showtxt=res.data.msg; | |
| 271 | + var showtxt=res.data.msg; | |
| 272 | + | |
| 273 | + if(!res.data.data){ | |
| 274 | + wx.showToast({ | |
| 275 | + title: showtxt, | |
| 276 | + icon: 'none', | |
| 277 | + duration: 1500 | |
| 278 | + }); | |
| 279 | + return false; | |
| 280 | + } | |
| 281 | + | |
| 272 | 282 | if(res.data.data.indexOf('已成为分销商')!=-1){ | 
| 273 | 283 | showtxt="成功成为分销商"; | 
| 274 | 284 | var txt="fenxiao["+index+"].pass"; | ... | ... | 
