-
Status changed to merged
-
mentioned in commit f867e20864726095b82897f61829d6e915abd8e9
Showing
20 changed files
app.json
... | ... | @@ -210,7 +210,10 @@ |
210 | 210 | "pages/togoin/togoin", |
211 | 211 | "pages/user/Detailed/Detailed", |
212 | 212 | "pages/user/user_fw/user_fw", |
213 | - "pages/user/cardinfo/cardinfo" | |
213 | + "pages/user/cardinfo/cardinfo", | |
214 | + "pages/user/nick_avatar/nick_avatar", | |
215 | + "pages/user/slimming/slimming", | |
216 | + "pages/user/punchInhistory/punchInhistory" | |
214 | 217 | ] |
215 | 218 | } |
216 | 219 | ... | ... |
packageC/pages/presell/cart/cart.js
... | ... | @@ -803,10 +803,9 @@ Page({ |
803 | 803 | } else { |
804 | 804 | o_condition = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); |
805 | 805 | if (o_condition < 0) o_condition = 0; |
806 | - | |
807 | - if (o_condition1 < 0) o_condition1 = 0; | |
808 | - else if(o_condition1>th.data.goods.use_commission && th.data.bn_use_commission){ | |
809 | - o_condition1-=th.data.bn_use_commission; | |
806 | + //if (o_condition1 < 0) o_condition1 = 0; | |
807 | + else if(o_condition>th.data.goods.use_commission && th.data.bn_use_commission){ | |
808 | + o_condition-=th.data.bn_use_commission; | |
810 | 809 | } |
811 | 810 | |
812 | 811 | th.setData({ exp_price: 0, order_m: o_condition, show_submit: 1, }) |
... | ... | @@ -2225,7 +2224,7 @@ Page({ |
2225 | 2224 | var e_str = ut.formatTime(end_time); |
2226 | 2225 | var new_date = new Date(); //新建一个日期对象,默认现在的时间 |
2227 | 2226 | var old_date = new Date(e_str.replace(/-/g, '/')); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期 |
2228 | - var difftime = (new_date - old_date) / 1000; //计算时间差,并把毫秒转换成秒 | |
2227 | + var difftime =Math.abs((new_date - old_date) / 1000); //计算时间差,并把毫秒转换成秒 | |
2229 | 2228 | var days = parseInt(difftime / 86400); // 天 24*60*60*1000 |
2230 | 2229 | var hours = parseInt(difftime / 3600) - 24 * days; // 小时 60*60 总小时数-过去的小时数=现在的小时数 |
2231 | 2230 | var minutes = parseInt(difftime % 3600 / 60); // 分钟 -(day*24) 以60秒为一整份 取余 剩下秒数 秒数/60 就是分钟数 |
... | ... | @@ -2244,7 +2243,7 @@ Page({ |
2244 | 2243 | var e_str = ut.formatTime(end_time); |
2245 | 2244 | var new_date = new Date(); //新建一个日期对象,默认现在的时间 |
2246 | 2245 | var old_date = new Date(e_str.replace(/-/g, '/')); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期 |
2247 | - var difftime = (new_date - old_date) / 1000; //计算时间差,并把毫秒转换成秒 | |
2246 | + var difftime =Math.abs((new_date - old_date) / 1000); //计算时间差,并把毫秒转换成秒 | |
2248 | 2247 | var days = parseInt(difftime / 86400); // 天 24*60*60*1000 |
2249 | 2248 | var hours = parseInt(difftime / 3600) - 24 * days; // 小时 60*60 总小时数-过去的小时数=现在的小时数 |
2250 | 2249 | var minutes = parseInt(difftime % 3600 / 60); // 分钟 -(day*24) 以60秒为一整份 取余 剩下秒数 秒数/60 就是分钟数 | ... | ... |
packageE/pages/user/nick_avatar/nick_avatar.js
0 → 100644
1 | +// pages/user/userfw/userfw.js | |
2 | +var e = getApp(), os = e.globalData.setting; | |
3 | +var utils = require('../../../../utils/util.js'); | |
4 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
5 | + | |
6 | + | |
7 | +Page({ | |
8 | + /** | |
9 | + * 页面的初始数据 | |
10 | + */ | |
11 | + data: { | |
12 | + defaultAvatar: os.imghost + "/miniapp/images/no-head.jpg", | |
13 | + ob: {}, | |
14 | + load: 0 | |
15 | + }, | |
16 | + | |
17 | + /** | |
18 | + * 生命周期函数--监听页面加载 | |
19 | + */ | |
20 | + onLoad: function (options) { | |
21 | + if(getApp().globalData.up_nick_avatar){ | |
22 | + this.setData({ | |
23 | + ob: JSON.parse(JSON.stringify(getApp().globalData.up_nick_avatar)) | |
24 | + }) | |
25 | + getApp().globalData.up_nick_avatar=null; | |
26 | + } | |
27 | + | |
28 | + }, | |
29 | + /** | |
30 | + * 生命周期函数--监听页面显示 | |
31 | + */ | |
32 | + onShow: async function () { | |
33 | + | |
34 | + }, | |
35 | + | |
36 | + | |
37 | + onChooseAvatar: function (e) { | |
38 | + console.log(e, 1111); | |
39 | + var th = this; | |
40 | + getApp().request.uploadFile(os.url + "/api/weshop/comment/uploadCommentImg", { | |
41 | + filePath: e.detail.avatarUrl, | |
42 | + name: "file", | |
43 | + success: function (t) { | |
44 | + var u = t.data.data; | |
45 | + th.setData({'ob.head_pic': u}) | |
46 | + } | |
47 | + }); | |
48 | + | |
49 | + }, | |
50 | + | |
51 | + get_val: function (e) { | |
52 | + console.log(e, 2222); | |
53 | + this.setData({'ob.nickname': e.detail.value}) | |
54 | + }, | |
55 | + | |
56 | + save_data() { | |
57 | + | |
58 | + if (!this.data.ob.head_pic) { | |
59 | + wx.showToast({ | |
60 | + title: '请选择头像', | |
61 | + icon: 'none', | |
62 | + duration: 2000 | |
63 | + }); | |
64 | + return false; | |
65 | + } | |
66 | + | |
67 | + if (!this.data.ob.nickname) { | |
68 | + wx.showToast({ | |
69 | + title: '请输入昵称', | |
70 | + icon: 'none', | |
71 | + duration: 2000 | |
72 | + }); | |
73 | + return false; | |
74 | + } | |
75 | + | |
76 | + if (this.data.load) return false; | |
77 | + this.setData({load: 1}) | |
78 | + | |
79 | + | |
80 | + wx.showLoading(); | |
81 | + getApp().request.put("/api/weshop/users/update", { | |
82 | + data: { | |
83 | + storeId: os.stoid, | |
84 | + user_id: getApp().globalData.user_id, | |
85 | + nickname: this.data.ob.nickname, | |
86 | + head_pic: this.data.ob.head_pic | |
87 | + | |
88 | + }, | |
89 | + success: function (su) { | |
90 | + wx.hideLoading(); | |
91 | + if (su.data.code == 0) { | |
92 | + wx.navigateBack({delta: 1}) | |
93 | + }else{ | |
94 | + this.setData({load: 0}) | |
95 | + wx.showToast({ | |
96 | + title: su.data.msg, | |
97 | + icon: 'none', | |
98 | + duration: 2000 | |
99 | + }); | |
100 | + } | |
101 | + } | |
102 | + }); | |
103 | + } | |
104 | + | |
105 | + | |
106 | +}) | |
0 | 107 | \ No newline at end of file | ... | ... |
packageE/pages/user/nick_avatar/nick_avatar.json
0 → 100644
packageE/pages/user/nick_avatar/nick_avatar.wxml
0 → 100644
1 | +<view class='page_set'> | |
2 | + <view class="item flex jc_sb ai_c"> | |
3 | + <view>头像</view> | |
4 | + <button open-type='chooseAvatar' bind:chooseavatar="onChooseAvatar" class="avatar_btn"> | |
5 | + <image class="head_img" src="{{ob.head_pic || defaultAvatar}} "></image> | |
6 | + </button> | |
7 | + </view> | |
8 | + | |
9 | + <view class="item flex jc_sb ai_c"> | |
10 | + <view>昵称</view> | |
11 | + <view> | |
12 | + <input class="nick_inp" type="nickname" placeholder="用户昵称" value="{{ob.nickname || ''}}" bindinput="get_val" ></input> | |
13 | + </view> | |
14 | + </view> | |
15 | + | |
16 | + | |
17 | + | |
18 | + <!-- 确认修改按钮 --> | |
19 | + <view class="flex-center confirm"> | |
20 | + <view class="flex-center fs30 confirmtext {{load?'load':''}}" bindtap="save_data"> | |
21 | + <view>确认修改</view> | |
22 | + </view> | |
23 | + </view> | |
24 | + | |
25 | +</view> | |
0 | 26 | \ No newline at end of file | ... | ... |
packageE/pages/user/nick_avatar/nick_avatar.wxss
0 → 100644
1 | +.avatar_btn{ width: 60rpx !important; height: 60rpx !important; border-radius:50%; border: none !important; | |
2 | + margin-left:0 !important;margin-right: 0 !important; } | |
3 | +.head_img{ width: 60rpx; height: 60rpx; border-radius: 50%} | |
4 | + | |
5 | +.page_set{ border-top: 20rpx solid #eee; } | |
6 | +.item{ height: 80rpx; border-bottom: 1rpx solid #eee;padding:0 20rpx} | |
7 | +.nick_inp{ text-align: right; color: #999} | |
8 | + | |
9 | + | |
10 | +.confirm { | |
11 | + width: 100%; | |
12 | + left: 0rpx; | |
13 | + bottom: 0rpx; | |
14 | + height: 130rpx; | |
15 | + background-color: rgb(255, 255, 255); | |
16 | + z-index: 9; | |
17 | + | |
18 | +} | |
19 | + | |
20 | +.confirmtext { | |
21 | + width: 495rpx; | |
22 | + height: 65rpx; | |
23 | + color: rgb(255, 255, 255); | |
24 | + background-color: rgb(214, 1, 33); | |
25 | + border-radius: 35rpx; | |
26 | +} | |
27 | + | |
28 | +.load{ | |
29 | + background-color:#ea3993 !important; | |
30 | +} | |
0 | 31 | \ No newline at end of file | ... | ... |
packageE/pages/user/punchInhistory/punchInhistory.js
0 → 100644
1 | +var e = getApp(), os = e.globalData.setting; | |
2 | +var utils = require('../../../../utils/util.js'); | |
3 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
4 | +const request = getApp().request; | |
5 | +let app = getApp(); | |
6 | + | |
7 | + | |
8 | +Page({ | |
9 | + | |
10 | + filters: { | |
11 | + toFix(val) { | |
12 | + if (val === undefined) return 0; | |
13 | + if (val === null) return 0; | |
14 | + if (isNaN(val)) return 0; | |
15 | + if (val === '') return 0; | |
16 | + return parseFloat(val).toFixed(2); | |
17 | + }, | |
18 | + //获取样式 | |
19 | + set_def: function (val, def, is_price) { | |
20 | + if (val == undefined) { | |
21 | + if (def) return def; | |
22 | + return "-" | |
23 | + } | |
24 | + if (is_price) { | |
25 | + return parseFloat(val + "").toFixed(2); | |
26 | + } | |
27 | + return val; | |
28 | + }, | |
29 | + }, | |
30 | + | |
31 | + | |
32 | + data:{ | |
33 | + imghost: app.globalData.setting.imghost, | |
34 | + keyword: '', | |
35 | + list: [], | |
36 | + list2:[], | |
37 | + diffweight:'', | |
38 | + standardweight:'', | |
39 | + howday:'', | |
40 | + }, | |
41 | + | |
42 | + onLoad(options) { | |
43 | + var that = this; | |
44 | + if (options.customerid != undefined && options.customerid != "" && options.customerid != null) { | |
45 | + | |
46 | + that.setData({ | |
47 | + customerid:options.customerid, | |
48 | + diffweight:options.diffweight, | |
49 | + standardweight:options.standardweight, | |
50 | + howday:options.howday | |
51 | + }) | |
52 | + } | |
53 | + | |
54 | + | |
55 | + var userInfo = getApp().globalData.userInfo; | |
56 | + if (userInfo) { | |
57 | + that.userInfo = userInfo; | |
58 | + that.loding = 1; | |
59 | + that.init_data(); | |
60 | + } | |
61 | + | |
62 | + | |
63 | + wx.getSystemInfo({ | |
64 | + success: function (res) { | |
65 | + var clientWidth = res.windowWidth; | |
66 | + var clientHeight = res.windowHeight; | |
67 | + var rpxR = 750 / clientWidth; | |
68 | + var calc = clientHeight * rpxR; | |
69 | + that.setData({ | |
70 | + calc:calc | |
71 | + }) | |
72 | + } | |
73 | + }) | |
74 | + | |
75 | + }, | |
76 | + | |
77 | + onShow: function () { | |
78 | + if (getApp().globalData.userInfo && !this.userInfo) { | |
79 | + this.setData({ | |
80 | + userInfo:userInfo | |
81 | + }) | |
82 | + | |
83 | + this.loding = 1; | |
84 | + this.init_data(); | |
85 | + } | |
86 | + }, | |
87 | + | |
88 | + | |
89 | + //初始化数据 | |
90 | + init_data() { | |
91 | + var that = this; | |
92 | + let userInfo = getApp().globalData.userInfo; | |
93 | + | |
94 | + let req = { | |
95 | + customerid: that.data.customerid, | |
96 | + store_id: userInfo.store_id, //用户id | |
97 | + //staffid: getApp().globalData.RoleData.StaffId, //商户编号 | |
98 | + ApiName: 'api.slimming.clock.registration.sum.query', | |
99 | + }; | |
100 | + | |
101 | + that.get_list(req); | |
102 | + }, | |
103 | + | |
104 | + | |
105 | + //获取门店报表 | |
106 | + get_list(req) { | |
107 | + var that = this; | |
108 | + if (that.loading) { | |
109 | + return false; | |
110 | + } | |
111 | + that.loading = 1; | |
112 | + | |
113 | + if (req) { | |
114 | + | |
115 | + that.setData({ | |
116 | + noMore:false, | |
117 | + list:[], | |
118 | + list2:[] | |
119 | + }) | |
120 | + } else { | |
121 | + if (that.noMore) { | |
122 | + that.loading = 0; | |
123 | + return false; | |
124 | + } | |
125 | + req = that.req; //如果不是全选的参数,就是page分页+1 | |
126 | + req.page++; | |
127 | + } | |
128 | + | |
129 | + //请求参数进行存储 | |
130 | + that.req = req; | |
131 | + | |
132 | + wx.showLoading({ | |
133 | + title: '加载中' | |
134 | + }); | |
135 | + | |
136 | + var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid; | |
137 | + | |
138 | + getApp().request.promiseGet(url, { | |
139 | + data: req | |
140 | + }) | |
141 | + .then((res) => { | |
142 | + wx.hideLoading(); | |
143 | + that.loading = 0; | |
144 | + | |
145 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { | |
146 | + | |
147 | + var list=that.data.list; | |
148 | + | |
149 | + for (let i = 0; i < res.data.data.pageData.length; i++) { | |
150 | + list.push(res.data.data.pageData[i]); | |
151 | + } | |
152 | + | |
153 | + that.setData({ | |
154 | + list:list | |
155 | + }) | |
156 | + | |
157 | + } else { | |
158 | + getApp().confirmBox(res.data.msg) | |
159 | + } | |
160 | + }); | |
161 | + }, | |
162 | + | |
163 | + | |
164 | +}) | |
165 | + | |
166 | + | ... | ... |
packageE/pages/user/punchInhistory/punchInhistory.json
0 → 100644
packageE/pages/user/punchInhistory/punchInhistory.wxml
0 → 100644
1 | +<view> | |
2 | + | |
3 | + <view class="total_count"> | |
4 | + <view class="fs35" style="text-align: center;width: 100%;height: 80rpx;line-height: 80rpx;"> | |
5 | + 总览 | |
6 | + </view> | |
7 | + <view class="total_box"> | |
8 | + <view class="total_number"> | |
9 | + <view class="detail_number ellipsis-2 fs40">{{diffweight||"-"}}</view> | |
10 | + <view class="coo fs24">累计减重(斤)</view> | |
11 | + </view> | |
12 | + <view class="line2"> </view> | |
13 | + <view class="total_number"> | |
14 | + <view class="detail_number ellipsis-2 fs40">{{howday||"-"}}</view> | |
15 | + <view class="coo fs24">到店次数</view> | |
16 | + </view> | |
17 | + <view class="line2"> </view> | |
18 | + <view class="total_number"> | |
19 | + <view class="detail_number ellipsis-2 fs40">{{standardweight||"-"}}</view> | |
20 | + <view class="coo fs24">目标体重(斤)</view> | |
21 | + </view> | |
22 | + </view> | |
23 | + </view> | |
24 | + | |
25 | + | |
26 | + <!-- 门店报表 --> | |
27 | + <scroll-view scroll-y="true" bindscrolltolower="get_list()" style="height:{{calc - 300}}rpx" > | |
28 | + | |
29 | + <view style="padding:3%"> | |
30 | + <view class="card" wx:for="{{list}}"> | |
31 | + <view class="card_title" >{{item.fyearmonth}} 减重 <text style="color: rgba(254, 58, 98, 1);margin: 0 10rpx;">{{item.diffweight}}</text> 斤 到店 <text style="color: rgba(254, 58, 98, 1);margin: 0 10rpx;"> {{ item.weightqty }} </text> 次 | |
32 | + </view> | |
33 | + | |
34 | + <view class="card_box"> | |
35 | + <view class="flex " wx:for="{{item.items}}" wx:for-item="item2" style="height: 90rpx;"> | |
36 | + <view class="tiny_box1" style="margin: 5rpx 10rpx"> | |
37 | + <image src="{{imghost+ '/newmdimg/mdd_img/upcard_jz.png'}}" style="width: 61rpx;height: 61rpx;" mode=""></image> | |
38 | + </view> | |
39 | + <view class="tiny_box2" style="margin: 5rpx 10rpx"> | |
40 | + <view class="fs22 coo ellipsis-2">{{item2.billdate}}</view> | |
41 | + <view class="coo" style="display: flex;width: 100%;margin-top: 5rpx;"> | |
42 | + <view class="coo fs22 " style="display: flex;width: 45%;text-align: left;"> | |
43 | + <text>{{item2.weight}}斤</text> | |
44 | + </view> | |
45 | + <view class="coo fs22" style="display: flex;width: 55%;text-align: right;margin-left: 36rpx;"> | |
46 | + <text>减重 <text style="color: rgba(254, 58, 98, 1);margin: 0 5rpx;">{{item2.diffweight}}</text>斤</text> | |
47 | + </view> | |
48 | + | |
49 | + </view> | |
50 | + </view> | |
51 | + | |
52 | + <view class="tiny_box3" style="margin: 5rpx 10rpx;height: 90rpx;"> | |
53 | + <view class="coo ellipsis-22" style="line-height: 35rpx;">{{item2.remark}}</view> | |
54 | + </view> | |
55 | + | |
56 | + </view> | |
57 | + | |
58 | + </view> | |
59 | + </view> | |
60 | + </view> | |
61 | + | |
62 | +<!-- <van-empty description="暂无数据" wx:if="list.length==0" />--> | |
63 | +<!-- <van-divider contentPosition="center" fontSize="12" custom-style="padding: 0 60rpx;"--> | |
64 | +<!-- wx:if="noMore && list.length > 10">已经到底啦--> | |
65 | +<!-- </van-divider>--> | |
66 | + | |
67 | + | |
68 | + | |
69 | + <nodata class="t-c" wx:if="{{list.length == 0 && is_get}}"></nodata> | |
70 | + <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.length !== 0}}">- 已经到底了 -</view> | |
71 | + | |
72 | + | |
73 | + | |
74 | + </scroll-view> | |
75 | + | |
76 | + | |
77 | + </view> | ... | ... |
packageE/pages/user/punchInhistory/punchInhistory.wxss
0 → 100644
1 | +page{ | |
2 | + background-color: #f2f2f2; | |
3 | +} | |
4 | + | |
5 | +.tab_sec_list { | |
6 | + background-color: #fff; | |
7 | + border-bottom: 1rpx solid #eee; | |
8 | + border-top: 1rpx solid #eee; | |
9 | + | |
10 | +} | |
11 | + | |
12 | +.tab_th { | |
13 | + background-color: #fff; | |
14 | + flex-shrink: 0; | |
15 | + height: 68rpx; | |
16 | + line-height: 68rpx; | |
17 | + width: 187rpx; | |
18 | + text-align: center; | |
19 | + position: relative; | |
20 | + font-size: 24rpx; | |
21 | + color: #A6A6A6FF; | |
22 | +} | |
23 | + | |
24 | +.coo { | |
25 | + color: rgba(56, 56, 56, 1); | |
26 | +} | |
27 | + | |
28 | +.h_line { | |
29 | + position: absolute; | |
30 | + left: 50%; | |
31 | + margin-left: -30rpx; | |
32 | + width: 44rpx; | |
33 | + height: 7rpx; | |
34 | + overflow: hidden; | |
35 | + background-color: rgba(254, 58, 98, 1); | |
36 | + display: none; | |
37 | + border-radius: 17rpx !important; | |
38 | + bottom: -4rpx; | |
39 | +} | |
40 | + | |
41 | +.tab_thactive { | |
42 | + background-color: #fff; | |
43 | + flex-shrink: 0; | |
44 | + height: 63rpx; | |
45 | + line-height: 63rpx; | |
46 | + width: 187rpx; | |
47 | + text-align: center; | |
48 | + /* border-bottom: 1rpx solid #eee; | |
49 | + border-top: 1rpx solid #eee; */ | |
50 | + position: relative; | |
51 | + font-weight: bolder; | |
52 | + color: rgba(254, 58, 98, 1); | |
53 | + font-size: 35rpx; | |
54 | +} | |
55 | + | |
56 | +.tab_thactive .h_line { | |
57 | + display: block !important; | |
58 | + border-radius: 8rpx !important; | |
59 | +} | |
60 | + | |
61 | +.container { | |
62 | + margin-top: 73rpx; | |
63 | +} | |
64 | + | |
65 | +/* 图表 */ | |
66 | +.chart_card { | |
67 | + position: relative; | |
68 | + display: flex; | |
69 | + background: rgba(255, 255, 255, 1); | |
70 | + border-radius: 17rpx; | |
71 | + margin: 20rpx 23rpx; | |
72 | +} | |
73 | + | |
74 | +.net4 { | |
75 | + height: 60rpx; | |
76 | + color: rgba(56, 56, 56, 1); | |
77 | + font-size: 35rpx; | |
78 | + text-align: center; | |
79 | + display: flex; | |
80 | + align-items: center; | |
81 | +} | |
82 | + | |
83 | +.charts-box { | |
84 | + /* width: 550rpx; */ | |
85 | + width: 100%; | |
86 | + height: 350rpx; | |
87 | + /* margin-left: 50rpx; */ | |
88 | +} | |
89 | + | |
90 | +.cont { | |
91 | + margin-top: 88rpx; | |
92 | + width: 100%; | |
93 | +} | |
94 | +.pl{ | |
95 | + max-width: 200rpx; | |
96 | + margin-right: 4rpx; | |
97 | + height: 40rpx; | |
98 | +} | |
99 | +/* 图表下面 */ | |
100 | +.box { | |
101 | + display: flex; | |
102 | + flex-wrap: wrap; | |
103 | + justify-content: space-between; | |
104 | + box-sizing: border-box; | |
105 | + padding: 21rpx 26rpx; | |
106 | + margin: 20rpx 23rpx; | |
107 | + width: 705rpx; | |
108 | + height: 363rpx; | |
109 | + opacity: 1; | |
110 | + background: #FFFFFFFF; | |
111 | + border-radius: 17rpx; | |
112 | +} | |
113 | + | |
114 | +.box_item1 { | |
115 | + display: flex; | |
116 | + flex-direction: column; | |
117 | + width: 320rpx; | |
118 | + height: 147rpx; | |
119 | + background: #F9FAFE; | |
120 | + color: #333446; | |
121 | + text-align: center; | |
122 | + border-radius: 17rpx; | |
123 | + | |
124 | +} | |
125 | + | |
126 | +.box_item2 { | |
127 | + display: flex; | |
128 | + flex-direction: column; | |
129 | + width: 320rpx; | |
130 | + height: 147rpx; | |
131 | + background: #FFE3E9; | |
132 | + color: #FE3A62; | |
133 | + text-align: center; | |
134 | + border-radius: 17rpx; | |
135 | +} | |
136 | + | |
137 | +/* 门店报表 */ | |
138 | +.n_top { | |
139 | + display: flex; | |
140 | + flex-direction: column; | |
141 | + /* height: 224rpx; */ | |
142 | + /* background: #FFFFFFFF; */ | |
143 | + /* padding-bottom: 20rpx; */ | |
144 | + border-radius: 0 0 17rpx 17rpx; | |
145 | +} | |
146 | + | |
147 | +/* 搜索框 */ | |
148 | +.search-box { | |
149 | + display: flex; | |
150 | + align-items: center; | |
151 | + justify-content: center; | |
152 | + background: #FFFFFFFF; | |
153 | + padding-top: 20rpx; | |
154 | + padding-bottom: 20rpx; | |
155 | +} | |
156 | + | |
157 | +.btn_sear { | |
158 | + display: flex; | |
159 | + justify-content: center; | |
160 | + align-items: center; | |
161 | + color: #fff; | |
162 | + width: 107rpx; | |
163 | + height: 68rpx; | |
164 | + border-radius: 17rpx; | |
165 | + margin: 0 14rpx 0 18rpx; | |
166 | + background: linear-gradient(270deg, rgba(255, 24, 126, 1) 0%, rgba(255, 89, 64, 1) 100%); | |
167 | + letter-spacing: 4rpx; | |
168 | + text-indent: 4rpx; | |
169 | +} | |
170 | + | |
171 | +.inp_view { | |
172 | + background-color: rgb(249, 250, 254); | |
173 | + height: 82rpx; | |
174 | + width: 228rpx; | |
175 | + border-radius: 10rpx; | |
176 | + color: rgba(128, 128, 128, 1); | |
177 | +} | |
178 | + | |
179 | +.line { | |
180 | + height: 4rpx; | |
181 | + background: #C4C4C4; | |
182 | + margin: 0 15rpx; | |
183 | + width: 35rpx; | |
184 | +} | |
185 | + | |
186 | +.sign_tb { | |
187 | + width: 35rpx; | |
188 | + height: 35rpx; | |
189 | + margin-right: 10rpx; | |
190 | +} | |
191 | + | |
192 | +/* 搜索框下面 */ | |
193 | +.total_count { | |
194 | + width: 94%; | |
195 | + height: 180rpx; | |
196 | + margin: 3% 3% 0 3%; | |
197 | + background: white; | |
198 | + padding-bottom: 20rpx; | |
199 | + border-radius:17rpx; | |
200 | +} | |
201 | + | |
202 | +.total_box { | |
203 | + display: flex; | |
204 | + justify-content: space-between; | |
205 | + /* padding: 0 102rpx; */ | |
206 | + padding: 0 30rpx; | |
207 | +} | |
208 | + | |
209 | +.total_number { | |
210 | + width: 200rpx; | |
211 | + text-align: center; | |
212 | + display: flex; | |
213 | + flex-direction: column; | |
214 | + align-items: center; | |
215 | + font-size: 24rpx; | |
216 | + color: rgba(56, 56, 56, 1); | |
217 | +} | |
218 | + | |
219 | +.detail_number { | |
220 | + color: rgba(254, 58, 98, 1); | |
221 | + margin-top: 10rpx; | |
222 | + width: 200rpx; | |
223 | +} | |
224 | + | |
225 | +.inp_view3 { | |
226 | + background-color: rgb(249, 250, 254); | |
227 | + height: 82rpx; | |
228 | + width: 228rpx; | |
229 | + border-radius: 17rpx; | |
230 | + color: #A6A6A6FF; | |
231 | +} | |
232 | +.inp_view4 { | |
233 | + background-color: rgb(249, 250, 254); | |
234 | + height: 82rpx; | |
235 | + width: 250rpx; | |
236 | + border-radius: 17rpx; | |
237 | + color: #A6A6A6FF; | |
238 | +} | |
239 | +/* 门店数据 */ | |
240 | +.card_title { | |
241 | + display: flex; | |
242 | + align-items: center; | |
243 | + font-size: 32rpx; | |
244 | + color: rgba(0, 0, 0, 1); | |
245 | + height: 37rpx; | |
246 | + padding: 10rpx 0; | |
247 | +} | |
248 | + | |
249 | +.card_box { | |
250 | + background: #FFFFFFFF; | |
251 | + /* width: 750rpx; */ | |
252 | + width: 100%; | |
253 | + box-sizing: border-box; | |
254 | + padding-top: 21rpx; | |
255 | + margin-top: 10rpx; | |
256 | + font-size: 24rpx; | |
257 | + border-radius: 17rpx; | |
258 | +} | |
259 | + | |
260 | +.tiny_box1 { | |
261 | + display: flex; | |
262 | + flex-direction: column; | |
263 | + align-items: center; | |
264 | + width: 10%; | |
265 | + margin-left: 10rpx; | |
266 | +} | |
267 | +.tiny_box2 { | |
268 | + display: flex; | |
269 | + flex-direction: column; | |
270 | + width: 40%; | |
271 | +} | |
272 | +.tiny_box3 { | |
273 | + display: flex; | |
274 | + flex-direction: column; | |
275 | + /* align-items: ; */ | |
276 | + width: 50%; | |
277 | +} | |
278 | +.ellipsis-22 { | |
279 | + display: -webkit-box; | |
280 | + overflow: hidden; | |
281 | + text-overflow: ellipsis; | |
282 | + display: -webkit-box; | |
283 | + -webkit-line-clamp: 2; | |
284 | + -webkit-box-orient: vertical; | |
285 | + white-space: normal; | |
286 | + word-break: break-all; | |
287 | + word-warp: break-word; | |
288 | +} | |
289 | + | |
290 | +.tiny_number { | |
291 | + color: rgba(254, 58, 98, 1); | |
292 | + margin-bottom: 10rpx; | |
293 | + height: 37rpx; | |
294 | + line-height: 37rpx; | |
295 | + width: 150rpx; | |
296 | + text-align: center; | |
297 | +} | |
298 | + | |
299 | +.line2 { | |
300 | + margin-top: 10rpx; | |
301 | + width: 2rpx; | |
302 | + height: 70rpx; | |
303 | + background: rgba(229, 229, 229, 1); | |
304 | +} | |
305 | + | |
306 | +/* 筛选弹窗 */ | |
307 | +.pp_title { | |
308 | + height: 93rpx; | |
309 | + line-height: 93rpx; | |
310 | + border-bottom: 1rpx solid #eee; | |
311 | + | |
312 | +} | |
313 | + | |
314 | +.close_btn { | |
315 | + width: 40rpx; | |
316 | + height: 40rpx; | |
317 | + float: right; | |
318 | + position: relative; | |
319 | + top: 20rpx; | |
320 | + margin-right: 20rpx; | |
321 | +} | |
322 | + | |
323 | +.saixuan_name { | |
324 | + height: 42rpx; | |
325 | + line-height: 42rpx; | |
326 | +} | |
327 | + | |
328 | +.inp_view { | |
329 | + width: 240rpx; | |
330 | + background-color: rgb(249, 250, 254); | |
331 | + height: 70rpx; | |
332 | + border-radius: 11rpx; | |
333 | + color: rgba(128, 128, 128, 1); | |
334 | + margin-right: 33rpx; | |
335 | + margin-left: 12rpx; | |
336 | +} | |
337 | + | |
338 | +.inp_view2 { | |
339 | + background-color: rgb(249, 250, 254); | |
340 | + height: 70rpx; | |
341 | + border-radius: 11rpx; | |
342 | + color: rgba(128, 128, 128, 1); | |
343 | +} | |
344 | + | |
345 | +.clear_inp { | |
346 | + position: absolute; | |
347 | + top: 22rpx; | |
348 | + right: 0; | |
349 | +} | |
350 | + | |
351 | +.btn_set { | |
352 | + margin: 20rpx auto; | |
353 | + width: 95%; | |
354 | + height: 93rpx; | |
355 | + border-radius: 20rpx; | |
356 | + color: #fff; | |
357 | + line-height: 93rpx; | |
358 | + background: linear-gradient(180deg, rgba(255, 24, 126, 1) 0%, rgba(255, 89, 64, 1) 100%); | |
359 | + letter-spacing: 4rpx; | |
360 | + text-indent: 4rpx; | |
361 | +} | |
362 | + | |
363 | +.line3 { | |
364 | + height: 1rpx; | |
365 | + background: rgba(128, 128, 128, 1); | |
366 | + width: 56rpx; | |
367 | + margin-right: 14rpx; | |
368 | +} | |
369 | + | |
370 | +/* 商品概况部分 */ | |
371 | +.search-box .inp { | |
372 | + background: #F9FAFE; | |
373 | + height: 82rpx; | |
374 | + border-radius: 16rpx; | |
375 | + width: 524rpx; | |
376 | + color: rgba(166, 166, 166, 1) !important; | |
377 | + position: relative; | |
378 | + margin-left: 4rpx; | |
379 | +} | ... | ... |
packageE/pages/user/slimming/g_filter.wxs
0 → 100644
1 | +//获取样式 | |
2 | +var toFixTwo = function(val) { | |
3 | + if (val === undefined) return "-"; | |
4 | + if (val === null) return "-"; | |
5 | + if (isNaN(val)) return "-"; | |
6 | + if (val === '') return "-"; | |
7 | + if (val === 0) return "-"; | |
8 | + return parseFloat(parseFloat(val).toFixed(2)) ; | |
9 | +} | |
10 | + | |
11 | +module.exports = { | |
12 | + toFixTwo: toFixTwo, | |
13 | + | |
14 | +} | ... | ... |
packageE/pages/user/slimming/slimming.js
0 → 100644
1 | +var e = getApp(), os = e.globalData.setting; | |
2 | +var utils = require('../../../../utils/util.js'); | |
3 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
4 | + | |
5 | +Page({ | |
6 | + /** | |
7 | + * 页面的初始数据 | |
8 | + */ | |
9 | + data: { | |
10 | + | |
11 | + userInfo:null, | |
12 | + iurl: os.imghost, | |
13 | + portrait_list: [], | |
14 | + loading: 0, | |
15 | + portrait_req: {}, | |
16 | + industry:'', | |
17 | + is_get:0 | |
18 | + }, | |
19 | + | |
20 | + /** | |
21 | + * 生命周期函数--监听页面加载 | |
22 | + */ | |
23 | + onLoad: function (options) { | |
24 | + var that=this; | |
25 | + | |
26 | + this.setData({ | |
27 | + userInfo: getApp().globalData.userInfo | |
28 | + }) | |
29 | + | |
30 | + | |
31 | + getApp().getConfig(function (e){ | |
32 | + that.init_data(); | |
33 | + }) | |
34 | + | |
35 | + | |
36 | + }, | |
37 | + /** | |
38 | + * 生命周期函数--监听页面显示 | |
39 | + */ | |
40 | + onShow: async function () { | |
41 | + | |
42 | + }, | |
43 | + | |
44 | + /** | |
45 | + * 页面上拉触底事件的处理函数 | |
46 | + */ | |
47 | + onReachBottom: function () { | |
48 | + | |
49 | + }, | |
50 | + | |
51 | + init_data() { | |
52 | + | |
53 | + let userInfo = getApp().globalData.userInfo; | |
54 | + var portrait_req = { | |
55 | + ApiName:'api.slimming.member.portrait', | |
56 | + store_id: userInfo.store_id, | |
57 | + //StaffId: that.idd, | |
58 | + vipid: userInfo.erpvipid, | |
59 | + }; | |
60 | + this.get_service_portrait(portrait_req); | |
61 | + }, | |
62 | + | |
63 | + | |
64 | + get_service_portrait(portrait_req) { | |
65 | + | |
66 | + //var str='{"code":0,"msg":"操作成功!","data":[{"id":"a1ff01bc-b755-4a5c-8675-06b33354d5ec","customerno":"18650904780","customername":"心如水","sex":"女","mobiletel":"18650904780","birthday":"2000-11-23","age":22,"signingdate":"2022-11-22","weightlosscourse":4,"shapecourse":3,"weight":62,"targetweight":30,"subtracted":26,"advisername":"泉州万达纪莉(工号:07)","beautyconsultant":"泉州万达纪莉(工号:07)","diffweight":24,"minweight":100,"ideaweight":92,"tostoreqty":3,"dayweight":102,"previousweight":100,"lastweight":102,"actualweight":22,"ringratioweight":2,"undeduced":10,"standardweight":98}]}'; | |
67 | + //var res=JSON.parse(str); | |
68 | + //this.setData({portrait_list: res.data}); | |
69 | + //return false; | |
70 | + var that = this; | |
71 | + if (that.loading) { | |
72 | + return false; | |
73 | + } | |
74 | + that.loading = 1; | |
75 | + | |
76 | + if (portrait_req) { | |
77 | + that.setData({ | |
78 | + noMore: false, | |
79 | + portrait_list: [], | |
80 | + is_get: 0, | |
81 | + noMore: false | |
82 | + }) | |
83 | + | |
84 | + } else { | |
85 | + if (that.noMore) { | |
86 | + that.loading = 0; | |
87 | + return false; | |
88 | + } | |
89 | + portrait_req = that.portrait_req; //如果不是全选的参数,就是page分页+1 | |
90 | + portrait_req.page++; | |
91 | + } | |
92 | + | |
93 | + //请求参数进行存储 | |
94 | + that.portrait_req = portrait_req; | |
95 | + wx.showLoading({ | |
96 | + title: '加载中' | |
97 | + }); | |
98 | + | |
99 | + console.log(getApp().globalData.config,1111); | |
100 | + | |
101 | + | |
102 | + var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid; | |
103 | + getApp().request.promiseGet(url, { | |
104 | + data: portrait_req | |
105 | + }) | |
106 | + .then((res) => { | |
107 | + wx.hideLoading(); | |
108 | + that.loading = 0; | |
109 | + | |
110 | + that.setData({is_get: 1}) | |
111 | + | |
112 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { | |
113 | + | |
114 | + var list=res.data.data.pageData; | |
115 | + | |
116 | + list[0].weight = list[0].weight * 2 | |
117 | + if (list[0].tostoreqty == 0) { | |
118 | + list[0].undeduced = list[0].undeduced + list[0].actualweight | |
119 | + list[0].actualweight = 0 | |
120 | + list[0].ringratioweight = 0 | |
121 | + | |
122 | + } else if (list[0].tostoreqty == 1) { | |
123 | + list[0].ringratioweight = 0 | |
124 | + } | |
125 | + | |
126 | + that.setData({portrait_list: list}) | |
127 | + | |
128 | + } else { | |
129 | + that.setData({ | |
130 | + noMore:true | |
131 | + }) | |
132 | + } | |
133 | + }); | |
134 | + }, | |
135 | + | |
136 | + goto:function (e){ | |
137 | + var url=e.currentTarget.dataset.url; | |
138 | + getApp().goto(url); | |
139 | + } | |
140 | + | |
141 | + | |
142 | +}) | |
0 | 143 | \ No newline at end of file | ... | ... |
packageE/pages/user/slimming/slimming.json
0 → 100644
packageE/pages/user/slimming/slimming.wxml
0 → 100644
1 | +<wxs module="g_filter" src="g_filter.wxs"></wxs> | |
2 | +<view class="pd20 fs30" wx:for="{{portrait_list}}"> | |
3 | + <!-- 上 --> | |
4 | + <view class="card pd20 flex jc_sb fw_box"> | |
5 | + <image class="fw_img" | |
6 | + src="{{userInfo.head_pic}}"/> | |
7 | + | |
8 | + | |
9 | + <view class="flex mgt10 img_right" > | |
10 | + <view class="flex jc_sb fs26 mgb20"> | |
11 | + <view class="c-red">{{item.customername || '-'}}</view> | |
12 | + <view class="c-red">{{item.mobiletel || '-'}}</view> | |
13 | + <view class="flex ai_c c-red">{{item.age || '-'}} | |
14 | + <view class="c-38">岁 | |
15 | + </view> | |
16 | + </view> | |
17 | + </view> | |
18 | + <view class="flex fs26 mgb20"> | |
19 | + <view class="flex ai_c c-38">减重疗程数: | |
20 | + <view class="c-red"> | |
21 | + {{item.weightlosscourse || '0'}} | |
22 | + </view> | |
23 | + </view> | |
24 | + <view style="margin-left: 30rpx;" class="flex ai_c c-38">塑形疗程数: | |
25 | + <view class="c-red">{{item.shapecourse || '0'}}</view> | |
26 | + </view> | |
27 | + | |
28 | + </view> | |
29 | + <view class="flex fs26 mgb20"> | |
30 | + <view class="flex ai_c c-38">购买日期: | |
31 | + <view class="c-red">{{item.signingdate || '-'}}</view> | |
32 | + </view> | |
33 | + </view> | |
34 | + </view> | |
35 | + </view> | |
36 | + <!-- 下 --> | |
37 | + <view class="card mgt20"> | |
38 | + <view> | |
39 | + <view class="flex pd20 jc_sb ai_c"> | |
40 | + <view class="fs32 c-38">日常打卡</view> | |
41 | + <view bindtap="goto" data-url="/packageE/pages/user/punchInhistory/punchInhistory?customerid={{item.id}}&diffweight={{item.diffweight}}&howday={{item.tostoreqty}}&standardweight={{item.ideaweight}}" | |
42 | + class="fs26 fw_see_more">查看全部 | |
43 | + </view> | |
44 | + </view> | |
45 | + | |
46 | + <view class="flex pd20 jc_sb ai_c fw_detail_box"> | |
47 | + <view class="flex mgr20"> | |
48 | + <view wx:if="{{item.dayweight>0 }}" class="ellipsis-2 fw_day_weight" | |
49 | + style="color: #FE3A62;font-size: 84rpx;width: 250rpx;text-align: right;margin-left: 40rpx;"> | |
50 | + {{ g_filter.toFixTwo(item.dayweight ) }} | |
51 | + </view> | |
52 | + <view wx:else class="ellipsis-2 fw_no_day_weight"> | |
53 | + _ _ | |
54 | + </view> | |
55 | + <view class="fs26 c-38 mgt40">斤</view> | |
56 | + <view class="fw_edit_img_box" | |
57 | + bindtap="goto" data-url="/packageE/pages/punchIn/punchIn?mobiletel={{item.mobiletel}}&iswhere=1&gradenames=true&isMy=1"> | |
58 | + <image :src="imghost+'mdd_img/modigoods.png'" class="fw_edit_img" mode=""></image> | |
59 | + </view> | |
60 | + </view> | |
61 | + <view style="color: #383838;" class="fs26">今日体重</view> | |
62 | + </view> | |
63 | +</view> | |
64 | + | |
65 | +<view class="flex jc_sa fw_tiny_box"> | |
66 | + <view class="flex txt-center fw_tiny_top"> | |
67 | + <view class="flex jc_c"> | |
68 | + <view class="ellipsis-2 flex fs52 c-red">{{g_filter.toFixTwo(item.ringratioweight)}} | |
69 | + <view class="fs26 mgt20 c-38">斤</view> | |
70 | + </view> | |
71 | + | |
72 | + </view> | |
73 | + <view class="fs26 mgt20 c-38">环比重量</view> | |
74 | + </view> | |
75 | + <view class="flex txt-center fw_tiny_top"> | |
76 | + <view class="flex jc_c"> | |
77 | + <view class="ellipsis-2 flex fs52 c-red">{{ g_filter.toFixTwo(item.actualweight)}} | |
78 | + <view class="fs26 mgt20 c-38">斤</view> | |
79 | + </view> | |
80 | + | |
81 | + | |
82 | + </view> | |
83 | + <view class="fs26 mgt20 c-38">实际减重</view> | |
84 | + </view> | |
85 | + <view class="flex txt-center fw_tiny_top"> | |
86 | + <view class="flex jc_c"> | |
87 | + <view class="ellipsis-2 flex fs52 c-red">{{g_filter.toFixTwo(item.diffweight)}} | |
88 | + <view class="fs26 mgt20 c-38">斤</view> | |
89 | + </view> | |
90 | + | |
91 | + </view> | |
92 | + <view class="fs26 mgt20 c-38">累计减重</view> | |
93 | + </view> | |
94 | +</view> | |
95 | + | |
96 | +<view class="flex jc_sa fw_tiny_box" > | |
97 | + <view class="flex txt-center fw_tiny_top"> | |
98 | + <view class="flex jc_c"> | |
99 | + <view class="ellipsis-2 flex fs52 c-red">{{item.tostoreqty || '0'}} | |
100 | + <view class="fs26 mgt20 c-38">次</view> | |
101 | + </view> | |
102 | + | |
103 | + </view> | |
104 | + <view class="fs26 mgt20 c-38">累计到店</view> | |
105 | + </view> | |
106 | + <view class="flex txt-center fw_tiny_top"> | |
107 | + <view class="flex jc_c"> | |
108 | + <view class="ellipsis-2 flex fs52 c-red">{{ g_filter.toFixTwo(item.undeduced)}} | |
109 | + <view class="fs26 mgt20 c-38">斤</view> | |
110 | + </view> | |
111 | + | |
112 | + </view> | |
113 | + <view class="fs26 mgt20 c-38">未减斤数</view> | |
114 | + </view> | |
115 | + <view class="flex txt-center fw_tiny_top"> | |
116 | + <view class="flex jc_c"> | |
117 | + <view class="ellipsis-2 flex fs52 c-red">{{g_filter.toFixTwo(item.minweight) }} | |
118 | + <view class="fs26 mgt20 c-38">斤</view> | |
119 | + </view> | |
120 | + </view> | |
121 | + <view class="fs26 mgt20 c-38">最低体重</view> | |
122 | + </view> | |
123 | +</view> | |
124 | + | |
125 | +<view class="flex jc_sa fw_3weight"> | |
126 | + <view class="fs26 flex ai_c c-38">初始体重<view class="fs26 c-red">{{ g_filter.toFixTwo(item.weight) }}</view>斤 | |
127 | + </view> | |
128 | + <view class="fs26 flex ai_c c-38">标准体重<view class="fs26 c-red">{{ g_filter.toFixTwo(item.standardweight)}}</view>斤 | |
129 | + </view> | |
130 | + <view class="fs26 flex ai_c c-38">应减斤数<view class="fs26 c-red">{{g_filter.toFixTwo(item.subtracted)}}</view>斤 | |
131 | + </view> | |
132 | +</view> | |
133 | +<view class="flex jc_sb fw_bottom_box"> | |
134 | + <view class="fs26 c-38 lh68">减重顾问</view> | |
135 | + <view class="fs26 c-38 lh68">{{item.advisername || '-'}}</view> | |
136 | +</view> | |
137 | +<view class="flex jc_sb fw_bottom_box"> | |
138 | + <view class="fs26 c-38 lh68">减重塑形师</view> | |
139 | + <view class="fs26 c-38 lh68">{{item.beautyconsultant || '-'}}</view> | |
140 | +</view> | |
141 | + | |
142 | + </view> | |
143 | + </view> | |
144 | + | |
145 | +<nodata class="t-c" wx:if="{{portrait_list.length == 0 && is_get}}"></nodata> | |
146 | +<view class="noMore" hidden="{{!noMore}}" wx:if="{{portrait_list.length !== 0}}">- 已经到底了 -</view> | |
147 | + | ... | ... |
packageE/pages/user/slimming/slimming.wxss
0 → 100644
1 | +page{ | |
2 | + background-color: #f2f2f2; line-height: normal; | |
3 | +} | |
4 | + | |
5 | +.pd20 { | |
6 | + padding: 20rpx; | |
7 | +} | |
8 | +.fs26 { | |
9 | + font-size: 26rpx; | |
10 | +} | |
11 | +.fs28 { | |
12 | + font-size: 28rpx; | |
13 | +} | |
14 | +.fs30 { | |
15 | + font-size: 30rpx; | |
16 | +} | |
17 | +.fs32 { | |
18 | + font-size: 32rpx; | |
19 | +} | |
20 | + | |
21 | +.mgt20 { | |
22 | + margin-top: 20rpx !important; | |
23 | +} | |
24 | + | |
25 | +.card { | |
26 | + background-color: white; | |
27 | + border-radius: 16rpx; | |
28 | + overflow: hidden; | |
29 | +} | |
30 | +.txt-center{ | |
31 | + text-align: center; | |
32 | +} | |
33 | +.fw_box { | |
34 | + height: 210rpx; | |
35 | + box-sizing: border-box; | |
36 | +} | |
37 | + | |
38 | +.fw_img { | |
39 | + margin-right: 26rpx; | |
40 | + width: 158rpx; | |
41 | + height: 158rpx; | |
42 | + border-radius: 50%; | |
43 | +} | |
44 | + | |
45 | +.img_right { | |
46 | + width: 70%; | |
47 | + flex-direction: column; | |
48 | +} | |
49 | + | |
50 | +.c-38 { | |
51 | + color: #383838; | |
52 | +} | |
53 | + | |
54 | +.mgl { | |
55 | + margin-left: 30rpx; | |
56 | +} | |
57 | + | |
58 | +.fw_see_more { | |
59 | + border: 1.75rpx solid #FE3A62; | |
60 | + border-radius: 88rpx; | |
61 | + width: 123rpx; | |
62 | + height: 48rpx; | |
63 | + color: #FE3A62; | |
64 | + line-height: 48rpx; | |
65 | + text-align: center; | |
66 | +} | |
67 | + | |
68 | +.fw_detail_box { | |
69 | + flex-direction: column; | |
70 | + border-bottom: 1rpx solid #F0F0F0; | |
71 | +} | |
72 | + | |
73 | +.fw_day_weight { | |
74 | + color: #FE3A62; | |
75 | + font-size: 84rpx; | |
76 | + width: 250rpx; | |
77 | + text-align: right; | |
78 | + margin-left: 40rpx; | |
79 | +} | |
80 | + | |
81 | +.fw_no_day_weight { | |
82 | + color: #FE3A62; | |
83 | + font-size: 84rpx; | |
84 | + width: 250rpx; | |
85 | + text-align: right; | |
86 | + margin-left: 40rpx; | |
87 | + margin-right: 50rpx; | |
88 | + margin-bottom: 20rpx; | |
89 | +} | |
90 | + | |
91 | +.mgt40 { | |
92 | + margin-top: 40rpx | |
93 | +} | |
94 | + | |
95 | +.fw_edit_img_box { | |
96 | + width: 30rpx; | |
97 | + height: 30rpx; | |
98 | + margin-top: 20rpx; | |
99 | + padding: 20rpx; | |
100 | +} | |
101 | + | |
102 | +.fw_edit_img { | |
103 | + width: 30rpx; | |
104 | + height: 30rpx; | |
105 | +} | |
106 | + | |
107 | +.fw_tiny_box { | |
108 | + height: 160rpx; | |
109 | + padding: 20rpx 0; | |
110 | + box-sizing: border-box; | |
111 | + border-bottom: 1rpx solid #F0F0F0; | |
112 | +} | |
113 | + | |
114 | +.fw_tiny_top { | |
115 | + flex-direction: column; | |
116 | + width: 33%; | |
117 | +} | |
118 | + | |
119 | +.fs52 { | |
120 | + font-size: 52rpx; | |
121 | +} | |
122 | + | |
123 | +.fw_3weight { | |
124 | + height: 68rpx; | |
125 | + border-bottom: 1rpx solid #F0F0F0; | |
126 | + padding: 20rpx 0; | |
127 | + box-sizing: border-box; | |
128 | +} | |
129 | + | |
130 | +.fw_bottom_box { | |
131 | + height: 68rpx; | |
132 | + border-bottom: 1rpx solid #F0F0F0; | |
133 | + padding: 20rpx 0; | |
134 | + box-sizing: border-box; | |
135 | + padding: 0 20rpx; | |
136 | +} | |
137 | + | |
138 | +.lh68 { | |
139 | + line-height: 68rpx; | |
140 | +} | |
141 | + | |
142 | +.jc_c{ | |
143 | + justify-content: center; | |
144 | +} | |
0 | 145 | \ No newline at end of file | ... | ... |
pages/giftpack/public/buy_com.wxml
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | </view> |
38 | 38 | <view> |
39 | 39 | <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> |
40 | - 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}} | |
40 | + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+'km':filter.toFix(item.distance,0)+"m"}} | |
41 | 41 | </view> |
42 | 42 | </view> |
43 | 43 | </view> |
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | </view> |
64 | 64 | <view> |
65 | 65 | <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> |
66 | - 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | |
66 | + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}} | |
67 | 67 | </view> |
68 | 68 | </view> |
69 | 69 | </view> |
... | ... | @@ -91,7 +91,7 @@ |
91 | 91 | </view> |
92 | 92 | <view> |
93 | 93 | <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> |
94 | - 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | |
94 | + 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}} | |
95 | 95 | </view> |
96 | 96 | </view> |
97 | 97 | </view> |
... | ... | @@ -138,7 +138,8 @@ |
138 | 138 | </block> |
139 | 139 | </view> |
140 | 140 | </block> |
141 | -<!-- --弹起来,选择规格数量,普通商品购买和秒杀---- --> | |
141 | + | |
142 | + <!-- --弹起来,选择规格数量,普通商品购买和秒杀---- --> | |
142 | 143 | <view hidden="{{!openSpecModal}}"> |
143 | 144 | <view bindtap="closeSpecModal" class="cover-layer"></view> |
144 | 145 | <view class="spec-model"> |
... | ... | @@ -178,7 +179,7 @@ |
178 | 179 | <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> |
179 | 180 | <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text> |
180 | 181 | <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> |
181 | - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
182 | + 距离:{{def_pick_store.distance>1000?filter.toFix(def_pick_store.distance/1000,2)+"km":filter.toFix(def_pick_store.distance,0)+"m"}} | |
182 | 183 | </view> |
183 | 184 | </view> |
184 | 185 | <!-- 没有门店的时候 --> | ... | ... |
pages/user/index/filter.wxs
pages/user/index/index.js
... | ... | @@ -42,13 +42,15 @@ Page({ |
42 | 42 | actId: "", //生日活动的id |
43 | 43 | actImg: "", |
44 | 44 | is_assistance: 0, //助力活动 |
45 | - ad_img: "", | |
46 | - usertop_ad: [],//会员顶部配置 | |
47 | - add_card_data: '', //等级卡的内容 | |
48 | - getusercode_vailtime:10,//会员二维码时效 | |
45 | + ad_img: "", | |
46 | + usertop_ad: [],//会员顶部配置 | |
47 | + add_card_data: '', //等级卡的内容 | |
48 | + getusercode_vailtime:10,//会员二维码时效 | |
49 | 49 | hiddenCS: true, |
50 | 50 | |
51 | - is_show_recommend:false | |
51 | + is_show_recommend:false, | |
52 | + | |
53 | + has_rj:0 | |
52 | 54 | |
53 | 55 | }, |
54 | 56 | goto_nav: function (e) { |
... | ... | @@ -176,6 +178,34 @@ Page({ |
176 | 178 | if (e != undefined && e != null && e.mobile) { |
177 | 179 | |
178 | 180 | |
181 | + if(this.data.has_rj==0){ | |
182 | + var portrait_req = { | |
183 | + ApiName:'api.slimming.member.portrait', | |
184 | + store_id: e.store_id, | |
185 | + //StaffId: that.idd, | |
186 | + vipid: e.erpvipid, | |
187 | + }; | |
188 | + | |
189 | + | |
190 | + var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid; | |
191 | + getApp().request.promiseGet(url, { | |
192 | + data: portrait_req | |
193 | + }) | |
194 | + .then((res) => { | |
195 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { | |
196 | + this.setData({has_rj:1}) | |
197 | + }else { | |
198 | + this.setData({has_rj:-1}) | |
199 | + } | |
200 | + | |
201 | + }) | |
202 | + | |
203 | + | |
204 | + | |
205 | + | |
206 | + } | |
207 | + | |
208 | + | |
179 | 209 | // 判断是否开启美业 |
180 | 210 | getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => { |
181 | 211 | if (res.data.code == 0) { | ... | ... |
pages/user/index/index.wxml
... | ... | @@ -252,6 +252,14 @@ |
252 | 252 | <view class="fs26">套盒商品</view> |
253 | 253 | </view> |
254 | 254 | </block> |
255 | + <block wx:elif="{{item.name=='瘦身日记'}} "> | |
256 | + <view wx:if="{{has_rj>0}}" class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav"> | |
257 | + <image class="xc-center-img" src="{{iurl+item.icoimg}}"></image> | |
258 | + <view class="fs26">{{item.name}}</view> | |
259 | + </view> | |
260 | + </block> | |
261 | + | |
262 | + | |
255 | 263 | <block wx:else> |
256 | 264 | <view class="item t-c" data-url="{{item.weappurl}}" bindtap="goto_nav"> |
257 | 265 | <image class="xc-center-img" src="{{iurl+item.icoimg}}"></image> | ... | ... |
pages/user/userinfo/userinfo.js
... | ... | @@ -658,37 +658,46 @@ Page({ |
658 | 658 | // 获取用户头像昵称 |
659 | 659 | getUserProfile(e) { |
660 | 660 | var th = this; |
661 | - new Promise((resolve, reject) => { | |
662 | - wx.getUserProfile({ | |
663 | - desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 | |
664 | - success: (res) => { | |
665 | - th.data.user.nickname = res.userInfo.nickName; | |
666 | - th.data.user.head_pic = res.userInfo.avatarUrl; | |
667 | - this.setData({ | |
668 | - userInfo: res.userInfo, | |
669 | - hasUserInfo: true, | |
670 | - user: th.data.user, | |
671 | - }); | |
672 | - resolve(res.userInfo); | |
673 | - }, | |
674 | 661 | |
675 | - }); | |
676 | - }).then((userInfo) => { | |
677 | - getApp().request.put("/api/weshop/users/update", { | |
678 | - data: { | |
679 | - storeId: r.stoid, | |
680 | - user_id: getApp().globalData.user_id, | |
681 | - nickname: userInfo.nickName, | |
682 | - head_pic: userInfo.avatarUrl | |
683 | - | |
684 | - }, | |
685 | - success: function(su) { | |
686 | - if (su.data.code == 0) { | |
687 | - console.log("update user info OK"); | |
688 | - } | |
689 | - } | |
690 | - }); | |
691 | - }); | |
662 | + var ob={ | |
663 | + nickname:this.data.user.nickname, | |
664 | + head_pic:this.data.user.head_pic, | |
665 | + } | |
666 | + getApp().globalData.up_nick_avatar=ob; | |
667 | + getApp().goto('/packageE/pages/user/nick_avatar/nick_avatar'); | |
668 | + | |
669 | + | |
670 | + // new Promise((resolve, reject) => { | |
671 | + // wx.getUserProfile({ | |
672 | + // desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 | |
673 | + // success: (res) => { | |
674 | + // th.data.user.nickname = res.userInfo.nickName; | |
675 | + // th.data.user.head_pic = res.userInfo.avatarUrl; | |
676 | + // this.setData({ | |
677 | + // userInfo: res.userInfo, | |
678 | + // hasUserInfo: true, | |
679 | + // user: th.data.user, | |
680 | + // }); | |
681 | + // resolve(res.userInfo); | |
682 | + // }, | |
683 | + // | |
684 | + // }); | |
685 | + // }).then((userInfo) => { | |
686 | + // getApp().request.put("/api/weshop/users/update", { | |
687 | + // data: { | |
688 | + // storeId: r.stoid, | |
689 | + // user_id: getApp().globalData.user_id, | |
690 | + // nickname: userInfo.nickName, | |
691 | + // head_pic: userInfo.avatarUrl | |
692 | + // | |
693 | + // }, | |
694 | + // success: function(su) { | |
695 | + // if (su.data.code == 0) { | |
696 | + // console.log("update user info OK"); | |
697 | + // } | |
698 | + // } | |
699 | + // }); | |
700 | + // }); | |
692 | 701 | |
693 | 702 | |
694 | 703 | }, | ... | ... |