Commit d24847bcceaaa763c53437ddbd06f51e7f69980d

Authored by taiyuan
1 parent e662d353

修改卡项列表、历史预约、服务项目、预约服务

components/diy_nav/diy_nav.js
@@ -46,7 +46,8 @@ Component({ @@ -46,7 +46,8 @@ Component({
46 //智能跳转 46 //智能跳转
47 go_url:function (e) { 47 go_url:function (e) {
48 var url=e.currentTarget.dataset.url; 48 var url=e.currentTarget.dataset.url;
49 - getApp().goto(url); 49 + console.log('url==>', url);
  50 + // getApp().goto(url);
50 } 51 }
51 } 52 }
52 }) 53 })
53 \ No newline at end of file 54 \ No newline at end of file
packageA/pages/cardList/cardList.js
@@ -16,6 +16,8 @@ Page({ @@ -16,6 +16,8 @@ Page({
16 currentQuery: { 16 currentQuery: {
17 store_id: app.globalData.setting.stoid, 17 store_id: app.globalData.setting.stoid,
18 }, 18 },
  19 +
  20 + default_img: '/miniapp/images/default_g_img.gif',
19 }, 21 },
20 22
21 /** 23 /**
packageA/pages/cardList/cardList.wxml
1 <view class="page"> 1 <view class="page">
2 <swiper class="swiper" autoplay indicator-dots circular easing-function="easeOutCubic"> 2 <swiper class="swiper" autoplay indicator-dots circular easing-function="easeOutCubic">
3 - <swiper-item wx:for="{{banner}}"><image src="{{item.ad_code}}" class="swiper-img"/></swiper-item> 3 + <swiper-item wx:for="{{banner}}"><image src="{{item.ad_code ? item.ad_code : (imghost + default_img)}}" class="swiper-img"/></swiper-item>
4 <!-- <swiper-item>234</swiper-item> 4 <!-- <swiper-item>234</swiper-item>
5 <swiper-item>345</swiper-item> --> 5 <swiper-item>345</swiper-item> -->
6 </swiper> 6 </swiper>
@@ -26,6 +26,6 @@ @@ -26,6 +26,6 @@
26 <nodata class="t-c" wx:if="{{list.pageData.length == 0 || list == null}}"></nodata> 26 <nodata class="t-c" wx:if="{{list.pageData.length == 0 || list == null}}"></nodata>
27 </view> 27 </view>
28 <!-- <nodata class="t-c" wx:if="{{list.pageData.length == 0 && list.pageData}}"></nodata> --> 28 <!-- <nodata class="t-c" wx:if="{{list.pageData.length == 0 && list.pageData}}"></nodata> -->
29 - <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 已经到底了 -</view> 29 + <view class="noMore">- 已经到底了 -</view>
30 </scroll-view> 30 </scroll-view>
31 </view> 31 </view>
packageA/pages/cardList/cardList.wxss
@@ -20,7 +20,7 @@ page { @@ -20,7 +20,7 @@ page {
20 display: block; 20 display: block;
21 width: 240rpx; 21 width: 240rpx;
22 height: 240rpx; 22 height: 240rpx;
23 - background-color: pink; 23 + /* background-color: pink; */
24 } 24 }
25 25
26 .price { 26 .price {
packageA/pages/my_service/appment_main.js
@@ -96,7 +96,7 @@ Page({ @@ -96,7 +96,7 @@ Page({
96 var buyType = th.data.buyType; //服务项目类型 96 var buyType = th.data.buyType; //服务项目类型
97 var storeId = a.stoid; //商家id 97 var storeId = a.stoid; //商家id
98 var storageId = th.data.storageId; //门店id 98 var storageId = th.data.storageId; //门店id
99 - var userId = d.user_id; //用户id 99 + var userId = th.data.options.userid; //用户id
100 var remarks = th.data.remarks; //用户备注 100 var remarks = th.data.remarks; //用户备注
101 var project_id = th.data.project_id; //项目id 101 var project_id = th.data.project_id; //项目id
102 var validay = th.data.validay; 102 var validay = th.data.validay;
@@ -153,7 +153,7 @@ Page({ @@ -153,7 +153,7 @@ Page({
153 "page": "/pages/user/my_service/tment_details?number=" + number, 153 "page": "/pages/user/my_service/tment_details?number=" + number,
154 "storeId": a.stoid, 154 "storeId": a.stoid,
155 "typeId": "1011", 155 "typeId": "1011",
156 - "userId": d.user_id 156 + "userId": th.data.options.userid
157 }; 157 };
158 var data = JSON.stringify(json); 158 var data = JSON.stringify(json);
159 //调用发送预约成功模版接口 159 //调用发送预约成功模版接口
@@ -373,7 +373,7 @@ Page({ @@ -373,7 +373,7 @@ Page({
373 key_word = key_word.replace(/\s+/g, ""); 373 key_word = key_word.replace(/\s+/g, "");
374 getApp().request.promiseGet(url, { 374 getApp().request.promiseGet(url, {
375 data: { 375 data: {
376 - userId:getApp().globalData.user_id, 376 + userId: th.data.options.userid,
377 storeId: a.stoid, 377 storeId: a.stoid,
378 serviceId: itemId, 378 serviceId: itemId,
379 latitude: th.data.lat, 379 latitude: th.data.lat,
@@ -428,7 +428,7 @@ Page({ @@ -428,7 +428,7 @@ Page({
428 getApp().request.promiseGet(url, { 428 getApp().request.promiseGet(url, {
429 data: { 429 data: {
430 storeId: a.stoid, 430 storeId: a.stoid,
431 - userId: d.user_id, 431 + userId: th.data.options.userid,
432 serviceId: itemid, 432 serviceId: itemid,
433 storageId: storageId 433 storageId: storageId
434 } 434 }
@@ -527,6 +527,7 @@ Page({ @@ -527,6 +527,7 @@ Page({
527 onLoad: function(options) { 527 onLoad: function(options) {
528 var th = this; 528 var th = this;
529 th.setData({ 529 th.setData({
  530 + options,
530 itemId: options.service_id, 531 itemId: options.service_id,
531 buyType: options.BuyType, 532 buyType: options.BuyType,
532 project_id: options.ProjectID, 533 project_id: options.ProjectID,
@@ -564,16 +565,18 @@ Page({ @@ -564,16 +565,18 @@ Page({
564 // 获取当前默认导购信息及归属门店信息 565 // 获取当前默认导购信息及归属门店信息
565 getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', { 566 getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', {
566 data: { 567 data: {
567 - store_id: 1,  
568 - guide_id: 73,  
569 - UserCode: '01', 568 + store_id: a.stoid,
  569 + guide_id: e.globalData.guide_id,
  570 + UserCode: th.data.options.usercode,
570 } 571 }
571 }).then(res => { 572 }).then(res => {
572 - console.log('res==>', res.data.data);  
573 - th.setData({  
574 - store_name: res.data.data.StorageName,  
575 - beautician_name: res.data.data.StaffName,  
576 - }); 573 + console.log('res==>', a.stoid, e.globalData.guide_id, th.data.options.usercode);
  574 + if(res.data.data.Tech) {
  575 + th.setData({
  576 + store_name: res.data.data.StorageName,
  577 + beautician_name: res.data.data.StaffName,
  578 + });
  579 + }
577 }); 580 });
578 581
579 }, 582 },
@@ -630,7 +633,7 @@ Page({ @@ -630,7 +633,7 @@ Page({
630 getApp().request.promiseGet(url, { 633 getApp().request.promiseGet(url, {
631 data: { 634 data: {
632 storeId: a.stoid, 635 storeId: a.stoid,
633 - userId: d.user_id, 636 + userId: th.data.options.userid,
634 projectId: project_id 637 projectId: project_id
635 } 638 }
636 }).then(res => { 639 }).then(res => {
packageA/pages/my_service/hist_service.js
@@ -120,7 +120,7 @@ Page({ @@ -120,7 +120,7 @@ Page({
120 getApp().request.promiseGet(url, { 120 getApp().request.promiseGet(url, {
121 data: { 121 data: {
122 storeId: a.stoid, 122 storeId: a.stoid,
123 - userId: this.data.options.userid, 123 + userId: th.data.options.userid,
124 beginDate: startTime, 124 beginDate: startTime,
125 endDate: endTime, 125 endDate: endTime,
126 page: th.data.curpage, 126 page: th.data.curpage,
packageA/pages/my_service/i_service.js
@@ -40,7 +40,10 @@ Page({ @@ -40,7 +40,10 @@ Page({
40 options, 40 options,
41 }); 41 });
42 var th = this; 42 var th = this;
43 - th.query_service(); 43 + // if(options.UserId) {
  44 + th.query_service();
  45 + // };
  46 +
44 }, 47 },
45 /** 48 /**
46 * 生命周期函数--监听页面显示 49 * 生命周期函数--监听页面显示
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;" data-userid="{{options.UserId}}">服务记录</navigator>  
5 - <navigator class="History fs26" url="/packageA/pages/my_service/hist_service" data-userid="{{options.UserId}}">历史预约</navigator> 4 + <navigator class="History fs26" url="/packageA/pages/service_record/service_record?userid={{options.UserId}}" style="left:10px;right:auto;">服务记录</navigator>
  5 + <navigator class="History fs26" url="/packageA/pages/my_service/hist_service?userid={{options.UserId}}">历史预约</navigator>
6 </view> 6 </view>
7 7
8 <!-- 预约内容 --> 8 <!-- 预约内容 -->
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 <!-- <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}"> 50 <!-- <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}" data-service_id="{{item.ServiceID}}">
51 <view>帮你预约</view> 51 <view>帮你预约</view>
52 </view> --> 52 </view> -->
53 - <view class="flex-level btn" data-url="/packageA/pages/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}"> 53 + <view class="flex-level btn" data-url="/packageA/pages/my_service/appment_main?service_id={{item.ServiceID}}&BuyType={{item.BuyType}}&ProjectID={{item.ProjectID}}&Validay={{item.Validay}}&userid={{options.UserId}}&usercode={{options.UserCode}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}">
54 <view>帮你预约</view> 54 <view>帮你预约</view>
55 </view> 55 </view>
56 </view> 56 </view>
packageA/pages/service_record/service_record.js
@@ -28,6 +28,7 @@ Page({ @@ -28,6 +28,7 @@ Page({
28 }, 28 },
29 29
30 onShow: function() { 30 onShow: function() {
  31 + reqData.url = '/api/weshop/marketing/servicewrite/page';
31 reqData.data = { 32 reqData.data = {
32 storeId: app.globalData.setting.stoid, 33 storeId: app.globalData.setting.stoid,
33 }; 34 };
@@ -39,8 +40,6 @@ Page({ @@ -39,8 +40,6 @@ Page({
39 reqData.data.userId = app.globalData.user_id; 40 reqData.data.userId = app.globalData.user_id;
40 this.isLogin() 41 this.isLogin()
41 .then(function(data) { 42 .then(function(data) {
42 - reqData.url = '/api/weshop/marketing/servicewrite/page';  
43 -  
44 _this.getData(true, reqData.url, reqData.data); 43 _this.getData(true, reqData.url, reqData.data);
45 }); 44 });
46 }; 45 };
packageA/pages/shop_details/shop_details.js 0 → 100644
  1 +Page({
  2 + data: {
  3 + shop: null,
  4 + },
  5 +
  6 + onLoad(options) {
  7 + let shop = JSON.parse(decodeURIComponent(options.shop))
  8 + this.setData({
  9 + shop: shop,
  10 + });
  11 + },
  12 +
  13 + // 监听拨打电话
  14 + onPhone() {
  15 + wx.makePhoneCall({
  16 + phoneNumber: this.data.shop.pickup_phone,
  17 + })
  18 + },
  19 +
  20 +})
0 \ No newline at end of file 21 \ No newline at end of file
pages/user/my_service/i_service.wxml
@@ -65,6 +65,7 @@ @@ -65,6 +65,7 @@
65 <view class="end fs26 xc-black">到底了</view> 65 <view class="end fs26 xc-black">到底了</view>
66 <view class="Line"></view> 66 <view class="Line"></view>
67 </view> 67 </view>
  68 + <!-- <view class="After_all flex-center" wx:if="{{ismore && service_List.length>=6}}">选择更多服务卡项,</view> -->
68 </view> 69 </view>
69 <!-- 无服务项目 --> 70 <!-- 无服务项目 -->
70 <view wx:if="{{service_List.length<1 && is_service_read}}"> 71 <view wx:if="{{service_List.length<1 && is_service_read}}">
@@ -75,7 +76,8 @@ @@ -75,7 +76,8 @@
75 <view class="flex-level"> 76 <view class="flex-level">
76 <image src="{{iurl}}miniapp/images/yyservice/no_history.png"></image> 77 <image src="{{iurl}}miniapp/images/yyservice/no_history.png"></image>
77 </view> 78 </view>
78 - <view class="flex-level fs30 xc-ash">暂无服务项目</view> 79 + <!-- <view class="flex-level fs30 xc-ash">暂无服务项目</view> -->
  80 + <view class="flex-level fs30 xc-ash">暂无服务卡项,<text class="ctb" data-url="/packageA/pages/cardList/cardList" bindtap="goto">立即购买!</text></view>
79 <view class="flex-level"> 81 <view class="flex-level">
80 <navigator data-url="/pages/user/index/index" bindtap="goto"> 82 <navigator data-url="/pages/user/index/index" bindtap="goto">
81 <view class="flex-center fs28 white">回到首页</view> 83 <view class="flex-center fs28 white">回到首页</view>