Commit ba260b3f99c3c0c80da3c59173f684880323c44c
1 parent
54c9be5642
Exists in
master
修改
Showing
5 changed files
with
42 additions
and
140 deletions
Show diff stats
src/components/SimpleAddress/SimpleAddress.vue
... | ... | @@ -221,6 +221,7 @@ export default { |
221 | 221 | }, |
222 | 222 | methods: { |
223 | 223 | init () { |
224 | + console.log(this.pickerValueDefault) | |
224 | 225 | this.handPickValueDefault() // 对 pickerValueDefault 做兼容处理 |
225 | 226 | this.provinceDataList = provinceData |
226 | 227 | this.cityDataList = cityData[this.pickerValueDefault[0]] | ... | ... |
src/pages/address/addAddress.vue
... | ... | @@ -116,15 +116,17 @@ export default { |
116 | 116 | uni.setNavigationBarTitle({ |
117 | 117 | title: '编辑地址' |
118 | 118 | }) |
119 | - const { name, mobile, sex, add_detail: addDetial, default: isDefault } = this.$store.state.address.details | |
119 | + const { name, mobile, sex, add_detail: addDetial, default: isDefault,address } = this.$store.state.address.details | |
120 | 120 | console.log('---', this.$store.state.address.details) |
121 | 121 | const index = this.$refs.SimpleAddress.queryIndex(this.$store.state.address.details.address.split('-'), 'label') |
122 | + console.log(index) | |
122 | 123 | this.cityPickerValueDefault = index.index |
123 | 124 | this.name = name |
124 | 125 | this.mobile = Number(mobile) |
125 | 126 | this.sexIndex = sex |
126 | 127 | this.addDetial = addDetial |
127 | 128 | this.isDefalutAddress = !!Number(isDefault) |
129 | + this.pickerText = address | |
128 | 130 | }) |
129 | 131 | } |
130 | 132 | }, |
... | ... | @@ -200,6 +202,7 @@ export default { |
200 | 202 | params.add_id = this.addId |
201 | 203 | } |
202 | 204 | store.dispatch('address/edit', params).then(() => { |
205 | + console.log('fanhui') | |
203 | 206 | uni.navigateBack({ |
204 | 207 | delta: 1 |
205 | 208 | }) | ... | ... |
src/pages/address/addressList.vue
... | ... | @@ -24,13 +24,13 @@ |
24 | 24 | <text class="address">{{item.address.replace(/[-]/g,' ')}}\n{{item.add_detail}}</text> |
25 | 25 | </view> |
26 | 26 | <image |
27 | - @tap="toEditAddress(item.add_id)" | |
27 | + @click.stop="toEditAddress(item.add_id)" | |
28 | 28 | v-if="item.default === '1'" |
29 | 29 | class="arrow" |
30 | 30 | src="../../static/right.png" |
31 | 31 | ></image> |
32 | 32 | <image |
33 | - @tap="toEditAddress(item.add_id)" | |
33 | + @click.stop="toEditAddress(item.add_id)" | |
34 | 34 | v-else |
35 | 35 | class="arrow pen" |
36 | 36 | src="../../static/icon-pen.png" |
... | ... | @@ -64,6 +64,9 @@ export default { |
64 | 64 | } |
65 | 65 | store.dispatch('address/list') |
66 | 66 | }, |
67 | + onShow() { | |
68 | + store.dispatch('address/list') | |
69 | + }, | |
67 | 70 | methods: { |
68 | 71 | toAddAddress() { |
69 | 72 | console.log('aaaaa-a') |
... | ... | @@ -85,12 +88,18 @@ export default { |
85 | 88 | }, |
86 | 89 | toOrder (addId) { |
87 | 90 | if (this.edit) { |
88 | - uni.navigateTo({ | |
89 | - url: `../confirmOrder/confirmOrder?addressId=${addId}`, | |
90 | - fail: (error) => { | |
91 | - console.error('跳转出现错误', error) | |
92 | - } | |
93 | - }) | |
91 | + let pages = getCurrentPages(); | |
92 | + let prevPage = pages[pages.length - 2]; //上一个页面 | |
93 | + const addressId=addId | |
94 | + // console.log(addressId) | |
95 | + prevPage.onShow(addressId); | |
96 | + uni.navigateBack(); | |
97 | + // uni.navigateTo({ | |
98 | + // url: `../confirmOrder/confirmOrder?addressId=${addId}`, | |
99 | + // fail: (error) => { | |
100 | + // console.error('跳转出现错误', error) | |
101 | + // } | |
102 | + // }) | |
94 | 103 | } |
95 | 104 | } |
96 | 105 | } |
... | ... | @@ -116,7 +125,8 @@ export default { |
116 | 125 | height: 108rpx; |
117 | 126 | width: 100%; |
118 | 127 | align-items: center; |
119 | - margin-left: 126rpx; | |
128 | + padding-left: 126rpx; | |
129 | + box-sizing: border-box; | |
120 | 130 | .name { |
121 | 131 | display: flex; |
122 | 132 | justify-content: space-between; | ... | ... |
src/pages/confirmOrder/confirmOrder.vue
... | ... | @@ -196,7 +196,23 @@ export default { |
196 | 196 | // isAnonymous: |
197 | 197 | } |
198 | 198 | }, |
199 | - onLoad({ pid, addressId, isCart ,count,name}) { | |
199 | + onShow(addressId) { | |
200 | + // console.log('+-+-*-*-+-+',addressId) | |
201 | + if (addressId) { | |
202 | + store | |
203 | + .dispatch('address/details', { | |
204 | + add_id: addressId, | |
205 | + }) | |
206 | + .then(({ code, data }) => { | |
207 | + if (code === 1) { | |
208 | + // console.log('code', code, data) | |
209 | + this.showAddress = true | |
210 | + this.addressInfo = data | |
211 | + } | |
212 | + }) | |
213 | + } | |
214 | + }, | |
215 | + onLoad({ pid, addressId,isCart ,count,name}) { | |
200 | 216 | this.pid = pid; |
201 | 217 | this.count = count; |
202 | 218 | this.name = name; | ... | ... |
src/pages/frameDetail/components/BottomSheet.vue
... | ... | @@ -238,86 +238,6 @@ |
238 | 238 | v-show="!show[index]" |
239 | 239 | >* {{attrList[index].attr[current[index]].name}}</view> |
240 | 240 | </view> |
241 | - <!-- <view class="chooseItem_1 chooseItem"> | |
242 | - <UniCollapse @change="change(1)"> | |
243 | - <UniCollapseItem | |
244 | - open=true | |
245 | - title="款式挑选" | |
246 | - showAnimation=false | |
247 | - > | |
248 | - <view | |
249 | - class="chooseRes" | |
250 | - v-show="show[1]" | |
251 | - >* {{chooseRes1}}</view> | |
252 | - <view class="chooseItem_1_content"> | |
253 | - <view class="itemsWrap"> | |
254 | - <view | |
255 | - class="item1" | |
256 | - v-for="(item,index) in chooseItem1" | |
257 | - :key="index" | |
258 | - :style="item.style" | |
259 | - :class="{ active1: current1 === index }" | |
260 | - @click="onClickItem1(index)" | |
261 | - ></view> | |
262 | - </view> | |
263 | - </view> | |
264 | - </UniCollapseItem> | |
265 | - </UniCollapse> | |
266 | - <view | |
267 | - class="chooseRes" | |
268 | - v-show="show[1]" | |
269 | - >* {{chooseRes1}}</view> | |
270 | - </view> | |
271 | - <view class="chooseItem_2 chooseItem "> | |
272 | - <UniCollapse @change="change(2)"> | |
273 | - <UniCollapseItem | |
274 | - open=true | |
275 | - title="直径" | |
276 | - showAnimation=false | |
277 | - > | |
278 | - <view class="chooseItem_1_content"> | |
279 | - <view class="itemsWrap"> | |
280 | - <view | |
281 | - class="item2" | |
282 | - v-for="(item,index) in chooseItem2" | |
283 | - :key="index" | |
284 | - :class="{ active2: current2 === index }" | |
285 | - @click="onClickItem2(index)" | |
286 | - >{{item.num}}</view> | |
287 | - </view> | |
288 | - </view> | |
289 | - </UniCollapseItem> | |
290 | - </UniCollapse> | |
291 | - <view | |
292 | - class="chooseRes" | |
293 | - v-show="show[2]" | |
294 | - >* {{chooseRes2}}</view> | |
295 | - </view> | |
296 | - <view class="chooseItem_3 chooseItem"> | |
297 | - <UniCollapse @change="change(3)"> | |
298 | - <UniCollapseItem | |
299 | - open=true | |
300 | - title="度数" | |
301 | - showAnimation=false | |
302 | - > | |
303 | - <view class="chooseItem_1_content"> | |
304 | - <view class="itemsWrap"> | |
305 | - <view | |
306 | - class="item2" | |
307 | - v-for="(item,index) in chooseItem3" | |
308 | - :key="index" | |
309 | - :class="{ active2: current3 === index }" | |
310 | - @click="onClickItem3(index)" | |
311 | - >{{item}}</view> | |
312 | - </view> | |
313 | - </view> | |
314 | - </UniCollapseItem> | |
315 | - </UniCollapse> | |
316 | - <view | |
317 | - class="chooseRes" | |
318 | - v-show="show[3]" | |
319 | - >* {{chooseRes3}}</view> | |
320 | - </view> --> | |
321 | 241 | </view> |
322 | 242 | <view |
323 | 243 | class="button" |
... | ... | @@ -356,42 +276,9 @@ import store from '@/store' |
356 | 276 | opIsOpen: true, |
357 | 277 | addDisabled: false, |
358 | 278 | desDisabled: false, |
359 | - // current1: 0, | |
360 | - // current2: 0, | |
361 | - // current3: 0, | |
362 | 279 | current: [], |
363 | 280 | show: [], |
364 | - chooseRes1: { | |
365 | - sku_name: 'Miss 黑二代【减龄自然】', | |
366 | - sk_id: '128', | |
367 | - }, | |
368 | 281 | checkedData: {}, |
369 | - chooseRes2: '14.0', | |
370 | - chooseRes3: 0, | |
371 | - chooseItem1: [ | |
372 | - { style: 'opacity: 0.7;background-image: radial-gradient(50% 148%, #ECEAEA 50%, #8D8C8C 100%);', describ: 'Miss 黑1代【减龄自然】' }, | |
373 | - { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑二代【防紫外线】' }, | |
374 | - { style: 'background-image: radial-gradient(50% 148%, #FDF8F6 50%, #94380B 100%);', describ: 'Miss 黑3代【防紫外线】' }, | |
375 | - { style: 'background-image: radial-gradient(50% 148%, #FFFFFF 50%, #324A05 100%);', describ: 'Miss 黑4代【防紫外线】' }, | |
376 | - { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑5代【防紫外线】' }, | |
377 | - { style: 'opacity: 0.7;background-image: radial-gradient(50% 150%, #F0EEE7 50%, #6F0838 100%);', describ: 'Miss 黑6代【防紫外线】' }, | |
378 | - { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #370B4E 100%);', describ: 'Miss 黑7代【防紫外线】' }, | |
379 | - { style: 'background-image: radial-gradient(50% 148%, #FFFFFF 50%, #324A05 100%);', describ: 'Miss 黑4代【防紫外线】' }, | |
380 | - { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑5代【防紫外线】' }, | |
381 | - { style: 'opacity: 0.7;background-image: radial-gradient(50% 150%, #F0EEE7 50%, #6F0838 100%);', describ: 'Miss 黑6代【防紫外线】' }, | |
382 | - { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #370B4E 100%);', describ: 'Miss 黑7代【防紫外线】' }, | |
383 | - { style: 'background-image: radial-gradient(50% 148%, #FFFFFF 50%, #324A05 100%);', describ: 'Miss 黑4代【防紫外线】' }, | |
384 | - { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑5代【防紫外线】' }, | |
385 | - { style: 'opacity: 0.7;background-image: radial-gradient(50% 150%, #F0EEE7 50%, #6F0838 100%);', describ: 'Miss 黑6代【防紫外线】' }, | |
386 | - { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #370B4E 100%);', describ: 'Miss 黑7代【防紫外线】' }, | |
387 | - ], | |
388 | - chooseItem2: [ | |
389 | - { num: '14.0' }, | |
390 | - { num: '14.2' }, | |
391 | - { num: '14.4' }, | |
392 | - { num: '14.5' }, | |
393 | - ], | |
394 | - chooseItem3: [0, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 470, 500, 525, 550, 575, 600, 1000], | |
395 | 282 | // 度数相关数据 |
396 | 283 | pickerInfoList: [ |
397 | 284 | { nameC: '度数', nameE: '(SPH)', nameArray1: [''], nameIndex1: 0, nameArray2: [''], nameIndex2: 0, key: 0 }, |
... | ... | @@ -424,7 +311,7 @@ import store from '@/store' |
424 | 311 | }, |
425 | 312 | computed: { |
426 | 313 | loveList() { |
427 | - console.log('**********loveList',this.$store.state.myLoveList.loveList) | |
314 | + // console.log('**********loveList',this.$store.state.myLoveList.loveList) | |
428 | 315 | return this.$store.state.myLoveList.loveList || [] |
429 | 316 | }, |
430 | 317 | attrList() { |
... | ... | @@ -445,9 +332,6 @@ import store from '@/store' |
445 | 332 | created() { |
446 | 333 | const pid = this.pid |
447 | 334 | console.log('this.goodInfo',this.goodInfo) |
448 | - store.dispatch('read/fetch', { | |
449 | - pid, | |
450 | - }).then(() => { | |
451 | 335 | const current = [] |
452 | 336 | const show = [] |
453 | 337 | for (let index = 0; index < this.attrList.length; index++) { |
... | ... | @@ -456,14 +340,12 @@ import store from '@/store' |
456 | 340 | } |
457 | 341 | this.current = current |
458 | 342 | this.show = show |
459 | - }) | |
460 | 343 | |
461 | 344 | //获取关心的人列表 |
462 | 345 | store.dispatch('myLoveList/getLoveList', { |
463 | 346 | uid: this.$store.state.user.userInfo.uid, |
464 | 347 | }); |
465 | 348 | |
466 | - store.dispatch('myLoveList/getLoveList') | |
467 | 349 | |
468 | 350 | // 初始化SPL、CYL、AXI的值 |
469 | 351 | for (let j = 0; j < 3; j++) { |
... | ... | @@ -502,11 +384,6 @@ import store from '@/store' |
502 | 384 | for (let index = 0; index < loveList.length; index++) { |
503 | 385 | if (name === loveList[index].name && name!==this.name) { |
504 | 386 | this.isDataName = true |
505 | - uni.showModal({ | |
506 | - title: '提示', | |
507 | - content: `是否填充已有的"${name}"的数据`, | |
508 | - success: (res) => { | |
509 | - if (res.confirm) { | |
510 | 387 | this.kinds = 2 |
511 | 388 | this.name = loveList[index].name |
512 | 389 | this.pd = loveList[index].pd |
... | ... | @@ -530,11 +407,6 @@ import store from '@/store' |
530 | 407 | } else { |
531 | 408 | this.pickerInfoList[3].nameArray3.unshift(loveList[index].in_time.toString().slice(8, 10)) |
532 | 409 | } |
533 | - } else if (res.cancel) { | |
534 | - this.kinds = 2 | |
535 | - } | |
536 | - }, | |
537 | - }) | |
538 | 410 | } |
539 | 411 | } |
540 | 412 | this.name = name; | ... | ... |