Commit 91920da7253dd2518c34c28aa697d8149406c4ad

Authored by taiyuan
2 parents 32eb8d82 7d8de8ce

解决冲突

Showing 65 changed files with 3900 additions and 584 deletions
components/diy_searchbox/diy_searchbox.js
... ... @@ -19,6 +19,8 @@ Component({
19 19 inputShowed:1,
20 20 inputval:'在店铺内搜索',
21 21 keyword:'',
  22 +
  23 + searchRecord: [],
22 24 },
23 25 ready: function() {
24 26 var th=this;
... ... @@ -27,7 +29,27 @@ Component({
27 29 if(e.hot_keywords)
28 30 th.setData({keyword:e.hot_keywords});
29 31 })
  32 +
  33 + var arr=wx.getStorageSync('searchRecord') || [] //若无存储则为空
  34 +
  35 + this.setData({
  36 + searchRecord: arr
  37 + });
  38 +
  39 + },
  40 +
  41 +
  42 + pageLifetimes:{
  43 + //要处理一下,游客登录后的界面的变化,主要还该是改变会员
  44 + show: function () {
  45 + var th=this;
  46 + var arr=wx.getStorageSync('searchRecord') || [] //若无存储则为空
  47 + this.setData({
  48 + searchRecord: arr,inputval:'',first:1,is_his:0
  49 + });
  50 + }
30 51 },
  52 +
31 53 methods: {
32 54 //智能跳转
33 55 go_url:function (e) {
... ... @@ -41,17 +63,23 @@ Component({
41 63 return false;
42 64 }
43 65 this.setData({first:0,inputShowed:1,inputval:''});
44   -
45   -
46   -
47   -
48   - },
  66 +
  67 + },
  68 + inputFocus:function(){
  69 + if(this.data.is_init) return false;
  70 + this.setData({is_his:1,})
  71 + },
49 72  
50   - onblur:function(){
51   - var val=this.data.inputval;
52   - if(val==''){
53   - this.setData({first:1,});
54   - }
  73 + onblur:function(){
  74 + var th=this;
  75 + setTimeout(function(){
  76 + if(th.data.click_sear) return false;
  77 + var val=th.data.inputval;
  78 + if(val==''){
  79 + th.setData({first:1,});
  80 + }
  81 + th.setData({is_his:0,})
  82 + },300)
55 83 },
56 84 set_input:function(e){
57 85 var val=e.detail.value;
... ... @@ -60,7 +88,23 @@ Component({
60 88 sear:function(){
61 89 var url="/pages/goods/search/search?s_key="+this.data.inputval;
62 90 getApp().goto(url);
63   - }
  91 + },
  92 +
  93 + del_his:function(){
  94 + this.setData({
  95 + searchRecord: []
  96 + });
  97 + wx.setStorage({ key: 'searchRecord', data:[]});
  98 + },
  99 +
  100 + sear_key:function(e){
  101 + this.data.click_sear=1;
  102 + var str=e.currentTarget.dataset.item;
  103 + var url="/pages/goods/search/search?s_key="+str;
  104 + this.data.click_sear=0;
  105 + getApp().goto(url);
  106 +
  107 + },
64 108  
65 109 }
66 110 })
67 111 \ No newline at end of file
... ...
components/diy_searchbox/diy_searchbox.wxml
... ... @@ -3,7 +3,7 @@
3 3 <!-- first -->
4 4 <block wx:if="{{object.style==1}}">
5 5 <view class='ss' style="position: relative;">
6   - <view bindtap='click_sear' class="s1_gk_a1" wx:if="{{false}}">
  6 + <view bindtap='click_sear' class="s1_gk_a1" wx:if="{{first}}">
7 7 <view class='s_ge'>
8 8 <image src='{{imghost}}/miniapp/images/search.png'></image>
9 9 <text>在店铺内搜索</text>
... ... @@ -13,14 +13,14 @@
13 13 <view class="s1_gk_a1" wx:else>
14 14 <view class='s_ge flex'>
15 15 <image class="find_img" src='{{imghost}}/miniapp/images/search.png' bindtap='sear'></image>
16   - <input id="find_inp" class="find_inp" value=""
  16 + <input id="find_inp" class="find_inp" value="{{inputval}}" bindfocus="inputFocus"
17 17 bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" />
18 18 </view>
19   - <view class="his_str his_str1">
20   - <view class="item">2121</view>
21   - <view class="item">2121</view>
22   - <view class="item">2121</view>
23   - <view class="clear">清除搜索历史</view>
  19 + <view class="his_str his_str1" wx:if="{{searchRecord.length>0}}">
  20 + <block wx:for="{{searchRecord}}">
  21 + <view class="item" bindtap="sear_key" data-item="{{item}}" >{{item}}</view>
  22 + </block>
  23 + <view wx:if="{{searchRecord.length>0}}" class="clear" bindtap="del_his">清除</view>
24 24 </view>
25 25 </view>
26 26  
... ... @@ -45,20 +45,20 @@
45 45 <!-- <view class="pr"> -->
46 46 <view class="flex ali-c">
47 47 <text style="font-size: 40rpx;" class="iconfont icon-search" bindtap='sear'></text>
48   - <input id="find_inp" class="find_inp2" value=""
  48 + <input id="find_inp" class="find_inp2" value="{{inputval}}" bindblur="onblur" bindfocus="inputFocus"
49 49 bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}"/>
50 50 </view>
51   - <view class="his_str his_str2">
52   - <view class="item">2121</view>
53   - <view class="item">2121</view>
54   - <view class="item">2121</view>
55   - <view class="clear">清除搜索历史</view>
  51 + <view class="his_str his_str2" wx:if="{{searchRecord.length>0 && is_his}}">
  52 + <block wx:for="{{searchRecord}}">
  53 + <view class="item" bindtap="sear_key" data-item="{{item}}">{{item}}</view>
  54 + </block>
  55 + <view wx:if="{{searchRecord.length>0}}" class="clear" bindtap="del_his">清除</view>
56 56 </view>
57 57 <!-- wx:if="{{inputShowed}}" -->
58 58  
59 59 <!-- </view> -->
60 60  
61   -
  61 +
62 62 </view>
63 63 </view>
64 64 <view class='s2_right'>
... ...
components/diy_searchbox/diy_searchbox.wxss
... ... @@ -141,7 +141,8 @@
141 141 .item {
142 142 padding: 0 20rpx;
143 143 /* border-bottom: 2rpx solid #f0f0f0; */
144   - line-height: 70rpx;
  144 + line-height: 70rpx;
  145 + text-align: left;
145 146 }
146 147 /* .item ~ .item {
147 148 border-top: 2rpx solid #f0f0f0;
... ...
packageA/images/1.jpg 0 → 100644

181 KB

packageA/images/cloud.jpg 0 → 100644

12 KB

packageA/images/index/tuangou-pic.jpg deleted

25 KB

packageA/images/liveStreamDetails/circle.jpg deleted

3.83 KB

packageA/images/liveStreamDetails/cover.jpg deleted

88.7 KB

packageA/images/liveStreamDetails/friend.jpg deleted

4.38 KB

packageA/images/liveStreamDetails/goods.jpg deleted

7.99 KB

packageA/images/liveStreamDetails/home.jpg deleted

1.38 KB

packageA/images/liveStreamDetails/playbill.jpg deleted

96.2 KB

packageA/images/liveStreamDetails/save.jpg deleted

968 Bytes

packageA/images/liveStreamDetails/share.jpg deleted

1.09 KB

packageA/images/qywx.png 0 → 100644

3.62 KB

packageA/images/wx.png 0 → 100644

7.4 KB

packageA/images/wx2.png 0 → 100644

2.28 KB

packageA/pages/choujiang/choujiang.js 0 → 100644
  1 +// packageA//pages/choujiang/choujiang.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 +
  18 + /**
  19 + * 生命周期函数--监听页面初次渲染完成
  20 + */
  21 + onReady: function () {
  22 +
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面显示
  27 + */
  28 + onShow: function () {
  29 +
  30 + },
  31 +
  32 + /**
  33 + * 生命周期函数--监听页面隐藏
  34 + */
  35 + onHide: function () {
  36 +
  37 + },
  38 +
  39 + /**
  40 + * 生命周期函数--监听页面卸载
  41 + */
  42 + onUnload: function () {
  43 +
  44 + },
  45 +
  46 + /**
  47 + * 页面相关事件处理函数--监听用户下拉动作
  48 + */
  49 + onPullDownRefresh: function () {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 页面上拉触底事件的处理函数
  55 + */
  56 + onReachBottom: function () {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 用户点击右上角分享
  62 + */
  63 + onShareAppMessage: function () {
  64 +
  65 + }
  66 +})
0 67 \ No newline at end of file
... ...
packageA/pages/choujiang/choujiang.json 0 → 100644
  1 +{
  2 + "usingComponents": {}
  3 +}
0 4 \ No newline at end of file
... ...
packageA/pages/choujiang/choujiang.wxml 0 → 100644
  1 +<!--index.wxml-->
  2 +<view class="container">
  3 + <view>
  4 + <image src=""></image>
  5 + </view>
  6 + 停止位置:<input value='{{luckPosition}}' style="width:100%;text-align:center" bindinput='input' type='number'></input>
  7 + <view class='frame_view'>
  8 + <view class='frame_row'>
  9 + <image class='frame_item' style='opacity:{{color[0]}}' src='{{images[0]}}'></image>
  10 + <image class='frame_item' style='opacity:{{color[1]}}' src='{{images[1]}}'></image>
  11 + <image class='frame_item' style='opacity:{{color[2]}}' src='{{images[2]}}'></image>
  12 + </view>
  13 +
  14 + <view class='frame_row'>
  15 + <image class='frame_item' style='opacity:{{color[7]}}' src='{{images[7]}}'></image>
  16 + <image class='frame_item' src='{{btnconfirm}}' bindtap='{{clickLuck}}'></image>
  17 + <image class='frame_item' style='opacity:{{color[3]}}' src='{{images[3]}}'></image>
  18 + </view>
  19 +
  20 + <view class='frame_row'>
  21 + <image class='frame_item' style='opacity:{{color[6]}}' src='{{images[6]}}'></image>
  22 + <image class='frame_item' style='opacity:{{color[5]}}' src='{{images[5]}}'></image>
  23 + <image class='frame_item' style='opacity:{{color[4]}}' src='{{images[4]}}'></image>
  24 + </view>
  25 +</view>
  26 +</view>
... ...
packageA/pages/choujiang/choujiang.wxss 0 → 100644
  1 +/* packageA//pages/choujiang/choujiang.wxss */
0 2 \ No newline at end of file
... ...
packageA/pages/distribution/main/main.js deleted
1   -// packageA//pages/distribution/main/main.js
2   -const app = getApp();
3   -let self = null;
4   -
5   -Page({
6   -
7   - /**
8   - * 页面的初始数据
9   - */
10   - data: {
11   -
12   - },
13   -
14   - /**
15   - * 生命周期函数--监听页面加载
16   - */
17   - onLoad: function (options) {
18   - self = this;//保存全局指针
19   -
20   - app.isLogin().then(function(data) {//进入页面前已经授权登录成功
21   - self.setData({
22   - userInfo: data,
23   - });
24   - });
25   -
26   - },
27   -
28   - /**
29   - * 生命周期函数--监听页面初次渲染完成
30   - */
31   - onReady: function () {
32   -
33   - },
34   -
35   - /**
36   - * 生命周期函数--监听页面显示
37   - */
38   - onShow: function () {
39   - console.log('onshow');
40   - let url = '/api/weshop/users/distribut/getMoney';
41   - if(app.globalData.userInfo) {
42   - if(!this.data.isLogin) {
43   - this.setData({
44   - userInfo: app.globalData.userInfo,
45   - imghost: app.globalData.setting.imghost,
46   - isLogin: true,
47   - });
48   -
49   - // 请求数据
50   - app.request.get(url + '/' + this.data.userInfo.store_id + '/' + this.data.userInfo.user_id, {
51   - success: function(res) {
52   - console.log('success~~`', self.data.userInfo);
53   - if(res.data.code == 0){
54   -
55   - self.setData({
56   - data: res.data.data,
57   - });
58   -
59   - } else {
60   - // if(!res.data.data.is_distribut) {//如果不是分销商:0不是,1是
61   -
62   - app.request.promiseGet('/api/weshop/users/distribut/getIsDistribut', {
63   - data: {
64   - storeId: self.data.userInfo.store_id,
65   - userId: self.data.userInfo.user_id,
66   - first_leader: self.data.userInfo.first_leader,
67   - },
68   - isShowLoading: true,
69   - }).then(function(res) {
70   - console.log('!!!===>', res);
71   - self.setData({
72   - fenxiao: res.data.data,
73   - });
74   - });
75   -
76   - // };
77   - };
78   - },
79   -
80   - });
81   -
82   -
83   - };
84   - };
85   -
86   -
87   - },
88   -
89   - /**
90   - * 生命周期函数--监听页面隐藏
91   - */
92   - onHide: function () {
93   -
94   - },
95   -
96   - /**
97   - * 生命周期函数--监听页面卸载
98   - */
99   - onUnload: function () {
100   -
101   - },
102   -
103   - /**
104   - * 页面相关事件处理函数--监听用户下拉动作
105   - */
106   - onPullDownRefresh: function () {
107   -
108   - },
109   -
110   - /**
111   - * 页面上拉触底事件的处理函数
112   - */
113   - onReachBottom: function () {
114   -
115   - },
116   -
117   - /**
118   - * 用户点击右上角分享
119   - */
120   - onShareAppMessage: function () {
121   -
122   - },
123   -
124   - /**
125   - * 点击跳转
126   - */
127   - goto(e) {
128   - let url = '';
129   - if(e.target.dataset.url) {
130   - url = e.target.dataset.url;
131   - } else {
132   - url = e.currentTarget.dataset.url;
133   - }
134   - console.log(url);
135   - app.goto(url);
136   - },
137   -
138   -
139   -
140   - /**
141   - * 获取输入框
142   - */
143   - getInput(e) {
144   - this.setData({
145   - inputValue: e.detail.value,
146   - });
147   - },
148   -
149   -
150   - /**
151   - * 验证
152   - */
153   - verify(e) {
154   - let pass = e.target.dataset.pass;
155   - let mobile = 0;
156   - if(this.data.inputValue) {
157   - mobile = this.data.inputValue;
158   - if(!pass) {
159   - app.request.put('/api/weshop/users/distribut/updateUserRecommender', {
160   - data: {
161   - storeId: self.data.userInfo.store_id,
162   - userId: self.data.userInfo.user_id,
163   - mobile: mobile,
164   - },
165   - success: function (res) {
166   - if(res.code = -1) {
167   - wx.showToast({
168   - title: res.data.msg,
169   - icon: 'none',
170   - duration: 2000
171   - });
172   - };
173   - console.log('!!!===>', res);
174   -
175   - if(res.data.msg == '绑定上下级关系成功!') {
176   - app.request.promiseGet('/api/weshop/users/distribut/getIsDistribut', {
177   - data: {
178   - storeId: self.data.userInfo.store_id,
179   - userId: self.data.userInfo.user_id,
180   - first_leader: self.data.userInfo.first_leader,
181   - },
182   - isShowLoading: true,
183   - }).then(function(res) {
184   - console.log('!!!===>', res);
185   - self.setData({
186   - fenxiao: res.data.data,
187   - });
188   - });
189   - };
190   -
191   - }
192   - });
193   -
194   - }
195   - } else {
196   - wx.showToast({
197   - title: '手机号码不能为空',
198   - icon: 'none',
199   - duration: 2000
200   - });
201   - };
202   -
203   - },
204   -})
205 0 \ No newline at end of file
packageA/pages/distribution/main/main.json deleted
1   -{
2   - "usingComponents": {},
3   - "navigationBarTitleText": "我的分销",
4   - "enablePullDownRefresh": false
5   -}
6 0 \ No newline at end of file
packageA/pages/distribution/main/main.wxml deleted
1   -<wxs src="../../../../utils/filter.wxs" module="filter"></wxs>
2   -<view class="main">
3   - <!-- 头像 -->
4   - <view class="avatar-container t-c pdv40">
5   - <view class="pdb20">
6   - <image class="avatar" src="{{userInfo.head_pic}}"/>
7   - </view>
8   - <view class="fs26"><text class="nickname">{{filter.show_default(userInfo.nickname)}}</text></view>
9   - </view>
10   - <!-- 金额 -->
11   - <view>
12   - <view class="flex ai-center jc_sb pd2622 bdb arrow-r" bindtap="goto">
13   - <view><text class="iconfont icon-jine pdr10 ctb"></text>可提现金额</view>
14   - <view class="ctb money" data-url="/pages/user/member/menber">{{filter.show_default(data.liudong_money)}}</view>
15   - </view>
16   -
17   - <view class="flex jc_sa t-c">
18   - <view class="pd20 f1">
19   - <view class="money fs40">{{filter.show_default(data.today_money)}}</view>
20   - <view class="fs24 pdt10 cb">今日收入</view>
21   - </view>
22   - <view class="pd20 f1">
23   - <view class="money fs40">{{filter.show_default(data.sales_volume)}}</view>
24   - <view class="fs24 pdt10 cb">总销售额</view>
25   - </view>
26   - <view class="pd20 f1">
27   - <view class="money fs40">{{filter.show_default(data.distribut_money)}}</view>
28   - <view class="fs24 pdt10 cb">累计佣金</view>
29   - </view>
30   - </view>
31   - </view>
32   - <!-- 商品 -->
33   - <view class="flex t-c mgv20 fs30" bindtap="goto">
34   - <view class="f1 pd20 line" data-url="/packageA/pages/distribution/goods/goods?index=0"><text class="iconfont icon-shangjia pdr10 cf79"></text>上架商品</view>
35   - <view class="f1 pd20" data-url="/packageA/pages/distribution/goods/goods?index=1"><text class="iconfont icon-xiajia pdr10 c29f"></text>下架商品</view>
36   - </view>
37   - <!-- 图标列表 -->
38   - <view class="flex wrap pdv20">
39   - <view class="pd20 t-c w25" bindtap="goto" data-url="/packageA/pages/distribution/order/order">
40   - <view class="circle bgBlue"><text class="iconfont icon-order fs40"></text></view>
41   - <view class="fs24 pdt10">分销订单</view>
42   - </view>
43   - <view class="pd20 t-c w25" bindtap="goto" data-url="/packageA/pages/distribution/rank/rank">
44   - <view class="circle bgRed"><text class="iconfont icon-paihangbang fs40"></text></view>
45   - <view class="fs24 pdt10">分销排行</view>
46   - </view>
47   - <view class="pd20 t-c w25" bindtap="goto" data-url="/packageA/pages/distribution/myteam/myteam">
48   - <view class="circle bgPink"><text class="iconfont icon-tuandui fs40"></text></view>
49   - <view class="fs24 pdt10">我的团队</view>
50   - </view>
51   - <view class="pd20 t-c w25" bindtap="goto" data-url="/packageA/pages/distribution/commision/commision">
52   - <view class="circle bgRed"><text class="iconfont icon-yongjin fs40"></text></view>
53   - <view class="fs24 pdt10">佣金明细</view>
54   - </view>
55   - <view class="pd20 t-c w25" bindtap="goto" data-url="/packageA/pages/distribution/card/card">
56   - <view class="circle bgPurple"><text class="iconfont icon-mingpian fs40"></text></view>
57   - <view class="fs24 pdt10">我的名片</view>
58   - </view>
59   - <view class="pd20 t-c w25">
60   - <view class="circle bgYellow" bindtap="goto" data-url="/pages/user/index/index"><text class="iconfont icon-huiyuan fs40"></text></view>
61   - <view class="fs24 pdt10">会员中心</view>
62   - </view>
63   - <view class="pd20 t-c w25" bindtap="goto" data-url="/packageA/pages/distribution/shop/shop">
64   - <view class="circle bgBlue"><text class="iconfont icon-shop fs40"></text></view>
65   - <view class="fs24 pdt10">我的小店</view>
66   - </view>
67   - <view class="pd20 t-c w25" bindtap="goto" data-url="/packageA/pages/distribution/rookie/rookie">
68   - <view class="circle bgGreen"><text class="iconfont icon-xinshouyindao fs40"></text></view>
69   - <view class="fs24 pdt10">新手必看</view>
70   - </view>
71   - </view>
72   - <!-- 分销商验证 -->
73   - <!-- <view class="popup" wx:if="{{!1}}"> -->
74   - <view class="popup" wx:if="{{!data.is_distribut}}">
75   - <view class="t-c pd20 title">分销规则说明<text class="iconfont icon-close" bindtap="goto" data-url="/pages/user/index/index"></text></view>
76   - <!-- <view class="t-c pd20 title">分销规则说明</view> -->
77   - <view wx:if="{{fenxiao}}">
78   - <block wx:for="{{fenxiao}}">
79   - <view class="item" wx:if="{{item.type == 1}}">
80   - <view class="left f1">
81   - <view class="icon-container"><text class="iconfont icon-huiyuan1"></text></view>
82   - <view>仅限PLUS卡({{item.conditonRemark}})的会员, <text class="c-red" bindtap="goto" data-url="/pages/user/cardinfo/cardinfo">立即升级</text></view>
83   - </view>
84   - <text class="iconfont {{item.pass ? 'icon-yes c-red':'icon-yuanquan c-c7'}}"></text>
85   - </view>
86   - <view class="item" wx:if="{{item.type == 2}}">
87   - <view class="left f1">
88   - <view class="icon-container"><text class="iconfont icon-renzheng"></text></view>
89   - <view class="flex ali-c">
90   - <input class="bg-f0 pdh10 input" type="number" value="{{item.inviter ? item.inviter:''}}" placeholder="请输入推荐人手机号码" disabled="{{item.pass}}" bindinput="getInput"/>
91   - <view class="verify" wx:if="{{!item.pass}}" bindtap="verify" data-pass="{{item.pass}}">验证</view>
92   - </view>
93   - </view>
94   - <text class="iconfont {{item.pass ? 'icon-yes c-red':'icon-yuanquan c-c7'}}"></text>
95   - </view>
96   - <view class="item" wx:if="{{item.type == 3}}">
97   - <view class="left f1">
98   - <view class="icon-container"><text class="iconfont icon-gouwu"></text></view>
99   - <text>{{item.conditonRemark}}</text>
100   - </view>
101   - <text class="iconfont {{item.pass ? 'icon-yes c-red':'icon-yuanquan c-c7'}}"></text>
102   - </view>
103   - </block>
104   - <view class="item" data-url="1">
105   - <view class="left f1">
106   - <view class="icon-container"><text class="iconfont icon-yongjin"></text></view>
107   - <text>成功成为分销商,分享商品给好友即可获得相应收益</text>
108   - </view>
109   - </view>
110   -
111   - </view>
112   - <view class="t-c pd20 fs30 bdt co-red bold" bindtap="goto" data-url="/pages/index/index/index">去购买</view>
113   - <!-- <view class="t-c pd20 fs30 bdt co-red bold">确定</view> -->
114   - </view>
115   - <!-- 遮罩 -->
116   - <!-- <view class="mask" wx:if="{{!1}}"></view> -->
117   - <view class="mask" wx:if="{{!data.is_distribut}}"></view>
118   -</view>
119   -
packageA/pages/distribution/main/main.wxss deleted
1   -page {
2   - background-color: #f4f4f4;
3   -}
4   -
5   -.main > view {
6   - background-color: white;
7   -}
8   -
9   -.avatar-container {
10   - padding-top: 60rpx;
11   - padding-bottom: 60rpx;
12   - background: url(https://mshopimg.yolipai.net/miniapp/images/user_index_powder.jpg) no-repeat 100% 100%;
13   - /* background-size: 100%; */
14   -}
15   -
16   -.avatar {
17   - width: 160rpx;
18   - height: 160rpx;
19   - border-radius: 50%;
20   - background-color: #eee;
21   -}
22   -
23   -.nickname {
24   - display: inline-block;
25   - background-color: rgba(0,0,0,.5);
26   - padding: 4rpx 20rpx;
27   - color: white;
28   - border-radius: 24rpx;
29   -}
30   -
31   -.pd2622 {
32   - padding: 20rpx 60rpx 20rpx 20rpx;
33   -}
34   -
35   -.money::before {
36   - content: '¥';
37   - font-size: 24rpx;
38   -}
39   -
40   -/* .bdb {
41   - border-bottom: 2rpx solid #f8f8f8;
42   -} */
43   -
44   -.arrow-r {
45   - /* display: relative; */
46   -}
47   -
48   -.arrow-r::after {
49   - font-family: iconfont;
50   - content: '\e61f';
51   - position: absolute;
52   - right: 20rpx;
53   - color: #ddd;
54   -}
55   -.line {
56   - position: relative;
57   -}
58   -.line::after {
59   - content: '';
60   - position: absolute;
61   - right: 0;
62   - background-color: #f8f8f8;
63   - width: 2rpx;
64   - height: 30rpx;
65   - top: 50%;
66   - transform: translateY(-50%);
67   -}
68   -
69   -.circle {
70   - width: 80rpx;
71   - height: 80rpx;
72   - line-height: 80rpx;
73   - border-radius: 50%;
74   - color: white;
75   - margin: 0 auto;
76   - background-color: red;
77   -}
78   -
79   -.fs40 {
80   - font-size: 40rpx;
81   -}
82   -
83   -
84   -.bgBlue {
85   - background-image: linear-gradient(to top, #48c6ef 0%, #6f86d6 100%);
86   -}
87   -.bgPink {
88   - background-image: linear-gradient(to right, #b8cbb8 0%, #b8cbb8 0%, #b465da 0%, #cf6cc9 33%, #ee609c 66%, #ee609c 100%);
89   -}
90   -.bgRed {
91   - background-image: linear-gradient(to right, #f78ca0 0%, #f9748f 19%, #fd868c 60%, #fe9a8b 100%);
92   -}
93   -.bgYellow {
94   - background-image: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
95   -}
96   -.bgGreen {
97   - background-image: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
98   -}
99   -.bgPurple {
100   - background-image: linear-gradient(to top, #9795f0 0%, #fbc8d4 100%);
101   -}
102   -
103   -.mask {
104   - position: fixed;
105   - top: 0;
106   - left: 0;
107   - width: 100%;
108   - height: 100%;
109   - background-color: rgba(0,0,0,.5) !important;
110   -}
111   -
112   -.popup {
113   - position: fixed;
114   - z-index: 1;
115   - top: 50%;
116   - left: 50%;
117   - transform: translate(-50%, -50%);
118   - width: 90%;
119   - border-radius: 12rpx;
120   - overflow: hidden;
121   -}
122   -
123   -.icon-container {
124   - border-radius: 50%;
125   - background-color: #FCEA0D;
126   - width: 50rpx;
127   - line-height: 50rpx;
128   - height: 50rpx;
129   - text-align: center;
130   - font-size: 28rpx !important;
131   - margin-right: 10rpx;
132   - flex-shrink: 0;
133   -}
134   -
135   -.item {
136   - padding: 20rpx;
137   - display: flex;
138   - align-items: center;
139   - font-size: 26rpx;
140   - position: relative;
141   -}
142   -
143   -.title {
144   - background-image: linear-gradient( 135deg, #FF6768 10%, #EA5455 100%);
145   - color: white;
146   - font-size: 28rpx;
147   - position: relative;
148   -}
149   -
150   -.icon-close {
151   - position: absolute;
152   - right: 20rpx;
153   - color: white;
154   -}
155   -
156   -.verify {
157   - color: white;
158   - background-color: #FF6768;
159   - padding: 0 20rpx;
160   - border-radius: 6rpx;
161   - display: flex;
162   - align-items: center;
163   - margin-left: 10rpx;
164   -}
165   -
166   -.input {
167   - border-radius: 6rpx;
168   - height: 50rpx;
169   -}
170   -
171   -.item ~ .item .left::before {
172   - content: '';
173   - position: absolute;
174   - left: 45rpx;
175   - top: -45rpx;
176   - width: 2rpx;
177   - height: 100%;
178   - background: linear-gradient(to bottom, #eee, #eee 8rpx, transparent 8rpx, transparent);
179   - background-size: 100% 16rpx;
180   - z-index: -1;
181   -}
182   -
183   -.left {
184   - display: flex;
185   - align-items: center;
186   - padding-right: 20rpx;
187   -}
188   -
189   -
190   -/*checkbox 整体大小 */
191   -checkbox {
192   - /* width: 240rpx;
193   - height: 90rpx; */
194   -}
195   -/*checkbox 选项框大小 */
196   -checkbox .wx-checkbox-input {
197   - width: 34rpx;
198   - height: 34rpx;
199   - border-radius: 50%;
200   -
201   -}
202   -/*checkbox选中后样式 */
203   -checkbox .wx-checkbox-input.wx-checkbox-input-checked {
204   - background-color: #FF6768;
205   - border-color: #FF6768;
206   - /* color: white; */
207   -}
208   -/*checkbox选中后图标样式 */
209   -checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
210   - width: 34rpx;
211   - height: 34rpx;
212   - line-height: 34rpx;
213   - text-align: center;
214   - font-size: 24rpx;
215   - color: #fff;
216   - background: transparent;
217   - transform: translate(-50%, -50%) scale(1);
218   - -webkit-transform: translate(-50%, -50%) scale(1);
219   -}
220   -
221   -.item:not(:last-of-type) {
222   - display: flex;
223   - justify-content: space-between;
224   -}
225   -
226   -
packageA/pages/liveStream/liveStream.js
... ... @@ -10,7 +10,7 @@ var t = require(&quot;../../../utils/util&quot;),
10 10 o = s.globalData.setting,
11 11 os = o;
12 12 var regeneratorRuntime = require('../../../utils/runtime.js');
13   -
  13 +1
14 14 Page({
15 15 /**
16 16 * 页面的初始数据
... ...
packageA/pages/my_service/appment_main.js.rej 0 → 100644
  1 +diff a/packageA/pages/my_service/appment_main.js b/packageA/pages/my_service/appment_main.js (rejected hunks)
  2 +@@ -647,7 +647,7 @@
  3 + var project_id = th.data.project_id; //服务项目id
  4 + getApp().request.promiseGet(url, {
  5 + data: {
  6 +- storeId: a.stoid,
  7 ++ storeId: th.data.options.storeid,
  8 + userId: th.data.options.userid,
  9 + projectId: project_id
  10 + }
... ...
packageA/pages/my_service2/appment_main.js.rej 0 → 100644
  1 +diff a/packageA/pages/my_service/appment_main.js b/packageA/pages/my_service/appment_main.js (rejected hunks)
  2 +@@ -647,7 +647,7 @@
  3 + var project_id = th.data.project_id; //服务项目id
  4 + getApp().request.promiseGet(url, {
  5 + data: {
  6 +- storeId: a.stoid,
  7 ++ storeId: th.data.options.storeid,
  8 + userId: th.data.options.userid,
  9 + projectId: project_id
  10 + }
... ...
packageA/pages/my_service2/appment_main.wxml.rej 0 → 100644
  1 +diff a/packageA/pages/my_service/appment_main.wxml b/packageA/pages/my_service/appment_main.wxml (rejected hunks)
  2 +@@ -17,54 +17,120 @@
  3 + <view class="angle">∟</view>
  4 + </view>
  5 + </view>
  6 ++
  7 ++
  8 ++ <view class="table flex">
  9 ++ <view class="left t-c">
  10 ++ <view class="td">时间</view>
  11 ++ <view class="td">8:00</view>
  12 ++ <view class="td">9:00</view>
  13 ++ </view>
  14 ++ <scroll-view scroll-x class="right" bindscroll="scroll">
  15 ++ <view class="flex t-c" bindtap="rect">
  16 ++ <view bindtap="rect">
  17 ++ <view class="td blue">张三</view>
  18 ++ <view class="td" bindtap="print">100</view>
  19 ++ <view class="td">200</view>
  20 ++ </view>
  21 ++ <view>
  22 ++ <view class="td blue">张三</view>
  23 ++ <view class="td">100</view>
  24 ++ <view class="td">200</view>
  25 ++ </view>
  26 ++ <view>
  27 ++ <view class="td blue">张三</view>
  28 ++ <view class="td" bindtap="print">100</view>
  29 ++ <view class="td">200</view>
  30 ++ </view>
  31 ++ <view>
  32 ++ <view class="td blue">张三</view>
  33 ++ <view class="td">100</view>
  34 ++ <view class="td">200</view>
  35 ++ </view>
  36 ++ <view>
  37 ++ <view class="td blue">张三</view>
  38 ++ <view class="td">100</view>
  39 ++ <view class="td">200</view>
  40 ++ </view>
  41 ++ <view>
  42 ++ <view class="td blue">张三</view>
  43 ++ <view class="td">100</view>
  44 ++ <view class="td">200</view>
  45 ++ </view>
  46 ++ <view>
  47 ++ <view class="td blue">张三</view>
  48 ++ <view class="td">100</view>
  49 ++ <view class="td">200</view>
  50 ++ </view>
  51 ++ <view>
  52 ++ <view class="td blue">1张三</view>
  53 ++ <view class="td">300</view>
  54 ++ <view class="td">300</view>
  55 ++ </view>
  56 ++ </view>
  57 ++ </scroll-view>
  58 ++ <view class="card">
  59 ++ <view class="t-c pd20">
  60 ++ <text class="iconfont icon-meirong fs40"></text>
  61 ++ <view class="fs24">项目1</view>
  62 ++ </view>
  63 ++ <view class="t-c pd20">
  64 ++ <text class="iconfont icon-meirong fs40"></text>
  65 ++ <view class="fs24">项目1</view>
  66 ++ </view>
  67 ++ </view>
  68 ++ </view>
  69 ++
  70 ++
  71 ++
  72 + <!-- 选择美容师 -->
  73 +- <view class="flex-vertical mabot">
  74 ++ <!-- <view class="flex-vertical mabot"> -->
  75 + <!-- 门店 -->
  76 +- <view class="flex-vertical-between head fs30">
  77 ++ <!-- <view class="flex-vertical-between head fs30">
  78 + <view>美</view>
  79 + <view>容</view>
  80 + <view>师</view>
  81 +- </view>
  82 ++ </view> -->
  83 +
  84 + <!-- 选择美容师 -->
  85 +- <view class="rel fs26">
  86 +- <view class="flex-vertical-between Cosmetology" bindtap="query_beautician">
  87 ++ <!-- <view class="rel fs26"> -->
  88 ++ <!-- <view class="flex-vertical-between Cosmetology" bindtap="query_beautician">
  89 + <view class="{{beautician_name==''?'color':''}} value ellipsis-1">{{beautician_name==''?'选择美容师':beautician_name}}</view>
  90 + <view class="angle">∟</view>
  91 +- </view>
  92 ++ </view> -->
  93 + <!-- 美容师下拉列表 -->
  94 +- <view class="beauticians abs" wx:if="{{beautician}}">
  95 ++ <!-- <view class="beauticians abs" wx:if="{{beautician}}"> -->
  96 + <!-- 到时候要做判断如果是index==循环的最后一个则把下边线去掉:(beaclone去掉的css) -->
  97 +- <view class="beautician flex-vertical fs26" wx:for="{{beautician_list}}" bindtap="choice_beautician" data-baaindex="{{key}}" wx:for-index="key">
  98 ++ <!-- <view class="beautician flex-vertical fs26" wx:for="{{beautician_list}}" bindtap="choice_beautician" data-baaindex="{{key}}" wx:for-index="key">
  99 + <view class="StaffName ellipsis-1">{{item.StaffName}}</view>
  100 + </view>
  101 + <view>
  102 + </view>
  103 +- </view>
  104 +- </view>
  105 +- <view class="flex-center users" bindtap="nav_bea">
  106 ++ </view> -->
  107 ++ <!-- </view> -->
  108 ++ <!-- <view class="flex-center users" bindtap="nav_bea">
  109 + <image class="user" src="{{iurl}}/miniapp/images/yyservice/user.png"></image>
  110 +- </view>
  111 +- </view>
  112 ++ </view> -->
  113 ++ <!-- </view> -->
  114 +
  115 + <!-- 选择时间 -->
  116 +- <view class="flex-vertical mabot">
  117 ++ <!-- <view class="flex-vertical mabot"> -->
  118 + <!-- 门店 -->
  119 +- <view class="head fs30">
  120 ++ <!-- <view class="head fs30">
  121 + <view>预约时间</view>
  122 +- </view>
  123 ++ </view> -->
  124 +
  125 + <!-- 选择时间 -->
  126 +- <view class="flex-vertical-between fs26 select" data-url="/packageA/pages/my_service/beauty_deta?url={{url}}&StorageId={{StorageId}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto">
  127 ++ <!-- <view class="flex-vertical-between fs26 select" data-url="/packageA/pages/my_service/beauty_deta?url={{url}}&StorageId={{StorageId}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto">
  128 + <view class="{{time==''?'color':''}}">{{time==""?'选择时间':time}}</view>
  129 + <view class="angle angler">∟</view>
  130 +- </view>
  131 +- </view>
  132 ++ </view> -->
  133 ++ <!-- </view> -->
  134 +
  135 + <!-- 备注 -->
  136 +- <view class="flex Remarks">
  137 ++ <!-- <view class="flex Remarks"> -->
  138 + <!-- 门店 -->
  139 +- <view class="flex-space-between head fs30">
  140 ++ <!-- <view class="flex-space-between head fs30">
  141 + <view>备</view>
  142 + <view>注</view>
  143 + </view>
... ...
packageA/pages/my_service2/beauty_deta.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + inurl: a.url, //接口网址
  13 + iurl: a.imghost,
  14 + url: "", //选择选择时间后返回的页面
  15 + defimgurl: "/miniapp/images/no-head.jpg",
  16 + seekTime: "", //当前服务预约选择的时间
  17 + time_list: [], //可预约时间
  18 + name: "", //美容师姓名
  19 + comment: "", //美容师评价
  20 + aweeks: [], //七天的预约时间
  21 + head_img: "", //美容师头像
  22 + time:['08:00','08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00','14:30', '15:00', '15:30', '16:00', '16:30', '17:00','17:30', '18:00','18:30', '19:00', '19:30', '20:00', '20:30', '21:00', '21:30', '22:00','22:30'],
  23 + weeks: [], //星期几数组
  24 + time_index: -1, //选择预约时间下标
  25 + date_id: 0, //选择日期的id
  26 + beautician_id: "", //美容师id
  27 + itemId: "", //服务id
  28 + number: "", //预约单号
  29 + modify: 0, //是否是修改时间
  30 + iscos: 0, //是否是从美容师列表过来的
  31 + hours: "", //获取当前时分秒
  32 + projectId: "", //项目id
  33 + StaffName: "", //美容师名称
  34 + },
  35 +
  36 + /**
  37 + * 生命周期函数--监听页面加载
  38 + */
  39 + onLoad: function(options) {
  40 + var th = this;
  41 + var myDate = new Date();
  42 + var minutes = myDate.getMinutes(); //获取当前分钟数(0-59)
  43 + var hours = myDate.getHours() + ":" + minutes; //获取当前小时数(0-23)
  44 + var beautician_id = options.BeauticianID;
  45 + var storageId = options.StorageId;
  46 +
  47 +
  48 + th.setData({
  49 + options,
  50 + storeid: options.storeid,
  51 + beautician_id: beautician_id,
  52 + itemId: options.itemId,
  53 + modify: options.modify,
  54 + hours: hours,
  55 + projectId: options.projectId,
  56 + storageId: storageId,
  57 + });
  58 +
  59 + if (options.url != undefined) {
  60 + th.setData({
  61 + url: options.url
  62 + })
  63 + }
  64 + if (options.number != undefined) {
  65 + th.setData({
  66 + number: options.number
  67 + })
  68 + }
  69 + if (options.iscos != undefined) {
  70 + th.setData({
  71 + iscos: options.iscos
  72 + })
  73 + }
  74 + if (options.StaffName!=undefined){
  75 + th.setData({
  76 + StaffName: options.StaffName
  77 + })
  78 + }
  79 + th.query_beatea(th.query_aweek);
  80 + },
  81 + /**
  82 + * 生命周期函数--监听页面显示
  83 + */
  84 + onShow: function() {
  85 + var th = this;
  86 + //获取当前时间
  87 + var myDate = new Date();
  88 + // var date = myDate.getHours(); //获取当前小时数(0-23);
  89 + let str = myDate.toTimeString(); //"10:55:24 GMT+0800 (中国标准时间)"
  90 + let date = str.substring(0, 8); // '10:55:24'
  91 + th.setData({
  92 + hours: date
  93 + });
  94 + },
  95 +
  96 + //图片失败,默认图片
  97 + bind_bnerr1: function(e) {
  98 + var _errImg = e.target.dataset.errorimg;
  99 + var _Img = e.target.dataset.img;
  100 + if (_Img != undefined) {
  101 + var _errObj = {};
  102 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
  103 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  104 + }
  105 + },
  106 + //选择服务日期
  107 + check_date: function(e) {
  108 + var th = this;
  109 + var id = e.currentTarget.dataset.dateid;
  110 + var date_id = th.data.date_id;
  111 + var seekTime = th.data.aweeks[id].time;
  112 + if (id != date_id) {
  113 + th.setData({
  114 + date_id: id,
  115 + seekTime: seekTime
  116 + })
  117 + th.query_date();
  118 + }
  119 + },
  120 + //获取美容师信息
  121 + query_beatea: function(func) {
  122 + var th = this;
  123 + var url = "/api/weshop/marketing/reservation/staff/get"; //接口路径
  124 + var beautician_id = th.data.beautician_id;
  125 + getApp().request.promiseGet(url, {
  126 + data: {
  127 + beauticianId: beautician_id,
  128 + storeId: a.stoid,
  129 + }
  130 + }).then(res => {
  131 + if (res.data.code == 0) {
  132 + var data = res.data.data;
  133 + var ob={
  134 + name: data.StaffName,
  135 + comment: data.Remark1,
  136 + head_img: data.PhotoUrl
  137 + };
  138 + if(!th.data.storageId){
  139 + ob.storageId=data.StorageId;
  140 + }
  141 + th.setData(ob);
  142 + func();
  143 + } else {
  144 + getApp().my_warnning(res.data.msg, 0, th);
  145 + }
  146 + })
  147 + },
  148 + //返回上个页面
  149 + navigateBack: function() {
  150 + var th = this;
  151 + var modify = th.data.modify; //是否是更改时间
  152 + var seekTime = th.data.seekTime; //选择的日期
  153 + var time_list = th.data.time_list;
  154 + var time_index = th.data.time_index;
  155 + if (time_index == -1) {
  156 + getApp().my_warnning("请选择预约时间", 0, th);
  157 + return false;
  158 + }
  159 + var date_id = th.data.date_id;
  160 + var date = th.data.aweeks[date_id].time;
  161 + var time = date + " " + time_list[time_index] + ":00";
  162 + if (modify == 1) {
  163 + var json = {
  164 + "arrangeTime": time,
  165 + "number": th.data.number,
  166 + "remark": "更改预约时间",
  167 + "states": 0,
  168 + "storeId": a.stoid,
  169 + "isxz": 1
  170 + };
  171 + var data = JSON.stringify(json);
  172 + var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  173 + wx.request({
  174 + url: url,
  175 + data: data,
  176 + method: 'put',
  177 + header: {
  178 + 'content-type': 'application/json'
  179 + }, // 设置请求的 header
  180 + success: function(res) {
  181 + if (res.data.code == 0) {
  182 + getApp().my_warnning(res.data.data, 1, th);
  183 + setTimeout(function() {
  184 + wx.navigateBack({
  185 + //返回
  186 + delta: 1
  187 + })
  188 + }, 1000);
  189 + } else {
  190 + getApp().my_warnning(res.data.msg, 0, th);
  191 + }
  192 + }
  193 + })
  194 + } else {
  195 + var pages = getCurrentPages(); //当前页面
  196 + var iscos = th.data.iscos;
  197 + var delta = 1;
  198 + if (Number(iscos) == 1) {
  199 + delta = delta + Number(iscos); //返回哪个页面
  200 + var prevPage = pages[pages.length - 2 - Number(iscos)]; //上一页面
  201 + prevPage.setData({
  202 + //直接给上一个页面赋值
  203 + time: time,
  204 + beautician_name: th.data.StaffName,
  205 + beauticianID: th.data.beautician_id,
  206 + storageId: th.data.storageId,
  207 + });
  208 + wx.navigateBack({
  209 + //返回
  210 + delta: 2
  211 + })
  212 + } else {
  213 + var prevPage = pages[pages.length - 2]; //上一页面
  214 + prevPage.setData({
  215 + //直接给上一个页面赋值
  216 + time: time,
  217 + storageId: th.data.storageId,
  218 + });
  219 + wx.navigateBack({
  220 + //返回
  221 + delta: 1
  222 + })
  223 + }
  224 + }
  225 + },
  226 + //选择时间
  227 + Selection_time: function(e) {
  228 + var th = this;
  229 + var index = e.currentTarget.dataset.index;
  230 + var time_index = th.data.time_index;
  231 + if (index == time_index) {
  232 + return false;
  233 + } else {
  234 + th.setData({
  235 + time_index: index
  236 + })
  237 + }
  238 + },
  239 + //查询七天预约时间
  240 + query_aweek: function() {
  241 + var th = this;
  242 + var beautician_id = th.data.beautician_id; //美容师id
  243 + var storageId=th.data.storageId;
  244 +
  245 + var itemId = th.data.itemId; //服务id
  246 + var projectId = th.data.projectId; //项目id
  247 + var url = "/api/weshop/marketing/reservation/staff/seven/time/listnew"; //接口地址
  248 + getApp().request.promiseGet(url, {
  249 + data: {
  250 + projectId: projectId,
  251 + beauticianId: beautician_id,
  252 + serviceId: itemId,
  253 + storeId: a.stoid,
  254 + storageId:storageId
  255 + }
  256 + }).then(res => {
  257 + if (res.data.code == 0) {
  258 + var data = res.data.data;
  259 + var arr = [];
  260 + for (var i in data) {
  261 + var em = {
  262 + "time": i,
  263 + "val": data[i]
  264 + };
  265 + arr.push(em);
  266 + }
  267 + arr.sort(th.sort_arr);
  268 + var weeks = ["今天", "明天", "后天"];
  269 + var week = "";
  270 + for (var i = 3; i < arr.length; i++) {
  271 + var date = new Date(arr[i].time);
  272 + if (date.getDay() == 0) week = "周日"
  273 + if (date.getDay() == 1) week = "周一"
  274 + if (date.getDay() == 2) week = "周二"
  275 + if (date.getDay() == 3) week = "周三"
  276 + if (date.getDay() == 4) week = "周四"
  277 + if (date.getDay() == 5) week = "周五"
  278 + if (date.getDay() == 6) week = "周六"
  279 + weeks[i] = week;
  280 + }
  281 + th.setData({
  282 + aweeks: arr,
  283 + weeks: weeks
  284 + })
  285 + th.query_date();
  286 +
  287 + } else {
  288 + getApp().my_warnning(res.data.msg, 0, th);
  289 + }
  290 + })
  291 +
  292 + },
  293 +
  294 + query_date: function() {
  295 + var th = this;
  296 + var projectId = th.data.projectId;
  297 + var date_id = th.data.date_id; //日期下标
  298 + var SeekTime = th.data.aweeks[date_id].time;
  299 + var val = th.data.aweeks[date_id].val;
  300 +
  301 + var url = "/api/weshop/marketing/reservation/staff/time/listnew";
  302 + getApp().request.promiseGet(url, {
  303 + data: {
  304 + projectId: projectId,
  305 + staffId: th.data.beautician_id,
  306 + storageId:th.data.storageId,
  307 + serviceId: th.data.itemId,
  308 + seekTime: SeekTime,
  309 + storeId: a.stoid,
  310 + }
  311 + }).then(res => {
  312 + if (res.data.code == 0) {
  313 + var hours = th.data.hours;
  314 + var time_list = res.data.data;
  315 + var time = th.data.time;
  316 + var date_id = th
  317 + var new_time = [];
  318 + var date = th.data.hours.substring(0,2);
  319 +
  320 + //不等于空就是有可以预约的时间
  321 + if (time_list != null) {
  322 + if (res.data.data && res.data.data[0]!= undefined) {
  323 + if (res.data.data[0].GroupHour && res.data.data[0].GroupHour.length > 11) {
  324 + getApp().my_warnning(res.data.data[0].GroupHour, 0, th);
  325 + }
  326 + }
  327 + //循环固定和可预约的时间
  328 + for (var i = 0; i < time.length; i++) {
  329 + for (var ii = 0; ii < time_list.length; ii++) {
  330 + //判断固定的时间和可以预约的时间
  331 + if (time[i] == time_list[ii].begintime.substring(0, 5)) {
  332 + var date_id = th.data.date_id;
  333 + if (date > time_list[ii].begintime.substring(0, 2) && date_id == 0) {
  334 + new_time[i] = "";
  335 + break;
  336 + }else{
  337 + new_time[i] = time_list[ii].begintime.substring(0, 5);
  338 + break;
  339 + }
  340 + } else {
  341 + new_time[i] = "";
  342 + }
  343 + }
  344 + }
  345 + }else{
  346 + for(var i = 0 ;i<time.length;i++){
  347 + new_time[i]="";
  348 + }
  349 + }
  350 + th.setData({
  351 + time_list: new_time,
  352 + })
  353 + } else {
  354 + getApp().my_warnning(res.data.msg, 0, th);
  355 + }
  356 + })
  357 +
  358 + },
  359 + //更改预约时间
  360 + change_time: function() {
  361 + var th = this;
  362 + var seekTime = th.data.seekTime; //选择的日期
  363 + var time_list = th.data.time_list;
  364 + var time_index = th.data.time_index;
  365 + var time = time_list[time_index];
  366 + var number = th.data.number; //预约单号
  367 + var json = {
  368 + "arrangeTime": seekTime + " " + time,
  369 + "number": number,
  370 + "remark": "更改预约时间",
  371 + "states": 0,
  372 + "storeId": a.stoid,
  373 + "isxz": 1
  374 + };
  375 + var data = JSON.stringify(json);
  376 + var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  377 + wx.request({
  378 + url: url,
  379 + data: data,
  380 + method: 'put',
  381 + header: {
  382 + 'content-type': 'application/json'
  383 + }, // 设置请求的 header
  384 + success: function(res) {
  385 + if (res.data.code == 0) {
  386 + getApp().my_warnning("更改成功", 0, th);
  387 + } else {
  388 + getApp().my_warnning(res.data.msg, 0, th);
  389 + }
  390 + }
  391 + })
  392 + },
  393 + //预览头像
  394 + previewImage: function(e) {
  395 + var th = this;
  396 + var current = e.currentTarget.dataset.src;
  397 + wx.previewImage({
  398 + current: current, // 当前显示图片的http链接
  399 + urls: [th.data.head_img] // 需要预览的图片http链接列表
  400 + })
  401 + },
  402 +
  403 + sort_arr: function(a, b) {
  404 + a = a['time'];
  405 + b = b['time'];
  406 + if (a < b) {
  407 + return -1;
  408 + }
  409 + if (a > b) {
  410 + return 1;
  411 + }
  412 + return 0;
  413 + },
  414 +
  415 + check_is_in_arr:function(val,pdata) {
  416 + if(!val || !pdata) return false;
  417 + for(var i in pdata){
  418 + if(pdata[i].begintime.indexOf(val)!=-1){
  419 + return true;
  420 + }
  421 + }
  422 + return false;
  423 + }
  424 +
  425 +
  426 +
  427 +})
0 428 \ No newline at end of file
... ...
packageA/pages/my_service2/beauty_deta.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "美容师详情",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn"
  5 + }
  6 +}
0 7 \ No newline at end of file
... ...
packageA/pages/my_service2/beauty_deta.wxml 0 → 100644
  1 +<view class="container">
  2 + <view class="backcolor"></view>
  3 +
  4 + <view class="comments">
  5 + <!-- 个人信息 -->
  6 + <view class="Personal">
  7 +
  8 + <view class="name fs36 ellipsis-1">{{name}}</view>
  9 +
  10 + <view class="ellipsis-4" style="width:100%">
  11 + <view style="overflow:hidden;">
  12 + <image class="head" src="{{head_img==''?iurl+defimgurl:head_img}}" data-errorimg="{{head_img}}" binderror="bind_bnerr1" data-img="{{head_img}}" data-src="{{head_img}}"></image>
  13 + <view class="introduce fs26">
  14 + <block wx:if="{{comment!=''}}">
  15 + {{comment}}
  16 + </block>
  17 + <block wx:else>
  18 + 暂无介绍
  19 + </block>
  20 + </view>
  21 + <view style="clear:both"></view>
  22 + </view>
  23 + </view>
  24 +
  25 + </view>
  26 +
  27 + <view>
  28 + <view class="fs36" style="margin-bottom:35rpx;">服务预约</view>
  29 + <scroll-view class="scroll-h fs26 " scroll-x>
  30 + <view class="rel" wx:for="{{aweeks}}" style="display: inline-block;">
  31 + <block wx:if="{{aweeks[index].val!=''}}">
  32 + <view class="scroll-item-h bd {{index==date_id?'chbd':''}}" bindtap="check_date" data-dateid="{{index}}">
  33 + <view>{{weeks[index]}}</view>
  34 + <view>{{item.time}}</view>
  35 + </view>
  36 + </block>
  37 + <block wx:else>
  38 + <view class="scroll-item-h bd {{index==date_id?'chbd':''}}" bindtap="check_date" data-dateid="{{index}}">
  39 + <view>{{weeks[index]}}(约满)</view>
  40 + <view>{{item.time}}</view>
  41 + </view>
  42 + </block>
  43 + </view>
  44 +
  45 + </scroll-view>
  46 +
  47 + <!-- 选择时间 -->
  48 + <view class="Times">
  49 +
  50 + <view class="flex-center" wx:for="{{time}}" style="display:inline-block;" wx:for-index="key" wx:for-item="it">
  51 + <block wx:if="{{it==time_list[key]}}">
  52 + <view class="Time flex-center {{time_index==key?'chTime':''}}" bindtap="Selection_time" data-index="{{key}}">
  53 + <view>
  54 + <view class="fs26">{{it}}</view>
  55 + </view>
  56 + </view>
  57 + </block>
  58 + <block wx:else>
  59 + <view class="Time flex-center nochTime">
  60 + <view>
  61 + <view class="fs26">{{it}}</view>
  62 + </view>
  63 + </view>
  64 + </block>
  65 + </view>
  66 + <view class="choice flex-center fs32" bindtap="navigateBack">
  67 + <view>确定选择</view>
  68 + </view>
  69 +
  70 + </view>
  71 +
  72 + </view>
  73 +
  74 + </view>
  75 +
  76 +</view>
  77 +<warn id="warn"></warn>
0 78 \ No newline at end of file
... ...
packageA/pages/my_service2/beauty_deta.wxss 0 → 100644
  1 +.container {
  2 + border-top: 7rpx solid rgb(245, 245, 245);
  3 +}
  4 +
  5 +.backcolor {
  6 + position: absolute;
  7 + top: 0rpx;
  8 + left: 0rpx;
  9 + z-index: 0;
  10 + width: 100%;
  11 + height: 270rpx;
  12 + background-color: rgb(214, 1, 33);
  13 +
  14 +}
  15 +
  16 +.comments {
  17 + position: absolute;
  18 + top: 45rpx;
  19 + left: 0rpx;
  20 + z-index: 1;
  21 + padding: 0rpx 23rpx;
  22 +}
  23 +
  24 +.name {
  25 + font-weight: bold;
  26 + float: left;
  27 + width: 250rpx;
  28 +}
  29 +
  30 +.head {
  31 + width: 130rpx;
  32 + height: 130rpx;
  33 + border-radius: 50%;
  34 + float: right;
  35 + margin: 0rpx 15rpx;
  36 + /* border: 2rpx solid red; */
  37 +}
  38 +
  39 +.introduce {
  40 + margin-top: 90rpx;
  41 + text-indent: 2em;
  42 + color: rgb(102, 102, 102);
  43 +}
  44 +
  45 +.Personal {
  46 + width: 640rpx;
  47 + height: 300rpx;
  48 + background-color: rgb(255, 255, 255);
  49 + border-radius: 5rpx;
  50 + box-shadow: 0rpx 2rpx 2rpx 2rpx rgb(250, 228, 230);
  51 + margin-bottom: 65rpx;
  52 + padding-top: 40rpx;
  53 + padding-left: 35rpx;
  54 + padding-right: 35rpx;
  55 +}
  56 +
  57 +.choice {
  58 + height: 70rpx;
  59 + background-color: rgb(214, 1, 33);
  60 + color: rgb(255, 255, 255);
  61 + margin-top: 30rpx;
  62 +}
  63 +
  64 +.scroll-h {
  65 + white-space: nowrap;
  66 + width: 704rpx;
  67 + overflow: visible;
  68 + height: 125rpx;
  69 + color: transparent;
  70 +}
  71 +
  72 +.scroll-item-h {
  73 + display: inline-block;
  74 + width: 172rpx;
  75 + text-align: center;
  76 + overflow: visible;
  77 + height: 70rpx;
  78 + padding: 15rpx 0rpx;
  79 +}
  80 +::-webkit-scrollbar{
  81 + width: 0;
  82 + height: 0;
  83 + color: transparent;
  84 +}
  85 +.box {
  86 + width: 0px;
  87 + height: 0px;
  88 + margin-left: 15rpx;
  89 + border-top: 21rpx solid transparent;
  90 + border-right: 21rpx solid transparent;
  91 + border-left: 21rpx solid transparent;
  92 + display: inline-block;
  93 + transform: rotate(180deg);
  94 + border-bottom: 21rpx solid rgb(214, 1, 33);
  95 +}
  96 +
  97 +.bd {
  98 + /* border: 2rpx solid rgb(238, 238, 238); */
  99 + background-color: rgb(255, 255, 255);
  100 + color: rgb(20, 20, 20);
  101 +}
  102 +
  103 +.chbd {
  104 + border: 2rpx solid rgb(214, 1, 33);
  105 + background-color: rgb(214, 1, 33);
  106 + color: rgb(255, 255, 255);
  107 +}
  108 +
  109 +.Times {
  110 + background-color: rgb(238, 243, 247);
  111 + margin-bottom: 30rpx;
  112 + padding:34rpx 27rpx;
  113 +}
  114 +
  115 +.Time {
  116 + border: 2rpx solid rgb(238, 238, 238);
  117 + width: 160rpx;
  118 + height: 70rpx;
  119 + background-color: rgb(255, 255, 255);
  120 + text-align: center;
  121 + padding-top: 15rpx;
  122 + padding-bottom: 15rpx;
  123 +}
  124 +.chTime{
  125 + border-color: rgb(214, 1, 33);
  126 +}
  127 +.nochTime{
  128 + color: rgb(174,177,177);
  129 + background-color: rgb(250,250,250);
  130 +}
  131 +.abs {
  132 + left: 55rpx;
  133 + bottom: -39rpx;
  134 +}
... ...
packageA/pages/my_service2/cosmetology_list.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +
  7 +
  8 +Page({
  9 +
  10 + /**
  11 + * 页面的初始数据
  12 + */
  13 + data: {
  14 + defimgurl: "/miniapp/images/no-head.jpg",
  15 + iurl: a.imghost,
  16 + cosmetology_list: [], //美容师列表
  17 + is_cosmetology_read: 0, //是否有读过美容师接口,该属性用在没有美容师列表的排版
  18 + curpage: 1, //当前分页数
  19 + pageSize: 10, //页大小
  20 + total: 0, //总数量
  21 + ismore: 0, //是否加载完毕
  22 + itemId: 0, //服务id,
  23 + storageId: 0, //线下门店id
  24 + projectId:"",//项目id
  25 + },
  26 +
  27 + onReachBottom: function() {
  28 + var th = this;
  29 + if (this.data.total <= th.data.pageSize) return;
  30 + if (this.data.ismore) return;
  31 + wx.showLoading({
  32 + title: '加载中...',
  33 + })
  34 + th.query_cology();
  35 + },
  36 +
  37 +
  38 + query_cology: function() {
  39 + var th = this;
  40 + var url = "/api/weshop/marketing/reservation/staff/pagenew";
  41 + var itemId = th.data.itemId; //服务id
  42 + var storageId = th.data.storageId;
  43 + getApp().request.promiseGet(url, {
  44 + data: {
  45 + storeId: a.stoid,
  46 + userId: th.data.options.userid,
  47 + serviceId: itemId,
  48 + storageId: storageId,
  49 + page: th.data.curpage,
  50 + pageSize: th.data.pageSize
  51 + }
  52 + }).then(res => {
  53 + wx.hideLoading();
  54 + if (res.data.code == 0) {
  55 + th.data.curpage++;
  56 + var arr1 = th.data.cosmetology_list;
  57 + var arr2 = res.data.data;
  58 + var arr3 = [...arr1, ...arr2];
  59 +
  60 +
  61 + th.setData({
  62 + cosmetology_list: arr3,
  63 + total: res.data.data.total,
  64 + is_service_read: 1,
  65 + is_cosmetology_read:1
  66 + }), wx.stopPullDownRefresh(); //停止下拉刷新
  67 + } else {
  68 + th.setData({
  69 + is_cosmetology_read:1,
  70 + ismore:1
  71 + })
  72 + }
  73 + })
  74 + },
  75 +
  76 +
  77 + //图片失败,默认图片
  78 + bind_bnerr1: function(e) {
  79 + var _errImg = e.target.dataset.errorimg;
  80 + var _Img = e.target.dataset.img;
  81 + if (_Img != undefined) {
  82 + var _errObj = {};
  83 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
  84 + console.log(_errObj,"zzzzzzz");
  85 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  86 + }
  87 + },
  88 +
  89 +
  90 +
  91 + /**
  92 + * 生命周期函数--监听页面加载
  93 + */
  94 + onLoad: function(options) {
  95 + console.log('options--->', options);
  96 + var th = this;
  97 + this.setData({
  98 + options,
  99 + projectId: options.projectId,
  100 + itemId: options.itemId,
  101 + storageId: options.storageId
  102 + })
  103 + },
  104 +
  105 + /**
  106 + * 生命周期函数--监听页面显示
  107 + */
  108 + onShow: function() {
  109 + var th = this;
  110 + th.data.curpage++;
  111 + th.setData({
  112 + cosmetology_list: [],
  113 + total: 0,
  114 + is_service_read: 0,
  115 + is_cosmetology_read:0
  116 + })
  117 + th.query_cology();
  118 + },
  119 +
  120 +
  121 +})
0 122 \ No newline at end of file
... ...
packageA/pages/my_service2/cosmetology_list.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "美容师列表",
  3 + "usingComponents": {
  4 + "warn": "/components/long_warn/long_warn"
  5 + }
  6 +}
0 7 \ No newline at end of file
... ...
packageA/pages/my_service2/cosmetology_list.wxml 0 → 100644
  1 +<view class="container">
  2 + <image class="appointment" src="{{iurl}}/miniapp/images/yyservice/Cosm_appo.png"></image>
  3 +
  4 + <!-- 总预约 -->
  5 + <view wx:if="{{cosmetology_list.length>0}}">
  6 + <!-- 当个预约 -->
  7 + <view class="single" wx:for="{{cosmetology_list}}" wx:for-item="item">
  8 + <!-- 个人属性 -->
  9 + <view class="flex-vertical-between">
  10 + <view class="flex-vertical">
  11 + <image class="portrait" src="{{(!item.PhotoUrl || item.PhotoUrl=='')?iurl+defimgurl:item.PhotoUrl}}" lazy-load="true" data-errorimg="cosmetology_list[{{index}}].PhotoUrl" binderror="bind_bnerr1" data-img="cosmetology_list[{{index}}].PhotoUrl"></image>
  12 + <view>
  13 + <!-- 用户名 -->
  14 + <view class="UserName ellipsis-1 fs32">{{item.StaffName}}</view>
  15 + <!-- 评价星数 -->
  16 + <view class="flex" style="margin-top:10rpx;">
  17 + <image class="Stars" src="{{iurl}}{{key<item.Star || item.Star==''?'/miniapp/images/StarsredCk.png':'/miniapp/images/StarswhiteUnCk.png'}}" wx:for="{{item.Star==''?5:5}}" wx:for-index="key" wx:for-item="it"></image>
  18 + <!-- images/StarswhiteUnCk.png//白色星星地址 -->
  19 + </view>
  20 + <!-- 个人标签 -->
  21 + <view class="Labels fs22 flex" wx:if="{{item.EvaluationLabel!=''?true:false}} ">
  22 + <view wx:if="{{lab<3}}" class="flex-center Labelitem itone {{lab==1?'itwo':''}} {{lab==2?'ith':''}}" wx:for="{{item.EvaluationLabel}}" wx:for-item="it" wx:for-index="lab">
  23 + <view class="ellipsis-1">{{it.LabelName}}</view>
  24 + </view>
  25 + </view>
  26 + </view>
  27 + </view>
  28 +
  29 + <!-- 预约状态 -->
  30 + <navigator class="flex-center gofu go" url="/packageA/pages/my_service/beauty_deta?StorageId={{item.StorageId}}&BeauticianID={{item.staffid}}&itemId={{itemId}}&iscos=1&modify=0&projectId={{projectId}}&StaffName={{item.StaffName}}">
  31 + <view class="fs24">预约</view>
  32 + </navigator>
  33 + </view>
  34 + <view class="fs26 information">
  35 + <block wx:if="{{item.Remark1!=''}}">
  36 + <view class="ellipsis-3">{{item.Remark1}}
  37 + </view>
  38 + </block>
  39 + <block wx:else>
  40 + <view>暂无介绍</view>
  41 + </block>
  42 + </view>
  43 + </view>
  44 + <!-- 没有数据 -->
  45 + <!-- 加载完毕并且数据大于=页大小 -->
  46 + <view class="After_all flex-center" wx:if="{{ismore && cosmetology_list.length>=4}}">
  47 + <view class="Line"></view>
  48 + <view class="end fs26 xc-black">到底了</view>
  49 + <view class="Line"></view>
  50 + </view>
  51 + </view>
  52 +</view>
  53 +<!-- 无美容师 -->
  54 +<view class="empty_order" wx:if="{{cosmetology_list.length<1 && is_cosmetology_read}}">
  55 + <view class="flex-level">
  56 + <image src="{{iurl}}miniapp/images/yyservice/no_beauty.png"></image>
  57 + </view>
  58 + <view class="flex-level fs30 xc-ash">暂无美容师</view>
  59 + <view class="flex-level">
  60 + <navigator url="/pages/user/my_service/i_service" bindtap="goto">
  61 + <view class="flex-center fs28 white">其他项目</view>
  62 + </navigator>
  63 + </view>
  64 +</view>
  65 +<warn id="warn"></warn>
0 66 \ No newline at end of file
... ...
packageA/pages/my_service2/cosmetology_list.wxss 0 → 100644
  1 +page{
  2 + height: 100%;
  3 +}
  4 +.container{
  5 + background-color: rgb(255,255,255);
  6 +}
  7 +.appointment {
  8 + width: 100%;
  9 + height: 305rpx;
  10 +}
  11 +
  12 +.single {
  13 + margin-left: 10rpx;
  14 + border-bottom: 1rpx solid rgb(229, 229, 229);
  15 + padding-bottom: 30rpx;
  16 + padding-left: 20rpx;
  17 + padding-right: 35rpx;
  18 + padding-top: 30rpx;
  19 +}
  20 +
  21 +.portrait {
  22 + width: 140rpx;
  23 + height: 140rpx;
  24 + border-radius: 50%;
  25 + margin-right: 30rpx;
  26 +}
  27 +.UserName{
  28 + max-width: 250rpx;
  29 +}
  30 +.Stars {
  31 + width: 25rpx;
  32 + height: 25rpx;
  33 + margin-right: 7rpx;
  34 +}
  35 +.Labels{
  36 + width: 100%;
  37 + margin-top: 15rpx;
  38 +}
  39 +.Label {
  40 + margin-top: 25rpx;
  41 +}
  42 +
  43 +.Labelitem {
  44 + width: 100rpx;
  45 + height: 30rpx;
  46 + border-radius: 20rpx;
  47 + line-height: 30rpx;
  48 + margin-right: 10rpx;
  49 + padding:0rpx 9rpx;
  50 +}
  51 +
  52 +.itone {
  53 + border: 2rpx solid rgb(22, 232, 131);
  54 + color: rgb(22, 232, 131);
  55 +}
  56 +
  57 +.itwo {
  58 + border: 2rpx solid rgb(92, 135, 248);
  59 + color: rgb(92, 135, 248);
  60 +}
  61 +
  62 +.ith {
  63 + border: 2rpx solid rgb(244, 143, 55);
  64 + color: rgb(244, 143, 55);
  65 +}
  66 +
  67 +.gofu {
  68 + width: 120rpx;
  69 + padding: 5rpx 0rpx;
  70 + border-radius: 25rpx;
  71 +}
  72 +
  73 +.go {
  74 + border: 1rpx solid rgb(196, 26, 46);
  75 + color: rgb(196, 26, 46);
  76 + background-color: rgb(255,255,255);
  77 +}
  78 +
  79 +.gofull {
  80 + border: 1rpx solid rgb(185, 185, 185);
  81 + color: rgb(185, 185, 185);
  82 + background-color: rgb(255,255,255);
  83 +}
  84 +
  85 +.information {
  86 + margin-top: 25rpx;
  87 + text-indent: 2em;
  88 + color: rgb(103, 103, 103);
  89 +}
  90 +/* 无订单 */
  91 +.empty_order image {
  92 + width: 330rpx;
  93 + height: 280rpx;
  94 + margin-top: 120rpx;
  95 +}
  96 +
  97 +.empty_order .xc-ash {
  98 + margin-top: 10rpx;
  99 + font-weight: 600px;
  100 +}
  101 +
  102 +.empty_order navigator {
  103 + margin-top: 60rpx;
  104 + border-radius: 40rpx;
  105 +}
  106 +
  107 +.empty_order navigator view {
  108 + width: 247rpx;
  109 + height: 56rpx;
  110 + background-color: rgb(255, 72, 72);
  111 + border-radius: 40rpx;
  112 +}
  113 +.After_all {
  114 + height: 80rpx;
  115 +}
  116 +
  117 +.After_all .Line {
  118 + border-top: 3rpx solid rgb(0, 0, 0);
  119 + width: 130rpx;
  120 +}
  121 +
  122 +.After_all .end {
  123 + margin: 0rpx 15rpx;
  124 +}
... ...
packageA/pages/my_service2/hist_service.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + iurl: a.imghost,
  13 + isPickerShow: false,
  14 + isPickerRender: false,
  15 + startTime: "",
  16 + endTime: "",
  17 + pickerConfig: {
  18 + endDate: true,
  19 + column: "",
  20 + dateLimit: true,
  21 + initStartTime: "2019-01-01 12:32:44",
  22 + initEndTime: "2019-12-01 12:32:44",
  23 + limitStartTime: "1917-05-06 12:32:44",
  24 + limitEndTime: "2055-05-06 12:32:44"
  25 + },
  26 + hist_List: [], //服务项目列表
  27 + is_service_read: 0,
  28 + curpage: 1, //当前分页数
  29 + pageSize: 15, //页大小
  30 + total: 0,
  31 + ismore: 0, //是否加载完毕
  32 + is_screen: 0, //是否通过筛选来选择历史服务
  33 + is_reset: 0, //是否重复点击
  34 + is_nav: 1, //是否显示导航栏
  35 + },
  36 + pickerShow: function() {
  37 + this.setData({
  38 + isPickerShow: true,
  39 + isPickerRender: true,
  40 + chartHide: true
  41 + });
  42 + },
  43 + pickerHide: function() {
  44 + var th = this;
  45 + th.setData({
  46 + isPickerShow: false,
  47 + chartHide: false
  48 + });
  49 + },
  50 + //--选择时间--
  51 + setPickerTime: function(val) {
  52 + let data = val.detail,
  53 + gl_data = getApp().globalData,
  54 + th = this;
  55 + th.setData({
  56 + startTime: data.startTime,
  57 + endTime: data.endTime,
  58 + val: 0,
  59 + distance: 0,
  60 + hist_List: [],
  61 + curpage: 1,
  62 + is_screen: 1,
  63 + is_nav: 1
  64 + });
  65 + th.query_hist();
  66 + },
  67 + /**
  68 + * 生命周期函数--监听页面加载
  69 + */
  70 + onLoad: function(options) {
  71 + var th = this;
  72 + console.log('xxoptions==>', options);
  73 + this.setData({
  74 + options,
  75 + });
  76 + th.query_hist();
  77 + },
  78 + /**
  79 + * 生命周期函数--监听页面显示
  80 + */
  81 + onShow: function() {},
  82 +
  83 + /**
  84 + * 页面上拉触底事件的处理函数
  85 + */
  86 + onReachBottom: function() {
  87 + var th = this;
  88 + if (th.data.total <= th.data.pageSize) return false;
  89 + if (th.data.ismore) return false;
  90 +
  91 + wx.showLoading({
  92 + title: '加载中...',
  93 + })
  94 + th.query_hist();
  95 + },
  96 + //重置历史服务数据
  97 + his_reset: function() {
  98 + var th = this;
  99 + var is_reset = th.data.is_reset;
  100 + if (is_reset == 0) {
  101 + th.setData({
  102 + hist_List: [],
  103 + curpage: 1,
  104 + is_service_read: 0,
  105 + is_screen: 1,
  106 + is_reset: 1,
  107 + startTime: "",
  108 + endTime: "",
  109 + is_nav: 1
  110 + })
  111 + th.query_hist();
  112 + }
  113 + },
  114 + query_hist: function() {
  115 +
  116 + var th = this;
  117 + var startTime = th.data.startTime.substring(0, 10); //开始
  118 + var endTime = th.data.endTime.substring(0, 10); //结束
  119 + var url = "/api/weshop/marketing/reservation/history/reservation/page";
  120 + getApp().request.promiseGet(url, {
  121 + data: {
  122 + storeId: a.stoid,
  123 + userId: th.data.options.userid,
  124 + beginDate: startTime,
  125 + endDate: endTime,
  126 + page: th.data.curpage,
  127 + pageSize: th.data.pageSize
  128 + }
  129 + }).then(res => {
  130 + wx.hideLoading();
  131 + th.setData({
  132 + is_reset: 0
  133 + })
  134 + if (res.data.code == 0) {
  135 + th.data.curpage++;
  136 + var arr1 = th.data.hist_List;
  137 + var arr2 = res.data.data.pageData;
  138 + var arr3 = [...arr1, ...arr2];
  139 + var ismore = 0;
  140 + if (arr3.length == res.data.total) ismore = 1
  141 + th.setData({
  142 + hist_List: arr3,
  143 + total: res.data.data.total,
  144 + ismore: ismore,
  145 + is_service_read: 1,
  146 + }), wx.stopPullDownRefresh(); //停止下拉刷新
  147 + } else {
  148 + th.setData({
  149 + is_service_read: 1,
  150 + is_screen: 0,
  151 + ismore: 1
  152 + })
  153 + if (startTime!="") {
  154 + th.setData({
  155 + total:0
  156 + })
  157 + }
  158 + }
  159 + })
  160 + }
  161 +})
0 162 \ No newline at end of file
... ...
packageA/pages/my_service2/hist_service.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "历史预约",
  3 + "usingComponents": {
  4 + "timePicker": "/components/timePicker/timePicker",
  5 + "warn": "/components/long_warn/long_warn"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageA/pages/my_service2/hist_service.wxml 0 → 100644
  1 +<view class="{{isPickerRender==true?'container':''}}">
  2 + <!-- 点击方法 -->
  3 + <view class="exption flex-vertical-between fs28" wx:if="{{is_nav || hist_List.length>0}}">
  4 + <view class="flex">
  5 + 共使用
  6 + <view class="count">{{total}}</view>
  7 + 次服务
  8 + </view>
  9 + <view class="flex">
  10 + <view class="Resetfram flex-center" bindtap="his_reset">
  11 + <view class="Reset">重置</view>
  12 + <image class="Resetsub" src="{{iurl}}/miniapp/images/reset.png"></image>
  13 + </view>
  14 + <view class="flex-center" bindtap='pickerShow'>
  15 + <view>筛选</view>
  16 + <view wx:if="{{true}}" class="box"></view>
  17 + </view>
  18 + </view>
  19 + </view>
  20 +
  21 + <!-- 总的服务列表 -->
  22 + <view class="items">
  23 + <!-- 单个 -->
  24 + <view class="item flex-vertical-between" wx:for="{{hist_List}}">
  25 + <!-- left -->
  26 + <view>
  27 + <view class="flex fs28">
  28 + <view class="itemName ellipsis-1">{{item.ServiceName==''?'匿名':item.ServiceName}}</view>
  29 + <block wx:if="{{item.State==1 || item.State==4}}">
  30 + <view>(服务美容师:</view>
  31 + </block>
  32 + <block wx:else>
  33 + <view>(预约美容师:</view>
  34 + </block>
  35 + <view class="itemUsna ellipsis-1">{{item.BeauticianName}}</view>
  36 + )
  37 + </view>
  38 + <view class="fs24">{{item.ArrangeTime}}</view>
  39 + </view>
  40 + <!-- right -->
  41 + <view class="serState fs32">
  42 + <view wx:if="{{item.State==0}}">未服务</view>
  43 + <view wx:if="{{item.State==1}}">已服务</view>
  44 + <view wx:if="{{item.State==2}}">已过期</view>
  45 + <view wx:if="{{item.State==3}}">已取消</view>
  46 + <view wx:if="{{item.State==4}}">已评价</view>
  47 + </view>
  48 + </view>
  49 + <!-- 没有数据 -->
  50 + <!-- 加载完毕并且数据大于=页大小 -->
  51 + <view class="After_all flex-center" wx:if="{{ismore && hist_List.length>=pageSize}}">
  52 + <view class="Line"></view>
  53 + <view class="end fs26 xc-black">到底了</view>
  54 + <view class="Line"></view>
  55 + </view>
  56 + </view>
  57 +</view>
  58 +<view wx:if="{{hist_List.length<1 && startTime!=''}}" class="flex-center fs26 slot">
  59 + <view>该时间段无预约记录</view>
  60 +</view>
  61 +<!-- 无历史服务 -->
  62 +<view class="empty_order" wx:if="{{hist_List.length<1 && is_service_read && startTime==''}}">
  63 + <view class="flex-level">
  64 + <image src="{{iurl}}miniapp/images/yyservice/no_history.png"></image>
  65 + </view>
  66 + <view class="flex-level fs30 xc-ash">暂无服务记录</view>
  67 + <view class="flex-level">
  68 + <navigator url="/pages/user/my_service/i_service">
  69 + <view class="flex-center fs32 white">前往使用</view>
  70 + </navigator>
  71 + </view>
  72 +</view>
  73 +
  74 +
  75 +<!-- 引用时间主键 -->
  76 +<timePicker pickerShow="{{isPickerShow}}" id="picker" wx:if="{{isPickerRender}}" bind:hidePicker="pickerHide" bind:setPickerTime="setPickerTime" config="{{pickerConfig}}"></timePicker>
  77 +<warn id="warn"></warn>
0 78 \ No newline at end of file
... ...
packageA/pages/my_service2/hist_service.wxss 0 → 100644
  1 +page {
  2 + height: 100%;
  3 +}
  4 +
  5 +.box {
  6 + width: 0px;
  7 + height: 0px;
  8 + margin-left: 15rpx;
  9 + border-top: 11rpx solid rgba(0, 0, 0, 0);
  10 + border-right: 10rpx solid rgba(0, 0, 0, 0);
  11 + border-left: 10rpx solid rgba(0, 0, 0, 0);
  12 + display: inline-block;
  13 + margin-bottom: 10rpx;
  14 + color: red;
  15 + transform: rotate(0deg);
  16 + border-bottom: 18rpx solid rgb(153, 153, 153);
  17 +}
  18 +
  19 +.exption {
  20 + padding: 0rpx 45rpx;
  21 + background-color: rgb(238, 238, 238);
  22 + height: 70rpx;
  23 + color: rgb(153, 153, 153);
  24 + position: fixed;
  25 + top:0rpx;
  26 + left: 0rpx;
  27 + width: 660rpx;
  28 +}
  29 +
  30 +.count {
  31 + margin: 0rpx 5rpx;
  32 +}
  33 +
  34 +.Resetfram {
  35 + margin-right: 40rpx;
  36 +}
  37 +
  38 +.Reset {
  39 + margin-right: 5rpx;
  40 +}
  41 +
  42 +.Resetsub {
  43 + width: 30rpx;
  44 + height: 30rpx;
  45 +}
  46 +.items{
  47 + margin-top: 70rpx;
  48 +}
  49 +.item {
  50 + margin: 0rpx 25rpx;
  51 + padding: 0rpx 20rpx;
  52 + height: 100rpx;
  53 + border-bottom: 1rpx solid rgb(242, 242, 242);
  54 +}
  55 +
  56 +.itemName {
  57 + margin-right: 10rpx;
  58 + max-width: 130rpx;
  59 +}
  60 +
  61 +.itemUsna {
  62 + max-width: 150rpx;
  63 +}
  64 +
  65 +.serState {
  66 + color: rgb(255, 82, 125);
  67 +}
  68 +
  69 +.container {
  70 + position: fixed;
  71 + width: 100%;
  72 + top: 0rpx;
  73 +}
  74 +
  75 +/* 无历史服务 */
  76 +
  77 +.empty_order {
  78 + height: 100%;
  79 + background-color: rgb(238, 238, 238);
  80 +}
  81 +
  82 +.empty_order image {
  83 + width: 329rpx;
  84 + height: 229rpx;
  85 + margin-top: 202rpx;
  86 +}
  87 +
  88 +.empty_order .xc-ash {
  89 + margin-top: 10rpx;
  90 + font-weight: 600px;
  91 +}
  92 +
  93 +.empty_order navigator {
  94 + margin-top: 65rpx;
  95 + border-radius: 40rpx;
  96 +}
  97 +
  98 +.empty_order navigator view {
  99 + width: 247rpx;
  100 + height: 65rpx;
  101 + background-color: rgb(255, 72, 72);
  102 + border-radius: 40rpx;
  103 +}
  104 +
  105 +.After_all {
  106 + height: 80rpx;
  107 +}
  108 +
  109 +.After_all .Line {
  110 + border-top: 3rpx solid rgb(0, 0, 0);
  111 + width: 130rpx;
  112 +}
  113 +
  114 +.After_all .end {
  115 + margin: 0rpx 15rpx;
  116 +}
  117 +.slot{
  118 + color: rgb(153, 153, 153);
  119 + height:300rpx;
  120 + width:100%;
  121 +}
0 122 \ No newline at end of file
... ...
packageA/pages/my_service2/i_service.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + qr_code_object: {
  13 + val: "12121",
  14 + content: "请将二维码展示给核销员,服务更快捷!"
  15 + },
  16 + iurl: a.imghost,
  17 + defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
  18 + service_List: [], //服务项目列表
  19 + is_service_read: 0,
  20 + curpage: 1, //当前分页数
  21 + pageSize: 10, //页大小
  22 + total: 0,
  23 + ismore: 0, //是否加载完毕
  24 + userinfo: null,
  25 + is_sub: 0, //是否重复提交预约
  26 + },
  27 +
  28 + /**
  29 + * 生命周期函数--监听页面加载
  30 + */
  31 + onLoad: function(options) {
  32 + console.log('options==>', options);
  33 + var userinfo = getApp().globalData.userInfo;
  34 + if (userinfo == null) {
  35 + //界面必须使用warn 做ID,并调用
  36 + // return false;
  37 + };
  38 + this.setData({
  39 + userinfo: userinfo,
  40 + options,
  41 + });
  42 + var th = this;
  43 + // if(options.UserId) {
  44 + th.query_service();
  45 + // };
  46 +
  47 + },
  48 + /**
  49 + * 生命周期函数--监听页面显示
  50 + */
  51 + onShow: function() {
  52 + var th = this;
  53 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  54 + my_confirm.open_cancel(0);
  55 + },
  56 +
  57 + onReachBottom: function() {
  58 + var th = this;
  59 + if (this.data.total <= th.data.pageSize) return;
  60 + if (this.data.ismore) return;
  61 +
  62 + th.query_service();
  63 + },
  64 + //查询服务项目列表
  65 + query_service: function() {
  66 + wx.showLoading({
  67 + title: '加载中',
  68 + })
  69 + var th = this;
  70 + var url = "/api/weshop/marketing/reservation/sm/page?State=1";
  71 + getApp().request.promiseGet(url, {
  72 + data: {
  73 + storeId: a.stoid,
  74 + userId: th.data.options.UserId,
  75 + page: th.data.curpage,
  76 + pageSize: th.data.pageSize
  77 + }
  78 + }).then(res => {
  79 + wx.hideLoading();
  80 + if (res.data.code == 0) {
  81 + th.data.curpage++;
  82 + var arr1 = th.data.service_List;
  83 + var arr2 = res.data.data.pageData;
  84 + var arr3 = [...arr1, ...arr2];
  85 + var ismore = 0;
  86 + if (arr3.length == res.data.data.total) ismore = 1
  87 + th.setData({
  88 + service_List: arr3,
  89 + total: res.data.data.total,
  90 + ismore: ismore,
  91 + is_service_read: 1,
  92 + }),
  93 + wx.stopPullDownRefresh(); //停止下拉刷新
  94 + } else {
  95 + th.setData({
  96 + is_service_read: 1
  97 + })
  98 + }
  99 + })
  100 + },
  101 + /*-- 打开服务项目 --*/
  102 + open_fw: function(e) {
  103 + wx.showLoading({
  104 + title: '加载中',
  105 + })
  106 + var th = this;
  107 + var url = e.currentTarget.dataset.url;
  108 + var service_id = e.currentTarget.dataset.service_id; //服务id
  109 + var project_id = e.currentTarget.dataset.project_id;
  110 + var ind = e.currentTarget.dataset.ind;
  111 + var item = this.data.service_List[ind];
  112 + var ewm = "^" + th.data.userinfo.erpvipid + "|" + item.ProjectID + "|" + item.BuyType + "|TY01|";
  113 + var tt = th.format_time(1);
  114 + ewm = ewm + tt;
  115 + th.data.qr_code_object.val = ewm;
  116 + th.data.qr_code_object.is_fw = 1;
  117 + var qc_com = th.selectComponent("#qc_com"); //组件的id
  118 + getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/check", {
  119 + data: {
  120 + serviceId: service_id,
  121 + storeId: a.stoid,
  122 + userId: th.data.options.UserId,
  123 + }
  124 + }).then(res => {
  125 + wx.hideLoading();
  126 + th.setData({
  127 + is_sub: 0
  128 + })
  129 + if (res.data.data != null) {
  130 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  131 + my_confirm.open_cancel(1);
  132 + my_confirm.open(
  133 + "已有预约记录!",
  134 + "预约详情",
  135 + "继续使用",
  136 + function() {
  137 + my_confirm.open_cancel(0);
  138 + var deta_url = "/packageA/pages/my_service/tment_details?userid="+ th.data.options.UserId + "&number=" + res.data.data.Number;
  139 + wx.navigateTo({
  140 + url: deta_url
  141 + })
  142 + },
  143 + function() {
  144 + my_confirm.open_cancel(0);
  145 + qc_com.open(th.data.qr_code_object)
  146 + }
  147 +
  148 + )
  149 +
  150 + } else {
  151 + qc_com.open(th.data.qr_code_object)
  152 + }
  153 + })
  154 +
  155 + },
  156 + //图片失败,默认图片
  157 + bind_bnerr1: function(e) {
  158 + var _errImg = e.target.dataset.errorimg;
  159 + var _Img = e.target.dataset.img;
  160 + if (_Img != undefined) {
  161 + var _errObj = {};
  162 + _errObj[_errImg] = "/miniapp/images/no_cate_def.png";
  163 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  164 + }
  165 + },
  166 + format_time: function(isFull) {
  167 + var d = new Date();
  168 + var m = d.getMonth() + 1;
  169 + if (m < 10) m = "0" + m;
  170 + var dd = d.getDate();
  171 + if (dd < 10) dd = "0" + dd;
  172 + var fm = [d.getFullYear(), m, dd].join('-');
  173 + if (isFull == 1)
  174 + fm = fm + ' ' + [d.getHours(), d.getMinutes(), d.getSeconds()].join(':')
  175 + return fm;
  176 + },
  177 + //跳转到首页
  178 + goto: function(e) {
  179 + var url = e.currentTarget.dataset.url;
  180 + getApp().goto(url);
  181 + },
  182 + //校正是否可预约
  183 + correcting: function(e) {
  184 + var th = this;
  185 + wx.showLoading({
  186 + title: '加载中',
  187 + })
  188 + if (th.data.is_sub == 0) {
  189 + th.setData({
  190 + is_sub: 1
  191 + })
  192 + var url = e.currentTarget.dataset.url;
  193 + var service_id = e.currentTarget.dataset.service_id; //服务id
  194 + var project_id = e.currentTarget.dataset.project_id;
  195 + getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/check", {
  196 + data: {
  197 + serviceId: service_id,
  198 + storeId: a.stoid,
  199 + userId: th.data.options.UserId,
  200 + }
  201 + }).then(res => {
  202 + wx.hideLoading();
  203 + th.setData({
  204 + is_sub: 0
  205 + })
  206 + if (res.data.code == 0) {
  207 + if (res.data.data != null) {
  208 +
  209 + var number = res.data.data.Number;
  210 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  211 + my_confirm.open_cancel(1);
  212 + my_confirm.open(
  213 + "已有预约记录!",
  214 + "预约详情",
  215 + "继续预约",
  216 + function() {
  217 + my_confirm.open_cancel(0);
  218 + var deta_url = "/packageA/pages/my_service/tment_details?number=" + number + "&userid="+ th.data.options.UserId;
  219 + wx.navigateTo({
  220 + url: deta_url
  221 + })
  222 + },
  223 + function() {
  224 + my_confirm.open_cancel(0);
  225 + getApp().request.promiseGet("/api/weshop/marketing/reservation/reservation/sm/check", {
  226 + data: {
  227 + projectId: project_id,
  228 + serviceId: service_id,
  229 + storeId: a.stoid,
  230 + userId: th.data.options.UserId,
  231 + }
  232 + }).then(res => {
  233 + if (res.data.code == 0) {
  234 + wx.navigateTo({
  235 + url: url
  236 + })
  237 + } else {
  238 + getApp().my_warnning(res.data.msg, 0, th);
  239 + }
  240 + })
  241 + }
  242 + )
  243 + } else {
  244 + wx.navigateTo({
  245 + url: url,
  246 + })
  247 + }
  248 +
  249 + } else {
  250 + getApp().my_warnning(res.data.msg, 0, th);
  251 + }
  252 + })
  253 + }
  254 + },
  255 + //关闭导航
  256 + close: function () {
  257 + var th = this;
  258 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  259 + nav_b.close_box();
  260 + }
  261 +
  262 +})
