Commit 8743432aa05081d5af668a33464dcfa7de1b577b
1 parent
84345b25
修改现有的跳转路径
Showing
9 changed files
with
85 additions
and
15 deletions
pages/user/my_service/appment_main.wxml
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | </view> |
42 | 42 | </view> |
43 | 43 | </view> |
44 | - <navigator class="flex-center" url="/pages/user/Cosmetology_list/Cosmetology_list"> | |
44 | + <navigator class="flex-center" url="/pages/user/my_service/cosmetology_list"> | |
45 | 45 | <image class="user" src="{{iurl}}/miniapp/images/yyservice/user.png"></image> |
46 | 46 | </navigator> |
47 | 47 | </view> |
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 | </view> |
55 | 55 | |
56 | 56 | <!-- 选择门店 --> |
57 | - <view class="flex-vertical-between fs26 select" data-url="/pages/user/beauty_deta/beauty_deta" bindtap="goto"> | |
57 | + <view class="flex-vertical-between fs26 select" data-url="/pages/user/my_service/beauty_deta" bindtap="goto"> | |
58 | 58 | <view class="color">选择时间</view> |
59 | 59 | <view class="angle angler">∟</view> |
60 | 60 | </view> |
... | ... | @@ -83,7 +83,7 @@ |
83 | 83 | </view> |
84 | 84 | |
85 | 85 | <view class="submitMax flex-space-between fs30"> |
86 | - <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list/tment_order_list"> | |
86 | + <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list"> | |
87 | 87 | <view>我的预约</view> |
88 | 88 | </navigator> |
89 | 89 | <view class="sub_appment flex-center"> | ... | ... |
pages/user/my_service/beauty_deta.wxss
... | ... | @@ -63,6 +63,7 @@ |
63 | 63 | .scroll-h { |
64 | 64 | white-space: nowrap; |
65 | 65 | width: 704rpx; |
66 | + /* width: 100%; */ | |
66 | 67 | margin-bottom: 25rpx; |
67 | 68 | overflow: visible; |
68 | 69 | height: 125rpx; |
... | ... | @@ -95,7 +96,7 @@ |
95 | 96 | } |
96 | 97 | |
97 | 98 | .bd { |
98 | - border: 2rpx solid rgb(238, 238, 238); | |
99 | + /* border: 2rpx solid rgb(238, 238, 238); */ | |
99 | 100 | background-color: rgb(255, 255, 255); |
100 | 101 | color: rgb(20, 20, 20); |
101 | 102 | } | ... | ... |
pages/user/my_service/cosmetology_list.js
... | ... | @@ -9,9 +9,23 @@ Page({ |
9 | 9 | */ |
10 | 10 | data: { |
11 | 11 | iurl: a.imghost, |
12 | - cosmetology_list: null, //美容师列表 | |
12 | + cosmetology_list: [], //美容师列表 | |
13 | + is_cosmetology_read: 0,//是否有读过美容师接口,该属性用在没有美容师列表的排版 | |
14 | + curpage: 1, //当前分页数 | |
15 | + pageSize: 10, //页大小 | |
16 | + total: 0,//总数量 | |
17 | + ismore: 0, //是否加载完毕 | |
13 | 18 | }, |
14 | - query_cosmetology: function() { | |
19 | + onReachBottom: function () { | |
20 | + var th = this; | |
21 | + if (this.data.total <= th.data.pageSize) return; | |
22 | + if (this.data.ismore) return; | |
23 | + wx.showLoading({ | |
24 | + title: '加载中...', | |
25 | + }) | |
26 | + th.query_cology(); | |
27 | + }, | |
28 | + query_cology: function() { | |
15 | 29 | var th = this; |
16 | 30 | var url = "http://localhost:8022/api/weshop/yy_fuwu_meirongshi"; |
17 | 31 | wx.request({ |
... | ... | @@ -23,8 +37,44 @@ Page({ |
23 | 37 | }) |
24 | 38 | } |
25 | 39 | } |
26 | - | |
27 | 40 | }) |
41 | + | |
42 | + // var th = this; | |
43 | + // var url = "http://localhost:8022/api/weshop/yy_fuwu_meirongshi"; | |
44 | + // getApp().request.promiseGet(url, { | |
45 | + // data: { | |
46 | + // storeId: a.stoid, | |
47 | + // userId: d.user_id, | |
48 | + // page: th.data.curpage, | |
49 | + // pageSize: th.data.pageSize | |
50 | + // } | |
51 | + // }).then(res => { | |
52 | + // if (res.data.code == 0) { | |
53 | + // wx.hideLoading(); | |
54 | + // th.data.curpage++; | |
55 | + // var arr1 = th.data.cosmetology_list; | |
56 | + // var arr2 = res.data.data.pageData; | |
57 | + // var arr3 = [...arr1, ...arr2]; | |
58 | + // var ismore = 0; | |
59 | + // if (arr3.length == res.data.data.total) ismore = 1 | |
60 | + // th.setData({ | |
61 | + // cosmetology_list: arr3, | |
62 | + // total: res.data.data.total, | |
63 | + // ismore: ismore, | |
64 | + // is_service_read: 1, | |
65 | + // }), wx.stopPullDownRefresh(); //停止下拉刷新 | |
66 | + // } | |
67 | + // }) | |
68 | + }, | |
69 | + //图片失败,默认图片 | |
70 | + bind_bnerr1: function (e) { | |
71 | + var _errImg = e.target.dataset.errorimg; | |
72 | + var _Img = e.target.dataset.img; | |
73 | + if (_Img != undefined) { | |
74 | + var _errObj = {}; | |
75 | + _errObj[_errImg] = "/miniapp/images/no_cate_def.png"; | |
76 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
77 | + } | |
28 | 78 | }, |
29 | 79 | /** |
30 | 80 | * 生命周期函数--监听页面加载 |
... | ... | @@ -43,7 +93,7 @@ Page({ |
43 | 93 | */ |
44 | 94 | onShow: function() { |
45 | 95 | var th = this; |
46 | - th.query_cosmetology(); | |
96 | + th.query_cology(); | |
47 | 97 | }, |
48 | 98 | |
49 | 99 | }) |
50 | 100 | \ No newline at end of file | ... | ... |
pages/user/my_service/cosmetology_list.wxml
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | <!-- 个人属性 --> |
9 | 9 | <view class="flex-vertical-between"> |
10 | 10 | <view class="flex-vertical"> |
11 | - <image class="portrait" src="{{item.img}}"></image> | |
11 | + <image class="portrait" src="{{item.img}}" lazy-load="true" data-errorimg="cosmetology_list[{{index}}].img" binderror="bind_bnerr1" data-img="{{item.img}}"></image> | |
12 | 12 | <view> |
13 | 13 | <!-- 用户名 --> |
14 | 14 | <view class="UserName ellipsis-1 fs32">{{item.name}}</view> |
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | |
36 | 36 | <!-- 预约状态 --> |
37 | 37 | <block wx:if="{{0}}"> |
38 | - <navigator class="flex-center gofu go" url="/pages/user/beauty_deta/beauty_deta"> | |
38 | + <navigator class="flex-center gofu go" url="/pages/user/my_service/beauty_deta"> | |
39 | 39 | <view class="fs24">预约</view> |
40 | 40 | </navigator> |
41 | 41 | </block> |
... | ... | @@ -55,6 +55,13 @@ |
55 | 55 | </block> |
56 | 56 | </view> |
57 | 57 | </view> |
58 | + <!-- 没有数据 --> | |
59 | + <!-- 加载完毕并且数据大于=页大小 --> | |
60 | + <view class="After_all flex-center" wx:if="{{ismore && service_List.length>=pageSize}}"> | |
61 | + <view class="Line"></view> | |
62 | + <view class="end fs26 xc-black">到底了</view> | |
63 | + <view class="Line"></view> | |
64 | + </view> | |
58 | 65 | </view> |
59 | 66 | </view> |
60 | 67 | <!-- 无美容师 --> |
... | ... | @@ -64,7 +71,7 @@ |
64 | 71 | </view> |
65 | 72 | <view class="flex-level fs30 xc-ash">暂无美容师</view> |
66 | 73 | <view class="flex-level"> |
67 | - <navigator url="/pages/user/my_service/my_service" bindtap="goto"> | |
74 | + <navigator url="/pages/user/my_service/i_service" bindtap="goto"> | |
68 | 75 | <view class="flex-center fs28 white">其他项目</view> |
69 | 76 | </navigator> |
70 | 77 | </view> | ... | ... |
pages/user/my_service/cosmetology_list.wxss
... | ... | @@ -104,4 +104,16 @@ page{ |
104 | 104 | height: 56rpx; |
105 | 105 | background-color: rgb(255, 72, 72); |
106 | 106 | border-radius: 40rpx; |
107 | -} | |
108 | 107 | \ No newline at end of file |
108 | +} | |
109 | +.After_all { | |
110 | + height: 80rpx; | |
111 | +} | |
112 | + | |
113 | +.After_all .Line { | |
114 | + border-top: 3rpx solid rgb(0, 0, 0); | |
115 | + width: 130rpx; | |
116 | +} | |
117 | + | |
118 | +.After_all .end { | |
119 | + margin: 0rpx 15rpx; | |
120 | +} | ... | ... |
pages/user/my_service/i_service.wxml
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | </view> |
26 | 26 | <view> |
27 | 27 | <view class="flex-center"> |
28 | - <image class="itemimage" src="{{item.ImageUrl==''?iurl+defimgurl:item.ImageUrl}}" lazy-load="true" data-errorimg="service_List[{{index}}].img" binderror="bind_bnerr1" data-img="{{item.img}}"></image> | |
28 | + <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> | |
29 | 29 | </view> |
30 | 30 | |
31 | 31 | <view class="flex-center itemName"> |
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | </view> |
64 | 64 | </view> |
65 | 65 | <!-- 无服务项目 --> |
66 | -<view wx:if="{{service_List.length<0 && ismore}}"> | |
66 | +<view wx:if="{{service_List.length<0 && is_service_read}}"> | |
67 | 67 | <!-- 遮住 --> |
68 | 68 | <view class="cover"></view> |
69 | 69 | <!-- 无历史服务 --> | ... | ... |
pages/user/my_service/my_service.js
0 → 100644
pages/user/my_service/my_service.wxml
0 → 100644
pages/user/my_service/tment_order_list.wxml
... | ... | @@ -82,7 +82,7 @@ |
82 | 82 | </view> |
83 | 83 | <view class="flex-level fs30 xc-ash">暂无预约记录</view> |
84 | 84 | <view class="flex-level"> |
85 | - <navigator url="/pages/user/my_service/my_service" bindtap="goto"> | |
85 | + <navigator url="/pages/user/my_service/i_service" bindtap="goto"> | |
86 | 86 | <view class="flex-center fs28 white">立即预约</view> |
87 | 87 | </navigator> |
88 | 88 | </view> | ... | ... |