正在显示
48 个修改的文件
包含
3948 行增加
和
383 行删除
1 | //app.js | 1 | //app.js |
2 | App({ | 2 | App({ |
3 | - onLaunch: function () { | ||
4 | - // 展示本地存储能力 | ||
5 | - var logs = wx.getStorageSync('logs') || [] | ||
6 | - logs.unshift(Date.now()) | ||
7 | - wx.setStorageSync('logs', logs) | ||
8 | - | ||
9 | - // 登录 | ||
10 | - wx.login({ | ||
11 | - success: res => { | ||
12 | - // 发送 res.code 到后台换取 openId, sessionKey, unionId | ||
13 | - } | ||
14 | - }) | ||
15 | - // 获取用户信息 | ||
16 | - wx.getSetting({ | ||
17 | - success: res => { | ||
18 | - if (res.authSetting['scope.userInfo']) { | ||
19 | - // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 | ||
20 | - wx.getUserInfo({ | ||
21 | - success: res => { | ||
22 | - // 可以将 res 发送给后台解码出 unionId | ||
23 | - this.globalData.userInfo = res.userInfo | ||
24 | - | ||
25 | - // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 | ||
26 | - // 所以此处加入 callback 以防止这种情况 | ||
27 | - if (this.userInfoReadyCallback) { | ||
28 | - this.userInfoReadyCallback(res) | ||
29 | - } | ||
30 | - } | ||
31 | - }) | 3 | + onLaunch: function () { |
4 | + //自动更新版本 | ||
5 | + const updateManager = wx.getUpdateManager() | ||
6 | + updateManager.onCheckForUpdate(function (res) { | ||
7 | + // 请求完新版本信息的回调 | ||
8 | + }) | ||
9 | + | ||
10 | + updateManager.onUpdateReady(function () { | ||
11 | + wx.showModal({ | ||
12 | + title: '更新提示', | ||
13 | + content: '新版本已经准备好,是否重启应用?', | ||
14 | + success: function (res) { | ||
15 | + if (res.confirm) { | ||
16 | + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 | ||
17 | + updateManager.applyUpdate() | ||
18 | + } | ||
19 | + } | ||
20 | + }) | ||
21 | + | ||
22 | + }) | ||
23 | + | ||
24 | + updateManager.onUpdateFailed(function () { | ||
25 | + // 新的版本下载失败 | ||
26 | + wx.showModal({ | ||
27 | + title: '更新提示', | ||
28 | + content: '新版本下载失败', | ||
29 | + showCancel: false | ||
30 | + }) | ||
31 | + }) | ||
32 | + }, | ||
33 | + changeToken() { | ||
34 | + let url = '/api/user/codeToToken', | ||
35 | + t = this; | ||
36 | + wx.login({ | ||
37 | + success: function (res) { | ||
38 | + t.post(url, { | ||
39 | + code: res.code | ||
40 | + }).then((r) => { | ||
41 | + wx.setStorageSync('token', r.userInfo.token) | ||
42 | + }) | ||
43 | + } | ||
44 | + }) | ||
45 | + }, | ||
46 | + | ||
47 | + upload(filetype, file) { | ||
48 | + var promise = new Promise((resolve, reject) => { | ||
49 | + wx.showNavigationBarLoading() | ||
50 | + wx.showLoading({ | ||
51 | + title: '上传中', | ||
52 | + }) | ||
53 | + let url = 'https://anleguo.w.brotop.cn/portal/common/upload'; | ||
54 | + let head = { | ||
55 | + 'XX-Token': wx.getStorageSync('token'), | ||
56 | + 'XX-Device-Type': '' | ||
57 | + } | ||
58 | + let typename = { | ||
59 | + filetype: filetype | ||
60 | + } | ||
61 | + wx.uploadFile({ | ||
62 | + url: url, //仅为示例,非真实的接口地址 | ||
63 | + filePath: file, | ||
64 | + name: 'file', | ||
65 | + header: {}, | ||
66 | + formData: typename, | ||
67 | + success: function (res) { | ||
68 | + console.log('上传文件后', res) | ||
69 | + let temdata = JSON.parse(res.data); | ||
70 | + let urlobj = { | ||
71 | + url: temdata.data.preview_url | ||
72 | + //url: temdata.data.filepath | ||
73 | + } | ||
74 | + resolve(urlobj); | ||
75 | + wx.hideNavigationBarLoading(); | ||
76 | + wx.hideLoading(); | ||
77 | + }, | ||
78 | + fail: function (res) { | ||
79 | + reject('网络出错'); | ||
80 | + wx.hideNavigationBarLoading() | ||
81 | + wx.hideLoading() | ||
82 | + }, | ||
83 | + complete: () => { | ||
84 | + wx.hideNavigationBarLoading() | ||
85 | + wx.hideLoading() | ||
86 | + }, | ||
87 | + }) | ||
88 | + }); | ||
89 | + return promise; | ||
90 | + }, | ||
91 | + | ||
92 | + post: function (url, data, headerParams, showLoad) { | ||
93 | + wx.showNavigationBarLoading() | ||
94 | + var promise = new Promise((resolve, reject) => { | ||
95 | + //init | ||
96 | + let that = this; | ||
97 | + let postData = data; | ||
98 | + let baseUrl = 'http://www.himrhi.com/api'; | ||
99 | + //网络请求 | ||
100 | + let header = { | ||
101 | + 'Content-Type': 'application/x-www-form-urlencoded', | ||
102 | + 'XX-Device-Type': 'wxapp', | ||
103 | + 'XX-Token': wx.getStorageSync("token") || "" | ||
104 | + | ||
105 | + } | ||
106 | + header = Object.assign(header, headerParams) | ||
107 | + //网络请求 | ||
108 | + | ||
109 | + wx.request({ | ||
110 | + url: baseUrl + url, | ||
111 | + data: postData, | ||
112 | + method: 'POST', | ||
113 | + header: header, | ||
114 | + | ||
115 | + success: function (res) { //返回取得的数据 | ||
116 | + if (res.statusCode == '200') { | ||
117 | + resolve(res.data); | ||
118 | + } else if (res.statusCode == '201') { | ||
119 | + resolve(res.data); | ||
120 | + } else { | ||
121 | + reject(res) | ||
122 | + // wx.showModal({ | ||
123 | + // title: '提示', | ||
124 | + // content: res.data.msg, | ||
125 | + // showCancel: false | ||
126 | + // }) | ||
127 | + } | ||
128 | + | ||
129 | + | ||
130 | + // setTimeout(function () { | ||
131 | + | ||
132 | + // wx.hideNavigationBarLoading() | ||
133 | + // }, 600) | ||
134 | + }, | ||
135 | + fail: function (e) { | ||
136 | + reject('网络出错'); | ||
137 | + // wx.hideLoading() | ||
138 | + wx.hideNavigationBarLoading() | ||
139 | + }, | ||
140 | + complete: function () { | ||
141 | + wx.hideNavigationBarLoading() | ||
142 | + // wx.hideLoading() | ||
143 | + }, | ||
144 | + }) | ||
145 | + }); | ||
146 | + return promise; | ||
147 | + }, | ||
148 | + | ||
149 | + timeFormate(timestamp, timeType) { | ||
150 | + if (timestamp) { | ||
151 | + var timeStamp = timestamp.length == 13 ? timestamp : timestamp * 1000 | ||
152 | + var date = new Date(timeStamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000 | ||
153 | + var Y = date.getFullYear() + '-'; | ||
154 | + var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; | ||
155 | + var D = date.getDate() + ' '; | ||
156 | + var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours())+":"; | ||
157 | + var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()); | ||
158 | + var s = date.getSeconds(); | ||
159 | + if (timeType == 'YYMMDD') { | ||
160 | + return Y + M + D; | ||
161 | + } else if (timeType == 'YYMMDDHHMM') { | ||
162 | + return Y + M + D + " " + h + m; | ||
163 | + } else { | ||
164 | + return h + m; | ||
165 | + } | ||
166 | + } | ||
167 | + }, | ||
168 | + | ||
169 | + globalData: { | ||
170 | + user_id: null, | ||
171 | + baseUrl: 'http://www.himrhi.com/api', | ||
172 | + imgUrl: 'http://qiniu.himrhi.com/', | ||
32 | } | 173 | } |
33 | - } | ||
34 | - }) | ||
35 | - }, | ||
36 | - globalData: { | ||
37 | - userInfo: null | ||
38 | - } | ||
39 | }) | 174 | }) |
1 | { | 1 | { |
2 | - "pages": [ | ||
3 | - "pages/index/index", | ||
4 | - "pages/my/orderDetail/orderDetail", | ||
5 | - "pages/my/big/big", | ||
6 | - "pages/my/activityInformation/activityInformation", | ||
7 | - "pages/my/serach/serach", | ||
8 | - "pages/my/selectAddress/selectAddress", | ||
9 | - "pages/my/editAddress2/editAddress2", | ||
10 | - "pages/my/editAddress/editAddress", | ||
11 | - "pages/index/production_steps/production_steps", | ||
12 | - "pages/my/myCollection/myCollection", | ||
13 | - "pages/index/goodsDetial2/goodsDetial2", | ||
14 | - "pages/index/goodsDetial/goodsDetial", | ||
15 | - "pages/my/modifyPersonInformation/modifyPersonInformation", | ||
16 | - "pages/my/modifyName/modifyName", | ||
17 | - "pages/my/invitationList/invitationList", | ||
18 | - "pages/my/invoiceInformation/invoiceInformation", | ||
19 | - "pages/my/invoice/invoice", | ||
20 | - "pages/my/commonProblems/commonProblems", | ||
21 | - "pages/my/myAddress/myAddress", | ||
22 | - | ||
23 | - "pages/my/invitationPolite/invitationPolite", | ||
24 | - "pages/my/comment/comment", | ||
25 | - "pages/my/coupons/coupons", | ||
26 | - "pages/my/balance _center2/balance _center2", | ||
27 | - "pages/my/charger_code/charger_code", | ||
28 | - "pages/my/balance _center/balance _center", | ||
29 | - "pages/my/my", | ||
30 | - "pages/cart/cart", | ||
31 | - "pages/index/selectAddress/selectAddress" | ||
32 | - ], | ||
33 | - "window": { | ||
34 | - "backgroundTextStyle": "dark", | ||
35 | - "navigationBarBackgroundColor": "#1a191f", | ||
36 | - "navigationBarTitleText": "HI,鲜生", | ||
37 | - "navigationBarTextStyle": "white" | ||
38 | - }, | ||
39 | - "permission": { | ||
40 | - "scope.userLocation": { | ||
41 | - "desc": "你的位置信息将用于小程序位置接口的效果展示" | ||
42 | - } | ||
43 | - }, | ||
44 | - "tabBar": { | ||
45 | - "selectedColor": "#222222", | ||
46 | - "list": [ | ||
47 | - { | ||
48 | - "selectedIconPath": "pages/imgs/nav02@2x.png", | ||
49 | - "iconPath": "pages/imgs/nav01@2x.png", | ||
50 | - "pagePath": "pages/index/index", | ||
51 | - "text": "首页" | ||
52 | - }, | ||
53 | - { | ||
54 | - "selectedIconPath": "pages/imgs/nav04@2x.png", | ||
55 | - "iconPath": "pages/imgs/nav03@2x.png", | ||
56 | - "pagePath": "pages/cart/cart", | ||
57 | - "text": "购物车" | ||
58 | - }, | ||
59 | - { | ||
60 | - "selectedIconPath": "pages/imgs/nav06@2x.png", | ||
61 | - "iconPath": "pages/imgs/nav05@2x.png", | ||
62 | - "pagePath": "pages/my/my", | ||
63 | - "text": "个人中心" | ||
64 | - } | ||
65 | - ] | ||
66 | - }, | ||
67 | - "networkTimeout": { | ||
68 | - "request": 1000, | ||
69 | - "connectSocket": 1000, | ||
70 | - "uploadFile": 1000, | ||
71 | - "downloadFile": 1000 | ||
72 | - }, | ||
73 | - "sitemapLocation": "sitemap.json" | 2 | + "pages": [ |
3 | + "pages/start/start", | ||
4 | + "pages/index/index", | ||
5 | + "pages/my/orderDetail/orderDetail", | ||
6 | + "pages/my/big/big", | ||
7 | + "pages/my/activityInformation/activityInformation", | ||
8 | + "pages/my/serach/serach", | ||
9 | + "pages/my/selectAddress/selectAddress", | ||
10 | + "pages/my/editAddress2/editAddress2", | ||
11 | + "pages/my/edit_address/edit_address", | ||
12 | + "pages/my/editAddress/editAddress", | ||
13 | + "pages/my/myOrder/myOrder", | ||
14 | + "pages/index/production_steps/production_steps", | ||
15 | + "pages/my/myCollection/myCollection", | ||
16 | + "pages/index/goodsDetial2/goodsDetial2", | ||
17 | + "pages/index/goodsDetial/goodsDetial", | ||
18 | + "pages/my/modifyPersonInformation/modifyPersonInformation", | ||
19 | + "pages/my/modifyName/modifyName", | ||
20 | + "pages/my/invitationList/invitationList", | ||
21 | + "pages/my/invoiceInformation/invoiceInformation", | ||
22 | + "pages/my/invoice/invoice", | ||
23 | + "pages/my/commonProblems/commonProblems", | ||
24 | + "pages/my/myAddress/myAddress", | ||
25 | + "pages/my/invitationPolite/invitationPolite", | ||
26 | + "pages/my/comment/comment", | ||
27 | + "pages/my/coupons/coupons", | ||
28 | + "pages/my/balance _center2/balance _center2", | ||
29 | + "pages/my/charger_code/charger_code", | ||
30 | + "pages/my/balance _center/balance _center", | ||
31 | + "pages/my/my", | ||
32 | + "pages/cart/cart", | ||
33 | + "pages/index/selectAddress/selectAddress", | ||
34 | + "pages/my/newAddress/newAddress", | ||
35 | + "pages/my/modifyPhone/modifyPhone", | ||
36 | + "pages/my/personal_center/personal_center", | ||
37 | + "pages/my/showComment/showComment", | ||
38 | + "pages/index/replaceDishes/replaceDishes", | ||
39 | + "pages/cart/mask/mask", | ||
40 | + "pages/my/question_two/question_two", | ||
41 | + "pages/my/cancelOrder/cancelOrder", | ||
42 | + "pages/my/deliveryTime/deliveryTime", | ||
43 | + "pages/my/settle_account/settle_account", | ||
44 | + "pages/my/notice_detail/notice_detail", | ||
45 | + "pages/index/select_index/select_index", | ||
46 | + "pages/my/agreement/agreement/agreement", | ||
47 | + "pages/vip/vip_index/vip_index", | ||
48 | + "pages/my/suggestion/suggestion", | ||
49 | + "pages/index/special_list/special_list", | ||
50 | + "pages/my/myCollections/myCollections", | ||
51 | + "pages/my/unpayOrderDetail/unpayOrderDetail", | ||
52 | + "pages/index/user_comment/user_comment", | ||
53 | + "pages/index/safty/safty", | ||
54 | + "pages/index/search_result/search_result", | ||
55 | + "pages/index/searchResultByScreen/searchResultByScreen", | ||
56 | + "pages/my/Aftermarket/Aftermarket", | ||
57 | + "pages/my/afterMarketList/afterMarketList", | ||
58 | + "pages/my/aftermarketDetail/aftermarketDetail", | ||
59 | + "pages/my/unship/unship", | ||
60 | + "pages/my/uncomment/uncomment", | ||
61 | + "pages/index/search_select_result/search_select_result", | ||
62 | + "pages/my/wait_receite/wait_receite", | ||
63 | + "pages/index/pay_ensure/pay_ensure", | ||
64 | + "pages/index/select_source/select_source", | ||
65 | + "pages/index/safetyDetail/safetyDetail", | ||
66 | + "pages/index/foodPackageDetial/foodPackageDetial", | ||
67 | + "pages/my/invoiceList/invoiceList", | ||
68 | + "pages/vip/detail_vip/detail_vip", | ||
69 | + "pages/index/goodsDetials/goodsDetials", | ||
70 | + "pages/navigate/navigate" | ||
71 | + ], | ||
72 | + "window": { | ||
73 | + "backgroundTextStyle": "dark", | ||
74 | + "navigationBarBackgroundColor": "#1a191f", | ||
75 | + "navigationBarTitleText": "HI,鲜生", | ||
76 | + "navigationBarTextStyle": "white" | ||
77 | + }, | ||
78 | + "permission": { | ||
79 | + "scope.userLocation": { | ||
80 | + "desc": "你的位置信息将用于小程序位置接口的效果展示" | ||
81 | + } | ||
82 | + }, | ||
83 | + "tabBar": { | ||
84 | + "selectedColor": "#222222", | ||
85 | + "list": [ | ||
86 | + { | ||
87 | + "selectedIconPath": "pages/imgs/nav02@2x.png", | ||
88 | + "iconPath": "pages/imgs/nav01@2x.png", | ||
89 | + "pagePath": "pages/index/index", | ||
90 | + "text": "首页" | ||
91 | + }, | ||
92 | + { | ||
93 | + "selectedIconPath": "pages/imgs/nav04@2x.png", | ||
94 | + "iconPath": "pages/imgs/nav03@2x.png", | ||
95 | + "pagePath": "pages/cart/cart", | ||
96 | + "text": "购物车" | ||
97 | + }, | ||
98 | + { | ||
99 | + "selectedIconPath": "pages/imgs/nav06@2x.png", | ||
100 | + "iconPath": "pages/imgs/nav05@2x.png", | ||
101 | + "pagePath": "pages/my/my", | ||
102 | + "text": "个人中心" | ||
103 | + } | ||
104 | + ] | ||
105 | + }, | ||
106 | + "networkTimeout": { | ||
107 | + "request": 1000, | ||
108 | + "connectSocket": 1000, | ||
109 | + "uploadFile": 1000, | ||
110 | + "downloadFile": 1000 | ||
111 | + }, | ||
112 | + "sitemapLocation": "sitemap.json" | ||
74 | } | 113 | } |
1 | /**app.wxss**/ | 1 | /**app.wxss**/ |
2 | 2 | ||
3 | -@font-face { | 3 | +/* @font-face { |
4 | font-family: 'pingfang'; | 4 | font-family: 'pingfang'; |
5 | src: url('pages/src/fonts/PingFangLight.ttf'); | 5 | src: url('pages/src/fonts/PingFangLight.ttf'); |
6 | font-family: 'pingfanglight'; | 6 | font-family: 'pingfanglight'; |
7 | src: url('pages/src/fonts/PingFangLight.ttf'); | 7 | src: url('pages/src/fonts/PingFangLight.ttf'); |
8 | -} | 8 | +} */ |
9 | 9 | ||
10 | +@font-face { | ||
11 | + font-family: 'iconfont'; /* project id 636259 */ | ||
12 | + src: url('//at.alicdn.com/t/font_636259_poikis0x03j.eot'); | ||
13 | + src: url('//at.alicdn.com/t/font_636259_poikis0x03j.eot?#iefix') format('embedded-opentype'), | ||
14 | + url('//at.alicdn.com/t/font_636259_poikis0x03j.woff2') format('woff2'), | ||
15 | + url('//at.alicdn.com/t/font_636259_poikis0x03j.woff') format('woff'), | ||
16 | + url('//at.alicdn.com/t/font_636259_poikis0x03j.ttf') format('truetype'), | ||
17 | + url('//at.alicdn.com/t/font_636259_poikis0x03j.svg#iconfont') format('svg'); | ||
18 | +} | ||
10 | /** | 19 | /** |
11 | * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) | 20 | * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) |
12 | * http://cssreset.com | 21 | * http://cssreset.com |
@@ -110,9 +119,6 @@ input, textarea { | @@ -110,9 +119,6 @@ input, textarea { | ||
110 | background: none; | 119 | background: none; |
111 | } | 120 | } |
112 | 121 | ||
113 | - | ||
114 | - | ||
115 | - | ||
116 | .rmb { | 122 | .rmb { |
117 | font-size: 22rpx; | 123 | font-size: 22rpx; |
118 | color: #222; | 124 | color: #222; |
@@ -127,6 +133,8 @@ input, textarea { | @@ -127,6 +133,8 @@ input, textarea { | ||
127 | padding: 29rpx 23rpx; | 133 | padding: 29rpx 23rpx; |
128 | border-bottom: 1rpx solid #f2f2f2; | 134 | border-bottom: 1rpx solid #f2f2f2; |
129 | background-color: #fff; | 135 | background-color: #fff; |
136 | + /*另加的*/ | ||
137 | + margin-top:40rpx; | ||
130 | } | 138 | } |
131 | 139 | ||
132 | .nav_type_left { | 140 | .nav_type_left { |
@@ -179,14 +187,18 @@ input, textarea { | @@ -179,14 +187,18 @@ input, textarea { | ||
179 | } | 187 | } |
180 | 188 | ||
181 | .good_right { | 189 | .good_right { |
182 | - flex: 2; | ||
183 | - margin-left: 20rpx; | 190 | + height: 217rpx; |
191 | + flex: 2; | ||
192 | + margin-left: 20rpx; | ||
193 | + padding-top:14rpx; | ||
194 | + box-sizing: border-box; | ||
184 | } | 195 | } |
185 | 196 | ||
186 | .good_name { | 197 | .good_name { |
187 | color: #222; | 198 | color: #222; |
188 | - font-size: 30rpx; | ||
189 | - padding: 0 0 10rpx 0; | 199 | + font-size: 32rpx; |
200 | + line-height: 32rpx; | ||
201 | + /* padding: 0 0 10rpx 0; */ | ||
190 | } | 202 | } |
191 | 203 | ||
192 | .good_stand { | 204 | .good_stand { |
@@ -195,10 +207,13 @@ input, textarea { | @@ -195,10 +207,13 @@ input, textarea { | ||
195 | } | 207 | } |
196 | 208 | ||
197 | .rmb { | 209 | .rmb { |
198 | - font-size: 22rpx; | 210 | + font-size: 20rpx; |
199 | } | 211 | } |
200 | 212 | ||
213 | + | ||
201 | .good_pprice { | 214 | .good_pprice { |
215 | + height: 20rpx; | ||
216 | + line-height: 20rpx; | ||
202 | font-size: 26rpx; | 217 | font-size: 26rpx; |
203 | color: #222; | 218 | color: #222; |
204 | font-weight: bold; | 219 | font-weight: bold; |
@@ -208,6 +223,7 @@ input, textarea { | @@ -208,6 +223,7 @@ input, textarea { | ||
208 | .good_oprice { | 223 | .good_oprice { |
209 | font-size: 22rpx; | 224 | font-size: 22rpx; |
210 | color: #888; | 225 | color: #888; |
226 | + text-decoration: line-through; | ||
211 | } | 227 | } |
212 | 228 | ||
213 | .good_vip { | 229 | .good_vip { |
@@ -216,10 +232,16 @@ input, textarea { | @@ -216,10 +232,16 @@ input, textarea { | ||
216 | font-weight: bold; | 232 | font-weight: bold; |
217 | } | 233 | } |
218 | 234 | ||
235 | +.red_rmb{ | ||
236 | + color: red; | ||
237 | + font-weight: bold; | ||
238 | +} | ||
239 | + | ||
219 | .good_vipbox { | 240 | .good_vipbox { |
220 | display: flex; | 241 | display: flex; |
221 | align-items: center; | 242 | align-items: center; |
222 | justify-content: space-between; | 243 | justify-content: space-between; |
244 | + margin-top:-20rpx; | ||
223 | } | 245 | } |
224 | 246 | ||
225 | .good_vipbox_left { | 247 | .good_vipbox_left { |
@@ -229,15 +251,7 @@ input, textarea { | @@ -229,15 +251,7 @@ input, textarea { | ||
229 | } | 251 | } |
230 | 252 | ||
231 | .good_vip_spec { | 253 | .good_vip_spec { |
232 | - font-size: 18rpx; | ||
233 | - height: 25rpx; | ||
234 | - background-color: #f44; | ||
235 | - padding: 3rpx; | ||
236 | - text-align: center; | ||
237 | - color: #fff; | ||
238 | - line-height: 100%; | ||
239 | - margin-left: 5rpx; | ||
240 | - /* background-image: url('../imgs/') */ | 254 | + |
241 | } | 255 | } |
242 | 256 | ||
243 | .good_btn { | 257 | .good_btn { |
@@ -254,6 +268,7 @@ input, textarea { | @@ -254,6 +268,7 @@ input, textarea { | ||
254 | .icon-gouwuche { | 268 | .icon-gouwuche { |
255 | font-size: 29rpx; | 269 | font-size: 29rpx; |
256 | color: #444; | 270 | color: #444; |
271 | + | ||
257 | } | 272 | } |
258 | 273 | ||
259 | /* 头部信息 */ | 274 | /* 头部信息 */ |
@@ -302,135 +317,292 @@ input, textarea { | @@ -302,135 +317,292 @@ input, textarea { | ||
302 | } | 317 | } |
303 | 318 | ||
304 | 319 | ||
320 | + | ||
305 | .iconfont { | 321 | .iconfont { |
306 | - font-family:"iconfont" !important; | ||
307 | - font-size:16px; | ||
308 | - font-style:normal; | 322 | + font-family: "iconfont" !important; |
323 | + font-size: 16px; | ||
324 | + font-style: normal; | ||
309 | -webkit-font-smoothing: antialiased; | 325 | -webkit-font-smoothing: antialiased; |
310 | -moz-osx-font-smoothing: grayscale; | 326 | -moz-osx-font-smoothing: grayscale; |
311 | } | 327 | } |
312 | 328 | ||
313 | -.icon-vip:before { content: "\e62f"; } | 329 | +.icon-vip:before { |
330 | + content: "\e62f"; | ||
331 | +} | ||
332 | + | ||
333 | +.icon-jia:before { | ||
334 | + content: "\e65b"; | ||
335 | +} | ||
336 | + | ||
337 | +.icon-jiantouarrow486:before { | ||
338 | + content: "\e6aa"; | ||
339 | +} | ||
340 | + | ||
341 | +.icon-quan:before { | ||
342 | + content: "\e741"; | ||
343 | +} | ||
344 | + | ||
345 | +.icon-gouwuche:before { | ||
346 | + content: "\e6be"; | ||
347 | +} | ||
348 | + | ||
349 | +.icon-cuowu:before { | ||
350 | + content: "\e657"; | ||
351 | +} | ||
314 | 352 | ||
315 | -.icon-jia:before { content: "\e65b"; } | 353 | +.icon-icondayu:before { |
354 | + content: "\e632"; | ||
355 | +} | ||
316 | 356 | ||
317 | -.icon-jiantouarrow486:before { content: "\e6aa"; } | 357 | +.icon-huangguan:before { |
358 | + content: "\e640"; | ||
359 | +} | ||
318 | 360 | ||
319 | -.icon-quan:before { content: "\e741"; } | 361 | +.icon-3:before { |
362 | + content: "\e62c"; | ||
363 | +} | ||
320 | 364 | ||
321 | -.icon-gouwuche:before { content: "\e6be"; } | 365 | +.icon-one-off:before { |
366 | + content: "\e62d"; | ||
367 | +} | ||
322 | 368 | ||
323 | -.icon-cuowu:before { content: "\e657"; } | 369 | +.icon-two-off:before { |
370 | + content: "\e62e"; | ||
371 | +} | ||
324 | 372 | ||
325 | -.icon-icondayu:before { content: "\e632"; } | 373 | +.icon-shangyinhao:before { |
374 | + content: "\e63f"; | ||
375 | +} | ||
326 | 376 | ||
327 | -.icon-huangguan:before { content: "\e640"; } | 377 | +.icon-xiaoyu:before { |
378 | + content: "\e74c"; | ||
379 | +} | ||
328 | 380 | ||
329 | -.icon-3:before { content: "\e62c"; } | 381 | +.icon-diandian:before { |
382 | + content: "\e631"; | ||
383 | +} | ||
330 | 384 | ||
331 | -.icon-one-off:before { content: "\e62d"; } | 385 | +.icon-location:before { |
386 | + content: "\e601"; | ||
387 | +} | ||
332 | 388 | ||
333 | -.icon-two-off:before { content: "\e62e"; } | 389 | +.icon-search:before { |
390 | + content: "\e602"; | ||
391 | +} | ||
334 | 392 | ||
335 | -.icon-shangyinhao:before { content: "\e63f"; } | 393 | +.icon-message:before { |
394 | + content: "\e603"; | ||
395 | +} | ||
336 | 396 | ||
337 | -.icon-xiaoyu:before { content: "\e74c"; } | 397 | +.icon-fenlei:before { |
398 | + content: "\e604"; | ||
399 | +} | ||
400 | + | ||
401 | +.icon-jiance:before { | ||
402 | + content: "\e605"; | ||
403 | +} | ||
404 | + | ||
405 | +.icon-xingzhuang:before { | ||
406 | + content: "\e606"; | ||
407 | +} | ||
408 | + | ||
409 | +.icon-xingzhuang1:before { | ||
410 | + content: "\e607"; | ||
411 | +} | ||
412 | + | ||
413 | +.icon-datu:before { | ||
414 | + content: "\e608"; | ||
415 | +} | ||
416 | + | ||
417 | +.icon-wangge:before { | ||
418 | + content: "\e609"; | ||
419 | +} | ||
338 | 420 | ||
339 | -.icon-diandian:before { content: "\e631"; } | 421 | +.icon-liebiao:before { |
422 | + content: "\e60a"; | ||
423 | +} | ||
340 | 424 | ||
341 | -.icon-location:before { content: "\e601"; } | 425 | +.icon-shaixuan:before { |
426 | + content: "\e60b"; | ||
427 | +} | ||
342 | 428 | ||
343 | -.icon-search:before { content: "\e602"; } | 429 | +.icon-chakanguize:before { |
430 | + content: "\e600"; | ||
431 | +} | ||
344 | 432 | ||
345 | -.icon-message:before { content: "\e603"; } | 433 | +.icon-tianxie:before { |
434 | + content: "\e60c"; | ||
435 | +} | ||
346 | 436 | ||
347 | -.icon-fenlei:before { content: "\e604"; } | 437 | +.icon-xingzhuang2:before { |
438 | + content: "\e60d"; | ||
439 | +} | ||
348 | 440 | ||
349 | -.icon-jiance:before { content: "\e605"; } | 441 | +.icon-fanhui:before { |
442 | + content: "\e60e"; | ||
443 | +} | ||
350 | 444 | ||
351 | -.icon-xingzhuang:before { content: "\e606"; } | 445 | +.icon-dingwei:before { |
446 | + content: "\e60f"; | ||
447 | +} | ||
352 | 448 | ||
353 | -.icon-xingzhuang1:before { content: "\e607"; } | 449 | +.icon-lishisousuo:before { |
450 | + content: "\e610"; | ||
451 | +} | ||
354 | 452 | ||
355 | -.icon-datu:before { content: "\e608"; } | 453 | +.icon-remensousuo:before { |
454 | + content: "\e611"; | ||
455 | +} | ||
356 | 456 | ||
357 | -.icon-wangge:before { content: "\e609"; } | 457 | +.icon-quxiao:before { |
458 | + content: "\e612"; | ||
459 | +} | ||
358 | 460 | ||
359 | -.icon-liebiao:before { content: "\e60a"; } | 461 | +.icon-shanchu:before { |
462 | + content: "\e613"; | ||
463 | +} | ||
360 | 464 | ||
361 | -.icon-shaixuan:before { content: "\e60b"; } | 465 | +.icon-zhankai:before { |
466 | + content: "\e614"; | ||
467 | +} | ||
362 | 468 | ||
363 | -.icon-chakanguize:before { content: "\e600"; } | 469 | +.icon-meipingfen:before { |
470 | + content: "\e615"; | ||
471 | +} | ||
364 | 472 | ||
365 | -.icon-tianxie:before { content: "\e60c"; } | 473 | +.icon-maishoutuijian:before { |
474 | + content: "\e616"; | ||
475 | +} | ||
366 | 476 | ||
367 | -.icon-xingzhuang2:before { content: "\e60d"; } | 477 | +.icon-shoucang:before { |
478 | + content: "\e617"; | ||
479 | +} | ||
368 | 480 | ||
369 | -.icon-fanhui:before { content: "\e60e"; } | 481 | +.icon-jinru:before { |
482 | + content: "\e618"; | ||
483 | +} | ||
370 | 484 | ||
371 | -.icon-dingwei:before { content: "\e60f"; } | 485 | +.icon-pingfen:before { |
486 | + content: "\e619"; | ||
487 | +} | ||
372 | 488 | ||
373 | -.icon-lishisousuo:before { content: "\e610"; } | 489 | +.icon-genghuan:before { |
490 | + content: "\e630"; | ||
491 | +} | ||
374 | 492 | ||
375 | -.icon-remensousuo:before { content: "\e611"; } | 493 | +.icon-location1:before { |
494 | + content: "\e61a"; | ||
495 | +} | ||
376 | 496 | ||
377 | -.icon-quxiao:before { content: "\e612"; } | 497 | +.icon-weixuanzhong:before { |
498 | + content: "\e61b"; | ||
499 | +} | ||
378 | 500 | ||
379 | -.icon-shanchu:before { content: "\e613"; } | 501 | +.icon-time:before { |
502 | + content: "\e61c"; | ||
503 | +} | ||
380 | 504 | ||
381 | -.icon-zhankai:before { content: "\e614"; } | 505 | +.icon-xuanzhong:before { |
506 | + content: "\e61d"; | ||
507 | +} | ||
382 | 508 | ||
383 | -.icon-meipingfen:before { content: "\e615"; } | 509 | +.icon-fenxiangyouli:before { |
510 | + content: "\e61e"; | ||
511 | +} | ||
384 | 512 | ||
385 | -.icon-maishoutuijian:before { content: "\e616"; } | 513 | +.icon-wodeshoucang:before { |
514 | + content: "\e61f"; | ||
515 | +} | ||
386 | 516 | ||
387 | -.icon-shoucang:before { content: "\e617"; } | 517 | +.icon-location2:before { |
518 | + content: "\e620"; | ||
519 | +} | ||
388 | 520 | ||
389 | -.icon-jinru:before { content: "\e618"; } | 521 | +.icon-yonghuzhinan:before { |
522 | + content: "\e621"; | ||
523 | +} | ||
390 | 524 | ||
391 | -.icon-pingfen:before { content: "\e619"; } | 525 | +.icon-yijianfankui:before { |
526 | + content: "\e622"; | ||
527 | +} | ||
392 | 528 | ||
393 | -.icon-genghuan:before { content: "\e630"; } | 529 | +.icon-qiandao:before { |
530 | + content: "\e623"; | ||
531 | +} | ||
394 | 532 | ||
395 | -.icon-location1:before { content: "\e61a"; } | 533 | +.icon-zhangdanmingxi:before { |
534 | + content: "\e624"; | ||
535 | +} | ||
396 | 536 | ||
397 | -.icon-weixuanzhong:before { content: "\e61b"; } | 537 | +.icon-chuxuyouli:before { |
538 | + content: "\e625"; | ||
539 | +} | ||
398 | 540 | ||
399 | -.icon-time:before { content: "\e61c"; } | 541 | +.icon-saoma:before { |
542 | + content: "\e626"; | ||
543 | +} | ||
400 | 544 | ||
401 | -.icon-xuanzhong:before { content: "\e61d"; } | 545 | +.icon-pingjia:before { |
546 | + content: "\e627"; | ||
547 | +} | ||
402 | 548 | ||
403 | -.icon-fenxiangyouli:before { content: "\e61e"; } | 549 | +.icon-cai:before { |
550 | + content: "\e628"; | ||
551 | +} | ||
404 | 552 | ||
405 | -.icon-wodeshoucang:before { content: "\e61f"; } | 553 | +.icon-zan:before { |
554 | + content: "\e629"; | ||
555 | +} | ||
406 | 556 | ||
407 | -.icon-location2:before { content: "\e620"; } | 557 | +.icon-kefu:before { |
558 | + content: "\e62a"; | ||
559 | +} | ||
408 | 560 | ||
409 | -.icon-yonghuzhinan:before { content: "\e621"; } | 561 | +.icon-quxiao1:before { |
562 | + content: "\e62b"; | ||
563 | +} | ||
410 | 564 | ||
411 | -.icon-yijianfankui:before { content: "\e622"; } | 565 | +.icon-dangqian:before { |
566 | + content: "\e64a"; | ||
567 | +} | ||
412 | 568 | ||
413 | -.icon-qiandao:before { content: "\e623"; } | 569 | +.icon-meipingfen-copy:before { |
570 | + content: "\e6bf"; | ||
571 | +} | ||
414 | 572 | ||
415 | -.icon-zhangdanmingxi:before { content: "\e624"; } | 573 | +.icon-collection:before{ |
574 | + content: "\e607" | ||
575 | +} | ||
416 | 576 | ||
417 | -.icon-chuxuyouli:before { content: "\e625"; } | 577 | +.icon-position:before{ |
578 | + content: "\e634" | ||
579 | +} | ||
418 | 580 | ||
419 | -.icon-saoma:before { content: "\e626"; } | 581 | +.icon-suggest:before{ |
582 | + content: "\e635" | ||
583 | +} | ||
420 | 584 | ||
421 | -.icon-pingjia:before { content: "\e627"; } | 585 | +.icon-xiangxia:before{ |
586 | + content: "\e636" | ||
587 | +} | ||
422 | 588 | ||
423 | -.icon-cai:before { content: "\e628"; } | 589 | +.icon-xiangshang:before{ |
590 | + content: "\e637" | ||
591 | +} | ||
424 | 592 | ||
425 | -.icon-zan:before { content: "\e629"; } | 593 | +.icon-duigou:before{ |
594 | + content: "\e638" | ||
595 | +} | ||
426 | 596 | ||
427 | -.icon-kefu:before { content: "\e62a"; } | 597 | +.icon-fanhuidingbu:before{ |
598 | + content: "\e639" | ||
599 | +} | ||
428 | 600 | ||
429 | -.icon-quxiao1:before { content: "\e62b"; } | 601 | +.icon-weixin:before{ |
602 | + content: "\e63b" | ||
603 | +} | ||
430 | 604 | ||
431 | -.icon-dangqian:before { content: "\e64a"; } | ||
432 | 605 | ||
433 | -.icon-meipingfen-copy:before { content: "\e6bf"; } | ||
434 | 606 | ||
435 | 607 | ||
436 | 608 |
1 | // pages/cart/cart.js | 1 | // pages/cart/cart.js |
2 | +const app = getApp(); | ||
2 | Page({ | 3 | Page({ |
3 | 4 | ||
4 | - /** | ||
5 | - * 页面的初始数据 | ||
6 | - */ | ||
7 | - data: { | ||
8 | - | ||
9 | - }, | 5 | + /** |
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + choose: false, | ||
10 | + choose2: true, | ||
11 | + chooseAll2: false, | ||
12 | + number: 1, | ||
13 | + goodsList: [], | ||
14 | + goodsId: 0, | ||
15 | + totalPrice: 0, | ||
16 | + promotion: [], | ||
17 | + goods_Price: 0, | ||
18 | + shipment: {}, | ||
19 | + shipPrice: 0, | ||
20 | + ship_balance: 0, | ||
21 | + is_vip: 0, | ||
22 | + cartId: 1, | ||
23 | + listlist: [], | ||
24 | + all_both_choose: false, | ||
25 | + chuandi: 0, | ||
26 | + }, | ||
27 | + //跳转至详情页 | ||
28 | + goDetail(e) { | ||
29 | + wx.navigateTo({ | ||
30 | + url: '../index/goodsDetial/goodsDetial?id=' + e.currentTarget.dataset.id, | ||
31 | + }) | ||
32 | + }, | ||
33 | + goDetail2(e) { | ||
34 | + wx.navigateTo({ | ||
35 | + url: '../index/goodsDetial2/goodsDetial2?id=' + e.currentTarget.dataset.id, | ||
36 | + }) | ||
37 | + }, | ||
38 | + //获取购物车数量 | ||
39 | + fetchCartNum() { | ||
40 | + let url = '/wxapp/cart/index' | ||
41 | + app.post(url).then(r => { | ||
42 | + if (r.code == 1) { | ||
43 | + if (r.data.cartNum > 0) { | ||
44 | + wx.showTabBarRedDot({ | ||
45 | + index: 1, | ||
46 | + success: function(red) { | ||
47 | + wx.setTabBarBadge({ | ||
48 | + index: 1, | ||
49 | + text: r.data.cartNum.toString(), | ||
50 | + }) | ||
51 | + } | ||
52 | + }) | ||
53 | + } else { | ||
54 | + wx.hideTabBarRedDot({ | ||
55 | + index: 1 | ||
56 | + }) | ||
57 | + } | ||
58 | + } | ||
59 | + }) | ||
60 | + }, | ||
61 | + //最下面的全选 | ||
62 | + allBothChoose() { | ||
63 | + let that = this | ||
64 | + let goodsList = that.data.goodsList | ||
65 | + let promotion = that.data.promotion | ||
66 | + let all_both_choose = that.data.all_both_choose | ||
67 | + if (all_both_choose) { | ||
68 | + all_both_choose = false | ||
69 | + } else { | ||
70 | + all_both_choose = true | ||
71 | + } | ||
72 | + goodsList.forEach(function(ele, index) { | ||
73 | + if (all_both_choose) { | ||
74 | + ele.chooseAll = true | ||
75 | + for (let i = 0; i < ele.list.length; i++) { | ||
76 | + ele.list[i].flag = true | ||
77 | + } | ||
78 | + that.setData({ | ||
79 | + goodsList: goodsList | ||
80 | + }) | ||
81 | + } else { | ||
82 | + ele.chooseAll = false | ||
83 | + for (let i = 0; i < ele.list.length; i++) { | ||
84 | + ele.list[i].flag = false | ||
85 | + } | ||
86 | + that.setData({ | ||
87 | + goodsList: goodsList | ||
88 | + }) | ||
89 | + } | ||
90 | + }) | ||
91 | + promotion.forEach(function (ele, index) { | ||
92 | + if (all_both_choose) { | ||
93 | + ele.chooseAll = true | ||
94 | + for (let i = 0; i < ele.list.length; i++) { | ||
95 | + ele.list[i].flag = true | ||
96 | + } | ||
97 | + that.setData({ | ||
98 | + promotion: promotion | ||
99 | + }) | ||
100 | + } else { | ||
101 | + ele.chooseAll = false | ||
102 | + for (let i = 0; i < ele.list.length; i++) { | ||
103 | + ele.list[i].flag = false | ||
104 | + } | ||
105 | + that.setData({ | ||
106 | + promotion: promotion | ||
107 | + }) | ||
108 | + } | ||
109 | + }) | ||
110 | + that.setData({ | ||
111 | + all_both_choose: all_both_choose | ||
112 | + }) | ||
113 | + this.totalPrice(); | ||
114 | + }, | ||
115 | + //fetchUser | ||
116 | + fetchUser() { | ||
117 | + let url = '/wxapp/user/index' | ||
118 | + app.post(url).then(r => { | ||
119 | + if (r.code == 1) { | ||
120 | + console.log(r) | ||
121 | + this.setData({ | ||
122 | + is_vip: r.data.user.is_vip | ||
123 | + }) | ||
124 | + this.fetchCartList(); | ||
125 | + this.amount(); | ||
126 | + } | ||
127 | + }) | ||
128 | + }, | ||
129 | + //fetchCartList | ||
130 | + fetchCartList() { | ||
131 | + let that = this; | ||
132 | + let url = '/wxapp/cart/index' | ||
133 | + var list = {}; | ||
134 | + var number = 1; | ||
135 | + var g_price = 0; | ||
136 | + var vip = that.data.is_vip | ||
137 | + app.post(url).then(r => { | ||
138 | + r.data.list.forEach(function(ele, index) { | ||
139 | + ele.chooseAll = false | ||
140 | + for (let v in ele.list) { | ||
141 | + ele.list[v].flag = false | ||
142 | + if (vip == 1) { | ||
143 | + var price = ele.list[v].vip_price | ||
144 | + price = price.substring(0, price.length - 3) * 1 | ||
145 | + ele.list[v].goods_price = ele.list[v].number * price | ||
146 | + } else { | ||
147 | + var price = ele.list[v].price | ||
148 | + price = price.substring(0, price.length - 3) * 1 | ||
149 | + ele.list[v].goods_price = ele.list[v].number * price | ||
150 | + } | ||
151 | + } | ||
152 | + }) | ||
153 | + r.data.promotion.forEach(function(ele, index) { | ||
154 | + ele.chooseAll=false | ||
155 | + for (let v in ele.list) { | ||
156 | + ele.list[v].t = false | ||
157 | + if (vip == 1) { | ||
158 | + var price = ele.list[v].vip_price | ||
159 | + price = price.substring(0, price.length - 3) * 1 | ||
160 | + ele.list[v].goods_price = ele.list[v].number * price | ||
161 | + } else { | ||
162 | + var price = ele.list[v].price | ||
163 | + price = price.substring(0, price.length - 3) * 1 | ||
164 | + ele.list[v].goods_price = ele.list[v].number * price | ||
165 | + } | ||
166 | + } | ||
167 | + }) | ||
168 | + that.setData({ | ||
169 | + listlist: r.data, | ||
170 | + goodsList: r.data.list, | ||
171 | + promotion: r.data.promotion, | ||
172 | + number: number, | ||
173 | + shipment: r.data.shipment, | ||
174 | + shipPrice: r.data.shipment.price | ||
175 | + }); | ||
176 | + }); | ||
177 | + }, | ||
178 | + //每个商品总价 | ||
179 | + amount() { | ||
180 | + var that = this | ||
181 | + var goodsList = that.data.goodsList | ||
182 | + var promotion = that.data.promotion | ||
183 | + var vip = that.data.is_vip * 1 | ||
184 | + goodsList.forEach(function(ele, index) { | ||
185 | + for (let v in ele.list) { | ||
186 | + console.log("进来了goodsList") | ||
187 | + if (vip == 1) { | ||
188 | + var price = ele.list[v].vip_price | ||
189 | + price = price.substring(0, price.length - 3) * 1 | ||
190 | + ele.list[v].goods_price = ele.list[v].number * price | ||
191 | + } else { | ||
192 | + var price = ele.list[v].price | ||
193 | + price = price.substring(0, price.length - 3) * 1 | ||
194 | + ele.list[v].goods_price = ele.list[v].number * price | ||
195 | + } | ||
196 | + } | ||
197 | + }) | ||
198 | + promotion.forEach(function(ele, index) { | ||
199 | + for (let v in ele.list) { | ||
200 | + if (vip == 1) { | ||
201 | + var price = ele.list[v].vip_price | ||
202 | + price = price.substring(0, price.length - 3) * 1 | ||
203 | + ele.list[v].goods_price = ele.list[v].number * price | ||
204 | + } else { | ||
205 | + var price = ele.list[v].price | ||
206 | + price = price.substring(0, price.length - 3) * 1 | ||
207 | + ele.list[v].goods_price = ele.list[v].number * price | ||
208 | + } | ||
209 | + } | ||
210 | + }) | ||
211 | + }, | ||
212 | + //totalPrice | ||
213 | + totalPrice() { | ||
214 | + var that = this; | ||
215 | + var goodsList = that.data.goodsList; | ||
216 | + var promotion = that.data.promotion; | ||
217 | + var price = 0; | ||
218 | + var price2 = 0; | ||
219 | + var price3 = 0; | ||
220 | + var shipPrice = 0; | ||
221 | + var str_price = 0; | ||
222 | + goodsList.forEach(function(ele, index) { | ||
223 | + for (var i in ele.list) { | ||
224 | + if (ele.list[i].flag) { | ||
225 | + if (that.data.is_vip == 1) { | ||
226 | + str_price = ele.list[i].vip_price; | ||
227 | + } else { | ||
228 | + str_price = ele.list[i].price; | ||
229 | + } | ||
230 | + str_price = str_price.substring(0, str_price.length - 3); | ||
231 | + str_price = str_price * 1 * ele.list[i].number | ||
232 | + price = price + str_price; | ||
233 | + } | ||
234 | + } | ||
235 | + }); | ||
236 | + promotion.forEach(function(ele, index) { | ||
237 | + for (var i in ele.list) { | ||
238 | + if (ele.list[i].flag) { | ||
239 | + if (that.data.is_vip == 1) { | ||
240 | + str_price = ele.list[i].vip_price; | ||
241 | + } else { | ||
242 | + str_price = ele.list[i].price; | ||
243 | + } | ||
244 | + str_price = str_price.substring(0, str_price.length - 3); | ||
245 | + str_price = str_price * 1 * ele.list[i].number | ||
246 | + price2 = price2 + str_price; | ||
247 | + } | ||
248 | + } | ||
249 | + }); | ||
250 | + price3 = price + price2; | ||
251 | + if (price3 > that.data.shipment.free) { | ||
252 | + shipPrice = 0 | ||
253 | + } else { | ||
254 | + shipPrice = this.data.shipment.price | ||
255 | + } | ||
256 | + var ship_balance = that.data.shipment.free * 1 - price3 | ||
257 | + if (ship_balance <= 0) { | ||
258 | + ship_balance = 0 | ||
259 | + } | ||
260 | + let price4 = price3 | ||
261 | + let price5 = price3 * 1 + shipPrice * 1 | ||
262 | + that.setData({ | ||
263 | + totalPrice: price5, | ||
264 | + chuandi: price5, | ||
265 | + shipPrice: shipPrice, | ||
266 | + ship_balance: ship_balance | ||
267 | + }); | ||
268 | + }, | ||
269 | + //del_btn删除购物车 | ||
270 | + del_btn() { | ||
271 | + let that = this | ||
272 | + let url = '/wxapp/cart/delCart ' | ||
273 | + let goodsList = that.data.goodsList; | ||
274 | + let promotion = that.data.promotion; | ||
275 | + let ids = []; | ||
276 | + let new_ids = [] | ||
277 | + goodsList.forEach(function(ele, index) { | ||
278 | + for (let i = 0; i < ele.list.length; i++) { | ||
279 | + if (ele.list[i].flag) { | ||
280 | + let id = ele.list[i].id | ||
281 | + new_ids = ids.push(id) | ||
282 | + } | ||
283 | + } | ||
284 | + }) | ||
285 | + promotion.forEach(function(ele, index) { | ||
286 | + for (let i = 0; i < ele.list.length; i++) { | ||
287 | + if (ele.list[i].flag) { | ||
288 | + let id = ele.list[i].id | ||
289 | + new_ids = ids.push(id) | ||
290 | + } | ||
291 | + } | ||
292 | + }) | ||
293 | + let params = { | ||
294 | + ids: ids | ||
295 | + } | ||
296 | + app.post(url, params).then(r => { | ||
297 | + if (r.code == 1) { | ||
298 | + wx.showToast({ | ||
299 | + title: '删除成功', | ||
300 | + icon: 'none' | ||
301 | + }) | ||
302 | + this.totalPrice(); | ||
303 | + let a=this.data.shipment.free | ||
304 | + this.setData({ | ||
305 | + ship_balance:a, | ||
306 | + all_both_choose:false, | ||
307 | + totalPrice:0 | ||
308 | + }) | ||
309 | + } else { | ||
310 | + wx.showToast({ | ||
311 | + title: '请先选择要删除的商品', | ||
312 | + icon: 'none' | ||
313 | + }) | ||
314 | + } | ||
315 | + }); | ||
316 | + this.fetchCartList(); | ||
317 | + this.choose(); | ||
318 | + this.choose2(); | ||
319 | + this.totalPrice(); | ||
320 | + }, | ||
321 | + /** | ||
322 | + * 生命周期函数--监听页面加载 | ||
323 | + */ | ||
324 | + onLoad: function(options) { | ||
325 | + this.fetchUser(); | ||
326 | + }, | ||
327 | + // 再逛逛 | ||
328 | + get_return() { | ||
329 | + wx.switchTab({ | ||
330 | + url: '../../pages/index/index' | ||
331 | + }); | ||
332 | + }, | ||
333 | + //购物车结算 | ||
334 | + settleAccountGoods() { | ||
335 | + var id_arr = []; | ||
336 | + var id_arr2 = []; | ||
337 | + var id_arr1 = []; | ||
338 | + var goodsList = this.data.goodsList; | ||
339 | + var promotion = this.data.promotion; | ||
340 | + var listlist = this.data.listlist | ||
341 | + goodsList.forEach(function(ele, index) { | ||
342 | + for (var i in ele.list) { | ||
343 | + if (ele.list[i].flag) { | ||
344 | + id_arr1.push(ele.list[i].id); | ||
345 | + } | ||
346 | + } | ||
347 | + }); | ||
348 | + promotion.forEach(function(ele, index) { | ||
349 | + for (var i in ele.list) { | ||
350 | + if (ele.list[i].flag) { | ||
351 | + id_arr2.push(ele.list[i].id); | ||
352 | + } | ||
353 | + } | ||
354 | + }); | ||
355 | + if (id_arr1.length == 0 && id_arr2.length != 0) { | ||
356 | + id_arr = id_arr2 | ||
357 | + } | ||
358 | + if (id_arr2.length == 0 && id_arr1.length != 0) { | ||
359 | + id_arr = id_arr1 | ||
360 | + } | ||
361 | + if (id_arr1.length != 0 && id_arr2.length != 0) { | ||
362 | + id_arr = id_arr1.concat(id_arr2); | ||
363 | + } | ||
364 | + if (id_arr1.length == 0 && id_arr2.length == 0) { | ||
365 | + wx.showToast({ | ||
366 | + title: '请选择商品', | ||
367 | + icon: 'none' | ||
368 | + }) | ||
369 | + return; | ||
370 | + } | ||
371 | + if (id_arr2.length != 0 && id_arr2.length < 2) { | ||
372 | + wx.showToast({ | ||
373 | + title: '促销商品至少选择两个商品', | ||
374 | + icon: 'none' | ||
375 | + }) | ||
376 | + return; | ||
377 | + } | ||
378 | + var id_str = id_arr.join(','); | ||
379 | + var jiesuanjia='' | ||
380 | + var jianjia=listlist.minimum_price - this.data.chuandi | ||
381 | + var yunfeijia = this.data.shipPrice | ||
382 | + if (jianjia >= yunfeijia){ | ||
383 | + wx.navigateTo({ | ||
384 | + url: '../my/settle_account/settle_account?id=' + id_str + '&price=' + this.data.chuandi, | ||
385 | + }) | ||
386 | + }else{ | ||
387 | + wx.showToast({ | ||
388 | + title: '商品实满'+listlist.minimum_price+'元起送', | ||
389 | + icon:'none' | ||
390 | + }) | ||
391 | + } | ||
392 | + }, | ||
393 | + //选中商品 | ||
394 | + choose(e) { | ||
395 | + var that = this; | ||
396 | + var id = e.currentTarget.dataset.id; | ||
397 | + var indexs = e.currentTarget.dataset.index; | ||
398 | + var cellindex=e.currentTarget.dataset.cell | ||
399 | + var goodsList = this.data.goodsList | ||
400 | + var promotion = this.data.promotion | ||
401 | + var all_both_choose=that.data.all_both_choose | ||
402 | + var n = 0 | ||
403 | + goodsList.forEach(function(ele, index) { | ||
404 | + if(cellindex==index){ | ||
405 | + for (let i = 0; i < ele.list.length; i++) { | ||
406 | + if (indexs == i) { | ||
407 | + ele.list[indexs].flag = !ele.list[indexs].flag | ||
408 | + } | ||
409 | + if (ele.list[i].flag) { | ||
410 | + n++ | ||
411 | + } | ||
412 | + if (n == ele.list.length) { | ||
413 | + ele.chooseAll = true | ||
414 | + } else{ | ||
415 | + ele.chooseAll = false | ||
416 | + } | ||
417 | + that.last_both_choose() | ||
418 | + } | ||
419 | + } | ||
420 | + }) | ||
421 | + that.setData({ | ||
422 | + goodsId: id, | ||
423 | + goodsList: goodsList, | ||
424 | + }); | ||
425 | + that.totalPrice(); | ||
426 | + }, | ||
427 | + choose2(e) { | ||
428 | + var that = this; | ||
429 | + var id = e.currentTarget.dataset.id; | ||
430 | + var indexs = e.currentTarget.dataset.index; | ||
431 | + var cellindex=e.currentTarget.dataset.cell | ||
432 | + var promotion = this.data.promotion | ||
433 | + var goodsList=that.data.goodsList | ||
434 | + var all_both_choose=that.data.all_both_choose | ||
435 | + var n = 0 | ||
436 | + promotion.forEach(function (ele, index) { | ||
437 | + if(cellindex==index){ | ||
438 | + for (let i = 0; i < ele.list.length; i++) { | ||
439 | + if (indexs == i) { | ||
440 | + ele.list[indexs].flag = !ele.list[indexs].flag | ||
441 | + } | ||
442 | + if (ele.list[i].flag) { | ||
443 | + n++ | ||
444 | + } | ||
445 | + if (n == ele.list.length) { | ||
446 | + ele.chooseAll = true | ||
447 | + } else { | ||
448 | + ele.chooseAll = false | ||
449 | + } | ||
450 | + that.last_both_choose(); | ||
451 | + } | ||
452 | + } | ||
453 | + }) | ||
454 | + that.setData({ | ||
455 | + goodsId: id, | ||
456 | + promotion: promotion, | ||
457 | + }); | ||
458 | + that.totalPrice(); | ||
459 | + }, | ||
460 | + //减少对应的数量 | ||
461 | + dec(e) { | ||
462 | + var indexs = e.currentTarget.dataset.index | ||
463 | + var cellindex = e.currentTarget.dataset.cellindex | ||
464 | + var goodsList = this.data.goodsList | ||
465 | + var number = goodsList[cellindex].list[indexs].number | ||
466 | + if (number <= 1) { | ||
467 | + wx.showToast({ | ||
468 | + title: '已经是最少了哦', | ||
469 | + icon: 'none' | ||
470 | + }) | ||
471 | + return; | ||
472 | + } else { | ||
473 | + goodsList.forEach(function(ele, index) { | ||
474 | + if(cellindex==index){ | ||
475 | + for (let v in ele.list) { | ||
476 | + if (v == indexs) { | ||
477 | + console.log(number) | ||
478 | + number = ele.list[indexs].number - 1; | ||
479 | + ele.list[indexs].number = ele.list[indexs].number - 1; | ||
480 | + console.log(number) | ||
481 | + let url = '/wxapp/cart/editCartNumber' | ||
482 | + let params = { | ||
483 | + id: ele.list[indexs].id, | ||
484 | + num: number | ||
485 | + } | ||
486 | + app.post(url, params).then(r => { | ||
487 | + if (r.code == 1) { | ||
10 | 488 | ||
11 | - /** | ||
12 | - * 生命周期函数--监听页面加载 | ||
13 | - */ | ||
14 | - onLoad: function (options) { | ||
15 | - | ||
16 | - }, | ||
17 | - // 再逛逛 | ||
18 | - get_return(){ | ||
19 | - wx.switchTab({ | ||
20 | - url: '../../pages/index/index' | ||
21 | - }); | ||
22 | - }, | ||
23 | - /** | ||
24 | - * 生命周期函数--监听页面初次渲染完成 | ||
25 | - */ | ||
26 | - onReady: function () { | ||
27 | - | ||
28 | - }, | 489 | + } else { |
490 | + wx.showToast({ | ||
491 | + title: '修改失败', | ||
492 | + icon: 'none' | ||
493 | + }) | ||
494 | + } | ||
495 | + }) | ||
496 | + } | ||
497 | + } | ||
498 | + } | ||
499 | + }) | ||
500 | + this.amount(); | ||
501 | + this.setData({ | ||
502 | + goodsList: goodsList, | ||
503 | + }) | ||
504 | + this.totalPrice(); | ||
505 | + } | ||
506 | + }, | ||
507 | + dec2(e) { | ||
508 | + var indexs = e.currentTarget.dataset.index | ||
509 | + var cellindex = e.currentTarget.dataset.cellindex | ||
510 | + var promotion = this.data.promotion | ||
511 | + var number2 = promotion[cellindex].list[indexs].number | ||
512 | + if (number2 <= 1) { | ||
513 | + wx.showToast({ | ||
514 | + title: '已经是最少了哦', | ||
515 | + icon:'none' | ||
516 | + }) | ||
517 | + return; | ||
518 | + } else { | ||
519 | + promotion.forEach(function(ele, index) { | ||
520 | + if(cellindex==index){ | ||
521 | + for (let v in ele.list) { | ||
522 | + if (v == indexs) { | ||
523 | + number2 = ele.list[indexs].number - 1; | ||
524 | + ele.list[indexs].number = ele.list[indexs].number - 1; | ||
525 | + let url = '/wxapp/cart/editCartNumber' | ||
526 | + let params = { | ||
527 | + id: ele.list[indexs].id, | ||
528 | + num: number2 | ||
529 | + } | ||
530 | + app.post(url, params).then(r => { | ||
531 | + if (r.code == 1) { | ||
29 | 532 | ||
30 | - /** | ||
31 | - * 生命周期函数--监听页面显示 | ||
32 | - */ | ||
33 | - onShow: function () { | ||
34 | - | ||
35 | - }, | 533 | + } |
534 | + }) | ||
535 | + } | ||
536 | + } | ||
537 | + } | ||
538 | + }) | ||
539 | + this.amount(); | ||
540 | + this.setData({ | ||
541 | + promotion: promotion | ||
542 | + }) | ||
543 | + this.totalPrice(); | ||
544 | + } | ||
545 | + }, | ||
546 | + //是否全选 | ||
547 | + last_both_choose(){ | ||
548 | + let that=this | ||
549 | + let goodsList=that.data.goodsList | ||
550 | + let promotion = that.data.promotion | ||
551 | + let i=goodsList.length+promotion.length | ||
552 | + let all_both_choose=that.data.all_both_choose | ||
553 | + let j=0 | ||
554 | + goodsList.forEach(function(ele){ | ||
555 | + if(ele.chooseAll){ | ||
556 | + j++ | ||
557 | + } | ||
558 | + }) | ||
559 | + promotion.forEach(function (ele) { | ||
560 | + if (ele.chooseAll) { | ||
561 | + j++ | ||
562 | + } | ||
563 | + }) | ||
564 | + if(i==j){ | ||
565 | + console.log('全选success') | ||
566 | + all_both_choose=true | ||
567 | + }else{ | ||
568 | + all_both_choose=false | ||
569 | + } | ||
570 | + that.setData({ | ||
571 | + all_both_choose:all_both_choose | ||
572 | + }) | ||
573 | + }, | ||
574 | + //选中所有商品 | ||
575 | + chooseAll() { | ||
576 | + var that = this; | ||
577 | + var goodsList = that.data.goodsList; | ||
578 | + var promotion=that.data.promotion | ||
579 | + var all_both_choose = that.data.all_both_choose | ||
580 | + var n = that.data.n | ||
581 | + var m=0 | ||
582 | + goodsList.forEach(function(ele, index) { | ||
583 | + if (ele.chooseAll) { | ||
584 | + for (let i = 0; i < ele.list.length; i++) { | ||
585 | + ele.list[i].flag = false | ||
586 | + } | ||
587 | + ele.chooseAll = false | ||
588 | + n-- | ||
589 | + that.setData({ | ||
590 | + goodsList: goodsList | ||
591 | + }) | ||
592 | + } else { | ||
593 | + for (let i = 0; i < ele.list.length; i++) { | ||
594 | + ele.list[i].flag = true | ||
595 | + } | ||
596 | + ele.chooseAll = true | ||
597 | + n++ | ||
598 | + that.setData({ | ||
599 | + goodsList: goodsList | ||
600 | + }) | ||
601 | + } | ||
602 | + that.last_both_choose(); | ||
603 | + }); | ||
604 | + // m=goodsList.length+promotion.length | ||
605 | + // console.log("商品"+n) | ||
606 | + // if(n==m){ | ||
607 | + // all_both_choose=true | ||
608 | + // }else{ | ||
609 | + // all_both_choose=false | ||
610 | + // } | ||
611 | + that.setData({ | ||
612 | + // all_both_choose:all_both_choose, | ||
613 | + // n:n | ||
614 | + }) | ||
615 | + that.totalPrice(); | ||
616 | + }, | ||
617 | + chooseAll2() { | ||
618 | + var that = this; | ||
619 | + var promotion = that.data.promotion; | ||
620 | + var goodsList=that.data.goodsList | ||
621 | + var all_both_choose = that.data.all_both_choose | ||
622 | + var n = that.data.n | ||
623 | + var m=0 | ||
624 | + promotion.forEach(function (ele, index) { | ||
625 | + if (ele.chooseAll) { | ||
626 | + for (let i = 0; i < ele.list.length; i++) { | ||
627 | + ele.list[i].flag = false | ||
628 | + } | ||
629 | + ele.chooseAll = false | ||
630 | + n-- | ||
631 | + that.setData({ | ||
632 | + promotion: promotion | ||
633 | + }) | ||
634 | + } else { | ||
635 | + for (let i = 0; i < ele.list.length; i++) { | ||
636 | + ele.list[i].flag = true | ||
637 | + } | ||
638 | + ele.chooseAll = true | ||
639 | + n++ | ||
640 | + that.setData({ | ||
641 | + promotion: promotion | ||
642 | + }) | ||
643 | + } | ||
644 | + that.last_both_choose(); | ||
645 | + }); | ||
646 | + m=goodsList.length+promotion.length | ||
647 | + console.log("促销" + n) | ||
648 | + console.log("促销" + m) | ||
649 | + if(m==n){ | ||
650 | + all_both_choose=true | ||
651 | + } | ||
652 | + else{ | ||
653 | + all_both_choose=false | ||
654 | + } | ||
655 | + that.setData({ | ||
656 | + // all_both_choose:all_both_choose, | ||
657 | + n:n | ||
658 | + }) | ||
659 | + that.totalPrice(); | ||
660 | + }, | ||
661 | + //增加商品数量 | ||
662 | + add(e) { | ||
663 | + var indexs = e.currentTarget.dataset.index | ||
664 | + var cellindex = e.currentTarget.dataset.cellindex | ||
665 | + var goodsList = this.data.goodsList | ||
666 | + var number2 = goodsList[cellindex].list[indexs].number | ||
667 | + console.log(number2+"这个十二号") | ||
668 | + var limit=e.currentTarget.dataset.limit | ||
669 | + if(limit>number2||limit==0){ | ||
670 | + goodsList.forEach(function (ele, index) { | ||
671 | + if (cellindex == index) { | ||
672 | + for (let v in ele.list) { | ||
673 | + if (v == indexs) { | ||
674 | + console.log(number2) | ||
675 | + number2 = ele.list[indexs].number + 1 | ||
676 | + ele.list[indexs].number = ele.list[indexs].number + 1 | ||
677 | + console.log(number2) | ||
678 | + let url = '/wxapp/cart/editCartNumber' | ||
679 | + let params = { | ||
680 | + id: ele.list[indexs].id, | ||
681 | + num: number2 | ||
682 | + } | ||
683 | + app.post(url, params).then(r => { | ||
684 | + if (r.code == 1) { | ||
685 | + console.log(r) | ||
686 | + } | ||
687 | + }) | ||
688 | + } | ||
689 | + } | ||
690 | + } | ||
691 | + }) | ||
692 | + this.amount(); | ||
693 | + this.setData({ | ||
694 | + goodsList: goodsList, | ||
695 | + }) | ||
696 | + this.totalPrice(); | ||
697 | + }else{ | ||
698 | + wx.showToast({ | ||
699 | + title: '限购'+limit+'件', | ||
700 | + icon:'none' | ||
701 | + }) | ||
702 | + return | ||
703 | + } | ||
704 | + }, | ||
705 | + add2(e) { | ||
706 | + var indexs = e.currentTarget.dataset.index | ||
707 | + var cellindex = e.currentTarget.dataset.cellindex | ||
708 | + var promotion = this.data.promotion | ||
709 | + var number2 = promotion[cellindex].list[indexs].number | ||
710 | + var limit = e.currentTarget.dataset.limit | ||
711 | + if(limit>number2||limit==0){ | ||
712 | + promotion.forEach(function (ele, index) { | ||
713 | + if (cellindex == index) { | ||
714 | + for (let v in ele.list) { | ||
715 | + if (v == indexs) { | ||
716 | + number2 = ele.list[indexs].number + 1 | ||
717 | + ele.list[indexs].number = ele.list[indexs].number + 1 | ||
718 | + let url = '/wxapp/cart/editCartNumber' | ||
719 | + let params = { | ||
720 | + id: ele.list[indexs].id, | ||
721 | + num: number2 | ||
722 | + } | ||
723 | + app.post(url, params).then(r => { | ||
724 | + if (r.code == 1) { | ||
725 | + console.log(r) | ||
726 | + } | ||
727 | + }) | ||
728 | + } | ||
729 | + } | ||
730 | + } | ||
731 | + }) | ||
732 | + this.amount(); | ||
733 | + this.setData({ | ||
734 | + promotion: promotion | ||
735 | + }) | ||
736 | + this.totalPrice(); | ||
737 | + }else{ | ||
738 | + wx.showToast({ | ||
739 | + title: '限购'+limit+'件', | ||
740 | + icon:'none' | ||
741 | + }) | ||
742 | + return | ||
743 | + } | ||
744 | + }, | ||
36 | 745 | ||
37 | - /** | ||
38 | - * 生命周期函数--监听页面隐藏 | ||
39 | - */ | ||
40 | - onHide: function () { | ||
41 | - | ||
42 | - }, | 746 | + //去结算 |
747 | + account() { | ||
748 | + var that = this | ||
749 | + var goodsList = that.data.goodsList | ||
750 | + var id_arr = []; | ||
751 | + goodsList.forEach(function(ele, index) { | ||
752 | + for (var i in ele.list) { | ||
753 | + // console.log(ele.list[i].flag); | ||
754 | + if (ele.list[i].flag) { | ||
755 | + id_arr.push(ele.list[i].id); | ||
756 | + } | ||
757 | + } | ||
758 | + var id_str = id_arr.join(','); | ||
759 | + }); | ||
760 | + wx.navigateTo({ | ||
761 | + url: '../my/settle_account/settle_account?id=' + id_arr + '&price=' + that.data.totalPrice, | ||
762 | + }) | ||
763 | + }, | ||
764 | + /** | ||
765 | + * 生命周期函数--监听页面初次渲染完成 | ||
766 | + */ | ||
767 | + onReady: function() { | ||
768 | + | ||
769 | + }, | ||
43 | 770 | ||
44 | - /** | ||
45 | - * 生命周期函数--监听页面卸载 | ||
46 | - */ | ||
47 | - onUnload: function () { | ||
48 | - | ||
49 | - }, | 771 | + /** |
772 | + * 生命周期函数--监听页面显示 | ||
773 | + */ | ||
774 | + onShow: function() { | ||
775 | + let a=this.data.shipment.free | ||
776 | + this.fetchCartList(); | ||
777 | + this.setData({ | ||
778 | + chooseAll: false, | ||
779 | + chooseAll2: false, | ||
780 | + totalPrice: 0, | ||
781 | + all_both_choose: false, | ||
782 | + ship_balance:a | ||
783 | + }) | ||
784 | + this.fetchCartNum() | ||
785 | + }, | ||
50 | 786 | ||
51 | - /** | ||
52 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
53 | - */ | ||
54 | - onPullDownRefresh: function () { | ||
55 | - | ||
56 | - }, | 787 | + /** |
788 | + * 生命周期函数--监听页面隐藏 | ||
789 | + */ | ||
790 | + onHide: function() { | ||
57 | 791 | ||
58 | - /** | ||
59 | - * 页面上拉触底事件的处理函数 | ||
60 | - */ | ||
61 | - onReachBottom: function () { | ||
62 | - | ||
63 | - }, | 792 | + }, |
64 | 793 | ||
65 | - /** | ||
66 | - * 用户点击右上角分享 | ||
67 | - */ | ||
68 | - onShareAppMessage: function () { | ||
69 | - | ||
70 | - } | 794 | + /** |
795 | + * 生命周期函数--监听页面卸载 | ||
796 | + */ | ||
797 | + onUnload: function() { | ||
798 | + | ||
799 | + }, | ||
800 | + | ||
801 | + /** | ||
802 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
803 | + */ | ||
804 | + onPullDownRefresh: function() { | ||
805 | + | ||
806 | + }, | ||
807 | + | ||
808 | + /** | ||
809 | + * 页面上拉触底事件的处理函数 | ||
810 | + */ | ||
811 | + onReachBottom: function() { | ||
812 | + | ||
813 | + }, | ||
814 | + | ||
815 | + /** | ||
816 | + * 用户点击右上角分享 | ||
817 | + */ | ||
818 | + onShareAppMessage: function() { | ||
819 | + | ||
820 | + } | ||
71 | }) | 821 | }) |
1 | <!--pages/cart/cart.wxml--> | 1 | <!--pages/cart/cart.wxml--> |
2 | -<view class='cart_box'> | ||
3 | - <view class='top_label'> | ||
4 | - 购物车 | ||
5 | - <view class='del_btn'>删除</view> | ||
6 | - </view> | ||
7 | - <view class='tips'> | ||
8 | - <view class='left'> | ||
9 | - <view class='note'>提示</view>满200元包邮,还差36包邮 | ||
10 | - </view> | ||
11 | - <view class='right' catchtap='get_return'>再逛逛 <icon class='iconfont icon-icondayu'></icon></view> | ||
12 | - </view> | ||
13 | - <!-- 商品列表 --> | ||
14 | - <view class='product_list'> | ||
15 | - <view class='singlepart'> | ||
16 | - <view class='single_part_top'> | ||
17 | - <view class='single_part_left'> | ||
18 | - <view class='iconfont icon-weixuanzhong'></view> | ||
19 | - 标签01商品 | ||
20 | - </view> | ||
21 | - <view class='single_part_right'> | ||
22 | - 鲜橙促销 买1送1 | ||
23 | - <view class='iconfont icon-icondayu'></view> | ||
24 | - </view> | ||
25 | - </view> | ||
26 | - <view class='single_part_items'> | ||
27 | - <view class='single_part_item'> | ||
28 | - <view class='iconfont icon-weixuanzhong'></view> | ||
29 | - <view class='single_part_imgbox'> | ||
30 | - <image src='/pages/imgs/icon32.png' mode='widthFix'></image> | ||
31 | - </view> | ||
32 | - <view class='single_part_detail'> | ||
33 | - <view class='product_title'>泰式冬阴功秘制虾汤620g</view> | ||
34 | - <view class='product_type'>小份 切丝</view> | ||
35 | - <view class='product_action'> | ||
36 | - <view class='price'>¥<text class='detail_price'>26</text></view> | ||
37 | - <view class='action_box'> | ||
38 | - <view class='short action_btn'>-</view> | ||
39 | - <view class='detail_num'>1</view> | ||
40 | - <view class='action_btn'>+</view> | ||
41 | - </view> | ||
42 | - </view> | ||
43 | - </view> | ||
44 | - </view> | ||
45 | - <view class='single_part_item'> | ||
46 | - <view class='iconfont icon-weixuanzhong'></view> | ||
47 | - <view class='single_part_imgbox'> | ||
48 | - <image src='/pages/imgs/icon32.png' mode='widthFix'></image> | ||
49 | - </view> | ||
50 | - <view class='single_part_detail'> | ||
51 | - <view class='product_title'>泰式冬阴功秘制虾汤620g</view> | ||
52 | - <view class='product_type'>小份 切丝</view> | ||
53 | - <view class='product_action'> | ||
54 | - <view class='price'>¥<text class='detail_price'>26</text></view> | ||
55 | - <view class='action_box'> | ||
56 | - <view class='short action_btn'>-</view> | ||
57 | - <view class='detail_num'>1</view> | ||
58 | - <view class='action_btn'>+</view> | ||
59 | - </view> | ||
60 | - </view> | ||
61 | - </view> | ||
62 | - </view> | ||
63 | - </view> | ||
64 | - </view> | ||
65 | - <view class='singlepart'> | ||
66 | - <view class='single_part_top'> | ||
67 | - <view class='single_part_left'> | ||
68 | - <view class='iconfont icon-weixuanzhong'></view> | ||
69 | - 标签01商品 | ||
70 | - </view> | ||
71 | - <view class='single_part_right'> | ||
72 | - 鲜橙促销 买1送1 | ||
73 | - <view class='iconfont icon-icondayu'></view> | ||
74 | - </view> | ||
75 | - </view> | ||
76 | - <view class='single_part_items'> | ||
77 | - <view class='single_part_item'> | ||
78 | - <view class='iconfont icon-weixuanzhong'></view> | ||
79 | - <view class='single_part_imgbox'> | ||
80 | - <image src='/pages/imgs/icon32.png' mode='widthFix'></image> | ||
81 | - </view> | ||
82 | - <view class='single_part_detail'> | ||
83 | - <view class='product_title'>泰式冬阴功秘制虾汤620g</view> | ||
84 | - <view class='product_type'>小份 切丝</view> | ||
85 | - <view class='product_action'> | ||
86 | - <view class='price'>¥<text class='detail_price'>26</text></view> | ||
87 | - <view class='action_box'> | ||
88 | - <view class='short action_btn'>-</view> | ||
89 | - <view class='detail_num'>1</view> | ||
90 | - <view class='action_btn'>+</view> | ||
91 | - </view> | ||
92 | - </view> | ||
93 | - </view> | ||
94 | - </view> | ||
95 | - <view class='single_part_item'> | ||
96 | - <view class='iconfont icon-weixuanzhong'></view> | ||
97 | - <view class='single_part_imgbox'> | ||
98 | - <image src='/pages/imgs/icon32.png' mode='widthFix'></image> | ||
99 | - </view> | ||
100 | - <view class='single_part_detail'> | ||
101 | - <view class='product_title'>泰式冬阴功秘制虾汤620g</view> | ||
102 | - <view class='product_type'>小份 切丝</view> | ||
103 | - <view class='product_action'> | ||
104 | - <view class='price'>¥<text class='detail_price'>26</text></view> | ||
105 | - <view class='action_box'> | ||
106 | - <view class='short action_btn'>-</view> | ||
107 | - <view class='detail_num'>1</view> | ||
108 | - <view class='action_btn'>+</view> | ||
109 | - </view> | ||
110 | - </view> | ||
111 | - </view> | ||
112 | - </view> | ||
113 | - </view> | ||
114 | - </view> | ||
115 | - </view> | ||
116 | - | 2 | +<view class='page'> |
3 | + <view class='cart_box'> | ||
4 | + <view class='top_label'> | ||
5 | + 购物车 | ||
6 | + <view class='del_btn' bindtap='del_btn'>删除 </view> | ||
7 | + </view> | ||
8 | + <view class='tips'> | ||
9 | + <view class='left'> | ||
10 | + <view class='note'>提示</view>满{{listlist.shipment.free}}元包邮,还差{{ship_balance}}包邮 | ||
11 | + </view> | ||
12 | + <view class='right' catchtap='get_return'>再逛逛 | ||
13 | + <icon class='iconfont icon-icondayu'></icon> | ||
14 | + </view> | ||
15 | + </view> | ||
16 | + <!-- 商品列表 --> | ||
17 | + <view> | ||
18 | + <view class='product_list' wx:if='{{goodsList.length>0||promotion.length>0}}'> | ||
19 | + <view class='singlepart' wx:for='{{goodsList}}' wx:for-item='cell' wx:for-index='cellindex' wx:key='{{cellindex}}'> | ||
20 | + <view class='single_part_top'> | ||
21 | + <view class='single_part_left'> | ||
22 | + <view class='iconfont icon-weixuanzhong {{cell.chooseAll?"active":""}}' bindtap='chooseAll'></view> | ||
23 | + {{cell.name}} | ||
24 | + </view> | ||
25 | + <!-- <view class='single_part_right'> | ||
26 | + 鲜橙促销 买1送1 | ||
27 | + <view class='iconfont icon-icondayu'></view> | ||
28 | + </view> --> | ||
29 | + </view> | ||
30 | + <view class='single_part_items'> | ||
31 | + <view class='single_part_item' wx:for='{{cell.list}}' wx:key='*this' wx:for-index='index' wx:for-item='value' data-id='{{value.product_id}}' bindtap='goDetail'> | ||
32 | + <view class='iconfont icon-weixuanzhong {{value.flag?"active":""}}' data-cell='{{cellindex}}' catchtap='choose' data-id='{{value.id}}' data-flag='{{value.flag}}' data-index='{{index}}'></view> | ||
33 | + <view class='single_part_imgbox'> | ||
34 | + <image src='{{value.more.thumbnail}}' mode='widthFix'></image> | ||
35 | + </view> | ||
36 | + <view class='single_part_detail'> | ||
37 | + <view class='product_title'>{{value.title}}</view> | ||
38 | + <view class='product_type'>{{value.sku_values}}</view> | ||
39 | + <view class='product_action'> | ||
40 | + <view class='price'>¥ | ||
41 | + <text class='detail_price'>{{value.goods_price}}</text> | ||
42 | + </view> | ||
43 | + <view class='action_box'> | ||
44 | + <view class='short action_btn' catchtap='dec' data-number='{{value.number}}' data-index='{{index}}' data-cellindex='{{cellindex}}'>-</view> | ||
45 | + <view class='detail_num'>{{value.number}}</view> | ||
46 | + <view class='action_btn' catchtap='add' data-limit='{{value.limit_numer}}' data-number='{{value.number}}' data-index='{{index}}' data-cellindex='{{cellindex}}'>+</view> | ||
47 | + </view> | ||
48 | + </view> | ||
49 | + </view> | ||
50 | + </view> | ||
51 | + </view> | ||
52 | + </view> | ||
53 | + <view class='singlepart' data-id='{{cell.id}}' bindtap='goDetail2' wx:for='{{promotion}}' wx:for-item='cell' wx:for-index='cellindex' wx:key='{{cellindex}}'> | ||
54 | + <view class='single_part_top'> | ||
55 | + <view class='single_part_left'> | ||
56 | + <view class='iconfont icon-weixuanzhong {{cell.chooseAll?"active":""}}' catchtap='chooseAll2'></view> | ||
57 | + {{cell.name}} | ||
58 | + </view> | ||
59 | + <!-- <view class='single_part_right'> | ||
60 | + 鲜橙促销 买1送1 | ||
61 | + <view class='iconfont icon-icondayu'></view> | ||
62 | + </view> --> | ||
63 | + </view> | ||
64 | + <view class='single_part_items'> | ||
65 | + <view class='single_part_item' wx:for='{{cell.list}}' wx:key='*this' wx:for-index='index' wx:for-item='value'> | ||
66 | + <view class='iconfont icon-weixuanzhong {{value.flag?"active":""}}' catchtap='choose2' data-cell='{{cellindex}}' data-id='{{value.id}}' data-flag='{{value.flag}}' data-index='{{index}}'></view> | ||
67 | + <view class='single_part_imgbox'> | ||
68 | + <image src='{{value.more.thumbnail}}' mode='widthFix'></image> | ||
69 | + </view> | ||
70 | + <view class='single_part_detail'> | ||
71 | + <view class='product_title'>{{value.title}}</view> | ||
72 | + <view class='product_type'>{{value.sku_values}}</view> | ||
73 | + <view class='product_action'> | ||
74 | + <view class='price'>¥ | ||
75 | + <text class='detail_price'>{{value.goods_price}}</text> | ||
76 | + </view> | ||
77 | + <!-- <view class='action_box'> | ||
78 | + <view class='short action_btn' catchtap='dec2' data-number='{{value.number}}' data-index='{{index}}' data-cellindex='{{cellindex}}'>-</view> | ||
79 | + <view class='detail_num'>{{value.number}}</view> | ||
80 | + <view class='action_btn' catchtap='add2' data-limit='{{value.limit_numer}}' data-number='{{value.number}}' data-index='{{index}}' data-cellindex='{{cellindex}}'>+</view> | ||
81 | + </view> --> | ||
82 | + </view> | ||
83 | + </view> | ||
84 | + </view> | ||
85 | + </view> | ||
86 | + </view> | ||
87 | + </view> | ||
88 | + <view wx:else class='gogogo'>请先去选择商品</view> | ||
89 | + </view> | ||
117 | 90 | ||
118 | -</view> | ||
119 | - <view class='bottom_ac'> | ||
120 | - <view class='choose'> | ||
121 | - <view class='iconfont icon-weixuanzhong'></view> 全选 | ||
122 | - </view> | ||
123 | 91 | ||
124 | - <view class='count'> | ||
125 | - <view class='count_top'> | ||
126 | - 合计:<view class='price'>¥<text class='detail_price'>26</text></view> | ||
127 | - </view> | ||
128 | - <view class='fee'> | ||
129 | - 含运费10元 | ||
130 | - </view> | ||
131 | - </view> | ||
132 | - <view class='count_btn'> | ||
133 | - 结算 | ||
134 | - </view> | ||
135 | - </view> | ||
92 | + </view> | ||
93 | + <view class='bottom_ac'> | ||
94 | + <view class='choose' bindtap='allBothChoose'> | ||
95 | + <view class='iconfont icon-weixuanzhong {{all_both_choose?"active":""}}'></view> 全选 | ||
96 | + </view> | ||
97 | + <view class='count'> | ||
98 | + <view class='count_top'> | ||
99 | + 合计: | ||
100 | + <view class='price'>¥ | ||
101 | + <text class='detail_price'>{{totalPrice}} </text> | ||
102 | + </view> | ||
103 | + </view> | ||
104 | + <view class='fee'> | ||
105 | + 含运费{{shipPrice}}元 | ||
106 | + </view> | ||
107 | + </view> | ||
108 | + <view class='count_btn' bindtap='settleAccountGoods'> | ||
109 | + <!-- 原来是account --> | ||
110 | + 结算 | ||
111 | + </view> | ||
112 | + </view> | ||
113 | +</view> |
@@ -5,6 +5,17 @@ page{ | @@ -5,6 +5,17 @@ page{ | ||
5 | flex-flow: column; | 5 | flex-flow: column; |
6 | height: 100%; | 6 | height: 100%; |
7 | } | 7 | } |
8 | +.page{ | ||
9 | + overflow-x: hidden; | ||
10 | + min-height: 100%; | ||
11 | +} | ||
12 | +.gogogo{ | ||
13 | + text-align: center; | ||
14 | + line-height: 500rpx; | ||
15 | + color: #888; | ||
16 | + font-size: 32rpx; | ||
17 | + | ||
18 | +} | ||
8 | .cart_box{ | 19 | .cart_box{ |
9 | flex: 1; | 20 | flex: 1; |
10 | display: flex; | 21 | display: flex; |
@@ -59,12 +70,13 @@ page{ | @@ -59,12 +70,13 @@ page{ | ||
59 | margin-right: 30rpx; | 70 | margin-right: 30rpx; |
60 | } | 71 | } |
61 | .product_list{ | 72 | .product_list{ |
62 | - padding: 0 25rpx; | ||
63 | flex: 1; | 73 | flex: 1; |
64 | overflow-y: scroll; | 74 | overflow-y: scroll; |
65 | } | 75 | } |
66 | .singlepart{ | 76 | .singlepart{ |
67 | border-top: 22rpx solid #FAFAFA; | 77 | border-top: 22rpx solid #FAFAFA; |
78 | + padding: 0 25rpx; | ||
79 | + box-sizing: border-box | ||
68 | } | 80 | } |
69 | .single_part_top{ | 81 | .single_part_top{ |
70 | height: 90rpx; | 82 | height: 90rpx; |
@@ -88,6 +100,9 @@ page{ | @@ -88,6 +100,9 @@ page{ | ||
88 | font-size: 40rpx; | 100 | font-size: 40rpx; |
89 | margin-right: 24rpx; | 101 | margin-right: 24rpx; |
90 | } | 102 | } |
103 | +.single_part_left .iconfont.active,.icon-weixuanzhong.active{ | ||
104 | + color:#FFDA44 | ||
105 | +} | ||
91 | .single_part_item{ | 106 | .single_part_item{ |
92 | display: flex; | 107 | display: flex; |
93 | margin: 30rpx 0 60rpx; | 108 | margin: 30rpx 0 60rpx; |
@@ -105,6 +120,7 @@ page{ | @@ -105,6 +120,7 @@ page{ | ||
105 | margin-left: 20rpx; | 120 | margin-left: 20rpx; |
106 | margin-right: 40rpx; | 121 | margin-right: 40rpx; |
107 | } | 122 | } |
123 | + | ||
108 | .single_part_imgbox image{ | 124 | .single_part_imgbox image{ |
109 | width: 100%; | 125 | width: 100%; |
110 | } | 126 | } |
@@ -160,12 +176,16 @@ page{ | @@ -160,12 +176,16 @@ page{ | ||
160 | padding: 0 16rpx; | 176 | padding: 0 16rpx; |
161 | } | 177 | } |
162 | .bottom_ac{ | 178 | .bottom_ac{ |
179 | + width: 100%; | ||
163 | height: 100rpx; | 180 | height: 100rpx; |
164 | display: flex; | 181 | display: flex; |
165 | padding-left:25rpx; | 182 | padding-left:25rpx; |
166 | background: #FFF; | 183 | background: #FFF; |
167 | align-items: center; | 184 | align-items: center; |
168 | border-top: 1px solid #EFEFEF; | 185 | border-top: 1px solid #EFEFEF; |
186 | + position: absolute; | ||
187 | + bottom: 0; | ||
188 | + left: 0; | ||
169 | } | 189 | } |
170 | .choose{ | 190 | .choose{ |
171 | display: flex; | 191 | display: flex; |
@@ -199,4 +219,7 @@ page{ | @@ -199,4 +219,7 @@ page{ | ||
199 | justify-self: flex-end; | 219 | justify-self: flex-end; |
200 | margin-left: auto; | 220 | margin-left: auto; |
201 | -webkit-margin-start: auto; | 221 | -webkit-margin-start: auto; |
222 | + position: absolute; | ||
223 | + right: 0; | ||
224 | + top: 0 | ||
202 | } | 225 | } |
pages/cart/mask/mask.js
0 → 100644
1 | +// pages/cart/mask/mask.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + navList: ['今日特惠', '烟灶推荐', '净水饮水推荐', '洗碗机推荐', '电热推荐', '燃热推荐', '消毒柜推荐', '嵌入式推荐', '商用电器', '活动说明'], | ||
9 | + | ||
10 | + navLists: ['今日特惠', '烟灶推荐', '净水饮水推荐', '洗碗机推荐', '电热推荐', '燃热推荐', '消毒柜推荐', '嵌入式推荐', '商用电器', '活动说明'], status: 0, | ||
11 | + multiArray: [['宴会庆典', '峰会论坛', '商业活动'], ["协会活动", "慈善活动", "答谢活动", "区块链", "人工智能", "大数据", "品牌推广", "开业庆典", "展会活动"]], | ||
12 | + multiIndex: [0, 0], | ||
13 | + | ||
14 | + }, | ||
15 | + getStatus(e) { | ||
16 | + this.setData({ | ||
17 | + status: e.currentTarget.dataset.index | ||
18 | + }) | ||
19 | + }, | ||
20 | + | ||
21 | + | ||
22 | + /** | ||
23 | + * 生命周期函数--监听页面加载 | ||
24 | + */ | ||
25 | + onLoad: function (options) { | ||
26 | + | ||
27 | + }, | ||
28 | + | ||
29 | + /** | ||
30 | + * 生命周期函数--监听页面初次渲染完成 | ||
31 | + */ | ||
32 | + onReady: function () { | ||
33 | + | ||
34 | + }, | ||
35 | + | ||
36 | + /** | ||
37 | + * 生命周期函数--监听页面显示 | ||
38 | + */ | ||
39 | + onShow: function () { | ||
40 | + | ||
41 | + }, | ||
42 | + | ||
43 | + /** | ||
44 | + * 生命周期函数--监听页面隐藏 | ||
45 | + */ | ||
46 | + onHide: function () { | ||
47 | + | ||
48 | + }, | ||
49 | + | ||
50 | + /** | ||
51 | + * 生命周期函数--监听页面卸载 | ||
52 | + */ | ||
53 | + onUnload: function () { | ||
54 | + | ||
55 | + }, | ||
56 | + | ||
57 | + /** | ||
58 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
59 | + */ | ||
60 | + onPullDownRefresh: function () { | ||
61 | + | ||
62 | + }, | ||
63 | + | ||
64 | + /** | ||
65 | + * 页面上拉触底事件的处理函数 | ||
66 | + */ | ||
67 | + onReachBottom: function () { | ||
68 | + | ||
69 | + }, | ||
70 | + bindMultiPickerChange(e) { | ||
71 | + this.setData({ | ||
72 | + multiIndex: e.detail.value | ||
73 | + }) | ||
74 | + }, | ||
75 | + bindMultiPickerColumnChange(e) { | ||
76 | + const data = { | ||
77 | + multiArray: this.data.multiArray, | ||
78 | + multiIndex: this.data.multiIndex | ||
79 | + } | ||
80 | + data.multiIndex[e.detail.column] = e.detail.value | ||
81 | + switch (e.detail.column) { | ||
82 | + case 0: | ||
83 | + switch (data.multiIndex[0]) { | ||
84 | + case 0: | ||
85 | + data.multiArray[1] = ["协会活动", "慈善活动", "答谢活动"] | ||
86 | + break | ||
87 | + case 1: | ||
88 | + data.multiArray[1] = ["区块链", "人工智能", "大数据"] | ||
89 | + break | ||
90 | + case 2: | ||
91 | + data.multiArray[1] = ["品牌推广", "开业庆典", "展会活动"] | ||
92 | + break | ||
93 | + } | ||
94 | + data.multiIndex[1] = 0 | ||
95 | + break | ||
96 | + } | ||
97 | + console.log(data.multiIndex) | ||
98 | + this.setData(data) | ||
99 | + }, | ||
100 | + /** | ||
101 | + * 用户点击右上角分享 | ||
102 | + */ | ||
103 | + onShareAppMessage: function () { | ||
104 | + | ||
105 | + } | ||
106 | +}) |
pages/cart/mask/mask.json
0 → 100644
pages/cart/mask/mask.wxml
0 → 100644
1 | +<view class="tui-city-scroll"> | ||
2 | +<swiper > | ||
3 | + <swiper-item wx:for="{{navList}}" wx:key=""> | ||
4 | + <text bindtap="getStatus" id="Nav{{index}}" class="tui-nav-li {{index === status ? 'tui-nav-active' : ''}}" data-index="{{index}}">{{item}}</text> | ||
5 | + </swiper-item> | ||
6 | +</swiper> | ||
7 | +</view> | ||
8 | +<!--列表滚动区 --> | ||
9 | +<view class="tui-fixed-y"> | ||
10 | + <scroll-view class="tui-city-scroll-y" scroll-y="true" scroll-into-view="Nav{{status}}" scroll-with-animation="true"> | ||
11 | + <view wx:for="{{navList}}" wx:key="{{item}}"> | ||
12 | + <view id="Nav{{index}}" class="tui-list-head">{{item}}</view> | ||
13 | + <view class="tui-list-li">{{item}} 列表 {{index}}</view> | ||
14 | + </view> | ||
15 | + </scroll-view> | ||
16 | +</view> | ||
17 | + | ||
18 | +<view class="section"> | ||
19 | + <picker | ||
20 | + mode="multiSelector" | ||
21 | + bindchange="bindMultiPickerChange" | ||
22 | + bindcolumnchange="bindMultiPickerColumnChange" | ||
23 | + value="{{multiIndex}}" | ||
24 | + range="{{multiArray}}" | ||
25 | + > | ||
26 | + <view class="picker"> | ||
27 | + 当前选择:{{multiArray[0][multiIndex[0]]}},{{multiArray[1][multiIndex[1]]}} | ||
28 | + </view> | ||
29 | + </picker> | ||
30 | +</view> |
pages/cart/mask/mask.wxss
0 → 100644
1 | +/* .tui-fixed-x{ | ||
2 | + width: 100%; | ||
3 | + position: fixed; | ||
4 | + top: 0; | ||
5 | + left: 0; | ||
6 | +} | ||
7 | +.tui-city-scroll{ | ||
8 | + height: 80rpx; | ||
9 | + line-height: 80rpx; | ||
10 | + width: 100%; | ||
11 | + white-space: nowrap; | ||
12 | +} | ||
13 | +.tui-nav-li{ | ||
14 | + font-size: 30rpx; | ||
15 | + padding: 0 8rpx; | ||
16 | +} | ||
17 | +.tui-nav-li:first-child{padding-left: 16rpx;} | ||
18 | +.tui-nav-li:last-child{padding-right: 16rpx;} | ||
19 | +.tui-nav-active{color: red;} | ||
20 | +.tui-fixed-y{ | ||
21 | + width: 100%; | ||
22 | + height: calc(100% - 80rpx); | ||
23 | + position: fixed; | ||
24 | + bottom: 0; | ||
25 | + left: 0; | ||
26 | +} | ||
27 | +.tui-city-scroll-y{ | ||
28 | + padding: 0 20rpx; | ||
29 | + height: 100%; | ||
30 | + box-sizing: border-box; | ||
31 | +} | ||
32 | +.tui-list-head{ | ||
33 | + height: 50px; | ||
34 | + line-height: 50px; | ||
35 | + text-align: center; | ||
36 | + font-size: 30rpx; | ||
37 | + color: blue; | ||
38 | +} | ||
39 | +.tui-list-li{ | ||
40 | + height: 400px; | ||
41 | + padding: 10rpx; | ||
42 | + color: #fff; | ||
43 | + font-size: 50rpx; | ||
44 | + background-color: lightgreen; | ||
45 | +} | ||
46 | + */ | ||
47 | + |
pages/imgs/aicon48.png
0 → 100644
2.4 KB
pages/imgs/aicon49.png
0 → 100644
2.5 KB
pages/imgs/atan@2x.png
已删除
100644 → 0
196.6 KB
pages/imgs/bg.png
已删除
100644 → 0
3.6 KB
pages/imgs/bianji.png
0 → 100644
1.3 KB
pages/imgs/caipu.png
已删除
100644 → 0
63.9 KB
pages/imgs/deleteicon.png
0 → 100644
2.6 KB
pages/imgs/ic01@2x.png
已删除
100644 → 0
1.4 KB
pages/imgs/ic02@2x.png
已删除
100644 → 0
1.3 KB
pages/imgs/ic03@2x.png
已删除
100644 → 0
1.1 KB
pages/imgs/ic04@2x.png
已删除
100644 → 0
696 字节
pages/imgs/icon32.png
已删除
100644 → 0
9.0 KB
pages/imgs/icon36.png
已删除
100644 → 0
492 字节
pages/imgs/icon37.png
已删除
100644 → 0
495 字节
pages/imgs/jifen.png
0 → 100644
62.8 KB
pages/imgs/jindou1.png
0 → 100644
13.7 KB
pages/imgs/jindou2.png
0 → 100644
8.6 KB
pages/imgs/jindou3.png
0 → 100644
6.6 KB
pages/imgs/noCoupon (1).png
0 → 100644
9.1 KB
pages/imgs/personal_bj.png
0 → 100644
11.2 KB
pages/imgs/pic1.png
已删除
100644 → 0
125.8 KB
pages/imgs/pic19.png
已删除
100644 → 0
77.0 KB
pages/imgs/pic2.png
已删除
100644 → 0
96.3 KB
pages/imgs/pic38.png
已删除
100644 → 0
7.7 KB
pages/imgs/pic41.png
已删除
100644 → 0
23.7 KB
pages/imgs/pic43.png
已删除
100644 → 0
16.4 KB
pages/imgs/pic6.png
已删除
100644 → 0
19.2 KB
pages/imgs/replace.png
0 → 100644
1.3 KB
pages/imgs/transuccess.png
0 → 100644
24.9 KB
pages/imgs/unpay.png
0 → 100644
22.7 KB
pages/imgs/unreceive.png
0 → 100644
36.4 KB
pages/imgs/unship.png
0 → 100644
24.8 KB
pages/imgs/vip_du.png
0 → 100644
2.7 KB
pages/imgs/yifahuo@2x.png
已删除
100644 → 0
721 字节
1 | +// pages/index/goodsDetial/goodsDetial.js | ||
2 | +const app = getApp(); | ||
3 | +Page({ | ||
4 | + | ||
5 | + /** | ||
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + imgUrl: app.globalData.imgUrl, | ||
10 | + shoucang: false, | ||
11 | + active: true, | ||
12 | + show: false, | ||
13 | + shows: false, | ||
14 | + id: 0, | ||
15 | + goods: [], | ||
16 | + ids: [], | ||
17 | + idss: [], | ||
18 | + status: 0, | ||
19 | + cart_count: 0, | ||
20 | + skuid: '', | ||
21 | + num: 1, | ||
22 | + id_arr: [], | ||
23 | + gPrice: 0, | ||
24 | + collocation: [], | ||
25 | + goods_star: 1, | ||
26 | + star_arr: [], | ||
27 | + commentCount: 0, | ||
28 | + favorite: 0, | ||
29 | + totalPrice: 0, | ||
30 | + gPrice: 0, | ||
31 | + is_group: 0, | ||
32 | + packageList: [], | ||
33 | + showList: [], | ||
34 | + showMore: false, | ||
35 | + show1: false, | ||
36 | + goods1: {}, | ||
37 | + origin: 0, | ||
38 | + skuid_arr: [], | ||
39 | + is_vip: 0 | ||
40 | + }, | ||
41 | + fetchVip() { | ||
42 | + let url = '/wxapp/user/index' | ||
43 | + app.post(url).then(r => { | ||
44 | + if (r.code == 1) { | ||
45 | + console.log(r) | ||
46 | + this.setData({ | ||
47 | + is_vip: r.data.user.is_vip | ||
48 | + }) | ||
49 | + this.fetchGoods() | ||
50 | + } | ||
51 | + }) | ||
52 | + }, | ||
53 | + //进入评论列表 | ||
54 | + jump_user_comment(e) { | ||
55 | + let id = e.currentTarget.dataset.id | ||
56 | + wx.navigateTo({ | ||
57 | + url: '../user_comment/user_comment?id=' + this.data.id | ||
58 | + }) | ||
59 | + }, | ||
60 | + //进入商品详情 | ||
61 | + goDetail(e) { | ||
62 | + wx.navigateTo({ | ||
63 | + url: '../goodsDetials/goodsDetials?id=' + e.currentTarget.dataset.id | ||
64 | + }) | ||
65 | + }, | ||
66 | + //减少数量 | ||
67 | + dec_num() { | ||
68 | + var num = this.data.num; | ||
69 | + if (num <= 1) { | ||
70 | + return; | ||
71 | + } else { | ||
72 | + num-- | ||
73 | + } | ||
74 | + this.setData({ | ||
75 | + num: num | ||
76 | + }); | ||
77 | + this.totalPrice() | ||
78 | + }, | ||
79 | + //增加数量 | ||
80 | + add_num() { | ||
81 | + var num = this.data.num; | ||
82 | + num++ | ||
83 | + this.setData({ | ||
84 | + num: num | ||
85 | + }); | ||
86 | + this.totalPrice(); | ||
87 | + }, | ||
88 | + //总价格 | ||
89 | + totalPrice() { | ||
90 | + var that = this | ||
91 | + var total = that.data.goods.info.price * that.data.num | ||
92 | + that.setData({ | ||
93 | + totalPrice: total | ||
94 | + }) | ||
95 | + }, | ||
96 | + //点击收藏 | ||
97 | + collection_true(e) { | ||
98 | + let id = e.currentTarget.dataset.id | ||
99 | + let that = this | ||
100 | + let url = '/wxapp/cookbook_package/setFavorites?id=' + id | ||
101 | + let params = { | ||
102 | + id: id | ||
103 | + } | ||
104 | + app.post(url).then(r => { | ||
105 | + if (r.code == 1) { | ||
106 | + wx.showToast({ | ||
107 | + title: r.msg, | ||
108 | + icon: 'none' | ||
109 | + }) | ||
110 | + that.fetchGoods(); | ||
111 | + } | ||
112 | + }) | ||
113 | + }, | ||
114 | + //促销进商品详情 | ||
115 | + jump_goodsDetial2(e) { | ||
116 | + wx.navigateTo({ | ||
117 | + url: '../goodsDetial2/goodsDetial2?id=' + e.currentTarget.dataset.id | ||
118 | + }) | ||
119 | + }, | ||
120 | + //关闭弹窗 | ||
121 | + close_mask_carts() { | ||
122 | + this.setData({ | ||
123 | + shows: false | ||
124 | + }); | ||
125 | + }, | ||
126 | + //根据id获取内容 | ||
127 | + fetchGoods() { | ||
128 | + let url = '/wxapp/cookbook_package/getPackageInfo'; | ||
129 | + let params = { | ||
130 | + id: this.data.id | ||
131 | + }; | ||
132 | + let that = this | ||
133 | + let showList = [] | ||
134 | + let arr1 = [] | ||
135 | + let skuid1 = 0 | ||
136 | + let skuid_price1 = 0 | ||
137 | + let old_skuid_price1 = 0 | ||
138 | + let skuid_arr = that.data.skuid_arr; | ||
139 | + let is_vip = that.data.is_vip | ||
140 | + console.log(is_vip + 'shibushis') | ||
141 | + app.post(url, params).then(r => { | ||
142 | + // console.log(r); | ||
143 | + r.data.list.forEach(function (ele, indexxx) { | ||
144 | + if (is_vip == 1) { | ||
145 | + ele.ggprice = ele.vip_price | ||
146 | + } else { | ||
147 | + ele.ggprice = ele.price | ||
148 | + } | ||
149 | + if (ele.is_default == 1) { | ||
150 | + showList.push(ele) | ||
151 | + } | ||
152 | + ele.t = false | ||
153 | + ele.attr.attr_sku.forEach(function (eles, indexxxx) { | ||
154 | + for (let i = 0; i < eles.item.length; i++) { | ||
155 | + eles.item[i].t = false | ||
156 | + eles.item[0].t = true; | ||
157 | + arr1.push(eles.item[0].id) | ||
158 | + } | ||
159 | + }) | ||
160 | + arr1.sort(); | ||
161 | + let arr2 = [...new Set(arr1)] | ||
162 | + ele.arr = arr2 | ||
163 | + let str1 = arr2.join('_'); | ||
164 | + let sys_attrprice1 = r.data.list[indexxx].sys_attrprice | ||
165 | + | ||
166 | + if (ele.attr.attr_sku.length == 0) { | ||
167 | + return; | ||
168 | + } else { | ||
169 | + for (let i in sys_attrprice1) { | ||
170 | + if (i == str1) { | ||
171 | + skuid1 = sys_attrprice1[i].skuid | ||
172 | + skuid_price1 = sys_attrprice1[i].price | ||
173 | + old_skuid_price1 = sys_attrprice1[i].old_price | ||
174 | + } | ||
175 | + } | ||
176 | + } | ||
177 | + ele.ggid = skuid1 | ||
178 | + if (ele.ggid) { | ||
179 | + skuid_arr.push(skuid1) | ||
180 | + } | ||
181 | + str1 = '' | ||
182 | + arr1 = [] | ||
183 | + }) | ||
184 | + if (r.data.groupType) { | ||
185 | + var days = '' | ||
186 | + var hours = '' | ||
187 | + var minutes = '' | ||
188 | + var seconds = '' | ||
189 | + var percent = 0 | ||
190 | + function time() { | ||
191 | + var cut_time = r.data.groupType.count_down_time | ||
192 | + days = Math.floor((cut_time) / (60 * 60 * 24)); | ||
193 | + hours = Math.floor((cut_time) / (60 * 60)) % 24; | ||
194 | + minutes = Math.floor((cut_time) / (60)) % 60; | ||
195 | + seconds = cut_time % 60; | ||
196 | + percent = Math.floor(r.data.info.group_number * 100 / r.data.info.group_min_number) | ||
197 | + } | ||
198 | + time(); | ||
199 | + // setInterval(time, 1000); | ||
200 | + that.setData({ | ||
201 | + day: days, | ||
202 | + hour: hours, | ||
203 | + minute: minutes, | ||
204 | + second: seconds, | ||
205 | + percent: percent, | ||
206 | + goods: r.data, | ||
207 | + gPrice: r.data.info.price, | ||
208 | + collocation: r.data.collocation, | ||
209 | + comment: r.data.comment, | ||
210 | + // star_arr: star_arr, | ||
211 | + is_group: r.data.info.group_min_number | ||
212 | + }); | ||
213 | + } else { | ||
214 | + that.setData({ | ||
215 | + goods: r.data, | ||
216 | + gPrice: r.data.info.price, | ||
217 | + // comment: r.data.comment, | ||
218 | + packageList: r.data.list, | ||
219 | + showList: showList | ||
220 | + }); | ||
221 | + } | ||
222 | + }); | ||
223 | + }, | ||
224 | + //渲染评论列表 | ||
225 | + fetchCommentList() { | ||
226 | + let url = '/wxapp/product/comment?id=' + this.data.id | ||
227 | + app.post(url).then(r => { | ||
228 | + this.setData({ | ||
229 | + commentCount: r.data.length | ||
230 | + }); | ||
231 | + }) | ||
232 | + }, | ||
233 | + //点击更换菜品 | ||
234 | + replaceDishes() { | ||
235 | + this.setData({ | ||
236 | + showMore: true | ||
237 | + }) | ||
238 | + wx.pageScrollTo({ | ||
239 | + scrollTop: 0, | ||
240 | + }) | ||
241 | + }, | ||
242 | + | ||
243 | + /** | ||
244 | + * 生命周期函数--监听页面加载 | ||
245 | + */ | ||
246 | + onLoad: function (options) { | ||
247 | + console.log(options) | ||
248 | + this.fetchVip(); | ||
249 | + var query = wx.createSelectorQuery(); | ||
250 | + var offset = query.select('.itme_list5'); | ||
251 | + this.setData({ | ||
252 | + id: options.id | ||
253 | + }); | ||
254 | + // this.fetchGoods(); | ||
255 | + this.fetchCommentList(); | ||
256 | + }, | ||
257 | + // 返回上一页 | ||
258 | + get_back() { | ||
259 | + wx.navigateBack({}) | ||
260 | + }, | ||
261 | + //弹框返回 | ||
262 | + closeShowMore() { | ||
263 | + let that = this | ||
264 | + let goods = that.data.goods | ||
265 | + let num = goods.info.num | ||
266 | + let showList = [] | ||
267 | + let n = 0 | ||
268 | + goods.list.forEach(function (ele, index) { | ||
269 | + if (ele.t) { | ||
270 | + showList.push(ele) | ||
271 | + n++; | ||
272 | + } | ||
273 | + }) | ||
274 | + if ((n < goods.info.num && n > 0) || n > goods.info.num) { | ||
275 | + wx.showToast({ | ||
276 | + title: '请选择' + num + '种商品', | ||
277 | + icon: 'none' | ||
278 | + }) | ||
279 | + return; | ||
280 | + } else { | ||
281 | + if (showList.length == 0) { | ||
282 | + that.setData({ | ||
283 | + showMore: false, | ||
284 | + }) | ||
285 | + } else { | ||
286 | + that.setData({ | ||
287 | + showMore: false, | ||
288 | + showList: showList | ||
289 | + }) | ||
290 | + } | ||
291 | + } | ||
292 | + }, | ||
293 | + //attr选择规格 | ||
294 | + chooseStandard(e) { | ||
295 | + let origin = e.currentTarget.dataset.origin | ||
296 | + if (e.currentTarget.dataset.shop.attr.attr_sku.length == 0) { | ||
297 | + wx.showToast({ | ||
298 | + title: '暂无规格', | ||
299 | + icon: "none", | ||
300 | + duration: 1300 | ||
301 | + }) | ||
302 | + } else { | ||
303 | + this.setData({ | ||
304 | + goods1: e.currentTarget.dataset.shop, | ||
305 | + show1: true, | ||
306 | + origin: origin, | ||
307 | + }); | ||
308 | + } | ||
309 | + }, | ||
310 | + //关闭弹框 | ||
311 | + close_mask_cart1() { | ||
312 | + this.setData({ | ||
313 | + show1: false | ||
314 | + }) | ||
315 | + }, | ||
316 | + //加购筛选 | ||
317 | + changeIds1(e) { | ||
318 | + let t = this; | ||
319 | + let goods = t.data.showList; | ||
320 | + let iindex = e.currentTarget.dataset.origin | ||
321 | + //父级索引 | ||
322 | + let parent = e.currentTarget.dataset.parent | ||
323 | + goods.forEach(function (ele, index) { | ||
324 | + if (iindex == index) { | ||
325 | + let new_arr = ele.arr | ||
326 | + let listAll = ele.attr.attr_sku; | ||
327 | + // 父级索引 | ||
328 | + let x = e.currentTarget.dataset.index; | ||
329 | + // 当前点击Id | ||
330 | + let nowId = e.currentTarget.dataset.gid; | ||
331 | + //当前点击value | ||
332 | + let nowValue = e.currentTarget.dataset.item; | ||
333 | + // 子集索引 | ||
334 | + let nowIndex = e.currentTarget.dataset.index; | ||
335 | + // 当前可否多选 | ||
336 | + let is_checkMore = false | ||
337 | + let foo = new_arr.indexOf(nowId) | ||
338 | + if (foo > -1) { | ||
339 | + new_arr.splice(foo, 1) | ||
340 | + } else { | ||
341 | + ele.attr.attr_sku.forEach(function (eles, indexxxx) { | ||
342 | + if (indexxxx == parent) { | ||
343 | + for (let i = 0; i < eles.item.length; i++) { | ||
344 | + let havId = ele.attr.attr_sku[indexxxx].item[i].id | ||
345 | + let have = new_arr.indexOf(havId) | ||
346 | + if (have > -1) { | ||
347 | + new_arr.splice(have, 1) | ||
348 | + } | ||
349 | + } | ||
350 | + } | ||
351 | + }) | ||
352 | + } | ||
353 | + // 当前点击父级值 | ||
354 | + let tempArry = JSON.parse(JSON.stringify(ele.attr.attr_sku[parent])); | ||
355 | + !tempArry.chooseIndex ? tempArry.chooseIndex = [] : ''; | ||
356 | + // 是否多选 | ||
357 | + if (is_checkMore) { } else { | ||
358 | + tempArry.chooseIndex.pop(); | ||
359 | + tempArry.chooseIndex.push(nowId); | ||
360 | + for (let obj of tempArry.item) { | ||
361 | + obj.t = false | ||
362 | + } | ||
363 | + tempArry.item[nowIndex].t = true; | ||
364 | + } | ||
365 | + ele.attr.attr_sku[parent] = tempArry; | ||
366 | + } | ||
367 | + }) | ||
368 | + t.setData({ | ||
369 | + goods1: goods[iindex] | ||
370 | + }) | ||
371 | + // let goods = t.data.goodsList; | ||
372 | + goods.forEach(function (ele, indexaa) { | ||
373 | + if (iindex == indexaa) { | ||
374 | + let new_arr = ele.arr | ||
375 | + let sys_attrprice = goods[indexaa].sys_attrprice; | ||
376 | + let new_arr_item = []; | ||
377 | + let str = '' | ||
378 | + let skuid = 0 | ||
379 | + let skuid_price = 0 | ||
380 | + let old_skuid_price = 0 | ||
381 | + let vip_skuid_price = 0 | ||
382 | + ele.attr.attr_sku.forEach(function (eles, indexx) { | ||
383 | + if (indexx == parent) { | ||
384 | + new_arr = new_arr.concat(eles.chooseIndex); | ||
385 | + } | ||
386 | + }) | ||
387 | + new_arr = new_arr.sort() | ||
388 | + str = new_arr.join('_') | ||
389 | + ele.arr = new_arr | ||
390 | + t.setData({ | ||
391 | + goodsList: goods | ||
392 | + }) | ||
393 | + new_arr_item = new_arr_item.join(','); | ||
394 | + new_arr_item = new_arr_item.replace(/,/g, " "); | ||
395 | + for (let i in sys_attrprice) { | ||
396 | + if (i == str) { | ||
397 | + skuid = sys_attrprice[i].skuid | ||
398 | + skuid_price = sys_attrprice[i].price | ||
399 | + old_skuid_price = sys_attrprice[i].old_price | ||
400 | + vip_skuid_price = sys_attrprice[i].vip_price | ||
401 | + | ||
402 | + ele.ggid = skuid; | ||
403 | + var ggprice = 0 | ||
404 | + if (t.data.is_vip == 1) { | ||
405 | + ggprice = vip_skuid_price | ||
406 | + } else { | ||
407 | + ggprice = skuid_price | ||
408 | + } | ||
409 | + ele.ggprice = ggprice | ||
410 | + ele.arr = new_arr | ||
411 | + } | ||
412 | + } | ||
413 | + } | ||
414 | + }) | ||
415 | + t.setData({ | ||
416 | + goodsList: goods | ||
417 | + }) | ||
418 | + console.log(101010101) | ||
419 | + }, | ||
420 | + //skuid加入skuid_arr | ||
421 | + hide_mask1(e) { | ||
422 | + var skuid_arr = this.data.skuid_arr | ||
423 | + var skuid1 = this.data.skuid1 | ||
424 | + var indexs = e.currentTarget.dataset.index | ||
425 | + if (skuid1 != 0) { | ||
426 | + // skuid_arr.push(skuid1) | ||
427 | + } | ||
428 | + var goods = this.data.showList | ||
429 | + goods.forEach(function (ele, index) { | ||
430 | + if (index == indexs) { | ||
431 | + for (let i = 0; i < ele.attr.attr_sku.length; i++) { | ||
432 | + if (ele.arr.length == 1) { | ||
433 | + wx.showToast({ | ||
434 | + title: '请选择全部属性', | ||
435 | + icon: 'none' | ||
436 | + }) | ||
437 | + } | ||
438 | + } | ||
439 | + } | ||
440 | + }) | ||
441 | + this.setData({ | ||
442 | + show1: false, | ||
443 | + skuid_arr: skuid_arr | ||
444 | + }) | ||
445 | + }, | ||
446 | + //立即购买 | ||
447 | + go_pay_sale() { | ||
448 | + var that = this | ||
449 | + var goodsList = that.data.showList | ||
450 | + var skuid_arr = [] | ||
451 | + var total_price = 0 | ||
452 | + goodsList.forEach(function (ele, index) { | ||
453 | + var skuid = ele.ggid | ||
454 | + if (ele.ggprice) { | ||
455 | + ele.ggprice = ele.ggprice.substring(0, ele.ggprice.length - 3) | ||
456 | + } | ||
457 | + var price = ele.ggprice * 1 | ||
458 | + if (ele.stock > 0) { | ||
459 | + if (ele.ggid && ele.ggid != 0) { | ||
460 | + total_price += price | ||
461 | + skuid_arr.push(skuid) | ||
462 | + } else { | ||
463 | + wx.showToast({ | ||
464 | + title: '本件商品没有规格属性', | ||
465 | + icon: 'none', | ||
466 | + duration: 1000 | ||
467 | + }) | ||
468 | + ele.t = false | ||
469 | + that.setData({ | ||
470 | + goodsList: goodsList | ||
471 | + }) | ||
472 | + } | ||
473 | + } else { | ||
474 | + wx.showToast({ | ||
475 | + title: '商品已卖完', | ||
476 | + icon: 'none' | ||
477 | + }) | ||
478 | + } | ||
479 | + }) | ||
480 | + console.log(total_price + "总价") | ||
481 | + wx.navigateTo({ | ||
482 | + url: '../../my/settle_account/settle_account?pakSale=' + skuid_arr + '&pakId=' + that.data.goods.info.id | ||
483 | + }) | ||
484 | + }, | ||
485 | + //选区食品包 | ||
486 | + changeFlag(e) { | ||
487 | + let indexs = e.currentTarget.dataset.index | ||
488 | + let that = this | ||
489 | + let list = that.data.packageList | ||
490 | + list.forEach(function (ele, index) { | ||
491 | + if (indexs == index) { | ||
492 | + console.log(ele.t + "之前") | ||
493 | + ele.t = !ele.t | ||
494 | + console.log(ele.t + "之后") | ||
495 | + } | ||
496 | + }) | ||
497 | + that.setData({ | ||
498 | + packageList: list | ||
499 | + }) | ||
500 | + }, | ||
501 | + // 跳转图文食谱 | ||
502 | + get_recipe() { | ||
503 | + wx.navigateTo({ | ||
504 | + url: '../production_steps/production_steps?id=' + this.data.id, | ||
505 | + }) | ||
506 | + }, | ||
507 | + // 跳转购物车 | ||
508 | + get_car() { | ||
509 | + this.setData({ | ||
510 | + show: true | ||
511 | + }); | ||
512 | + }, | ||
513 | + //隐藏mask | ||
514 | + hide_masks() { | ||
515 | + var that = this | ||
516 | + if (that.data.skuid != '') { | ||
517 | + that.setData({ | ||
518 | + shows: false | ||
519 | + }); | ||
520 | + var str = '' | ||
521 | + str = that.data.id_arr.join(','); | ||
522 | + if (that.data.id_arr.length > 1) { | ||
523 | + var gPrice = that.data.num * that.data.gPrice | ||
524 | + console.log(gPrice); | ||
525 | + if (that.data.is_group == 0) { | ||
526 | + wx.navigateTo({ | ||
527 | + url: '../../my/settle_account/settle_account?ids=' + that.data.skuid + '&gid=' + that.data.id + '&num=' + that.data.num + '&gPrice=' + gPrice | ||
528 | + }) | ||
529 | + } else { | ||
530 | + wx.navigateTo({ | ||
531 | + url: '../../my/settle_account/settle_account?ids=' + that.data.skuid + '&gid=' + that.data.id + '&num=' + that.data.num + '&gPrice=' + gPrice + '&is_group=' + that.data.is_group | ||
532 | + }) | ||
533 | + } | ||
534 | + } | ||
535 | + } else { | ||
536 | + wx.showToast({ | ||
537 | + title: '请先选择商品属性组合', | ||
538 | + icon: 'none' | ||
539 | + }) | ||
540 | + } | ||
541 | + }, | ||
542 | + //跳至图文详情 | ||
543 | + jump_detail() { | ||
544 | + this.setData({ | ||
545 | + active: false | ||
546 | + }); | ||
547 | + wx.pageScrollTo({ | ||
548 | + scrollTop: 1200, | ||
549 | + duration: 300 | ||
550 | + }) | ||
551 | + }, | ||
552 | + jump_goods() { | ||
553 | + this.setData({ | ||
554 | + active: true | ||
555 | + }); | ||
556 | + wx.pageScrollTo({ | ||
557 | + scrollTop: 0, | ||
558 | + duration: 300 | ||
559 | + }) | ||
560 | + }, | ||
561 | + //收藏 | ||
562 | + collection() { | ||
563 | + this.setData({ | ||
564 | + shoucang: !this.data.shoucang | ||
565 | + }); | ||
566 | + }, | ||
567 | + | ||
568 | + /** | ||
569 | + * 生命周期函数--监听页面初次渲染完成 | ||
570 | + */ | ||
571 | + onReady: function () { | ||
572 | + | ||
573 | + }, | ||
574 | + | ||
575 | + /** | ||
576 | + * 生命周期函数--监听页面显示 | ||
577 | + */ | ||
578 | + onShow: function () { | ||
579 | + | ||
580 | + }, | ||
581 | + | ||
582 | + /** | ||
583 | + * 生命周期函数--监听页面隐藏 | ||
584 | + */ | ||
585 | + onHide: function () { | ||
586 | + | ||
587 | + }, | ||
588 | + | ||
589 | + /** | ||
590 | + * 生命周期函数--监听页面卸载 | ||
591 | + */ | ||
592 | + onUnload: function () { | ||
593 | + | ||
594 | + }, | ||
595 | + | ||
596 | + /** | ||
597 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
598 | + */ | ||
599 | + onPullDownRefresh: function () { | ||
600 | + | ||
601 | + }, | ||
602 | + | ||
603 | + /** | ||
604 | + * 页面上拉触底事件的处理函数 | ||
605 | + */ | ||
606 | + onReachBottom: function () { | ||
607 | + | ||
608 | + }, | ||
609 | + | ||
610 | + /** | ||
611 | + * 用户点击右上角分享 | ||
612 | + */ | ||
613 | + onShareAppMessage: function () { | ||
614 | + var shareObj = { | ||
615 | + // title: options.target.dataset.title, // 默认是小程序的名称(可以写slogan等) | ||
616 | + path: '/pages/start/start', | ||
617 | + imgUrl: '', | ||
618 | + title: '' | ||
619 | + } | ||
620 | + // if (options.from == 'button') { | ||
621 | + // // 此处可以修改 shareObj 中的内容 | ||
622 | + // shareObj.path = '/pages/start/start?status=' + options.target.dataset.status | ||
623 | + // } | ||
624 | + return shareObj; | ||
625 | + } | ||
626 | +}) |
1 | +<view class='page {{showMore||show1?"active":""}}'> | ||
2 | + <view class='big_box'> | ||
3 | + <view class='detail_container {{show||shows?"active":""}}'> | ||
4 | + <view class='banner' wx:if='{{!showMore}}'> | ||
5 | + <view class='iconfont icon-fanhui' catchtap='get_back'></view> | ||
6 | + <view class='coupons'> | ||
7 | + <view class='goods_detail {{active?"active":""}}' bindtap='jump_goods'>商品详情</view> | ||
8 | + <view class='graphic_detail {{!active?"active":""}}' bindtap='jump_detail'>图文详情</view> | ||
9 | + </view> | ||
10 | + <view class='share'> | ||
11 | + <button open-type='share' type='false' class='share_btn' plain='true'>分享</button> | ||
12 | + </view> | ||
13 | + </view> | ||
14 | + <view class='banner_box'> | ||
15 | + <view class='banner_box_group' wx:if='{{goods.groupType}}'> | ||
16 | + 距离团购 | ||
17 | + <text wx:if='{{goods.groupType.group_status==1}}'>开始\t\t\t</text> | ||
18 | + <text wx:elif='{{goods.groupType.group_status==2}}'>结束\t\t\t</text> {{day}}天{{hour}}小时{{minute}}分钟 | ||
19 | + </view> | ||
20 | + <view class='banner_img'> | ||
21 | + <image src='{{goods.info.thumbnail}}'></image> | ||
22 | + </view> | ||
23 | + </view> | ||
24 | + | ||
25 | + <view class='content_item'> | ||
26 | + <view class='item_list'> | ||
27 | + <view class='banner_title'>{{goods.info.title}}</view> | ||
28 | + <view class='introduce'>{{goods.info.excerpt}}</view> | ||
29 | + <view class='good_price_progress' wx:if='{{goods.groupType.group_status==2}}'> | ||
30 | + <progress show-info border-radius='4' activeColor='#ffda44' stroke-width='8' percent='{{percent}}' font-size='12'></progress> | ||
31 | + <text class='group_font'>已拼{{goods.info.group_number}}份\t\t\t\t目标{{goods.info.group_min_number}}份</text> | ||
32 | + </view> | ||
33 | + <!-- <view class='banner_character'> | ||
34 | + <view class='banner_price'> | ||
35 | + <view class=''> | ||
36 | + <text class='money_icon'>¥</text> | ||
37 | + <text class='money'>{{goods.info.price}}</text> | ||
38 | + <text class='original_price'>¥{{goods.info.old_price}}</text> | ||
39 | + </view> | ||
40 | + | ||
41 | + </view> | ||
42 | + </view> --> | ||
43 | + <view class='banner_character'> | ||
44 | + <view class='banner_price'> | ||
45 | + <view class=''> | ||
46 | + <text class='money_icon'>¥</text> | ||
47 | + <text class='money'>{{goods.info.price}}</text> | ||
48 | + <text class='original_price'>¥{{goods.info.old_price}}</text> | ||
49 | + </view> | ||
50 | + <view class='display_box'> | ||
51 | + <text class='money_icon2'>¥</text> | ||
52 | + <text class='money2'>{{goods.info.vip_price}}</text> | ||
53 | + <view class='vip'> | ||
54 | + <image class='vipvip' src='{{imgUrl}}vipvip.png'></image></view> | ||
55 | + </view> | ||
56 | + </view> | ||
57 | + <!-- <view>已售出:{{goods.info.sale_number}}份</view> --> | ||
58 | + </view> | ||
59 | + </view> | ||
60 | + <view class='item_list2' wx:if='{{common}}'> | ||
61 | + <view class='user_evaluation'> | ||
62 | + <view class='user_evaluation_title'>用户评价</view> | ||
63 | + <view class='user_evaluation_time' bindtap='jump_user_comment'> | ||
64 | + <view>({{commentCount}})</view> | ||
65 | + <view class='iconfont icon-jinru'></view> | ||
66 | + </view> | ||
67 | + </view> | ||
68 | + <view class='user_information_box' wx:for='{{comment}}' wx:for-index='index' wx:key='{{index}}'> | ||
69 | + <view class='user_information'> | ||
70 | + <view class='the_star'> | ||
71 | + <view class='head_portrait'> | ||
72 | + <image src='{{item.avatar}}'></image> | ||
73 | + </view> | ||
74 | + <view class='star_box'> | ||
75 | + <view class='user_name'>{{item.full_name}}</view> | ||
76 | + <view class='stars1'> | ||
77 | + <view class='iconfont icon-pingfen' wx:for='{{item.stars_arr}}' wx:key='{{item}}'></view> | ||
78 | + | ||
79 | + </view> | ||
80 | + </view> | ||
81 | + </view> | ||
82 | + <view class='title'>{{item.create_time}}</view> | ||
83 | + </view> | ||
84 | + <view class='evaluation'>{{item.content}}</view> | ||
85 | + <view class='evaluation_img'> | ||
86 | + <view class='upload_img_box'> | ||
87 | + <view class='upload_img' wx:for='{{item.more.photos}}' wx:for-item='child' wx:key='{{child}}'> | ||
88 | + <image src='{{child}}'></image> | ||
89 | + </view> | ||
90 | + </view> | ||
91 | + </view> | ||
92 | + <view class='comments_btn'> | ||
93 | + <view class='iconfont icon-message'></view> | ||
94 | + <view class='comments'>评论</view> | ||
95 | + </view> | ||
96 | + </view> | ||
97 | + </view> | ||
98 | + <view class='item_list10'> | ||
99 | + <view class='food_title_all'> | ||
100 | + <view class='explain_one'> | ||
101 | + 商品包内容 | ||
102 | + </view> | ||
103 | + <view class='two_title_xixi'>点击商品可查看商品信息,也可更换该商品包菜品</view> | ||
104 | + </view> | ||
105 | + <view class='food_box_big'> | ||
106 | + <view class='real_food_box'> | ||
107 | + <view class='collocation'> | ||
108 | + <view class='collocation_box' wx:for='{{showList}}' wx:for-index='index' wx:key='{{index}}' bindtap='goDetail' data-id='{{item.id}}'> | ||
109 | + <view class='iconfont icon-weixuanzhong {{flag?"active":""}}' catchtap='changeFlag'></view> | ||
110 | + <view class='collocation_img'> | ||
111 | + <image src='{{item.more.thumbnail}}'></image> | ||
112 | + </view> | ||
113 | + <view class='collocation_content'> | ||
114 | + | ||
115 | + <view class='overflowe'>{{item.title}} | ||
116 | + </view> | ||
117 | + <view class='introduce'>{{item.tips}}</view> | ||
118 | + <view class='introduce' catchtap='chooseStandard' data-shop="{{item}}" data-origin='{{index}}'>请选择商品属性 | ||
119 | + <view class='iconfont icon-icondayu'></view> | ||
120 | + </view> | ||
121 | + </view> | ||
122 | + </view> | ||
123 | + </view> | ||
124 | + </view> | ||
125 | + <view class='replace_dishes' bindtap='replaceDishes'> | ||
126 | + <view class='replace_dishes_center'> | ||
127 | + <view class='replace_image'> | ||
128 | + <image src='../../imgs/replace.png'></image> | ||
129 | + </view> | ||
130 | + <view class='replace_font'>更换菜品</view> | ||
131 | + </view> | ||
132 | + </view> | ||
133 | + </view> | ||
134 | + </view> | ||
135 | + | ||
136 | + <view> | ||
137 | + <view class='explain'> | ||
138 | + <view class='explain_one'> | ||
139 | + 小贴士 | ||
140 | + </view> | ||
141 | + <view class='explain_two'> | ||
142 | + <view> 01 这里是菜品更换说明,模块高度随文案内容变更,文案将两控制在100字以内</view> | ||
143 | + <view> 02 从以下菜品更换您的菜谱,点即可查看详情</view> | ||
144 | + <view> 03 这里是菜品更换说明,模块高度随文案内容变更,文案将两控制在100字以内</view> | ||
145 | + </view> | ||
146 | + </view> | ||
147 | + </view> | ||
148 | + </view> | ||
149 | + <view class='bottom_btn'> | ||
150 | + <view class='hint_btn'> | ||
151 | + <view class='shop_car' bindtap='get_car'> | ||
152 | + <view class='iconfont icon-gouwuche'></view> | ||
153 | + <view>购物车</view> | ||
154 | + <view class='cart_count'>{{goods.cartCount}}</view> | ||
155 | + </view> | ||
156 | + <!-- <view bindtap='collection' bindtap='collection_true' data-id='{{goods.info.id}}'> | ||
157 | + <view class='iconfont icon-shoucang {{goods.info.is_favorite==1||shoucang?"active":""}}'></view> | ||
158 | + <view class='shop_car {{goods.info.is_favorite==1||shoucang?"active":""}}'>收藏</view> | ||
159 | + </view> --> | ||
160 | + </view> | ||
161 | + <view class='immediately_btn' bindtap='go_pay_sale'>立即购买</view> | ||
162 | + </view> | ||
163 | + </view> | ||
164 | + <!-- 直接购买弹框 --> | ||
165 | + <view class='cart_mask' wx:if='{{shows}}'> | ||
166 | + <view class='cart_mask_diceng'> | ||
167 | + <view class='close_jump_cart iconfont icon-cuowu' bindtap='close_mask_carts'></view> | ||
168 | + <view class='goods_name'>菜品名称</view> | ||
169 | + <view class='weight' wx:for='{{goods.attr.attr_sku}}' wx:key='{{item.id}}' wx:for-index='cellindex' wx:for-item='cell'> | ||
170 | + <view class='weight_view'>{{cell.name}}</view> | ||
171 | + <view class='quality'> | ||
172 | + <view class='quality_left {{value.t?"active":""}}' wx:for='{{cell.item}}' wx:key='{{key}}' data-gid='{{value.id}}' data-parent="{{cellindex}}" data-item="{{value.attribute_value}}" data-index="{{index}}" bindtap='changeIds' wx:for-item='value'>{{value.attribute_value}}</view> | ||
173 | + </view> | ||
174 | + </view> | ||
175 | + | ||
176 | + <view class='last_box'> | ||
177 | + <view class='last_box_top'> | ||
178 | + <view class='last_box_top_price'> | ||
179 | + <view>¥{{goods.price}}</view> | ||
180 | + </view> | ||
181 | + </view> | ||
182 | + <view class='last_box_top'> | ||
183 | + <view class='last_box_top_price'> | ||
184 | + <view class='member_price'>¥{{goods.vip_price}}</view> | ||
185 | + <text class='member'>会员专享</text> | ||
186 | + </view> | ||
187 | + <view class='jiajian' wx:if='{{!goods.groupType}}'> | ||
188 | + <view bindtap='dec_num' class='dec_num'>-</view> | ||
189 | + <view class='numnum'> {{num}}</view> | ||
190 | + <view bindtap='add_num' class='dec_num'>+</view> | ||
191 | + </view> | ||
192 | + <view class='purchase' bindtap='hide_masks'>确定</view> | ||
193 | + </view> | ||
194 | + </view> | ||
195 | + </view> | ||
196 | + </view> | ||
197 | + </view> | ||
198 | +</view> | ||
199 | +<!-- 更换菜品弹框 --> | ||
200 | +<view class='maskMore' wx:if='{{showMore}}'> | ||
201 | + <view class='banner'> | ||
202 | + <view class='iconfont icon-fanhui' catchtap='closeShowMore'></view> | ||
203 | + <view class='coupons'>商品详情</view> | ||
204 | + </view> | ||
205 | + <view class='explaina'> | ||
206 | + <view class='explain_one'> | ||
207 | + 菜品更换说明 | ||
208 | + </view> | ||
209 | + <view class='explain_two'> | ||
210 | + <view> 01 这里是菜品更换说明,模块高度随文案内容变更,文案将两控制在100字以内</view> | ||
211 | + <view> 02 从以下菜品更换您的菜谱,点即可查看详情</view> | ||
212 | + </view> | ||
213 | + </view> | ||
214 | + <view class='three'> | ||
215 | + <view class='collocation_boxa' wx:for='{{packageList}}' wx:for-index='index' wx:key='{{index}}' bindtap='goDetail' data-id='{{item.id}}'> | ||
216 | + <view class='iconfont icon-weixuanzhong {{item.t?"active":""}}' catchtap='changeFlag' data-index='{{index}}'></view> | ||
217 | + <view class='collocation_img'> | ||
218 | + <image src='{{item.more.thumbnail}}'></image> | ||
219 | + </view> | ||
220 | + <view class='collocation_content'> | ||
221 | + <view class='overflowe'>{{item.title}}</view> | ||
222 | + <view class='introduce'>{{item.tips}}</view> | ||
223 | + </view> | ||
224 | + </view> | ||
225 | + </view> | ||
226 | +</view> | ||
227 | +<!-- 选择规格弹框弹框 --> | ||
228 | +<view class='cart_mask' wx:if='{{show1}}'> | ||
229 | + <view class='cart_mask_diceng'> | ||
230 | + <view class='close_jump_cart iconfont icon-cuowu' bindtap='close_mask_cart1'></view> | ||
231 | + <view class='goods_name'>{{goods1.title}}</view> | ||
232 | + <view class='weight' wx:for='{{goods1.attr.attr_sku}}' wx:key='{{item.id}}' wx:for-index='cellindex' wx:for-item='cell'> | ||
233 | + <view class='weight_view'>{{cell.name}}</view> | ||
234 | + <view class='quality'> | ||
235 | + <view class='quality_left {{value.t?"active":""}}' wx:for='{{cell.item}}' wx:key='{{key}}' data-gid='{{value.id}}' data-parent="{{cellindex}}" data-item="{{value.attribute_value}}" data-index="{{index}}" bindtap='changeIds1' wx:for-item='value' data-origin='{{origin}}'>{{value.attribute_value}}</view> | ||
236 | + </view> | ||
237 | + </view> | ||
238 | + | ||
239 | + <view class='last_box'> | ||
240 | + <view class='last_box_top'> | ||
241 | + <view class='last_box_top_price'> | ||
242 | + <view class='yanse'>¥{{goods1.ggprice}}</view> | ||
243 | + </view> | ||
244 | + <view class='purchase' bindtap='hide_mask1' data-index='{{originIndex}}'>确定</view> | ||
245 | + </view> | ||
246 | + </view> | ||
247 | + </view> | ||
248 | +</view> |
1 | +/* pages/index/goodsDetial/goodsDetial.wxss */ | ||
2 | + | ||
3 | +page { | ||
4 | + background: #f3f5f5; | ||
5 | + width: 100%; | ||
6 | + height: 100%; | ||
7 | +} | ||
8 | +.page{ | ||
9 | + width: 100%; | ||
10 | + height: 100% | ||
11 | +} | ||
12 | +.page.active{ | ||
13 | + overflow: hidden | ||
14 | +} | ||
15 | +.big_box { | ||
16 | + width: 100%; | ||
17 | + height: 100%; | ||
18 | +} | ||
19 | + | ||
20 | +.detail_container { | ||
21 | + width: 100%; | ||
22 | + height: 100%; | ||
23 | +} | ||
24 | + | ||
25 | +.detail_container.active { | ||
26 | + overflow: hidden; | ||
27 | +} | ||
28 | + | ||
29 | +.coupons { | ||
30 | + font-size: 30rpx; | ||
31 | + color: #222; | ||
32 | + display: flex; | ||
33 | +} | ||
34 | + | ||
35 | +.goods_detail { | ||
36 | + font-weight: bold; | ||
37 | +} | ||
38 | + | ||
39 | +.goods_detail.active { | ||
40 | + border-bottom: 3rpx solid #ffda44; | ||
41 | +} | ||
42 | + | ||
43 | +.graphic_detail { | ||
44 | + font-weight: bold; | ||
45 | + margin-left: 56rpx; | ||
46 | +} | ||
47 | + | ||
48 | +.graphic_detail.active { | ||
49 | + border-bottom: 3rpx solid #ffda44; | ||
50 | +} | ||
51 | + | ||
52 | +.share { | ||
53 | + font-size: 28rpx; | ||
54 | + color: #222; | ||
55 | +} | ||
56 | + | ||
57 | +.share_btn { | ||
58 | + background: transparent; | ||
59 | + padding: 0; | ||
60 | + margin: 0; | ||
61 | + border: 0 !important; | ||
62 | + color: #222; | ||
63 | + font-size: 28rpx; | ||
64 | + margin-top: 10rpx; | ||
65 | +} | ||
66 | + | ||
67 | +.banner { | ||
68 | + position: fixed; | ||
69 | + z-index: 999999; | ||
70 | +} | ||
71 | +.banner_box{ | ||
72 | + position: relative; | ||
73 | + | ||
74 | +} | ||
75 | +.banner_img { | ||
76 | + height: 630rpx; | ||
77 | + padding-top: 80rpx; | ||
78 | + box-sizing: border-box; | ||
79 | +} | ||
80 | + | ||
81 | +.banner_img image { | ||
82 | + width: 100%; | ||
83 | + height: 100%; | ||
84 | +} | ||
85 | + | ||
86 | +.item_list { | ||
87 | + padding: 32rpx 25rpx; | ||
88 | + background-color: #fff; | ||
89 | + margin-bottom: 20rpx; | ||
90 | +} | ||
91 | + | ||
92 | +.banner_title { | ||
93 | + font-size: 34rpx; | ||
94 | + color: #222; | ||
95 | +} | ||
96 | + | ||
97 | +.introduce { | ||
98 | + font-size: 28rpx; | ||
99 | + color: #888; | ||
100 | + text-overflow: ellipsis; | ||
101 | + overflow: hidden; | ||
102 | + white-space: nowrap; | ||
103 | + position: relative | ||
104 | +} | ||
105 | + | ||
106 | +.banner_character { | ||
107 | + display: flex; | ||
108 | + justify-content: space-between; | ||
109 | + align-items: center; | ||
110 | + font-size: 24rpx; | ||
111 | + color: #888; | ||
112 | + margin-top: 40rpx; | ||
113 | +} | ||
114 | + | ||
115 | +.banner_price { | ||
116 | + display: flex; | ||
117 | + align-items: center; | ||
118 | + width: auto; | ||
119 | +} | ||
120 | + | ||
121 | +.money_icon { | ||
122 | + font-size: 22rpx; | ||
123 | + color: #222; | ||
124 | +} | ||
125 | + | ||
126 | +.money { | ||
127 | + font-size: 38rpx; | ||
128 | + font-weight: bold; | ||
129 | + color: #222; | ||
130 | +} | ||
131 | + | ||
132 | +.original_price { | ||
133 | + color: #888; | ||
134 | + text-decoration: line-through; | ||
135 | +} | ||
136 | + | ||
137 | +.display_box { | ||
138 | + width: auto; | ||
139 | + margin-left: 40rpx; | ||
140 | + display: flex; | ||
141 | + align-items: center | ||
142 | +} | ||
143 | + | ||
144 | +.money_icon2 { | ||
145 | + font-size: 22rpx; | ||
146 | + color: #f44; | ||
147 | +} | ||
148 | + | ||
149 | +.money2 { | ||
150 | + font-size: 38rpx; | ||
151 | + font-weight: bold; | ||
152 | + color: #f44; | ||
153 | +} | ||
154 | + | ||
155 | +.vip { | ||
156 | + width: 80rpx; | ||
157 | + height: 25rpx; | ||
158 | + margin-left: 5rpx; | ||
159 | +} | ||
160 | + | ||
161 | +.vip image{ | ||
162 | + width: 100%; | ||
163 | + height: 100% | ||
164 | +} | ||
165 | + | ||
166 | +.list_content { | ||
167 | + display: flex; | ||
168 | + justify-content: space-between; | ||
169 | + align-items: center; | ||
170 | +} | ||
171 | + | ||
172 | +.content_title { | ||
173 | + display: flex; | ||
174 | +} | ||
175 | + | ||
176 | +.title { | ||
177 | + font-size: 24rpx; | ||
178 | + color: #888; | ||
179 | +} | ||
180 | + | ||
181 | +.content { | ||
182 | + font-size: 24rpx; | ||
183 | + color: #222; | ||
184 | + margin-left: 47rpx; | ||
185 | +} | ||
186 | + | ||
187 | +.icon-jinru { | ||
188 | + font-size: 22rpx; | ||
189 | + color: #c7c7c7; | ||
190 | +} | ||
191 | + | ||
192 | +.more_box { | ||
193 | + font-size: 24rpx; | ||
194 | + color: #949a9a; | ||
195 | + border-top: 1rpx solid #ededed; | ||
196 | + display: flex; | ||
197 | + justify-content: center; | ||
198 | + align-items: center; | ||
199 | + padding-top: 24rpx; | ||
200 | + margin-top: 35rpx; | ||
201 | +} | ||
202 | + | ||
203 | +.icon-zhankai { | ||
204 | + font-size: 14rpx; | ||
205 | + margin-left: 10rpx; | ||
206 | +} | ||
207 | + | ||
208 | +.item_list1 { | ||
209 | + background-color: #fff; | ||
210 | + margin-bottom: 20rpx; | ||
211 | + display: flex; | ||
212 | + justify-content: space-between; | ||
213 | + align-items: center; | ||
214 | + padding: 19rpx 16rpx; | ||
215 | +} | ||
216 | + | ||
217 | +.hint1 { | ||
218 | + font-size: 22rpx; | ||
219 | + color: #222; | ||
220 | + background-color: #fafafa; | ||
221 | + border-radius: 12rpx; | ||
222 | + padding: 25rpx 39rpx; | ||
223 | +} | ||
224 | + | ||
225 | +.cash_back { | ||
226 | + font-size: 28rpx; | ||
227 | + font-weight: bold; | ||
228 | + color: #222; | ||
229 | +} | ||
230 | + | ||
231 | +.red_font { | ||
232 | + font-weight: bold; | ||
233 | + color: #f44; | ||
234 | +} | ||
235 | + | ||
236 | +.item_list7 { | ||
237 | + padding: 31rpx 25rpx 25rpx 25rpx; | ||
238 | +} | ||
239 | + | ||
240 | +.attribute { | ||
241 | + width: 375rpx; | ||
242 | + display: flex; | ||
243 | + align-items: center; | ||
244 | + /* margin-left: 49rpx; */ | ||
245 | +} | ||
246 | + | ||
247 | +.attribute_titel { | ||
248 | + font-size: 26rpx; | ||
249 | + color: #94999a; | ||
250 | +} | ||
251 | + | ||
252 | +.stars { | ||
253 | + display: flex; | ||
254 | + font-size: 26rpx; | ||
255 | + color: #222; | ||
256 | + margin-left: 35rpx; | ||
257 | +} | ||
258 | + | ||
259 | +.icon-pingfen { | ||
260 | + font-size: 26rpx; | ||
261 | + color: #222; | ||
262 | +} | ||
263 | + | ||
264 | +.attribute_content { | ||
265 | + font-size: 26rpx; | ||
266 | + color: #222; | ||
267 | + margin-left: 113rpx; | ||
268 | +} | ||
269 | + | ||
270 | +.item_list2, .item_list3, .item_list4, .itme_list5, .item_list6, .item_list7 , .item_list10 { | ||
271 | + background-color: #fff; | ||
272 | + margin-bottom: 20rpx; | ||
273 | +} | ||
274 | + | ||
275 | +.user_evaluation { | ||
276 | + display: flex; | ||
277 | + justify-content: space-between; | ||
278 | + align-items: center; | ||
279 | + border-bottom: 1rpx solid #f3f5f5; | ||
280 | + padding: 31rpx 25rpx; | ||
281 | +} | ||
282 | + | ||
283 | +.user_evaluation_title { | ||
284 | + font-size: 30rpx; | ||
285 | + font-weight: bold; | ||
286 | + color: #222; | ||
287 | +} | ||
288 | + | ||
289 | +.user_evaluation_time { | ||
290 | + font-size: 24rpx; | ||
291 | + color: #c7c7c7; | ||
292 | + display: flex; | ||
293 | + align-items: center; | ||
294 | +} | ||
295 | + | ||
296 | +.comments_btn { | ||
297 | + display: flex; | ||
298 | + justify-content: flex-end; | ||
299 | + align-items: center; | ||
300 | + font-size: 23rpx; | ||
301 | + color: #949a9a; | ||
302 | + margin-top: 24rpx; | ||
303 | +} | ||
304 | + | ||
305 | +.icon-message { | ||
306 | + font-size: 22rpx; | ||
307 | + color: #949a9a; | ||
308 | + margin-right: 10rpx; | ||
309 | +} | ||
310 | + | ||
311 | +.user_information_box { | ||
312 | + padding: 31rpx 25rpx 25rpx 25rpx; | ||
313 | +} | ||
314 | + | ||
315 | +.user_information { | ||
316 | + display: flex; | ||
317 | + justify-content: space-between; | ||
318 | + align-items: center; | ||
319 | +} | ||
320 | + | ||
321 | +.head_portrait { | ||
322 | + width: 62rpx; | ||
323 | + height: 62rpx; | ||
324 | +} | ||
325 | + | ||
326 | +.head_portrait image { | ||
327 | + width: 100%; | ||
328 | + height: 100%; | ||
329 | +} | ||
330 | + | ||
331 | +.star_box { | ||
332 | + margin-left: 25rpx; | ||
333 | +} | ||
334 | + | ||
335 | +.the_star { | ||
336 | + display: flex; | ||
337 | + align-items: center; | ||
338 | +} | ||
339 | + | ||
340 | +.stars1 { | ||
341 | + display: flex; | ||
342 | +} | ||
343 | + | ||
344 | +.user_name { | ||
345 | + font-size: 26rpx; | ||
346 | + color: #222; | ||
347 | +} | ||
348 | + | ||
349 | +.evaluation { | ||
350 | + font-size: 24rpx; | ||
351 | + color: #222; | ||
352 | + margin-top: 25rpx; | ||
353 | +} | ||
354 | + | ||
355 | +.evaluation_img { | ||
356 | + margin-top: 21rpx; | ||
357 | +} | ||
358 | + | ||
359 | +.upload_img_box { | ||
360 | + display: flex; | ||
361 | +} | ||
362 | + | ||
363 | +.upload_img { | ||
364 | + width: 160rpx; | ||
365 | + height: 160rpx; | ||
366 | + margin-right: 20rpx; | ||
367 | +} | ||
368 | + | ||
369 | +.upload_img image { | ||
370 | + width: 100%; | ||
371 | + height: 100%; | ||
372 | +} | ||
373 | + | ||
374 | +.item_list3 { | ||
375 | + padding: 39rpx 25rpx 40rpx 25rpx; | ||
376 | +} | ||
377 | + | ||
378 | +.package_title { | ||
379 | + font-size: 30rpx; | ||
380 | + font-weight: bold; | ||
381 | + color: #222; | ||
382 | +} | ||
383 | + | ||
384 | +.package_box { | ||
385 | + display: flex; | ||
386 | + margin-top: 44rpx; | ||
387 | +} | ||
388 | + | ||
389 | +.package_img_box { | ||
390 | + width: 200rpx; | ||
391 | + height: 200rpx; | ||
392 | +} | ||
393 | + | ||
394 | +.package_img { | ||
395 | + width: 200rpx; | ||
396 | + height: 200rpx; | ||
397 | +} | ||
398 | + | ||
399 | +.package_img image { | ||
400 | + width: 100%; | ||
401 | + height: 100%; | ||
402 | +} | ||
403 | + | ||
404 | +.package_content { | ||
405 | + font-size: 30rpx; | ||
406 | + color: #222; | ||
407 | + margin-left: 40rpx; | ||
408 | +} | ||
409 | + | ||
410 | +.package_hint { | ||
411 | + font-size: 24rpx; | ||
412 | + color: #94999a; | ||
413 | +} | ||
414 | + | ||
415 | +.pickage_display { | ||
416 | + font-size: 24rpx; | ||
417 | + color: #f44; | ||
418 | + margin-top: 47rpx; | ||
419 | +} | ||
420 | + | ||
421 | +.item_list4 { | ||
422 | + padding: 46rpx 44rpx; | ||
423 | +} | ||
424 | + | ||
425 | +.detection_item { | ||
426 | + display: flex; | ||
427 | + justify-content: space-around; | ||
428 | + margin-top: 58rpx; | ||
429 | +} | ||
430 | + | ||
431 | +.detection { | ||
432 | + display: flex; | ||
433 | + justify-content: center; | ||
434 | + align-items: center; | ||
435 | +} | ||
436 | + | ||
437 | +.line1 { | ||
438 | + width: 115rpx; | ||
439 | + height: 1rpx; | ||
440 | + background: linear-gradient(to right, #fff, #bbb); | ||
441 | +} | ||
442 | + | ||
443 | +.line2 { | ||
444 | + width: 115rpx; | ||
445 | + height: 1rpx; | ||
446 | + background: linear-gradient(to left, #fff, #bbb); | ||
447 | +} | ||
448 | + | ||
449 | +.detection_title { | ||
450 | + font-size: 26rpx; | ||
451 | + color: #222; | ||
452 | + margin: 0 30rpx; | ||
453 | +} | ||
454 | + | ||
455 | +.detection_box { | ||
456 | + font-size: 26rpx; | ||
457 | + color: #222; | ||
458 | +} | ||
459 | + | ||
460 | +.detection_img { | ||
461 | + margin: 0 auto 23rpx; | ||
462 | + width: 54rpx; | ||
463 | + height: 54rpx; | ||
464 | +} | ||
465 | + | ||
466 | +.detection_img image { | ||
467 | + width: 100%; | ||
468 | + height: 100%; | ||
469 | +} | ||
470 | + | ||
471 | +.detection_hint { | ||
472 | + font-size: 22rpx; | ||
473 | + color: #94999a; | ||
474 | + text-align: center; | ||
475 | + margin-top: 20rpx; | ||
476 | +} | ||
477 | + | ||
478 | +.itme_list5 { | ||
479 | + position: relative; | ||
480 | + padding: 45rpx 25rpx 30rpx 25rpx; | ||
481 | + box-sizing: border-box; | ||
482 | +} | ||
483 | + | ||
484 | +.recommended_box { | ||
485 | + width: 150rpx; | ||
486 | + height: 45rpx; | ||
487 | + display: flex; | ||
488 | + align-items: center; | ||
489 | + justify-content: center; | ||
490 | + background: #ffda44; | ||
491 | + border-radius: 0 0 16rpx 16rpx; | ||
492 | + font-size: 22rpx; | ||
493 | + color: #333; | ||
494 | + position: absolute; | ||
495 | + right: 24rpx; | ||
496 | + top: 0; | ||
497 | +} | ||
498 | + | ||
499 | +.foretaste_box { | ||
500 | + display: flex; | ||
501 | + align-items: center; | ||
502 | + font-size: 30rpx; | ||
503 | +} | ||
504 | + | ||
505 | +.buyer_recommend { | ||
506 | + font-size: 22rpx; | ||
507 | + color: #94999a; | ||
508 | + margin-left: 20rpx; | ||
509 | +} | ||
510 | + | ||
511 | +.buyer_name { | ||
512 | + font-size: 30rpx; | ||
513 | + color: #222; | ||
514 | +} | ||
515 | + | ||
516 | +.recommend_content { | ||
517 | + background-color: #fafafa; | ||
518 | + border-radius: 16rpx; | ||
519 | + padding: 25rpx 25rpx 25rpx 25rpx; | ||
520 | + margin-top: 30rpx; | ||
521 | + font-size: 26rpx; | ||
522 | + color: #222; | ||
523 | + position: relative; | ||
524 | +} | ||
525 | + | ||
526 | +.icon-shangyinhao { | ||
527 | + font-size: 22rpx; | ||
528 | + color: #e3e3e3; | ||
529 | +} | ||
530 | + | ||
531 | +.triangle { | ||
532 | + width: 0; | ||
533 | + height: 0; | ||
534 | + border-left: 60rpx solid #fafafa; | ||
535 | + border-top: 30rpx solid transparent; | ||
536 | + border-bottom: 30rpx solid transparent; | ||
537 | + position: absolute; | ||
538 | + top: -30rpx; | ||
539 | + left: 50rpx; | ||
540 | +} | ||
541 | + | ||
542 | +.recommend_character { | ||
543 | + margin-left: 10rpx; | ||
544 | +} | ||
545 | + | ||
546 | +.ingredients { | ||
547 | + margin-top: 40rpx; | ||
548 | +} | ||
549 | + | ||
550 | +.ingredients_title { | ||
551 | + font-size: 30rpx; | ||
552 | + font-weight: bold; | ||
553 | + color: #222; | ||
554 | + text-align: center; | ||
555 | + margin-bottom: 41rpx; | ||
556 | +} | ||
557 | + | ||
558 | +.ingredients_img { | ||
559 | + width: 280rpx; | ||
560 | + height: 280rpx; | ||
561 | + margin-right: 34rpx; | ||
562 | +} | ||
563 | + | ||
564 | +.ingredients_box { | ||
565 | + display: flex; | ||
566 | +} | ||
567 | + | ||
568 | +.ingredients_img image { | ||
569 | + width: 100%; | ||
570 | + height: 100%; | ||
571 | +} | ||
572 | + | ||
573 | +.ingredients_item { | ||
574 | + width: 400rpx; | ||
575 | + font-size: 26rpx; | ||
576 | + display: flex; | ||
577 | + /* margin-left: 34rpx; */ | ||
578 | + margin-top: 34rpx; | ||
579 | + /* border: 1px solid red; */ | ||
580 | +} | ||
581 | + | ||
582 | +.ingredients_name { | ||
583 | + color: #94999a; | ||
584 | + width: 80rpx; | ||
585 | +} | ||
586 | + | ||
587 | +.ingredients_content { | ||
588 | + width: 300rpx; | ||
589 | + display: flex; | ||
590 | + flex-wrap: wrap; | ||
591 | + margin-left: 30rpx; | ||
592 | +} | ||
593 | + | ||
594 | +.graphic_ingredients_box { | ||
595 | + margin-top: 40rpx; | ||
596 | +} | ||
597 | + | ||
598 | +.graphic_ingredients { | ||
599 | + height: 200rpx; | ||
600 | + border: 1rpx solid red; | ||
601 | + display: flex; | ||
602 | + align-items: center; | ||
603 | + justify-content: center; | ||
604 | + background-image: url('http://hifresh.w.bronet.cn/assets/wxapp/keshihua@2x.png'); | ||
605 | + margin-bottom: 20rpx; | ||
606 | +} | ||
607 | + | ||
608 | +.graphic_ingredients_background { | ||
609 | + width: 450rpx; | ||
610 | + height: 110rpx; | ||
611 | + background-color: #ffb244; | ||
612 | + display: flex; | ||
613 | + align-items: center; | ||
614 | + justify-content: center; | ||
615 | +} | ||
616 | + | ||
617 | +.graphic_ingredients_border { | ||
618 | + font-size: 38rpx; | ||
619 | + color: #fff; | ||
620 | + width: 430rpx; | ||
621 | + height: 90rpx; | ||
622 | + border: 1rpx solid #fff; | ||
623 | + display: flex; | ||
624 | + align-items: center; | ||
625 | + justify-content: center; | ||
626 | +} | ||
627 | + | ||
628 | +.item_list6 { | ||
629 | + padding: 30rpx 25rpx; | ||
630 | + margin-bottom: 120rpx; | ||
631 | +} | ||
632 | +.item_list10{ | ||
633 | + padding: 30rpx 25rpx; | ||
634 | + box-sizing: border-box | ||
635 | +} | ||
636 | + | ||
637 | +.collocation_title { | ||
638 | + font-size: 30rpx; | ||
639 | + font-weight: bold; | ||
640 | + color: #222; | ||
641 | + margin-bottom: 40rpx; | ||
642 | +} | ||
643 | + | ||
644 | +.collocation { | ||
645 | + display: flex; | ||
646 | + justify-content: space-between; | ||
647 | + flex-wrap: wrap; | ||
648 | +} | ||
649 | + | ||
650 | +.collocation_box { | ||
651 | + width: 340rpx; | ||
652 | + border-radius: 16rpx; | ||
653 | + overflow: hidden; | ||
654 | + margin-bottom:20rpx; | ||
655 | +} | ||
656 | + | ||
657 | +.collocation_img { | ||
658 | + width: 340rpx; | ||
659 | + height: 340rpx; | ||
660 | +} | ||
661 | + | ||
662 | +.collocation_img image { | ||
663 | + width: 100%; | ||
664 | + height: 100%; | ||
665 | +} | ||
666 | + | ||
667 | +.collocation_content { | ||
668 | + background: #fafafa; | ||
669 | + font-size: 30rpx; | ||
670 | + color: #222; | ||
671 | + padding: 22rpx; | ||
672 | + height: 152rpx; | ||
673 | + position: relative | ||
674 | +} | ||
675 | + | ||
676 | +.bottom_btn { | ||
677 | + width: 100%; | ||
678 | + height: 100rpx; | ||
679 | + background: #fff; | ||
680 | + display: flex; | ||
681 | + justify-content: flex-end; | ||
682 | + align-items: center; | ||
683 | + position: fixed; | ||
684 | + bottom: 0; | ||
685 | + left: 0; | ||
686 | +} | ||
687 | + | ||
688 | +.hint_btn { | ||
689 | + width: 118rpx; | ||
690 | + display: flex; | ||
691 | + justify-content: space-around; | ||
692 | + align-items: center; | ||
693 | +} | ||
694 | + | ||
695 | +.icon-shoucang.active { | ||
696 | + color: #ff6700; | ||
697 | +} | ||
698 | + | ||
699 | +.shop_car { | ||
700 | + font-size: 18rpx; | ||
701 | + color: #747b7d; | ||
702 | + position: relative; | ||
703 | +} | ||
704 | + | ||
705 | +.cart_count { | ||
706 | + position: absolute; | ||
707 | + right: 2rpx; | ||
708 | + top: 0; | ||
709 | + width: 24rpx; | ||
710 | + height: 24rpx; | ||
711 | + border-radius: 50%; | ||
712 | + background: red; | ||
713 | + text-align: center; | ||
714 | + line-height: 24rpx; | ||
715 | + color: #fff; | ||
716 | + font-size: 18rpx; | ||
717 | +} | ||
718 | + | ||
719 | +.shop_car.active { | ||
720 | + color: #ff6700; | ||
721 | +} | ||
722 | + | ||
723 | +.join_btn { | ||
724 | + width: 266rpx; | ||
725 | + height: 100rpx; | ||
726 | + background: linear-gradient(to left, #ffda44, #ffb244); | ||
727 | + display: flex; | ||
728 | + align-items: center; | ||
729 | + justify-content: center; | ||
730 | + font-size: 26rpx; | ||
731 | + color: #fff; | ||
732 | +} | ||
733 | +.join_btns{ | ||
734 | + width: 266rpx; | ||
735 | + height: 100rpx; | ||
736 | + display: flex; | ||
737 | + align-items: center; | ||
738 | + justify-content: center; | ||
739 | + font-size: 26rpx; | ||
740 | + color: #fff; | ||
741 | + background: transparent | ||
742 | +} | ||
743 | + | ||
744 | +.immediately_btn { | ||
745 | + width: 632rpx; | ||
746 | + height: 100rpx; | ||
747 | + background: linear-gradient(to left, #f99115, #f56800); | ||
748 | + display: flex; | ||
749 | + align-items: center; | ||
750 | + justify-content: center; | ||
751 | + font-size: 26rpx; | ||
752 | + color: #fff; | ||
753 | +} | ||
754 | + | ||
755 | +/*购物车添加状态*/ | ||
756 | + | ||
757 | +.cart_mask { | ||
758 | + position: absolute; | ||
759 | + top: 0; | ||
760 | + left: 0; | ||
761 | + width: 100%; | ||
762 | + height: 100%; | ||
763 | + background: rgba(0, 0, 0, 0.8); | ||
764 | + z-index: 9999999; | ||
765 | +} | ||
766 | + | ||
767 | +.cart_mask_diceng { | ||
768 | + width: 80%; | ||
769 | + /* min-height: 550rpx; */ | ||
770 | + position: absolute; | ||
771 | + top: 50%; | ||
772 | + margin-left: 10%; | ||
773 | + transform: translateY(-50%); | ||
774 | + background: rgba(255, 255, 255, 1); | ||
775 | + border-radius: 10px; | ||
776 | + padding-top: 20rpx; | ||
777 | + padding-bottom: 130rpx; | ||
778 | +} | ||
779 | + | ||
780 | +.goods_name { | ||
781 | + font-size: 30rpx; | ||
782 | + font-family: PingFang-SC-Bold; | ||
783 | + font-weight: bold; | ||
784 | + color: rgba(51, 51, 51, 1); | ||
785 | + line-height: 36rpx; | ||
786 | + text-align: center; | ||
787 | + margin-top: 30rpx; | ||
788 | +} | ||
789 | + | ||
790 | +.weight { | ||
791 | + height: 100rpx; | ||
792 | + margin-top: 34rpx; | ||
793 | + /* margin-bottom:44rpx; */ | ||
794 | + padding: 0 47rpx 0 36rpx; | ||
795 | + box-sizing: border-box; | ||
796 | +} | ||
797 | + | ||
798 | +.weight_view { | ||
799 | + font-size: 26rpx; | ||
800 | + font-family: PingFang-SC-Medium; | ||
801 | + font-weight: 500; | ||
802 | + color: rgba(51, 51, 51, 1); | ||
803 | + line-height: 36rpx; | ||
804 | +} | ||
805 | + | ||
806 | +.quality { | ||
807 | + margin-top: 24rpx; | ||
808 | +} | ||
809 | + | ||
810 | +.quality_left { | ||
811 | + width: 150rpx; | ||
812 | + height: 50rpx; | ||
813 | + margin-bottom: 20rpx; | ||
814 | + background: rgba(247, 247, 247, 1); | ||
815 | + border-radius: 10rpx; | ||
816 | + text-align: center; | ||
817 | + line-height: 50rpx; | ||
818 | + font-size: 26rpx; | ||
819 | + font-family: FZY3JW--GB1-0; | ||
820 | + font-weight: 400; | ||
821 | + color: rgba(26, 26, 26, 1); | ||
822 | + float: left; | ||
823 | + margin-right: 20rpx; | ||
824 | +} | ||
825 | + | ||
826 | +.quality_left.active { | ||
827 | + background: rgba(255, 218, 68, 1); | ||
828 | +} | ||
829 | + | ||
830 | +.last_box { | ||
831 | + width: 100%; | ||
832 | + height: 110rpx; | ||
833 | + background: rgba(247, 247, 247, 1); | ||
834 | + border-radius: 0px 0px 10px 10px; | ||
835 | + margin-top: 100rpx; | ||
836 | + /* padding: 18rpx 0 0 51rpx; */ | ||
837 | + box-sizing: border-box; | ||
838 | + position: absolute; | ||
839 | + bottom: 0; | ||
840 | +} | ||
841 | + | ||
842 | +.last_box_top { | ||
843 | + font-size: 26rpx; | ||
844 | +} | ||
845 | + | ||
846 | +.last_box_top_price { | ||
847 | + display: flex; | ||
848 | + color: #f44; | ||
849 | + line-height: 78rpx; | ||
850 | + font-family: PingFang-SC-Bold; | ||
851 | + font-weight: bold; | ||
852 | +} | ||
853 | + | ||
854 | +.last_box_top_price text { | ||
855 | + color: #333; | ||
856 | + font-size: 18rpx; | ||
857 | + margin-left: 10rpx; | ||
858 | +} | ||
859 | + | ||
860 | +.member { | ||
861 | + text-align: center; | ||
862 | + font-family: PingFang-SC-Medium; | ||
863 | + margin-left: 24rpx; | ||
864 | + background: linear-gradient(-90deg, rgba(244, 243, 200, 1), rgba(250, 216, 90, 1)); | ||
865 | + border-radius: 5px; | ||
866 | + color: rgba(187, 138, 54, 1); | ||
867 | + padding: 4rpx -2rpx; | ||
868 | + box-sizing: border-box; | ||
869 | + /* margin-top:8rpx; */ | ||
870 | + font-size: 18rpx; | ||
871 | + font-weight: 400; | ||
872 | +} | ||
873 | + | ||
874 | +.purchase { | ||
875 | + width: 160rpx; | ||
876 | + height: 50rpx; | ||
877 | + background: rgba(255, 218, 68, 1); | ||
878 | + border-radius: 25rpx; | ||
879 | + font-size: 24rpx; | ||
880 | + font-family: PingFang-SC-Medium; | ||
881 | + font-weight: 500; | ||
882 | + color: rgba(26, 26, 26, 1); | ||
883 | + line-height: 50rpx; | ||
884 | + text-align: center; | ||
885 | + position: absolute; | ||
886 | + right: 36rpx; | ||
887 | + top: 30rpx; | ||
888 | +} | ||
889 | + | ||
890 | +.jiajian { | ||
891 | + width: 120rpx; | ||
892 | + height: 50rpx; | ||
893 | + position: absolute; | ||
894 | + right: 200rpx; | ||
895 | + top: 40rpx; | ||
896 | + display: flex; | ||
897 | + justify-content: space-between; | ||
898 | +} | ||
899 | + | ||
900 | +.dec_num { | ||
901 | + width: 32rpx; | ||
902 | + height: 32rpx; | ||
903 | + border-radius: 50%; | ||
904 | + background: #ffda44; | ||
905 | + font-size: 32rpx; | ||
906 | + color: #fff; | ||
907 | + font-weight: bold; | ||
908 | + text-align: center; | ||
909 | + line-height: 32rpx; | ||
910 | +} | ||
911 | + | ||
912 | +.numnum { | ||
913 | + width: 32rpx; | ||
914 | + height: 32rpx; | ||
915 | + text-align: center; | ||
916 | + line-height: 32rpx; | ||
917 | + font-size: 30rpx; | ||
918 | + font-family: PingFang-SC-Medium; | ||
919 | + font-weight: 500; | ||
920 | + color: rgba(102, 102, 102, 1); | ||
921 | +} | ||
922 | + | ||
923 | +.close_jump_cart { | ||
924 | + position: absolute; | ||
925 | + top: 24rpx; | ||
926 | + right: 24rpx; | ||
927 | + color: #ededed; | ||
928 | + font-size: 36rpx; | ||
929 | +} | ||
930 | +/*团购样式*/ | ||
931 | +.banner_box_group{ | ||
932 | + width:700rpx; | ||
933 | + height:45rpx; | ||
934 | + position: absolute; | ||
935 | + left: 0; | ||
936 | + bottom: 0; | ||
937 | + background: linear-gradient(to right,#ffda44,transparent); | ||
938 | + padding-left:26rpx; | ||
939 | + z-index: 999; | ||
940 | + font-size:26rpx; | ||
941 | +font-family:PingFang-SC-Medium; | ||
942 | +font-weight:500; | ||
943 | +color:rgba(255,255,255,1); | ||
944 | +line-height:45rpx; | ||
945 | +} | ||
946 | +/*团购*/ | ||
947 | +.good_price_progress{ | ||
948 | + margin-top:10rpx; | ||
949 | + } | ||
950 | +.group_font{ | ||
951 | + font-size:24rpx; | ||
952 | +font-family:PingFang-SC-Medium; | ||
953 | +font-weight:500; | ||
954 | +color:rgba(136,136,136,1); | ||
955 | +line-height:24rpx; | ||
956 | +height: 24rpx; | ||
957 | + | ||
958 | +} | ||
959 | +.goods_margin_top{ | ||
960 | + margin-top:20rpx; | ||
961 | +} | ||
962 | +.group_image{ | ||
963 | + border-radius: 16rpx; | ||
964 | + overflow: hidden | ||
965 | +} | ||
966 | +.group_time{ | ||
967 | + position: absolute; | ||
968 | + bottom:0; | ||
969 | + height:30px; | ||
970 | + width:200rpx; | ||
971 | + background:rgba(187,187,187,1); | ||
972 | + border-radius: 0 0 16rpx 16rpx; | ||
973 | + padding:0 10rpx; | ||
974 | + font-size:20rpx; | ||
975 | +font-family:PingFang-SC-Medium; | ||
976 | +font-weight:500; | ||
977 | +color:rgba(255,255,255,1); | ||
978 | +line-height:54rpx; | ||
979 | +text-align: center; | ||
980 | +} | ||
981 | +.group_time.active{ | ||
982 | + background:rgba(255,68,68,1); | ||
983 | + } | ||
984 | + | ||
985 | +/*小贴士*/ | ||
986 | + | ||
987 | +.explain{ | ||
988 | + width: 93.6%; | ||
989 | + height:auto; | ||
990 | + box-shadow:0px 15px 30px 0px rgba(214,214,214,0.6); | ||
991 | + border-radius:16px; | ||
992 | + background: #fff; | ||
993 | + margin:20rpx auto 130rpx; | ||
994 | + padding:18rpx 49rpx; | ||
995 | + box-sizing: border-box | ||
996 | +} | ||
997 | +.explain_one{ | ||
998 | + text-align: center; | ||
999 | + font-size:30rpx; | ||
1000 | + font-family:PingFang-SC-Heavy; | ||
1001 | + font-weight:800; | ||
1002 | + color:rgba(38,54,58,1); | ||
1003 | + line-height:62rpx; | ||
1004 | + position: relative; | ||
1005 | + margin-bottom:16rpx; | ||
1006 | +} | ||
1007 | +.explain_one::before{ | ||
1008 | + width: 115rpx; | ||
1009 | + height: 1rpx; | ||
1010 | + position: absolute; | ||
1011 | + left:70rpx; | ||
1012 | + top:0; | ||
1013 | + bottom:0; | ||
1014 | + margin:auto 0; | ||
1015 | + content: ''; | ||
1016 | + background: linear-gradient(to left,rgba(187,187,187,1),transparent); | ||
1017 | +} | ||
1018 | +.explain_one::after{ | ||
1019 | + width: 115rpx; | ||
1020 | + height: 1rpx; | ||
1021 | + position: absolute; | ||
1022 | + right:70rpx; | ||
1023 | + top:0; | ||
1024 | + bottom:0; | ||
1025 | + margin:auto 0; | ||
1026 | + content: ''; | ||
1027 | + background: linear-gradient(to right,rgba(187,187,187,1),transparent); | ||
1028 | +} | ||
1029 | +.explain_two{ | ||
1030 | + font-size:26rpx; | ||
1031 | + font-family:PingFang-SC-Medium; | ||
1032 | + font-weight:500; | ||
1033 | + color:rgba(38,54,58,1); | ||
1034 | + line-height: 40rpx; | ||
1035 | +} | ||
1036 | +.food_title_all{ | ||
1037 | + margin-bottom:30rpx; | ||
1038 | +} | ||
1039 | +.two_title_xixi{ | ||
1040 | + width: 100%; | ||
1041 | + height: 23rpx; | ||
1042 | + text-align: center; | ||
1043 | + font-size:22rpx; | ||
1044 | +font-family:PingFang-SC-Medium; | ||
1045 | +font-weight:500; | ||
1046 | +color:rgba(148,153,154,1); | ||
1047 | +line-height:23rpx; | ||
1048 | +} | ||
1049 | + | ||
1050 | +.collocation_contents { | ||
1051 | + background: #fafafa; | ||
1052 | + font-size: 30rpx; | ||
1053 | + color: #222; | ||
1054 | + padding: 22rpx; | ||
1055 | +} | ||
1056 | +.overflowe{ | ||
1057 | + text-overflow: ellipsis; | ||
1058 | + overflow: hidden; | ||
1059 | + white-space: nowrap; | ||
1060 | + position: relative | ||
1061 | +} | ||
1062 | +.icon-icondayu{ | ||
1063 | + position: absolute; | ||
1064 | + right: 0; | ||
1065 | + top: 50%; | ||
1066 | + transform: translateY(-50%); | ||
1067 | +} | ||
1068 | +.introduces { | ||
1069 | + font-size: 28rpx; | ||
1070 | + color: #888; | ||
1071 | +} | ||
1072 | +.collocation_boxs { | ||
1073 | + width: 360rpx; | ||
1074 | + border-radius: 16rpx; | ||
1075 | + overflow: hidden; | ||
1076 | + float: left; | ||
1077 | + padding:0 10rpx; | ||
1078 | + position: relative | ||
1079 | +} | ||
1080 | +.icon-weixuanzhong{ | ||
1081 | + position: absolute; | ||
1082 | + right:20rpx; | ||
1083 | + top:15rpx; | ||
1084 | + color:#888; | ||
1085 | +} | ||
1086 | +.icon-weixuanzhong.active{ | ||
1087 | + color:rgba(255,218,68,1); | ||
1088 | +} | ||
1089 | +.replace_dishes{ | ||
1090 | + width: 100%; | ||
1091 | + /* width:699px; */ | ||
1092 | +height:80rpx; | ||
1093 | +border:1rpx solid rgba(255,68,68,1); | ||
1094 | +border-radius:40rpx; | ||
1095 | +margin:10rpx 0 20rpx; | ||
1096 | +display: flex; | ||
1097 | +justify-content: center; | ||
1098 | +align-items: center | ||
1099 | +} | ||
1100 | +.replace_dishes_center{ | ||
1101 | + display: flex; | ||
1102 | + /* align-items: center */ | ||
1103 | +} | ||
1104 | +.replace_image{ | ||
1105 | + width: 31rpx; | ||
1106 | + height: 29rpx; | ||
1107 | + margin-right:18rpx; | ||
1108 | + margin-top:-14rpx; | ||
1109 | +} | ||
1110 | +.replace_image image{ | ||
1111 | + width: 100%; | ||
1112 | + height: 100% | ||
1113 | +} | ||
1114 | +.replace_font{ | ||
1115 | + height: 29rpx; | ||
1116 | + font-size:26rpx; | ||
1117 | +font-family:PingFang-SC-Medium; | ||
1118 | +font-weight:500; | ||
1119 | +color:rgba(255,68,68,1); | ||
1120 | +line-height: 29rpx; | ||
1121 | +} | ||
1122 | +/*更换菜品弹框*/ | ||
1123 | +.maskMore{ | ||
1124 | + width: 100%; | ||
1125 | + min-height: 100%; | ||
1126 | + background: #f3f5f5; | ||
1127 | + position: absolute; | ||
1128 | + left: 0; | ||
1129 | + top: 0; | ||
1130 | +} | ||
1131 | + | ||
1132 | +.coupons { | ||
1133 | + font-size: 30rpx; | ||
1134 | + color: #222; | ||
1135 | + display: flex; | ||
1136 | +} | ||
1137 | +.explaina{ | ||
1138 | + width: 93.6%; | ||
1139 | + height:auto; | ||
1140 | + box-shadow:0px 15px 30px 0px rgba(214,214,214,0.6); | ||
1141 | + border-radius:16px; | ||
1142 | + background: #fff; | ||
1143 | + margin:120rpx auto 40rpx; | ||
1144 | + padding:18rpx 49rpx 18rpx; | ||
1145 | + box-sizing: border-box | ||
1146 | +} | ||
1147 | +.explain_one{ | ||
1148 | + text-align: center; | ||
1149 | + font-size:30rpx; | ||
1150 | + font-family:PingFang-SC-Heavy; | ||
1151 | + font-weight:800; | ||
1152 | + color:rgba(38,54,58,1); | ||
1153 | + line-height:62rpx; | ||
1154 | + position: relative; | ||
1155 | + margin-bottom:16rpx; | ||
1156 | +} | ||
1157 | +.explain_one::before{ | ||
1158 | + width: 115rpx; | ||
1159 | + height: 1rpx; | ||
1160 | + position: absolute; | ||
1161 | + left:70rpx; | ||
1162 | + top:0; | ||
1163 | + bottom:0; | ||
1164 | + margin:auto 0; | ||
1165 | + content: ''; | ||
1166 | + background: linear-gradient(to left,rgba(187,187,187,1),transparent); | ||
1167 | +} | ||
1168 | +.explain_one::after{ | ||
1169 | + width: 115rpx; | ||
1170 | + height: 1rpx; | ||
1171 | + position: absolute; | ||
1172 | + right:70rpx; | ||
1173 | + top:0; | ||
1174 | + bottom:0; | ||
1175 | + margin:auto 0; | ||
1176 | + content: ''; | ||
1177 | + background: linear-gradient(to right,rgba(187,187,187,1),transparent); | ||
1178 | +} | ||
1179 | +.explain_two{ | ||
1180 | + font-size:26rpx; | ||
1181 | + font-family:PingFang-SC-Medium; | ||
1182 | + font-weight:500; | ||
1183 | + color:rgba(38,54,58,1); | ||
1184 | + line-height: 40rpx; | ||
1185 | +} | ||
1186 | +.three{ | ||
1187 | + width: 100%; | ||
1188 | + padding:0 15rpx; | ||
1189 | + } | ||
1190 | +.collocation_boxa { | ||
1191 | + width: 360rpx; | ||
1192 | + border-radius: 16rpx; | ||
1193 | + overflow: hidden; | ||
1194 | + float: left; | ||
1195 | + padding:0 10rpx; | ||
1196 | + position: relative | ||
1197 | +} | ||
1198 | + | ||
1199 | +.collocation_img { | ||
1200 | + width: 340rpx; | ||
1201 | + height: 340rpx; | ||
1202 | +} | ||
1203 | + | ||
1204 | +.collocation_img image { | ||
1205 | + width: 100%; | ||
1206 | + height: 100%; | ||
1207 | +} | ||
1208 | + | ||
1209 | +.introducea { | ||
1210 | + font-size: 28rpx; | ||
1211 | + color: #888; | ||
1212 | +} | ||
1213 | + | ||
1214 | +.icon-weixuanzhong{ | ||
1215 | + position: absolute; | ||
1216 | + right:20rpx; | ||
1217 | + top:15rpx; | ||
1218 | + color:#888; | ||
1219 | +} | ||
1220 | +.icon-weixuanzhong.active{ | ||
1221 | + color:rgba(255,218,68,1); | ||
1222 | +} | ||
1223 | +/*购物车添加状态*/ | ||
1224 | + | ||
1225 | +.cart_mask { | ||
1226 | + position: fixed; | ||
1227 | + top: 0; | ||
1228 | + left: 0; | ||
1229 | + width: 100%; | ||
1230 | + height: 100%; | ||
1231 | + background: rgba(0, 0, 0, 0.8); | ||
1232 | + z-index: 9999999; | ||
1233 | +} | ||
1234 | + | ||
1235 | +.cart_mask_diceng { | ||
1236 | + width: 80%; | ||
1237 | + /* min-height: 550rpx; */ | ||
1238 | + position: absolute; | ||
1239 | + top: 50%; | ||
1240 | + margin-left: 10%; | ||
1241 | + transform: translateY(-50%); | ||
1242 | + background: rgba(255, 255, 255, 1); | ||
1243 | + border-radius: 10px; | ||
1244 | + padding-top: 20rpx; | ||
1245 | + padding-bottom: 130rpx; | ||
1246 | +} | ||
1247 | + | ||
1248 | +.goods_name { | ||
1249 | + font-size: 30rpx; | ||
1250 | + font-family: PingFang-SC-Bold; | ||
1251 | + font-weight: bold; | ||
1252 | + color: rgba(51, 51, 51, 1); | ||
1253 | + line-height: 36rpx; | ||
1254 | + text-align: center; | ||
1255 | + margin-top: 30rpx; | ||
1256 | +} | ||
1257 | + | ||
1258 | +.weight { | ||
1259 | + height: 100rpx; | ||
1260 | + margin-top: 34rpx; | ||
1261 | + /* margin-bottom:44rpx; */ | ||
1262 | + padding: 0 47rpx 0 36rpx; | ||
1263 | + box-sizing: border-box; | ||
1264 | +} | ||
1265 | + | ||
1266 | +.weight_view { | ||
1267 | + font-size: 26rpx; | ||
1268 | + font-family: PingFang-SC-Medium; | ||
1269 | + font-weight: 500; | ||
1270 | + color: rgba(51, 51, 51, 1); | ||
1271 | + line-height: 36rpx; | ||
1272 | +} | ||
1273 | + | ||
1274 | +.quality { | ||
1275 | + margin-top: 24rpx; | ||
1276 | +} | ||
1277 | + | ||
1278 | +.quality_left { | ||
1279 | + width: 150rpx; | ||
1280 | + height: 50rpx; | ||
1281 | + margin-bottom: 20rpx; | ||
1282 | + background: rgba(247, 247, 247, 1); | ||
1283 | + border-radius: 10rpx; | ||
1284 | + text-align: center; | ||
1285 | + line-height: 50rpx; | ||
1286 | + font-size: 26rpx; | ||
1287 | + font-family: FZY3JW--GB1-0; | ||
1288 | + font-weight: 400; | ||
1289 | + color: rgba(26, 26, 26, 1); | ||
1290 | + float: left; | ||
1291 | + margin-right: 20rpx; | ||
1292 | +} | ||
1293 | + | ||
1294 | +.quality_left.active { | ||
1295 | + background: rgba(255, 218, 68, 1); | ||
1296 | +} | ||
1297 | + | ||
1298 | +.last_box { | ||
1299 | + width: 100%; | ||
1300 | + height: 110rpx; | ||
1301 | + background: rgba(247, 247, 247, 1); | ||
1302 | + border-radius: 0px 0px 10px 10px; | ||
1303 | + margin-top: 100rpx; | ||
1304 | + padding: 18rpx 0 0 51rpx; | ||
1305 | + box-sizing: border-box; | ||
1306 | + position: absolute; | ||
1307 | + bottom: 0; | ||
1308 | +} | ||
1309 | + | ||
1310 | +.last_box_top_price text { | ||
1311 | + color: #333; | ||
1312 | + font-size: 18rpx; | ||
1313 | + margin-left: 10rpx; | ||
1314 | +} | ||
1315 | + | ||
1316 | +.member_price { | ||
1317 | + /* color: rgba(187, 138, 54, 1); */ | ||
1318 | + color: #26363a; | ||
1319 | +} | ||
1320 | + | ||
1321 | +.member { | ||
1322 | + text-align: center; | ||
1323 | + font-family: PingFang-SC-Medium; | ||
1324 | + margin-left: 24rpx; | ||
1325 | + background: linear-gradient(-90deg, rgba(244, 243, 200, 1), rgba(250, 216, 90, 1)); | ||
1326 | + border-radius: 5px; | ||
1327 | + color: rgba(187, 138, 54, 1); | ||
1328 | + padding: 4rpx -2rpx; | ||
1329 | + box-sizing: border-box; | ||
1330 | + /* margin-top:8rpx; */ | ||
1331 | + font-size: 18rpx; | ||
1332 | + font-weight: 400; | ||
1333 | +} | ||
1334 | + | ||
1335 | +.purchase { | ||
1336 | + width: 160rpx; | ||
1337 | + height: 50rpx; | ||
1338 | + background: rgba(255, 218, 68, 1); | ||
1339 | + border-radius: 25rpx; | ||
1340 | + font-size: 24rpx; | ||
1341 | + font-family: PingFang-SC-Medium; | ||
1342 | + font-weight: 500; | ||
1343 | + color: rgba(26, 26, 26, 1); | ||
1344 | + line-height: 50rpx; | ||
1345 | + text-align: center; | ||
1346 | + position: absolute; | ||
1347 | + right: 36rpx; | ||
1348 | + top: 30rpx; | ||
1349 | +} | ||
1350 | + | ||
1351 | +.jiajian { | ||
1352 | + width: 120rpx; | ||
1353 | + height: 50rpx; | ||
1354 | + position: absolute; | ||
1355 | + right: 200rpx; | ||
1356 | + top: 40rpx; | ||
1357 | + display: flex; | ||
1358 | + justify-content: space-between; | ||
1359 | +} | ||
1360 | + | ||
1361 | +.dec_num { | ||
1362 | + width: 32rpx; | ||
1363 | + height: 32rpx; | ||
1364 | + border-radius: 50%; | ||
1365 | + background: #ffda44; | ||
1366 | + font-size: 32rpx; | ||
1367 | + color: #fff; | ||
1368 | + font-weight: bold; | ||
1369 | + text-align: center; | ||
1370 | + line-height: 32rpx; | ||
1371 | +} | ||
1372 | + | ||
1373 | +.numnum { | ||
1374 | + width: 32rpx; | ||
1375 | + height: 32rpx; | ||
1376 | + text-align: center; | ||
1377 | + line-height: 32rpx; | ||
1378 | + font-size: 30rpx; | ||
1379 | + font-family: PingFang-SC-Medium; | ||
1380 | + font-weight: 500; | ||
1381 | + color: rgba(102, 102, 102, 1); | ||
1382 | +} | ||
1383 | + | ||
1384 | +.close_jump_cart { | ||
1385 | + position: absolute; | ||
1386 | + top: 24rpx; | ||
1387 | + right: 24rpx; | ||
1388 | + color: #ededed; | ||
1389 | + font-size: 36rpx; | ||
1390 | +} | ||
1391 | +.pickage_display { | ||
1392 | + font-size: 24rpx; | ||
1393 | + color: #f44; | ||
1394 | + margin-top: 47rpx; | ||
1395 | +} | ||
1396 | +.money_icon2 { | ||
1397 | + font-size: 22rpx; | ||
1398 | + color: #f44; | ||
1399 | +} | ||
1400 | + | ||
1401 | +.money2 { | ||
1402 | + font-size: 38rpx; | ||
1403 | + font-weight: bold; | ||
1404 | + color: #f44; | ||
1405 | +} |
-
请 注册 或 登录 后发表评论