0 263 \ No newline at end of file
... ...
packageA/pages/my_service2/i_service.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "服务项目",
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "qr_code": "/components/qr_code/qr_code",
  6 + "warn": "/components/long_warn/long_warn",
  7 + "my_confirm": "/components/my_confirm/my_confirm",
  8 + "nav_b": "/components/nav_b/nav_b"
  9 + }
  10 +}
0 11 \ No newline at end of file
... ...
packageA/pages/my_service2/i_service.wxml 0 → 100644
  1 +<!-- 背景图片 -->
  2 +<view catchtap="close">
  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?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>
  7 +
  8 +
  9 +
  10 +
  11 +<!-- 预约内容 -->
  12 +<!-- 项目框架 -->
  13 +<view class="Serviceitems" catchtap="close">
  14 + <!-- 单个项目 -->
  15 + <view class="rel" wx:for="{{service_List}}">
  16 + <view class="abs">
  17 + <!-- 皇冠log -->
  18 + <block wx:if="{{item.BuyType==4}}">
  19 + <image class="equity_money" src="{{iurl}}/miniapp/images//yyservice/equity.png" lazy-load="true"></image>
  20 + </block>
  21 + <!-- 金钱log -->
  22 + <block wx:if="{{item.BuyType==1 || item.BuyType==2 }}">
  23 + <image class="equity_money" src="{{iurl}}/miniapp/images/yyservice/money.png" lazy-load="true"></image>
  24 + </block>
  25 + <!-- 礼包log -->
  26 + <block wx:if="{{item.BuyType==3}}">
  27 + <image class="equity_money" src="{{iurl}}/miniapp/images/yyservice/giftpackage.png" lazy-load="true"></image>
  28 + </block>
  29 + </view>
  30 + <view>
  31 + <view class="flex-center">
  32 + <image class="itemimage" src="{{item.ImageUrl==''?iurl+defimgurl:item.ImageUrl}}" lazy-load="true" data-errorimg="service_List[{{index}}].ImageUrl" binderror="bind_bnerr1" data-img="{{item.ImageUrl}}"></image>
  33 + </view>
  34 +
  35 + <view class="flex-center itemName">
  36 + <view class="fs32 Name ellipsis-1">{{item.ServiceName}}</view>
  37 + </view>
  38 +
  39 + <view class="flex-center fs24 itemCount">
  40 + <view>剩余次数:</view>
  41 + <view>{{item.ObtainTimes}}</view>
  42 + </view>
  43 +
  44 + <view class="flex-center fs24 itemEffective">
  45 + <view>有效期至</view>
  46 + <view class="Date">{{item.Validay==""?"长期有效":item.Validay}}</view>
  47 + </view>
  48 +
  49 + </view>
  50 +
  51 +
  52 + <view class="flex-center fs28 functionMax">
  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}}&firstleader={{options.first_leader}}" bindtap="correcting" data-service_id="{{item.ServiceID}}" data-project_id="{{item.ProjectID}}">
  54 + <view>帮你预约</view>
  55 + </view>
  56 + </view>
  57 + </view>
  58 + <!-- 没有数据 -->
  59 + <!-- 加载完毕并且数据大于=页大小 -->
  60 + <!-- <view class="After_all flex-center" wx:if="{{ismore && service_List.length>=6}}">
  61 + <view class="Line"></view>
  62 + <view class="end fs26 xc-black">到底了</view>
  63 + <view class="Line"></view>
  64 + </view> -->
  65 +</view>
  66 +
  67 +
  68 +<view class="table flex">
  69 + <view class="left t-c">
  70 + <view class="td">时间</view>
  71 + <view class="td">8:00</view>
  72 + <view class="td">9:00</view>
  73 + </view>
  74 + <scroll-view scroll-x class="right">
  75 + <view class="flex t-c">
  76 + <view>
  77 + <view class="td blue">张三</view>
  78 + <view class="td">100</view>
  79 + <view class="td">200</view>
  80 + </view>
  81 + <view>
  82 + <view class="td blue">张三</view>
  83 + <view class="td">100</view>
  84 + <view class="td">200</view>
  85 + </view>
  86 + <view>
  87 + <view class="td blue">张三</view>
  88 + <view class="td">100</view>
  89 + <view class="td">200</view>
  90 + </view>
  91 + <view>
  92 + <view class="td blue">张三</view>
  93 + <view class="td">100</view>
  94 + <view class="td">200</view>
  95 + </view>
  96 + <view>
  97 + <view class="td blue">张三</view>
  98 + <view class="td">100</view>
  99 + <view class="td">200</view>
  100 + </view>
  101 + <view>
  102 + <view class="td blue">张三</view>
  103 + <view class="td">100</view>
  104 + <view class="td">200</view>
  105 + </view>
  106 + <view>
  107 + <view class="td blue">张三</view>
  108 + <view class="td">100</view>
  109 + <view class="td">200</view>
  110 + </view>
  111 + <view>
  112 + <view class="td blue">张三</view>
  113 + <view class="td">100</view>
  114 + <view class="td">200</view>
  115 + </view>
  116 + </view>
  117 + </scroll-view>
  118 +</view>
  119 +<!-- 无服务项目 -->
  120 +<!-- <view wx:if="{{service_List.length<1 && is_service_read}}">
  121 + <view class="cover"></view>
  122 + <view class="empty_order" wx:if="{{true}}">
  123 + <view class="flex-level">
  124 + <image src="{{iurl}}miniapp/images/yyservice/no_history.png"></image>
  125 + </view>
  126 + <view class="flex-level fs30 xc-ash">暂无服务项目</view>
  127 + <view class="flex-level">
  128 + <navigator data-url="/pages/user/index/index" bindtap="goto">
  129 + <view class="flex-center fs28 white">回到首页</view>
  130 + </navigator>
  131 + </view>
  132 + </view>
  133 +</view> -->
  134 +<!-- 制作一个圆球导航 -->
  135 +<!-- <nav_b id="nav_b"></nav_b> -->
  136 +<!-- 弹出框扫描 -->
  137 +<!-- <qr_code id="qc_com"></qr_code>
  138 +<warn id="warn"></warn>
  139 +<my_confirm id="my_confirm"></my_confirm> -->
