Commit 6f6f0eef07d9107e9c932ffe595ac291d8b45124
1 parent
28609a3d
删除丢弃的我的服务项目,原服务项目放在i_service中
Showing
4 changed files
with
0 additions
and
359 deletions
pages/user/my_service/my_service.js deleted
| 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: 8, //页大小 | |
| 22 | - total: 0, | |
| 23 | - ismore: 0, //是否加载完毕 | |
| 24 | - userinfo: null, | |
| 25 | - }, | |
| 26 | - | |
| 27 | - /** | |
| 28 | - * 生命周期函数--监听页面加载 | |
| 29 | - */ | |
| 30 | - onLoad: function(options) { | |
| 31 | - var userinfo = getApp().globalData.userInfo; | |
| 32 | - if (userinfo == null) { | |
| 33 | - //界面必须使用warn 做ID,并调用 | |
| 34 | - getApp().my_warnning("会员为空", 0, this); | |
| 35 | - return false; | |
| 36 | - } | |
| 37 | - this.setData({ | |
| 38 | - userinfo: userinfo | |
| 39 | - }); | |
| 40 | - }, | |
| 41 | - /** | |
| 42 | - * 生命周期函数--监听页面显示 | |
| 43 | - */ | |
| 44 | - onShow: function() { | |
| 45 | - var th = this; | |
| 46 | - th.query_service(); | |
| 47 | - }, | |
| 48 | - onReachBottom: function() { | |
| 49 | - var th = this; | |
| 50 | - if (this.data.total <= th.data.pageSize) return; | |
| 51 | - if (this.data.ismore) return; | |
| 52 | - this.query_service(); | |
| 53 | - }, | |
| 54 | - //查询服务项目列表 | |
| 55 | - query_service: function() { | |
| 56 | - var th = this; | |
| 57 | - var url = "/api/weshop/marketing/reservation/sm/page"; | |
| 58 | - getApp().request.promiseGet(url, { | |
| 59 | - data: { | |
| 60 | - storeId: a.stoid, | |
| 61 | - userId: d.user_id, | |
| 62 | - page: th.data.curpage, | |
| 63 | - pageSize: th.data.pageSize | |
| 64 | - } | |
| 65 | - }).then(res => { | |
| 66 | - if (res.data.code == 0) { | |
| 67 | - th.data.curpage++; | |
| 68 | - var arr1 = th.data.service_List; | |
| 69 | - var arr2 = res.data.data.pageData; | |
| 70 | - var arr3 = [...arr1, ...arr2]; | |
| 71 | - var ismore = 0; | |
| 72 | - if (arr3.length == res.data.data.total) ismore = 1 | |
| 73 | - th.setData({ | |
| 74 | - service_List: arr3, | |
| 75 | - total: res.data.data.total, | |
| 76 | - ismore: ismore, | |
| 77 | - is_service_read: 1 | |
| 78 | - }), wx.stopPullDownRefresh(); //停止下拉刷新 | |
| 79 | - } | |
| 80 | - }) | |
| 81 | - }, | |
| 82 | - /*-- 打开服务项目 --*/ | |
| 83 | - open_fw: function(e) { | |
| 84 | - var th = this; | |
| 85 | - var ind = e.currentTarget.dataset.ind; | |
| 86 | - var item = this.data.service_List[ind]; | |
| 87 | - | |
| 88 | - var ewm = "^" + th.data.userinfo.erpvipid + "|" + item.ProjectID + "|" + item.BuyType + "|" + item.Validay + "|TY01|"; | |
| 89 | - var tt = th.format_time(1); | |
| 90 | - ewm = ewm + tt; | |
| 91 | - th.data.qr_code_object.val = ewm; | |
| 92 | - th.data.qr_code_object.is_fw = 1; | |
| 93 | - console.log(ewm); | |
| 94 | - var qc_com = th.selectComponent("#qc_com"); //组件的id | |
| 95 | - qc_com.open(th.data.qr_code_object) | |
| 96 | - }, | |
| 97 | - //图片失败,默认图片 | |
| 98 | - bind_bnerr1: function(e) { | |
| 99 | - var _errImg = e.target.dataset.errorimg; | |
| 100 | - var _Img = e.target.dataset.img; | |
| 101 | - if (_Img != undefined) { | |
| 102 | - var _errObj = {}; | |
| 103 | - _errObj[_errImg] = "/miniapp/images/no_cate_def.png"; | |
| 104 | - this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 105 | - } | |
| 106 | - }, | |
| 107 | - format_time: function(isFull) { | |
| 108 | - var d = new Date(); | |
| 109 | - var m = d.getMonth() + 1; | |
| 110 | - if (m < 10) m = "0" + m; | |
| 111 | - var dd = d.getDate(); | |
| 112 | - if (dd < 10) dd = "0" + dd; | |
| 113 | - var fm = [d.getFullYear(), m, dd].join('-'); | |
| 114 | - if (isFull == 1) | |
| 115 | - fm = fm + ' ' + [d.getHours(), d.getMinutes(), d.getSeconds()].join(':') | |
| 116 | - return fm; | |
| 117 | - }, | |
| 118 | - //跳转到首页 | |
| 119 | - goto: function(e) { | |
| 120 | - var url = e.currentTarget.dataset.url; | |
| 121 | - getApp().goto(url); | |
| 122 | - } | |
| 123 | -}) | |
| 124 | 0 | \ No newline at end of file |
pages/user/my_service/my_service.json deleted
pages/user/my_service/my_service.wxml deleted
| 1 | -<!-- 背景图片 --> | |
| 2 | -<view> | |
| 3 | - <image class="backimage" src="{{iurl}}/miniapp/images/yyservice/backimage.png" mode="widthFix"></image> | |
| 4 | - <navigator class="History fs26" url="/pages/user/hist_service/hist_service">历史服务</navigator> | |
| 5 | -</view> | |
| 6 | - | |
| 7 | -<!-- 预约内容 --> | |
| 8 | -<!-- 项目框架 --> | |
| 9 | -<view class="Serviceitems"> | |
| 10 | - <!-- 单个项目 --> | |
| 11 | - <view class="rel" wx:for="{{service_List}}"> | |
| 12 | - <view class="abs"> | |
| 13 | - <!-- 皇冠log --> | |
| 14 | - <block wx:if="{{item.BuyType==4}}"> | |
| 15 | - <image class="equity_money" src="{{iurl}}/miniapp/images//yyservice/equity.png" lazy-load="true"></image> | |
| 16 | - </block> | |
| 17 | - <!-- 金钱log --> | |
| 18 | - <block wx:if="{{item.BuyType==1}}"> | |
| 19 | - <image class="equity_money" src="{{iurl}}/miniapp/images/yyservice/money.png" lazy-load="true"></image> | |
| 20 | - </block> | |
| 21 | - <!-- 礼包log --> | |
| 22 | - <block wx:if="{{item.BuyType==3}}"> | |
| 23 | - <image class="equity_money" src="{{iurl}}/miniapp/images/yyservice/giftpackage.png" lazy-load="true"></image> | |
| 24 | - </block> | |
| 25 | - </view> | |
| 26 | - <view> | |
| 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> | |
| 29 | - </view> | |
| 30 | - | |
| 31 | - <view class="flex-center itemName"> | |
| 32 | - <view class="fs32 Name ellipsis-1">{{item.ProjectName}}</view> | |
| 33 | - </view> | |
| 34 | - | |
| 35 | - <view class="flex-center fs24 itemCount"> | |
| 36 | - <view>剩余次数:</view> | |
| 37 | - <view>{{item.ObtainTimes}}</view> | |
| 38 | - </view> | |
| 39 | - | |
| 40 | - <view class="flex-center fs24 itemEffective"> | |
| 41 | - <view>有效期至</view> | |
| 42 | - <view class="Date">{{item.Validay}}</view> | |
| 43 | - </view> | |
| 44 | - | |
| 45 | - </view> | |
| 46 | - | |
| 47 | - <view class="flex-center fs24 functionMax"> | |
| 48 | - <view class="flex-level Use" bindtap="open_fw" data-ind="{{index}}"> | |
| 49 | - <view>立即使用</view> | |
| 50 | - </view> | |
| 51 | - <!-- 可预约 --> | |
| 52 | - <navigator class="flex-level appointment" url="/pages/user/Appment_main/Appment_main"> | |
| 53 | - <view>预约</view> | |
| 54 | - </navigator> | |
| 55 | - </view> | |
| 56 | - </view> | |
| 57 | - | |
| 58 | -</view> | |
| 59 | -<!-- 无服务项目 --> | |
| 60 | -<view wx:if="{{service_List.length<0 && ismore}}"> | |
| 61 | - <!-- 遮住 --> | |
| 62 | - <view class="cover"></view> | |
| 63 | - <!-- 无历史服务 --> | |
| 64 | - <view class="empty_order" wx:if="{{true}}"> | |
| 65 | - <view class="flex-level"> | |
| 66 | - <image src="{{iurl}}miniapp/images/yyservice/no_history.png"></image> | |
| 67 | - </view> | |
| 68 | - <view class="flex-level fs30 xc-ash">暂无服务项目</view> | |
| 69 | - <view class="flex-level"> | |
| 70 | - <navigator data-url="/pages/user/index/index" bindtap="goto"> | |
| 71 | - <view class="flex-center fs28 white">回到首页</view> | |
| 72 | - </navigator> | |
| 73 | - </view> | |
| 74 | - </view> | |
| 75 | - | |
| 76 | -</view> | |
| 77 | - | |
| 78 | - | |
| 79 | -<!-- 弹出框扫描 --> | |
| 80 | -<qr_code id="qc_com"></qr_code> | |
| 81 | -<warn id="warn"></warn> | |
| 82 | 0 | \ No newline at end of file |
pages/user/my_service/my_service.wxss deleted
| 1 | -page { | |
| 2 | - overflow-x: scroll; | |
| 3 | -} | |
| 4 | - | |
| 5 | -/* 背景定位 */ | |
| 6 | - | |
| 7 | -.backimage { | |
| 8 | - position: absolute; | |
| 9 | - top: 0rpx; | |
| 10 | - left: 0rpx; | |
| 11 | - z-index: 0; | |
| 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: 420rpx; | |
| 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: relative; | |
| 49 | - top: 370rpx; | |
| 50 | - left: 0rpx; | |
| 51 | - z-index: 2; | |
| 52 | - padding-left: 18rpx; | |
| 53 | -} | |
| 54 | - | |
| 55 | -.itemimage { | |
| 56 | - width: 120rpx; | |
| 57 | - height: 120rpx; | |
| 58 | - border-radius: 50%; | |
| 59 | - margin-top: 30rpx; | |
| 60 | - margin-bottom: 20rpx; | |
| 61 | -} | |
| 62 | - | |
| 63 | -.itemName { | |
| 64 | - margin-bottom: 25rpx; | |
| 65 | - color: rgb(48, 48, 48); | |
| 66 | -} | |
| 67 | - | |
| 68 | -.itemName .Name { | |
| 69 | - max-width: 250rpx; | |
| 70 | - text-align: center; | |
| 71 | -} | |
| 72 | - | |
| 73 | -.itemCount { | |
| 74 | - margin-bottom: 5rpx; | |
| 75 | - color: rgb(177, 177, 177); | |
| 76 | -} | |
| 77 | - | |
| 78 | -.itemEffective { | |
| 79 | - margin-bottom: 30rpx; | |
| 80 | - color: rgb(177, 177, 177); | |
| 81 | -} | |
| 82 | - | |
| 83 | -.functionMax { | |
| 84 | - padding: 0rpx 25rpx; | |
| 85 | - color: rgb(254, 255, 255); | |
| 86 | -} | |
| 87 | - | |
| 88 | -.Use { | |
| 89 | - width: 170rpx; | |
| 90 | - height: 40rpx; | |
| 91 | - line-height: 40rpx; | |
| 92 | - border-radius: 25rpx; | |
| 93 | - background-color: red; | |
| 94 | -} | |
| 95 | - | |
| 96 | -.appointment { | |
| 97 | - width: 115rpx; | |
| 98 | - height: 40rpx; | |
| 99 | - line-height: 40rpx; | |
| 100 | - border-radius: 25rpx; | |
| 101 | - background-color: #ff9c00; | |
| 102 | - margin-left: 20rpx; | |
| 103 | -} | |
| 104 | - | |
| 105 | -.Date { | |
| 106 | - margin-left: 10rpx; | |
| 107 | -} | |
| 108 | -/* 无服务项目 */ | |
| 109 | -.cover{ | |
| 110 | - position: fixed; | |
| 111 | - z-index: 1; | |
| 112 | - left: 0rpx; | |
| 113 | - top: 390rpx; | |
| 114 | - width: 100%; | |
| 115 | - height: 200rpx; | |
| 116 | - background-color: rgb(255, 255, 255); | |
| 117 | -} | |
| 118 | -/* 无历史服务 */ | |
| 119 | -.empty_order{ | |
| 120 | - position: fixed; | |
| 121 | - left: 0rpx; | |
| 122 | - top: 500rpx; | |
| 123 | - z-index: 2; | |
| 124 | - width: 100%; | |
| 125 | -} | |
| 126 | - | |
| 127 | -.empty_order image { | |
| 128 | - width: 329rpx; | |
| 129 | - height: 229rpx; | |
| 130 | - margin-top: 80rpx; | |
| 131 | -} | |
| 132 | - | |
| 133 | -.empty_order .xc-ash { | |
| 134 | - margin-top: 10rpx; | |
| 135 | - font-weight: 600px; | |
| 136 | -} | |
| 137 | - | |
| 138 | -.empty_order navigator { | |
| 139 | - margin-top: 60rpx; | |
| 140 | - border-radius: 40rpx; | |
| 141 | -} | |
| 142 | - | |
| 143 | -.empty_order navigator view { | |
| 144 | - width: 247rpx; | |
| 145 | - height: 56rpx; | |
| 146 | - background-color: rgb(255, 72, 72); | |
| 147 | - border-radius: 40rpx; | |
| 148 | -} | |
| 149 | 0 | \ No newline at end of file |