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,7 +121,6 @@ | ||
| 121 | "pages/hongBaoDetails/hongBaoDetails", | 121 | "pages/hongBaoDetails/hongBaoDetails", |
| 122 | "pages/service_record/service_record", | 122 | "pages/service_record/service_record", |
| 123 | "pages/checkin/checkin", | 123 | "pages/checkin/checkin", |
| 124 | - "pages/distribution/main/main", | ||
| 125 | "pages/distribution/myteam/myteam", | 124 | "pages/distribution/myteam/myteam", |
| 126 | "pages/distribution/order/order", | 125 | "pages/distribution/order/order", |
| 127 | "pages/distribution/commision/commision", | 126 | "pages/distribution/commision/commision", |
| @@ -132,7 +131,15 @@ | @@ -132,7 +131,15 @@ | ||
| 132 | "pages/distribution/rookie/rookie", | 131 | "pages/distribution/rookie/rookie", |
| 133 | "pages/service_share/service_share", | 132 | "pages/service_share/service_share", |
| 134 | "pages/cardList/cardList", | 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 | "navigationBarTitleText": "预约服务", | 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 | \ No newline at end of file | 9 | \ No newline at end of file |
packageA/pages/my_service/appment_main.wxml
| @@ -83,14 +83,12 @@ | @@ -83,14 +83,12 @@ | ||
| 83 | <view>注:剩余可预约人数{{tment_count}}人</view> | 83 | <view>注:剩余可预约人数{{tment_count}}人</view> |
| 84 | </view> | 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 | <view>我的预约</view> | 88 | <view>我的预约</view> |
| 89 | - </navigator> | 89 | + </navigator> --> |
| 90 | <form report-submit='true' bindtap="sub_success"> | 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 | </form> | 92 | </form> |
| 95 | </view> | 93 | </view> |
| 96 | </view> | 94 | </view> |
packageA/pages/my_service/hist_service.js
| @@ -69,6 +69,10 @@ Page({ | @@ -69,6 +69,10 @@ Page({ | ||
| 69 | */ | 69 | */ |
| 70 | onLoad: function(options) { | 70 | onLoad: function(options) { |
| 71 | var th = this; | 71 | var th = this; |
| 72 | + // console.log('xxoptions==>', options); | ||
| 73 | + this.setData({ | ||
| 74 | + options, | ||
| 75 | + }); | ||
| 72 | th.query_hist(); | 76 | th.query_hist(); |
| 73 | }, | 77 | }, |
| 74 | /** | 78 | /** |
| @@ -116,7 +120,7 @@ Page({ | @@ -116,7 +120,7 @@ Page({ | ||
| 116 | getApp().request.promiseGet(url, { | 120 | getApp().request.promiseGet(url, { |
| 117 | data: { | 121 | data: { |
| 118 | storeId: a.stoid, | 122 | storeId: a.stoid, |
| 119 | - userId: d.user_id, | 123 | + userId: this.data.options.userid, |
| 120 | beginDate: startTime, | 124 | beginDate: startTime, |
| 121 | endDate: endTime, | 125 | endDate: endTime, |
| 122 | page: th.data.curpage, | 126 | page: th.data.curpage, |
packageA/pages/my_service/i_service.js
| @@ -29,13 +29,15 @@ Page({ | @@ -29,13 +29,15 @@ Page({ | ||
| 29 | * 生命周期函数--监听页面加载 | 29 | * 生命周期函数--监听页面加载 |
| 30 | */ | 30 | */ |
| 31 | onLoad: function(options) { | 31 | onLoad: function(options) { |
| 32 | + console.log('options==>', options); | ||
| 32 | var userinfo = getApp().globalData.userInfo; | 33 | var userinfo = getApp().globalData.userInfo; |
| 33 | if (userinfo == null) { | 34 | if (userinfo == null) { |
| 34 | //界面必须使用warn 做ID,并调用 | 35 | //界面必须使用warn 做ID,并调用 |
| 35 | - return false; | ||
| 36 | - } | 36 | + // return false; |
| 37 | + }; | ||
| 37 | this.setData({ | 38 | this.setData({ |
| 38 | - userinfo: userinfo | 39 | + userinfo: userinfo, |
| 40 | + options, | ||
| 39 | }); | 41 | }); |
| 40 | var th = this; | 42 | var th = this; |
| 41 | th.query_service(); | 43 | th.query_service(); |
| @@ -48,6 +50,7 @@ Page({ | @@ -48,6 +50,7 @@ Page({ | ||
| 48 | var my_confirm = th.selectComponent("#my_confirm"); //组件的id | 50 | var my_confirm = th.selectComponent("#my_confirm"); //组件的id |
| 49 | my_confirm.open_cancel(0); | 51 | my_confirm.open_cancel(0); |
| 50 | }, | 52 | }, |
| 53 | + | ||
| 51 | onReachBottom: function() { | 54 | onReachBottom: function() { |
| 52 | var th = this; | 55 | var th = this; |
| 53 | if (this.data.total <= th.data.pageSize) return; | 56 | if (this.data.total <= th.data.pageSize) return; |
| @@ -65,7 +68,7 @@ Page({ | @@ -65,7 +68,7 @@ Page({ | ||
| 65 | getApp().request.promiseGet(url, { | 68 | getApp().request.promiseGet(url, { |
| 66 | data: { | 69 | data: { |
| 67 | storeId: a.stoid, | 70 | storeId: a.stoid, |
| 68 | - userId: d.user_id, | 71 | + userId: th.data.options.UserId, |
| 69 | page: th.data.curpage, | 72 | page: th.data.curpage, |
| 70 | pageSize: th.data.pageSize | 73 | pageSize: th.data.pageSize |
| 71 | } | 74 | } |
| @@ -113,7 +116,7 @@ Page({ | @@ -113,7 +116,7 @@ Page({ | ||
| 113 | data: { | 116 | data: { |
| 114 | serviceId: service_id, | 117 | serviceId: service_id, |
| 115 | storeId: a.stoid, | 118 | storeId: a.stoid, |
| 116 | - userId: d.user_id | 119 | + userId: th.data.options.UserId, |
| 117 | } | 120 | } |
| 118 | }).then(res => { | 121 | }).then(res => { |
| 119 | wx.hideLoading(); | 122 | wx.hideLoading(); |
| @@ -190,7 +193,7 @@ Page({ | @@ -190,7 +193,7 @@ Page({ | ||
| 190 | data: { | 193 | data: { |
| 191 | serviceId: service_id, | 194 | serviceId: service_id, |
| 192 | storeId: a.stoid, | 195 | storeId: a.stoid, |
| 193 | - userId: d.user_id | 196 | + userId: th.data.options.UserId, |
| 194 | } | 197 | } |
| 195 | }).then(res => { | 198 | }).then(res => { |
| 196 | wx.hideLoading(); | 199 | wx.hideLoading(); |
| @@ -221,7 +224,7 @@ Page({ | @@ -221,7 +224,7 @@ Page({ | ||
| 221 | projectId: project_id, | 224 | projectId: project_id, |
| 222 | serviceId: service_id, | 225 | serviceId: service_id, |
| 223 | storeId: a.stoid, | 226 | storeId: a.stoid, |
| 224 | - userId: d.user_id | 227 | + userId: th.data.options.UserId, |
| 225 | } | 228 | } |
| 226 | }).then(res => { | 229 | }).then(res => { |
| 227 | if (res.data.code == 0) { | 230 | if (res.data.code == 0) { |
packageA/pages/my_service/i_service.json
| 1 | { | 1 | { |
| 2 | "navigationBarTitleText": "服务项目", | 2 | "navigationBarTitleText": "服务项目", |
| 3 | + "enablePullDownRefresh": false, | ||
| 3 | "usingComponents": { | 4 | "usingComponents": { |
| 4 | "qr_code": "/components/qr_code/qr_code", | 5 | "qr_code": "/components/qr_code/qr_code", |
| 5 | "warn": "/components/long_warn/long_warn", | 6 | "warn": "/components/long_warn/long_warn", |
packageA/pages/my_service/i_service.wxml
| 1 | <!-- 背景图片 --> | 1 | <!-- 背景图片 --> |
| 2 | <view catchtap="close"> | 2 | <view catchtap="close"> |
| 3 | <image class="backimage" src="{{iurl}}/miniapp/images/yyservice/backimage.png" lazy-load="true"></image> | 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 | </view> | 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,10 +14,11 @@ Page({ | ||
| 14 | endDate: '结束日期', | 14 | endDate: '结束日期', |
| 15 | }, | 15 | }, |
| 16 | 16 | ||
| 17 | - onLoad: function(t) { | 17 | + onLoad: function(options) { |
| 18 | _this = this; | 18 | _this = this; |
| 19 | 19 | ||
| 20 | this.setData({ | 20 | this.setData({ |
| 21 | + options, | ||
| 21 | currentDate: this.currentDate(), | 22 | currentDate: this.currentDate(), |
| 22 | }); | 23 | }); |
| 23 | 24 | ||
| @@ -27,15 +28,23 @@ Page({ | @@ -27,15 +28,23 @@ Page({ | ||
| 27 | }, | 28 | }, |
| 28 | 29 | ||
| 29 | onShow: function() { | 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,7 +268,17 @@ Page({ | ||
| 268 | mobile: mobile, | 268 | mobile: mobile, |
| 269 | }, | 269 | }, |
| 270 | success: function (res) { | 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 | if(res.data.data.indexOf('已成为分销商')!=-1){ | 282 | if(res.data.data.indexOf('已成为分销商')!=-1){ |
| 273 | showtxt="成功成为分销商"; | 283 | showtxt="成功成为分销商"; |
| 274 | var txt="fenxiao["+index+"].pass"; | 284 | var txt="fenxiao["+index+"].pass"; |