... ...
packageA/pages/my_service2/i_service.wxss 0 → 100644
  1 +page {
  2 + overflow-x: scroll;
  3 +}
  4 +
  5 +/* 背景定位 */
  6 +
  7 +.backimage {
  8 + position: absolute;
  9 + top: 0rpx;
  10 + left: 0rpx;
  11 + z-index: -1;
  12 + width: 100%;
  13 + /* height: 100%; */
  14 +}
  15 +
  16 +/* 历史服务定位 */
  17 +
  18 +.History {
  19 + position: absolute;
  20 + top: 30rpx;
  21 + right: 20rpx;
  22 + z-index: 1;
  23 + color: rgb(255, 255, 255);
  24 +}
  25 +
  26 +.rel {
  27 + background-color: rgb(255, 255, 255);
  28 + width: 350rpx;
  29 + height: 430rpx;
  30 + border-radius: 20rpx;
  31 + display: inline-block;
  32 + margin-right: 15rpx;
  33 + margin-bottom: 20rpx;
  34 + box-shadow: 0rpx 3rpx 3rpx 3rpx rgb(233, 233, 233);
  35 +}
  36 +
  37 +.abs {
  38 + left: 10rpx;
  39 + top: 10rpx;
  40 +}
  41 +
  42 +.equity_money {
  43 + width: 50rpx;
  44 + height: 55rpx;
  45 +}
  46 +
  47 +.Serviceitems {
  48 + position: absolute;
  49 + top: 370rpx;
  50 + left: 0rpx;
  51 + z-index: 2;
  52 + padding-left: 18rpx;
  53 + padding-bottom: 20rpx;
  54 +}
  55 +
  56 +.itemimage {
  57 + width: 120rpx;
  58 + height: 120rpx;
  59 + border-radius: 50%;
  60 + margin-top: 30rpx;
  61 + margin-bottom: 20rpx;
  62 +}
  63 +
  64 +.itemName {
  65 + margin-bottom: 25rpx;
  66 + color: rgb(48, 48, 48);
  67 +}
  68 +
  69 +.itemName .Name {
  70 + max-width: 250rpx;
  71 + text-align: center;
  72 +}
  73 +
  74 +.itemCount {
  75 + margin-bottom: 5rpx;
  76 + color: rgb(177, 177, 177);
  77 + align-items: baseline;
  78 +}
  79 +
  80 +.itemEffective {
  81 + margin-bottom: 30rpx;
  82 + color: rgb(177, 177, 177);
  83 + align-items: baseline;
  84 +}
  85 +
  86 +.functionMax {
  87 + padding: 0rpx 25rpx;
  88 + color: rgb(254, 255, 255);
  89 +}
  90 +
  91 +.Use {
  92 + width: 170rpx;
  93 + height: 50rpx;
  94 + line-height: 50rpx;
  95 + border-radius: 25rpx;
  96 + background-color: red;
  97 +}
  98 +
  99 +.appointment {
  100 + width: 115rpx;
  101 + height: 50rpx;
  102 + line-height: 50rpx;
  103 + border-radius: 25rpx;
  104 + margin-left: 20rpx;
  105 +}
  106 +
  107 +.Date {
  108 + margin-left: 10rpx;
  109 +}
  110 +
  111 +/* 无服务项目 */
  112 +
  113 +.cover {
  114 + position: fixed;
  115 + z-index: 1;
  116 + left: 0rpx;
  117 + top: 390rpx;
  118 + width: 100%;
  119 + height: 200rpx;
  120 + background-color: rgb(255, 255, 255);
  121 +}
  122 +
  123 +/* 无历史服务 */
  124 +
  125 +.empty_order {
  126 + position: fixed;
  127 + left: 0rpx;
  128 + top: 500rpx;
  129 + z-index: 2;
  130 + width: 100%;
  131 +}
  132 +
  133 +.empty_order image {
  134 + width: 329rpx;
  135 + height: 229rpx;
  136 + margin-top: 80rpx;
  137 +}
  138 +
  139 +.empty_order .xc-ash {
  140 + margin-top: 10rpx;
  141 + font-weight: 600px;
  142 +}
  143 +
  144 +.empty_order navigator {
  145 + margin-top: 60rpx;
  146 + border-radius: 40rpx;
  147 +}
  148 +
  149 +.empty_order navigator view {
  150 + width: 247rpx;
  151 + height: 56rpx;
  152 + background-color: rgb(255, 72, 72);
  153 + border-radius: 40rpx;
  154 +}
  155 +
  156 +.After_all {
  157 + height: 80rpx;
  158 +}
  159 +
  160 +.After_all .Line {
  161 + border-top: 3rpx solid rgb(0, 0, 0);
  162 + width: 130rpx;
  163 +}
  164 +
  165 +.After_all .end {
  166 + margin: 0rpx 15rpx;
  167 +}
  168 +
  169 +.btn {
  170 + background-color: red;
  171 + padding: 10rpx 20rpx;
  172 + border-radius: 30rpx;
  173 +}
  174 +
  175 +.table {
  176 + background-color: white;
  177 + border-top: 2rpx solid rgba(218, 217, 217, 1);
  178 + border-left: 2rpx solid rgba(218, 217, 217, 1);
  179 + margin-top: 400rpx;
  180 +}
  181 +.blue {
  182 + background: rgba(241, 252, 255, 1);
  183 +}
  184 +.td {
  185 + width: 100rpx;
  186 + height: 100rpx;
  187 + display: flex;
  188 + align-items: center;
  189 + justify-content: center;
  190 + border-right: 2rpx solid rgba(218, 217, 217, 1);
  191 + border-bottom: 2rpx solid rgba(218, 217, 217, 1);
  192 +}
  193 +
  194 +.left {
  195 + box-shadow: 4px 0px 6px #e7e9eb;
  196 +}
  197 +
  198 +.right {
  199 + width: calc(100% - 102rpx);
  200 +}
... ...
packageA/pages/my_service2/tment_details.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + url: a.url,
  13 + iurl: a.imghost,
  14 + tment_details: [], //预约详情
  15 + number: "", //订单号
  16 + arrangeTime: "", //预约年月日
  17 + day: "", //判断是上午还是下午
  18 + states: 3, //3为取消预约
  19 + },
  20 + //取消预约
  21 + cancel_tment: function(e) {
  22 + var th = this;
  23 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  24 + my_confirm.open(
  25 + "确定取消?",
  26 + "取消",
  27 + "确定",
  28 + function() {
  29 + my_confirm.open_cancel(0);
  30 + },
  31 + function() {
  32 + var index = e.currentTarget.dataset.index;
  33 + var states = th.data.states;
  34 + var tment_details = th.data.tment_details;
  35 + var number = th.data.number;
  36 + var json = {
  37 + "number": number,
  38 + "storeId": a.stoid,
  39 + "states": states,
  40 + "isxz": 1
  41 + };
  42 + var data = JSON.stringify(json);
  43 + var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  44 + wx.request({
  45 + url: url,
  46 + data: data,
  47 + method: 'put',
  48 + header: {
  49 + 'content-type': 'application/json'
  50 + }, // 设置请求的 header
  51 + success: function(res) {
  52 + my_confirm.open_cancel(0);
  53 + if (res.data.code == 0) {
  54 + getApp().my_warnning("取消成功", 1, th);
  55 + var start = 'tment_details[' + 0 + '].State';
  56 + th.setData({
  57 + [start]: 3
  58 + })
  59 + } else {
  60 + getApp().my_warnning(res.data.msg, 0, th);
  61 + }
  62 + }
  63 + })
  64 + }
  65 + );
  66 +
  67 + },
  68 +
  69 + /**
  70 + * 生命周期函数--监听页面加载
  71 + */
  72 + onLoad: function(options) {
  73 +
  74 + console.log("预约详情");
  75 + console.log(options);
  76 +
  77 + var th = this;
  78 + th.setData({
  79 + options,
  80 + number: options.number
  81 + })
  82 + },
  83 + //查询美容师详情
  84 + query_bea: function() {
  85 + var th = this;
  86 + var number = th.data.number;
  87 + var url = "/api/weshop/marketing/reservation/reservation/page";
  88 + getApp().request.promiseGet(url, {
  89 + data: {
  90 + storeId: a.stoid,
  91 + userId: th.data.options.userid,
  92 + number: number
  93 + }
  94 + }).then(res => {
  95 + wx.hideLoading();
  96 + if (res.data.code == 0) {
  97 + var data = res.data.data.pageData;
  98 + var arrangeTime = data[0].ArrangeTime.substring(0, 11);
  99 + var day = data[0].ArrangeTime.substring(11, 16);
  100 + th.setData({
  101 + tment_details: data,
  102 + arrangeTime: arrangeTime,
  103 + day: day
  104 + })
  105 +
  106 + } else {
  107 + getApp().my_warnning(res.data.msg, 0, th);
  108 + }
  109 + })
  110 + },
  111 + //显示核销码
  112 + code_show: function(e) {
  113 + var th = this;
  114 + //--获取成功的时候--
  115 + var no = e.currentTarget.dataset.order_sn;
  116 + var qc_com = th.selectComponent("#qc_com"); //组件的id
  117 + var obj = {
  118 + val: no,
  119 + content: "请将二维码展示给核销员,使用更快捷"
  120 + };
  121 + qc_com.open(obj)
  122 + },
  123 + //跳到首页
  124 + goto: function(e) {
  125 + var th = this;
  126 + wx.navigateTo({
  127 + url: '/pages/index/index/index',
  128 + })
  129 + },
  130 + /**
  131 + * 生命周期函数--监听页面显示
  132 + */
  133 + onShow: function() {
  134 + var th = this;
  135 + th.query_bea();
  136 + },
  137 + //关闭导航
  138 + close: function () {
  139 + var th = this;
  140 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  141 + nav_b.close_box();
  142 + }
  143 +})
0 144 \ No newline at end of file
... ...
packageA/pages/my_service2/tment_details.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "预约详情",
  3 + "usingComponents": {
  4 + "qr_code": "/components/qr_code/qr_code",
  5 + "warn": "/components/long_warn/long_warn",
  6 + "my_confirm": "/components/my_confirm/my_confirm",
  7 + "nav_b": "/components/nav_b/nav_b"
  8 + }
  9 +}
0 10 \ No newline at end of file
... ...
packageA/pages/my_service2/tment_details.wxml 0 → 100644
  1 +<view class="container" wx:for="{{tment_details}}" wx:if="{{index<1}}" catchtap="close">
  2 + <!-- 预约人的属性 -->
  3 + <view class="Subscriber padding">
  4 + <!-- 状态栏 -->
  5 + <view class="statusBar fs32 flex-vertical-between lf">
  6 + <view>预约状态:</view>
  7 + <view wx:if="{{item.State==0}}">未服务</view>
  8 + <view wx:if="{{item.State==1}}">已服务</view>
  9 + <view wx:if="{{item.State==2}}">已过期</view>
  10 + <view wx:if="{{item.State==3}}">已取消</view>
  11 + <view wx:if="{{item.State==4}}">已评价</view>
  12 + </view>
  13 + <view class="fs30">
  14 + <view class="items lf">
  15 + <!-- 预约订单 -->
  16 + <view class="flex-vertical bmt" bindtap="code_show" data-order_sn="{{number}}" wx:if="{{item.State==0}}">
  17 + <view class="flex-vertical ai-bas">
  18 + <view class="name">预约订单:</view>
  19 + <view class="ellipsis-1 value">{{number}}</view>
  20 + </view>
  21 + <image src="{{iurl}}miniapp/images/order/code.png" class="code"></image>
  22 + </view>
  23 +
  24 + <!-- 预约门店 -->
  25 + <view class="flex-vertical bmt ai-bas">
  26 + <view class="name">预约门店:</view>
  27 + <view class="ellipsis-1 value">{{item.StorageName}}</view>
  28 + </view>
  29 +
  30 + <!-- 预约项目 -->
  31 + <view class="flex-vertical bmt ai-bas">
  32 + <view class="name">预约项目:</view>
  33 + <view class="ellipsis-1 value">{{item.ServiceName}}</view>
  34 + </view>
  35 +
  36 + <!-- 预约时间 -->
  37 + <view class="flex-vertical bmt ai-bas">
  38 + <view class="name">预约时间:</view>
  39 + <view class="date">{{arrangeTime}}</view>
  40 + <view>{{day}}</view>
  41 + </view>
  42 + </view>
  43 + <view class="bt">
  44 +
  45 + <!-- 美容师 -->
  46 + <view class="flex-vertical bmt ai-bas">
  47 + <view class="name flex-vertical-between">
  48 + <block wx:if="{{item.State==1 || item.State==4}}">
  49 + <view>服务美容师:</view>
  50 + </block>
  51 + <block wx:else>
  52 + <view>预约美容师:</view>
  53 + </block>
  54 + </view>
  55 + <view class="ellipsis-1 value">{{item.BeauticianName}}</view>
  56 + </view>
  57 + <!-- 预约人及联系方式 -->
  58 + <!-- 姓名 -->
  59 + <view class="flex-vertical bmt ai-bas">
  60 + <view class="name flex-vertical-between">
  61 + <view>预</view>
  62 + <view>约</view>
  63 + <view>人:</view>
  64 + </view>
  65 + <view class="ellipsis-1 value">{{item.VIPName}}</view>
  66 + </view>
  67 + <!-- 号码 -->
  68 + <view class="flex-vertical ai-bas">
  69 + <view class="name flex-vertical-between">
  70 + <view>手</view>
  71 + <view>机</view>
  72 + <view>号:</view>
  73 + </view>
  74 + <view>{{item.MobileTel}}</view>
  75 + </view>
  76 + </view>
  77 + </view>
  78 +
  79 + </view>
  80 +
  81 + <!-- 温馨提示内容 -->
  82 + <view class="Tips fs30 lf rel padding">
  83 + <!-- 棒槌 -->
  84 + <view class="Stickl abs"></view>
  85 + <view class="Stickl Stickr abs"></view>
  86 +
  87 + <view class="Cozy flex-center" style="background-image: url({{iurl}}/miniapp/images/yyservice/icon.png);">
  88 + <view>温馨提示</view>
  89 + </view>
  90 + <view>1.预约成功后需在指定时间前到达;</view>
  91 + <view>2.如有任何问题可致电咨询;</view>
  92 + <view>3.如需退约,需提前取消。</view>
  93 + </view>
  94 + <!-- submit栏 -->
  95 + <view class="subs flex-vertical-between fs32">
  96 + <!-- 左边栏 -->
  97 + <view class="sub flex-center yellow-b" wx:if="{{item.State==0}}" bindtap="cancel_tment">
  98 + <view class="yellow-b" data-index="{{index}}">取消预约</view>
  99 + </view>
  100 + <navigator wx:if="{{item.State>0}}" class="sub flex-center yellow-b" url="/packageA/pages/my_service/tment_order_list?userid={{options.userid}}">
  101 + <view class="yellow-b">我的服务</view>
  102 + </navigator>
  103 + <!-- 右边栏 -->
  104 + <navigator wx:if="{{item.State==0}}" class="sub rb flex-center" url="/packageA/pages/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}">
  105 + <view>更改时间</view>
  106 + </navigator>
  107 + <navigator wx:if="{{item.State==1}}" class="sub rb flex-center" url="/packageA/pages/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}&userid={{options.userid}}">
  108 + <view>发表评价</view>
  109 + </navigator>
  110 + <navigator wx:if="{{item.State==4}}" class="sub rb flex-center" url="/packageA/pages/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}&userid={{options.userid}}">
  111 + <view>查看评价</view>
  112 + </navigator>
  113 + <navigator wx:if="{{item.State==2 || item.State==3}}" class="sub rb flex-center" url="/packageA/pages/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}&userid={{options.userid}}">
  114 + <view>重新预约</view>
  115 + </navigator>
  116 +
  117 + </view>
  118 +
  119 +</view>
  120 +
  121 +<!-- 制作一个圆球导航 -->
  122 +<nav_b id="nav_b"></nav_b>
  123 +<my_confirm id="my_confirm"></my_confirm>
  124 +<!-- 弹出框扫描 -->
  125 +<qr_code id="qc_com"></qr_code>
  126 +<warn id="warn"></warn>
0 127 \ No newline at end of file
... ...
packageA/pages/my_service2/tment_details.wxss 0 → 100644
  1 +page {
  2 + width: 100%;
  3 + background-color: rgb(238, 238, 238);
  4 +}
  5 +
  6 +/* 公用 */
  7 +
  8 +.lf {
  9 + padding: 0rpx 40rpx;
  10 +}
  11 +
  12 +.bt {
  13 + margin: 0rpx 15rpx;
  14 + padding: 0rpx 25rpx;
  15 + border-top: 2rpx dashed rgb(238, 238, 238);
  16 + padding-top: 50rpx;
  17 + padding-bottom: 50rpx;
  18 +}
  19 +
  20 +.bmt {
  21 + margin-bottom: 35rpx;
  22 +}
  23 +
  24 +.name {
  25 + width: 160rpx;
  26 + margin-right: 25rpx;
  27 +}
  28 +
  29 +.value {
  30 + max-width: 390rpx;
  31 +}
  32 +
  33 +/* 公用 */
  34 +
  35 +.container {
  36 + padding-bottom:70rpx;
  37 +}
  38 +
  39 +.padding{
  40 + margin: 0rpx 20rpx;
  41 +}
  42 +
  43 +.Subscriber {
  44 + overflow: hidden;
  45 + margin-top: 25rpx;
  46 + background-color: rgb(255, 255, 255);
  47 + border-radius: 10rpx;
  48 +}
  49 +
  50 +.statusBar {
  51 + height: 80rpx;
  52 + background-color: rgb(214, 1, 33);
  53 + color: rgb(255, 255, 255);
  54 +}
  55 +
  56 +.date {
  57 + margin-right: 25rpx;
  58 +}
  59 +
  60 +.items {
  61 + margin: 40rpx 0rpx;
  62 +}
  63 +
  64 +.Tips {
  65 + margin-top: 20rpx;
  66 + padding-top: 35rpx;
  67 + height: 255rpx;
  68 + border-radius: 10rpx;
  69 + background-color: rgb(255, 255, 255);
  70 + margin-bottom: 50rpx;
  71 +}
  72 +
  73 +.Cozy {
  74 + width: 165rpx;
  75 + height: 43rpx;
  76 + margin-bottom: 20rpx;
  77 + color: rgb(255, 255, 255);
  78 + background-size: 100%;
  79 +}
  80 +
  81 +.subs {
  82 + width: 710rpx;
  83 + padding: 15rpx 20rpx;
  84 + position: fixed;
  85 + bottom:0rpx;
  86 + background-color: rgb(255,255,255);
  87 +}
  88 +
  89 +.sub {
  90 + width: 325rpx;
  91 + height: 65rpx;
  92 + border-radius: 30rpx;
  93 + color: rgb(255, 255, 255);
  94 +}
  95 +.code{
  96 + margin-left: 10rpx;
  97 + width: 50rpx;
  98 + height: 50rpx;
  99 +}
  100 +.rb {
  101 + background-color: rgb(214, 1, 33);
  102 +}
  103 +
  104 +/* 棒槌 */
  105 +
  106 +.Stickl {
  107 + width: 39rpx;
  108 + height: 10rpx;
  109 + background-color: rgb(153, 153, 153);
  110 + transform: rotate(270deg);
  111 + border-radius: 20rpx;
  112 + left: 95rpx;
  113 + top: -15rpx;
  114 +}
  115 +
  116 +.Stickr {
  117 + left: 590rpx;
  118 +}
... ...
packageA/pages/my_service2/tment_eval.js 0 → 100644
  1 + var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + url: a.url, //接口网址
  13 + iurl: a.imghost,
  14 + defimgurl: "/miniapp/images/no-head.jpg",
  15 + stars_index: -1, //当前点击的星星下标
  16 + labels: [], //星级标签数组
  17 + sub_evaluate: 0, //是否评价成功
  18 + proposal: "", //用户输入的建议
  19 + proposal_size: 100, //评价意见和建议限定字数
  20 + number: "", //订单单号
  21 + beautician: "", //美容师信息
  22 + fromType: "服务评价", //评价来源
  23 + arrangeTime: "", //服务日期
  24 + is_evaluate: 0, //是否评价
  25 + EvaluateDatetime: "", //评价时间
  26 + is_act:0, //是否能购获取图片
  27 + actId:0, //活动ID
  28 + giftBagId:0, //礼包ID
  29 +
  30 + },
  31 + //点击星级
  32 + check_stars: function(e) {
  33 + var th = this;
  34 + var is_evaluate = th.data.is_evaluate; //0可点击
  35 + if (is_evaluate == 0) {
  36 + var index = e.currentTarget.dataset.index;
  37 + var stars_index = th.data.stars_index;
  38 + if (index != stars_index) {
  39 + var url = "/api/weshop/marketing/reservation/star/label/list";
  40 + getApp().request.promiseGet(url, {
  41 + data: {
  42 + Star: index + 1,
  43 + storeId: a.stoid,
  44 + }
  45 + }).then(res => {
  46 + if (res.data.code == 0) {
  47 + th.setData({
  48 + labels: res.data.data
  49 + })
  50 + } else {
  51 + getApp().my_warnning(res.data.msg, 0, th);
  52 + return;
  53 + }
  54 + })
  55 + th.setData({
  56 + stars_index: index
  57 + })
  58 + }
  59 + }
  60 + },
  61 + //输入评价意见和建议
  62 + input_proposal: function(e) {
  63 + var th = this;
  64 + var value = e.detail.value;
  65 + th.setData({
  66 + proposal: value
  67 + })
  68 + },
  69 + //图片失败,默认图片
  70 + bind_bnerr1: function (e) {
  71 + var th = this;
  72 + var _errImg = e.target.dataset.errorimg;
  73 + var _Img = e.target.dataset.img;
  74 + if (_Img != undefined) {
  75 + var _errObj = {};
  76 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
  77 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  78 + }
  79 + },
  80 + //选择标签
  81 + check_label: function(e) {
  82 + var th = this;
  83 + var evaluate = th.data.is_evaluate; //0为未评价,未评价才可点击标签
  84 + if (evaluate == 0) {
  85 + var index = e.currentTarget.dataset.index;
  86 + var label_id = th.data.labels[index].check;
  87 + var labels = 'labels[' + index + '].check';
  88 + if (label_id) {
  89 + label_id = 0
  90 + } else {
  91 + label_id = 1
  92 + }
  93 + th.setData({
  94 + [labels]: label_id
  95 + })
  96 + }
  97 + },
  98 + //查询美容师信息
  99 + query_bea: function() {
  100 + var th = this;
  101 + var url = "/api/weshop/marketing/reservation/reservation/page";
  102 + var number = th.data.number; //订单编号
  103 + getApp().request.promiseGet(url, {
  104 + data: {
  105 + storeId: a.stoid,
  106 + userId: th.data.options.userid,
  107 + number: number
  108 + }
  109 + }).then(res => {
  110 + if (res.data.code == 0) {
  111 + var data = res.data.data.pageData;
  112 + var arrangeTime = data[0].ArrangeTime;
  113 + th.setData({
  114 + beautician: data,
  115 + arrangeTime: arrangeTime
  116 + })
  117 + } else {
  118 + getApp().my_warnning(res.data.msg, 0, th);
  119 + }
  120 + })
  121 + },
  122 + //获取预约评价
  123 + evaluate_get: function() {
  124 + var th = this;
  125 + var url = "/api/weshop/evaluation/evaluate/get";
  126 + getApp().request.promiseGet(url, {
  127 + data: {
  128 + number: th.data.number,
  129 + storeId: a.stoid,
  130 + }
  131 + }).then(res => {
  132 + if (res.data.code == 0) {
  133 + th.setData({
  134 + stars_index: res.data.data.Star-1,
  135 + labels: res.data.data.EvaluationList,
  136 + proposal: res.data.data.Remark,
  137 + EvaluateDatetime: res.data.data.EvaluateDatetime.substring(0, 19)
  138 + })
  139 + } else {
  140 + getApp().my_warnning(res.data.msg, 0, th);
  141 + }
  142 + })
  143 + },
  144 + //提交评价
  145 + evaluate_save: function() {
  146 + var th = this;
  147 + var stars = th.data.stars_index; //评价星级
  148 + var proposal = th.data.proposal;
  149 + //判断是否评级
  150 + if (stars < 0) {
  151 + getApp().my_warnning("请进行评分", 0, th);
  152 + return false;
  153 + } else if (proposal == "") {
  154 + getApp().my_warnning("给点建议呗", 0, th);
  155 + return false;
  156 + }
  157 + wx.showLoading({
  158 + title: '加载中',
  159 + })
  160 + var labels = th.data.labels; //星级标签数组
  161 + var evaLabList = []; //用户选择的评价标签
  162 + // 查询评价标签
  163 + for (var i = 0; i < labels.length; i++) {
  164 + if (labels[i].check) {
  165 + evaLabList.push(labels[i].LabelName);
  166 + }
  167 + }
  168 + var url = th.data.url + "/api/weshop/evaluation/evaluate/insert";
  169 + var posNo = th.data.number; //收银单号
  170 + var proposal = th.data.proposal; //用户建议内容
  171 + var fromType = th.data.fromType; //评价来源
  172 + var json = {
  173 + "evaLabList": evaLabList,
  174 + "fromType": 2,
  175 + "number": posNo,
  176 + "remark": proposal,
  177 + "star": stars + 1,
  178 + "storeId": a.stoid,
  179 + };
  180 + var data = JSON.stringify(json); //转换成json格式
  181 + wx.request({
  182 + url: url,
  183 + data: data,
  184 + method: 'POST',
  185 + header: {
  186 + 'content-type': 'application/json'
  187 + }, // 设置请求的 header
  188 + success: function(res) {
  189 + wx.hideLoading();
  190 + if (res.data.code == 0) {
  191 + getApp().my_warnning("评价成功", 1, th);
  192 + var namber=th.data.number;
  193 + setTimeout(function() {
  194 + wx.redirectTo({
  195 + url: "/pages/user/my_service/tment_eval?Number="+namber+"&evaluate="+1
  196 + });
  197 + }, 2000);
  198 + } else {
  199 + getApp().my_warnning(res.data.msg, 0, th);
  200 + }
  201 + }
  202 + })
  203 +
  204 + },
  205 + //图片失败,默认图片
  206 + bind_bnerr1: function(e) {
  207 + var th = this;
  208 + var _errImg = e.target.dataset.errorimg;
  209 + var _Img = e.target.dataset.img;
  210 + if (_Img != undefined) {
  211 +
  212 + var _errObj = {};
  213 + _errObj[_errImg] = th.data.iurl+"/miniapp/images/no-head.jpg";
  214 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  215 + }
  216 + },
  217 + /**
  218 + * 生命周期函数--监听页面加载
  219 + */
  220 + onLoad: function(options) {
  221 + var th = this;
  222 + th.setData({
  223 + options,
  224 + number: options.Number,
  225 + is_evaluate: options.evaluate
  226 + })
  227 + th.query_bea();
  228 + th.judge_act();
  229 + },
  230 +
  231 + /**
  232 + * 生命周期函数--监听页面显示
  233 + */
  234 + onShow: function() {
  235 + var th = this;
  236 + var is_evaluate = th.data.is_evaluate;
  237 + if (is_evaluate == 1) {
  238 + th.evaluate_get();
  239 + }
  240 + },
  241 + //评价其他跳转
  242 + evaluate_qt:function(){
  243 +
  244 + wx.redirectTo({
  245 + url: "/pages/user/my_service/tment_order_list?state="+2
  246 + });
  247 + },
  248 + //点击领取礼包
  249 + clike_lb:function(){
  250 +
  251 + var id=this.data.actId;
  252 + var gifbagid = this.data.gifbagid;
  253 + console.log(id,"订单", this.data.number),
  254 + wx.redirectTo({
  255 + url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number
  256 + });
  257 +
  258 + },
  259 +
  260 + //--评价有礼判断---
  261 + judge_act: function () {
  262 + var th = this;
  263 + var url = "/api/weshop/marketing/comment/act/judge";
  264 + getApp().request.promiseGet(url, {
  265 + data: {
  266 + orderNumber: th.data.number,
  267 + orderType: 2,
  268 + storeId: a.stoid,
  269 + userId: th.data.options.userid,
  270 + }
  271 + }).then(res => {
  272 + if (res.data.code == 0) {
  273 + var id = res.data.data.id;
  274 + var giftbagid = res.data.data.giftbagid;
  275 + th.setData({
  276 + is_act: 1,
  277 + actId: id,
  278 + giftBagId: giftbagid
  279 + })
  280 + } else{
  281 + th.setData({
  282 + is_act:0
  283 + })
  284 + }
  285 + })
  286 + },
  287 +
  288 +})
0 289 \ No newline at end of file
... ...
packageA/pages/my_service2/tment_eval.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "预约评价",
  3 + "usingComponents": {
  4 + "qr_code": "/components/qr_code/qr_code",
  5 + "warn": "/components/long_warn/long_warn"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageA/pages/my_service2/tment_eval.wxml 0 → 100644
  1 +<view class="container" wx:for="{{beautician}}" wx:if="{{index<1}}" wx:for-item="it">
  2 +
  3 + <!-- 头像 -->
  4 + <view class="flex-center head">
  5 +
  6 + <image class="headimg" src="{{it.PhotoUrl==''?iurl+defimgurl:it.PhotoUrl}}" lazy-load="true" data-errorimg="beautician[{{index}}].PhotoUrl" binderror="bind_bnerr1" data-img="beautician[{{index}}].PhotoUrl"></image>
  7 + </view>
  8 +
  9 + <!-- 姓名 -->
  10 + <view class="flex-level item">
  11 + <view class="itemlf flex-level-right">
  12 + <view class="fs32">服务美容师:</view>
  13 + </view>
  14 + <view class="itemlr fs30 ellipsis-1">{{it.BeauticianName}}</view>
  15 + </view>
  16 +
  17 + <!-- 项目 -->
  18 + <view class="flex-center item">
  19 + <view class="itemlf fs32 flex-level-right">服务项目:</view>
  20 + <view class="itemlr fs30 ellipsis-1">{{it.ServiceName}}</view>
  21 + </view>
  22 +
  23 + <!-- 时间 -->
  24 + <view class="flex-center item">
  25 + <view class="itemlf fs32 flex-level-right">服务时间:</view>
  26 + <view class="itemlr fs30">{{it.WriteTime}}</view>
  27 + </view>
  28 +
  29 + <!-- 评价时间 -->
  30 + <view class="flex-center" wx:if="{{is_evaluate==1}}">
  31 + <view class="itemlf fs32 flex-level-right">评价时间:</view>
  32 + <view class="itemlr fs30">{{EvaluateDatetime}}</view>
  33 + </view>
  34 +
  35 + <!-- 设置虚线 -->
  36 +
  37 + <view class="flex-center">
  38 + <view class="starss">
  39 + <image class="stars" src="{{iurl}}{{key<=stars_index?'/miniapp/images/StarsredCk.png':'/miniapp/images/StarswhiteUnCk.png'}}" wx:for="{{5}}" bindtap="check_stars" data-index="{{key}}" wx:for-index="key"></image>
  40 + </view>
  41 + </view>
  42 + <view class="tea_labs">
  43 + <view class="flex-center fs26">
  44 + <block wx:if="{{is_evaluate==0}}">
  45 + <textarea class="rel textarea" placeholder="写其他意见和建议" placeholder-class="fs24" maxlength="{{proposal_size}}" bindinput="input_proposal" value="{{proposal}}">
  46 + <!-- 提示已输入多少数字 -->
  47 + <view if="{{is_evaluate==0}}" class="proposal abs">{{proposal.length}}/{{proposal_size}}</view>
  48 + </textarea>
  49 + </block>
  50 + <block wx:else>
  51 + <view wx:if="{{proposal!=''}}" class="textarea">
  52 + {{proposal}}
  53 + </view>
  54 + </block>
  55 + </view>
  56 +
  57 + <view wx:if="{{labels.length>0 && is_evaluate==0}}" class="labels flex fs24 ellipsis-3">
  58 + <view class="label {{item.check==1?'checklabel':''}} flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key">
  59 + <view class="ellipsis-1">{{item.LabelName}}</view>
  60 + </view>
  61 +
  62 + </view>
  63 + <view wx:if="{{labels.length>0 && is_evaluate==1}}" class="{{labels.length==1 || labels.length==2?'flex-center':''}}" style="width:100%;">
  64 + <view class="labels flex fs24 ellipsis-3">
  65 + <view class="label checklabel flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key">
  66 + <view class="ellipsis-1">{{item.LabelName}}</view>
  67 + </view>
  68 +
  69 + </view>
  70 + </view>
  71 +
  72 + </view>
  73 +
  74 + <view wx:if="{{is_evaluate==0}}" class="feedback flex-center fs28">
  75 + <view>满意的话请打五星噢,谢谢您的支持!</view>
  76 + </view>
  77 +
  78 + <block wx:if="{{sub_evaluate}}">
  79 + <view class="subSuccess">
  80 + <view class="flex-center">
  81 + <image class="Success" src="{{iurl}}/miniapp/images/yyservice/Success.png"></image>
  82 + </view>
  83 + <view class="fs36 flex-center">
  84 + <view>评价成功</view>
  85 + </view>
  86 + </view>
  87 + </block>
  88 +</view>
  89 +<navigator wx:if="{{is_evaluate==0}}" class="Subs fs32 flex-center">
  90 + <view class="Submission flex-center" bindtap="evaluate_save">
  91 + <view>确认提交</view>
  92 + </view>
  93 +</navigator>
  94 +<view wx:else>
  95 +
  96 +
  97 +<view style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center" bindtap="evaluate_qt">
  98 + <view>评价其他</view>
  99 + </view>
  100 +
  101 + <view wx:if="{{is_act==1}}" style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center yellow-b" bindtap="clike_lb">
  102 + <view>点击领取礼品</view>
  103 + </view>
  104 + </view>
  105 +<warn id="warn"></warn>
0 106 \ No newline at end of file
... ...
packageA/pages/my_service2/tment_eval.wxss 0 → 100644
  1 +.container {
  2 + border-top: 7rpx solid rgb(245, 245, 245);
  3 + padding-bottom: 100rpx;
  4 + background-color: rgb(255, 255, 255);
  5 +}
  6 +
  7 +.head {
  8 + height: 270rpx;
  9 +}
  10 +
  11 +.headimg {
  12 + width: 190rpx;
  13 + height: 190rpx;
  14 + border-radius: 50%;
  15 +}
  16 +
  17 +.item {
  18 + margin-bottom: 20rpx;
  19 +}
  20 +
  21 +.itemlf {
  22 + width: 195rpx;
  23 +}
  24 +
  25 +.itemlr {
  26 + width: 360rpx;
  27 +}
  28 +
  29 +.starss {
  30 + margin-top: 15rpx;
  31 + border-top: 3rpx dashed rgb(203, 203, 203);
  32 + padding-top: 25rpx;
  33 + padding-left: 15rpx;
  34 +}
  35 +
  36 +.stars {
  37 + width: 50rpx;
  38 + height: 50rpx;
  39 + margin-right: 20rpx;
  40 +}
  41 +
  42 +.datetime {
  43 + width: 190rpx;
  44 +}
  45 +
  46 +.tea_labs {
  47 + padding: 0rpx 56rpx;
  48 + margin-top: 20rpx;
  49 +}
  50 +
  51 +.proposal {
  52 + right: 20rpx;
  53 + bottom: 20rpx;
  54 + color: rgb(152, 152, 152);
  55 +}
  56 +
  57 +.textarea {
  58 + width: 100%;
  59 + height: 200rpx;
  60 + margin-top: 70rpx;
  61 + border: 2rpx solid rgb(203, 203, 203);
  62 + border-radius: 13rpx;
  63 + padding-top: 25rpx;
  64 + padding-left: 30rpx;
  65 + margin-bottom: 30rpx;
  66 + padding-right: 15rpx;
  67 + padding-bottom: 20rpx;
  68 +}
  69 +
  70 +.labels {
  71 + display: inline-block;
  72 + max-height: 240rxp;
  73 + line-height: 50rpx;
  74 + padding-left: 15rpx;
  75 +}
  76 +
  77 +.label {
  78 + padding: 0rpx 10rpx;
  79 + height: 48rpx;
  80 + line-height: 48rpx;
  81 + border: 2rpx solid rgb(218, 218, 218);
  82 + color: rgb(152, 152, 152);
  83 + border-radius: 5rpx;
  84 + margin-right: 20rpx;
  85 + width: 165rpx;
  86 + display: inline-block;
  87 + text-align: center;
  88 + margin-bottom: 10rpx;
  89 +}
  90 +
  91 +/* 选择标签的样式 */
  92 +
  93 +.checklabel {
  94 + border: 2rpx solid rgb(214, 1, 33);
  95 + background-color: rgb(255, 231, 235);
  96 + color: rgb(214, 1, 33);
  97 +}
  98 +
  99 +.feedback {
  100 + color: rgb(152, 152, 152);
  101 + margin-bottom: 70rpx;
  102 +}
  103 +
  104 +.Subs {
  105 + background-color: rgb(255, 255, 255);
  106 + position: fixed;
  107 + width: 100%;
  108 + bottom: 40rpx;
  109 +}
  110 +
  111 +.Submission {
  112 + width: 400rpx;
  113 + height: 65rpx;
  114 + border-radius: 60rpx;
  115 + background-color: rgb(214, 1, 33);
  116 + color: rgb(255, 255, 255);
  117 +}
  118 +.Submission.yellow-b{
  119 + background-color: #ffb03f;
  120 +
  121 +}
  122 +
  123 +.clonri {
  124 + margin: 0rpx;
  125 +}
  126 +
  127 +.subSuccess {
  128 + position: fixed;
  129 + z-index: 3;
  130 + top: 435rpx;
  131 + left: 66rpx;
  132 + background-color: #a6a6a6a4;
  133 + width: 615rpx;
  134 + height: 315rpx;
  135 + border-radius: 20rpx;
  136 + color: rgb(255, 255, 255);
  137 +}
  138 +
  139 +.Success {
  140 + width: 110rpx;
  141 + height: 110rpx;
  142 + margin-top: 50rpx;
  143 + margin-bottom: 45rpx;
  144 +}
... ...
packageA/pages/my_service2/tment_order_list.js 0 → 100644
  1 +var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + url: a.url, //接口网址
  13 + iurl: a.imghost, //图片网址
  14 + activeCategoryId: 0, //类别选中下标
  15 + defimgurl: "/miniapp/images/yyservice/yyxmdefault.jpg",
  16 + categories: [{
  17 + name: "全部",
  18 + id: 0
  19 + }, {
  20 + name: "未服务",
  21 + id: 1
  22 + }, {
  23 + name: "已服务",
  24 + id: 2
  25 + }, {
  26 + name: "已过期",
  27 + id: 3
  28 + }],
  29 + tm_order_list: [], //我的预约订单列表
  30 + curpage: 1, //当前分页数
  31 + pageSize: 10, //页大小
  32 + total: 0,
  33 + ismore: 0, //是否加载完毕
  34 + is_read: 0, //是否加载接口
  35 + states: 4, //4为取消预约
  36 + },
  37 +
  38 + /**
  39 + * 生命周期函数--监听页面加载
  40 + */
  41 + onLoad: function(options) {
  42 + this.setData({
  43 + options,
  44 + });
  45 + var state=options.state;
  46 + if (state != null && state != undefined && state!=""){
  47 + this.setData({ activeCategoryId: state });
  48 + }
  49 +
  50 + },
  51 + changeTab: function(e) {
  52 + var th = this;
  53 + var id = e.currentTarget.dataset.id;
  54 + var activeCategoryId = th.data.activeCategoryId;
  55 + if (id != activeCategoryId) {
  56 + th.setData({
  57 + activeCategoryId: id,
  58 + tm_order_list: [],
  59 + curpage: 1,
  60 + ismore: 0,
  61 + is_read: 0
  62 + })
  63 + th.query_orderList();
  64 + } else {
  65 + return false;
  66 + }
  67 + },
  68 + //显示核销码
  69 + code_show: function(e) {
  70 + var th = this;
  71 + //--获取成功的时候--
  72 + var no = e.currentTarget.dataset.order_sn;
  73 + var qc_com = th.selectComponent("#qc_com"); //组件的id
  74 + var obj = {
  75 + val: no,
  76 + content: "请将二维码展示给核销员,使用更快捷"
  77 + };
  78 + qc_com.open(obj)
  79 + },
  80 + query_orderList: function() {
  81 + wx.showLoading({
  82 + title: '加载中',
  83 + })
  84 + var th = this;
  85 + var url = "/api/weshop/marketing/reservation/reservation/page";
  86 +
  87 + var state_index = th.data.activeCategoryId;
  88 + if (state_index == 0) {
  89 + state_index = "";
  90 + } else {
  91 + --state_index;
  92 + }
  93 + th.setData({
  94 + is_read: 0
  95 + })
  96 + getApp().request.promiseGet(url, {
  97 + data: {
  98 + storeId: a.stoid,
  99 + userId: th.data.options.userid,
  100 + state: state_index,
  101 + page: th.data.curpage,
  102 + pageSize: th.data.pageSize
  103 + }
  104 + }).then(res => {
  105 + wx.hideLoading();
  106 + if (res.data.code == 0) {
  107 + th.data.curpage++;
  108 + var arr1 = th.data.tm_order_list;
  109 + var arr2 = res.data.data.pageData;
  110 + var arr3 = [...arr1, ...arr2];
  111 + for(var i = 0;i<arr3.length;i++){
  112 + arr3[i].ArrangeTime = arr3[i].ArrangeTime.substring(0, 16);
  113 + }
  114 + var ismore = 0;
  115 + if (arr3.length == res.data.data.total) ismore = 1
  116 + th.setData({
  117 + tm_order_list: arr3,
  118 + total: res.data.data.total,
  119 + ismore: ismore,
  120 + is_read: 1
  121 + }), wx.stopPullDownRefresh(); //停止下拉刷新 {
  122 + } else {
  123 + wx.hideLoading();
  124 + th.setData({
  125 + tm_order_list: [],
  126 + is_read: 1
  127 + })
  128 + }
  129 + })
  130 +
  131 + },
  132 + //取消预约
  133 + cancel_tment: function(e) {
  134 + var th = this;
  135 + var th = this;
  136 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  137 + my_confirm.open(
  138 + "确定取消?",
  139 + "取消",
  140 + "确定",
  141 + function() {
  142 + my_confirm.open_cancel(0);
  143 + },
  144 + function() {
  145 + my_confirm.open_cancel(0);
  146 + var index = e.currentTarget.dataset.index;
  147 + var states = th.data.states;
  148 + var order_list = th.data.tm_order_list;
  149 + var number = order_list[index].Number;
  150 + var json = {
  151 + "number": number,
  152 + "storeId": a.stoid,
  153 + "states": 3
  154 + };
  155 + var data = JSON.stringify(json);
  156 + var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址
  157 + wx.request({
  158 + url: url,
  159 + data: data,
  160 + method: 'put',
  161 + header: {
  162 + 'content-type': 'application/json'
  163 + }, // 设置请求的 header
  164 + success: function(res) {
  165 + if (res.data.code == 0) {
  166 + getApp().my_warnning("取消成功", 1, th);
  167 + var id = th.data.activeCategoryId;
  168 + if (id == 1) {
  169 + order_list.splice(index, 1);
  170 + th.setData({
  171 + tm_order_list: order_list
  172 + })
  173 + } else {
  174 + var start = 'tm_order_list[' + index + '].State';
  175 + th.setData({
  176 + [start]: 3
  177 + })
  178 + }
  179 + wx.stopPullDownRefresh(); //停止下拉刷新
  180 + } else {
  181 + getApp().my_warnning(res.data.msg, 0, th);
  182 + }
  183 + }
  184 + })
  185 + })
  186 +
  187 + },
  188 + //图片失败,默认图片
  189 + bind_bnerr1: function(e) {
  190 + var _errImg = e.target.dataset.errorimg;
  191 + var _Img = e.target.dataset.img;
  192 + if (_Img != undefined) {
  193 + var _errObj = {};
  194 + _errObj[_errImg] = "/miniapp/images/no_cate_def.png";
  195 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  196 + }
  197 + },
  198 + /**
  199 + * 生命周期函数--监听页面显示
  200 + */
  201 + onShow: function() {
  202 + var th = this;
  203 + th.setData({
  204 + curpage: 1,
  205 + total: 0,
  206 + ismore: 0,
  207 + is_read: 0,
  208 + tm_order_list: []
  209 + })
  210 + th.query_orderList();
  211 + },
  212 +
  213 + /**
  214 + * 页面上拉触底事件的处理函数
  215 + */
  216 + onReachBottom: function() {
  217 + var th = this;
  218 + if (th.data.total <= th.data.pageSize) return;
  219 + if (th.data.ismore) return;
  220 +
  221 + wx.showLoading({
  222 + title: '加载中...',
  223 + })
  224 + th.query_orderList();
  225 + },
  226 + //关闭导航
  227 + close: function() {
  228 + var th = this;
  229 + var nav_b = th.selectComponent("#nav_b"); //组件的id
  230 + nav_b.close_box();
  231 + }
  232 +
  233 +})
0 234 \ No newline at end of file
... ...
packageA/pages/my_service2/tment_order_list.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "我的预约",
  3 + "usingComponents": {
  4 + "qr_code": "/components/qr_code/qr_code",
  5 + "warn": "/components/long_warn/long_warn",
  6 + "my_confirm": "/components/my_confirm/my_confirm",
  7 + "nav_b": "/components/nav_b/nav_b"
  8 + }
  9 +}
0 10 \ No newline at end of file
... ...
packageA/pages/my_service2/tment_order_list.wxml 0 → 100644
  1 +<view class="container" catchtap="close">
  2 + <!-- 导航栏 -->
  3 + <view class="type-navbar padding flex-vertical fs30">
  4 + <view class="type-box flex-center {{activeCategoryId==item.id?'chtypebox':''}}" wx:for="{{categories}}" bindtap="changeTab" data-id="{{item.id}}">
  5 + <view>{{item.name}}</view>
  6 + </view>
  7 + </view>
  8 + <view class="itemMax">
  9 + <!-- 预约项目 -->
  10 + <view wx:for="{{tm_order_list}}">
  11 + <!-- 商品编号和状态 -->
  12 + <view class="Commodity_number flex-vertical-between fs26 padding">
  13 + <!--商品编号 -->
  14 + <text class="order_number ellipsis-1" selectable='true'>订单编号:{{item.Number}}</text>
  15 + <!-- 订单状态 -->
  16 + <view class="flex-center state">
  17 + <view wx:if="{{item.State==0}}">未服务</view>
  18 + <view wx:if="{{item.State==1}}">已服务</view>
  19 + <view wx:if="{{item.State==2}}">已过期</view>
  20 + <view wx:if="{{item.State==3}}">已取消</view>
  21 + <view wx:if="{{item.State==4}}">已评价</view>
  22 + </view>
  23 + </view>
  24 +
  25 + <!-- 项目属性 -->
  26 + <navigator class="items padding flex-vertical" url="/pages/user/my_service/tment_details?number={{item.Number}}">
  27 +
  28 + <view class="flex-center fs26">
  29 + <view class="itemimage">
  30 + <image class="itemimage" src="{{item.ImageUrl==''?iurl+defimgurl:item.ImageUrl}}" lazy-load="true" data-errorimg="tm_order_list[{{index}}].ImageUrl" binderror="bind_bnerr1" data-img="{{item.ImageUrl}}"></image>
  31 + </view>
  32 + <!-- 项目内容 -->
  33 + <view class="details">
  34 + <view class="item flex-vertical base">
  35 + <view class="itemname flex-level-right">预约门店:</view>
  36 + <view class="itemvalue ellipsis-1">{{item.StorageName}}</view>
  37 + </view>
  38 + <view class="item flex-vertical base">
  39 + <view class="itemname flex-level-right">预约项目:</view>
  40 + <view class="itemvalue ellipsis-1">{{item.ServiceName}}</view>
  41 + </view>
  42 + <view class="item flex-vertical base">
  43 + <block wx:if="{{item.State==1 || item.State==4}}">
  44 + <view class="itemname flex-level-right">服务美容师:
  45 + </view>
  46 + </block>
  47 + <block wx:else>
  48 + <view class="itemname flex-level-right">预约美容师:
  49 + </view>
  50 + </block>
  51 + <view class="itemvalue ellipsis-1">{{item.BeauticianName}}</view>
  52 + </view>
  53 + <view class="item flex-vertical base">
  54 + <view class="itemname flex-level-right">预约时间:</view>
  55 + <view>{{item.ArrangeTime}}</view>
  56 + </view>
  57 + <view class="item flex-vertical base" wx:if="{{item.WriteTime==''?false:true}}">
  58 + <view class="itemname flex-level-right">服务时间:</view>
  59 + <view>{{item.WriteTime}}</view>
  60 + </view>
  61 + </view>
  62 +
  63 + </view>
  64 + </navigator>
  65 + <view class="Unim flex-right-vertical fs26 padding">
  66 + <image wx:if="{{item.State==0}}" src="{{iurl}}miniapp/images/order/code.png" class="code" bindtap="code_show" data-order_sn="{{item.Number}}"></image>
  67 + <block wx:if="{{item.State==0}}">
  68 + <view class="Unimportance flex-level" data-index="{{index}}" bindtap="cancel_tment">取消预约</view>
  69 + </block>
  70 + <block wx:else>
  71 + <navigator url="/packageA/pages/my_service/tment_details?number={{item.Number}}&userid={{options.userid}}" class="Unimportance flex-level">查看详情</navigator>
  72 + </block>
  73 + <navigator wx:if="{{item.State==0}}" class="important Unimportance flex-level" url="/packageA/pages/my_service/beauty_deta?BeauticianID={{item.BeauticianID}}&number={{item.Number}}&itemId={{item.ServiceID}}&modify=1&projectId={{item.ProjectID}}&userid={{options.userid}}">更改时间</navigator>
  74 + <navigator wx:if="{{item.State==1}}" url="/packageA/pages/my_service/tment_eval?Number={{item.Number}}&evaluate={{0}}&userid={{options.userid}}" class="important Unimportance flex-level">发表评价</navigator>
  75 + <navigator wx:if="{{item.State==2 || item.State==3}}" url="/packageA/pages/my_service/appment_main?ProjectID={{item.ProjectID}}&BuyType={{item.BuyType}}&service_id={{item.ServiceID}}&userid={{options.userid}}" class="important Unimportance flex-level">重新预约</navigator>
  76 + <navigator wx:if="{{item.State==4}}" url="/packageA/pages/my_service/tment_eval?Number={{item.Number}}&evaluate={{1}}&userid={{options.userid}}" class="important Unimportance flex-level">评价详情</navigator>
  77 + </view>
  78 + </view>
  79 + <view class="exactly flex-center fs26" wx:if="{{ismore && tm_order_list.length>=3}}">
  80 + <view class="line"></view>
  81 + <view class="exactly_text">到底了</view>
  82 + <view class="line"></view>
  83 + </view>
  84 + </view>
  85 +</view>
  86 +
  87 +<!-- 无预约订单 -->
  88 +<view class="empty_order" wx:if="{{tm_order_list.length<1 && is_read}}" catchtap="close">
  89 + <view class="flex-level">
  90 + <image src="{{iurl}}miniapp/images/order/empty_order.png" lazy-load="true"></image>
  91 + </view>
  92 + <view class="flex-level fs30 xc-ash">无预约记录</view>
  93 + <view class="flex-level">
  94 + <navigator url="/pages/user/my_service/i_service" bindtap="goto">
  95 + <view class="flex-center fs32 white">立即预约</view>
  96 + </navigator>
  97 + </view>
  98 +</view>
  99 +<my_confirm id="my_confirm"></my_confirm>
  100 +<!-- 制作一个圆球导航 -->
  101 +<nav_b id="nav_b"></nav_b>
  102 +<!-- 弹出框扫描 -->
  103 +<qr_code id="qc_com"></qr_code>
  104 +<warn id="warn"></warn>
0 105 \ No newline at end of file
... ...
packageA/pages/my_service2/tment_order_list.wxss 0 → 100644
  1 +page {
  2 + height: 100%;
  3 +}
  4 +
  5 +.container {
  6 + background-color: rgb(255, 255, 255);
  7 +}
  8 +
  9 +.type-navbar {
  10 + border-top: 3rpx solid rgb(221, 221, 221);
  11 + display: flex;
  12 + justify-content: space-between;
  13 + position: fixed;
  14 + background-color: rgb(255,255,255);
  15 + width:696rpx;
  16 +}
  17 +.itemMax{
  18 + margin-top: 93rpx;
  19 +}
  20 +
  21 +.type-box {
  22 + height: 88rpx;
  23 + line-height: 88rpx;
  24 + padding: 0rpx 15rpx;
  25 + border-bottom: 5rpx solid rgb(255, 255, 255);
  26 +}
  27 +
  28 +.chtypebox {
  29 + border-bottom: 5rpx solid rgb(224, 18, 18);
  30 +}
  31 +
  32 +.Commodity_number {
  33 + height: 80rpx;
  34 + border-top: 13rpx solid rgb(245, 245, 245);
  35 +}
  36 +
  37 +.Commodity_number image {
  38 + width: 30rpx;
  39 + height: 32rpx;
  40 +}
  41 +
  42 +.padding {
  43 + padding: 0rpx 27rpx;
  44 +}
  45 +
  46 +.lin {
  47 + border-left: 2rpx solid rgb(211, 29, 54);
  48 + margin-left: 17rpx;
  49 + margin-right: 14rpx;
  50 + height: 40rpx;
  51 +}
  52 +
  53 +.order_number {
  54 + max-width: 550rpx;
  55 +}
  56 +.state{
  57 + color: rgb(216,63,82);
  58 +}
  59 +.items {
  60 + border-top: 4rpx solid rgb(245, 245, 245);
  61 + border-bottom: 4rpx solid rgb(245, 245, 245);
  62 + height: 260rpx;
  63 +}
  64 +.code{
  65 + width: 55rpx;
  66 + height: 55rpx;
  67 +}
  68 +.itemimage {
  69 + width: 190rpx;
  70 + height: 190rpx;
  71 + margin-right: 20rpx;
  72 + border-radius: 50%;
  73 + border: 1px solid #eee;
  74 +}
  75 +
  76 +.details {
  77 + height: 190rpx;
  78 +}
  79 +
  80 +.itemname {
  81 + width: 150rpx;
  82 + margin-right: 20rpx;
  83 +}
  84 +
  85 +.itemvalue {
  86 + max-width: 300rpx;
  87 +}
  88 +
  89 +.Unimportance {
  90 + width: 140rpx;
  91 + height: 40rpx;
  92 + line-height: 40rpx;
  93 + border-radius: 8rpx;
  94 + background-color: rgb(255, 255, 255);
  95 + margin-left: 20rpx;
  96 + border: 2rpx solid rgb(191, 191, 191);
  97 +}
  98 +
  99 +.important {
  100 + background-color: rgb(212, 28, 52);
  101 + border: 2rpx solid rgb(212, 28, 52);
  102 + color: rgb(255, 255, 255);
  103 +}
  104 +
  105 +.Unim {
  106 + height: 110rpx;
  107 +}
  108 +
  109 +.exactly {
  110 + height: 80rpx;
  111 + background-color: rgb(245, 245, 245);
  112 +}
  113 +
  114 +.exactly_text {
  115 + margin: 0rpx 15rpx;
  116 +}
  117 +
  118 +.line {
  119 + border-top: 2rpx solid rgb(0, 0, 0);
  120 + width: 130rpx;
  121 +}
  122 +
  123 +/* 无预约 */
  124 +
  125 +.empty_order image {
  126 + width: 300rpx;
  127 + height: 280rpx;
  128 + margin-top: 202rpx;
  129 +}
  130 +
  131 +.empty_order .xc-ash {
  132 + margin-top: 10rpx;
  133 + font-weight: 600px;
  134 +}
  135 +
  136 +.empty_order navigator {
  137 + margin-top: 60rpx;
  138 + border-radius: 40rpx;
  139 +}
  140 +
  141 +.empty_order navigator view {
  142 + width: 247rpx;
  143 + height: 65rpx;
  144 + background-color: rgb(255, 72, 72);
  145 + border-radius: 40rpx;
  146 +}
  147 +.base{
  148 + display: flex;
  149 + height: 38rpx;
  150 + line-height: 38rpx;
  151 + align-items: baseline;
  152 +}
0 153 \ No newline at end of file
... ...
packageA/pages/shop_details/shop_details.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "门店详情"
  3 +}
0 4 \ No newline at end of file
... ...
packageA/pages/shop_details/shop_details.wxml 0 → 100644
  1 +<view class="container">
  2 + <!-- 轮播图 -->
  3 + <view class="swiper-container">
  4 + <swiper
  5 + indicator-dots
  6 + autoplay
  7 + circular>
  8 + <swiper-item><image class="img" src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2841289551,2117307057&fm=26&gp=0.jpg"></image></swiper-item>
  9 + <swiper-item><image class="img" src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1399951667,129331942&fm=26&gp=0.jpg"></image></swiper-item>
  10 + </swiper>
  11 + </view>
  12 +
  13 + <view class="shop-container">
  14 + <!-- 地址 -->
  15 + <view class="address-container section flex">
  16 + <view class="left">
  17 + <view>{{shop.pickup_name}}</view>
  18 + <view class="address">{{shop.fulladdress}}</view>
  19 + </view>
  20 + <view class="right">
  21 + <view class="btn btn-nav"><text class="iconfont icon-daohang"></text>导航</view>
  22 + <view class="distance">999.0千米</view>
  23 + </view>
  24 + </view>
  25 +
  26 + <!-- 电话 -->
  27 + <view class="section flex">
  28 + <view>{{shop.pickup_phone}}</view>
  29 + <view class="btn btn-phone" bindtap="onPhone"><text class="iconfont icon-phone"></text>电话</view>
  30 + </view>
  31 + </view>
  32 +</view>
0 33 \ No newline at end of file
... ...
packageA/pages/shop_details/shop_details.wxss 0 → 100644
  1 +page {
  2 + height: 100%;
  3 + background-color: #F7F7F7;
  4 +}
  5 +.container {
  6 + background-color: white;
  7 +}
  8 +.swiper-container {
  9 + background-color: pink;
  10 +}
  11 +.img {
  12 + display: block;
  13 + width: 100%;
  14 + height: 100%;
  15 +}
  16 +.shop-container {
  17 + padding: 0 30rpx;
  18 +}
  19 +
  20 +.address-container {
  21 + align-items: center;
  22 +}
  23 +
  24 +.left {
  25 + padding-right: 40rpx;
  26 +}
  27 +
  28 +.address {
  29 + color: #6E6E6E;
  30 + font-size: 26rpx;
  31 + text-align: justify;
  32 + padding-top: 20rpx;
  33 +}
  34 +
  35 +.distance {
  36 + padding-top: 20rpx;
  37 + color: #6E6E6E;
  38 + font-size: 26rpx;
  39 + text-align: right;
  40 +}
  41 +
  42 +.right {
  43 + flex-shrink: 0;
  44 + text-align: right;
  45 +}
  46 +
  47 +
  48 +.btn {
  49 + display: inline-block;
  50 + height: 60rpx;
  51 + line-height: 60rpx;
  52 + padding: 0 30rpx;
  53 + border-radius: 30rpx;
  54 + border: 2rpx solid #B0B0B0;
  55 + font-size: 26rpx;
  56 +}
  57 +
  58 +
  59 +
  60 +
  61 +.section {
  62 + align-items: center;
  63 + justify-content: space-between;
  64 + padding: 36rpx 0;
  65 + border-bottom: 2rpx solid #F0F0F0;
  66 +}
  67 +
  68 +.section:last-child {
  69 + border-bottom: none;
  70 +}
  71 +
  72 +.iconfont {
  73 + margin-right: 20rpx;
  74 + font-size: 28rpx;
  75 +}
0 76 \ No newline at end of file
... ...
packageA/pages/text/text.js 0 → 100644
  1 +// packageA//pages/text/text.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 +
  18 + /**
  19 + * 生命周期函数--监听页面初次渲染完成
  20 + */
  21 + onReady: function () {
  22 +
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面显示
  27 + */
  28 + onShow: function () {
  29 +
  30 + },
  31 +
  32 + /**
  33 + * 生命周期函数--监听页面隐藏
  34 + */
  35 + onHide: function () {
  36 +
  37 + },
  38 +
  39 + /**
  40 + * 生命周期函数--监听页面卸载
  41 + */
  42 + onUnload: function () {
  43 +
  44 + },
  45 +
  46 + /**
  47 + * 页面相关事件处理函数--监听用户下拉动作
  48 + */
  49 + onPullDownRefresh: function () {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 页面上拉触底事件的处理函数
  55 + */
  56 + onReachBottom: function () {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 用户点击右上角分享
  62 + */
  63 + onShareAppMessage: function () {
  64 +
  65 + }
  66 +})
0 67 \ No newline at end of file
... ...
packageA/pages/text/text.json 0 → 100644
  1 +{
  2 + "usingComponents": {}
  3 +}
0 4 \ No newline at end of file
... ...
packageA/pages/text/text.wxml 0 → 100644
  1 +<!--packageA//pages/text/text.wxml-->
  2 +<text>packageA//pages/text/text.wxml</text>
... ...
packageA/pages/text/text.wxss 0 → 100644
  1 +/* packageA//pages/text/text.wxss */
0 2 \ No newline at end of file
... ...
pages/cart/cart/cart.js
... ... @@ -267,13 +267,22 @@ Page({
267 267 var isok = 1;
268 268 await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + item.goods_id + "/1", {}).then(res => {
269 269 if (res.data.code == 0) {
270   - var r_data = res.data.data;
  270 + var r_data = res.data.data;
271 271 if (!r_data.promGoodsLists) {
272 272 var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
273 273 getApp().request.delete(url, {});
274   - //商品已经下架
  274 + //商品已经无活动
275 275 isok = 0;
276   - }
  276 + }else{
  277 + //如果活动的ID不一样,说明原先的活动已经没有参与了或者过期了
  278 + if(item.prom_id!=r_data.promGoodsLists[0].prom_id ){
  279 + var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  280 + getApp().request.delete(url, {});
  281 + //商品已经下架
  282 + isok = 0;
  283 + }
  284 + }
  285 +
277 286 } else {
278 287 var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
279 288 getApp().request.delete(url, {});
... ...