Commit f8ad693018874b2576dc18536775b61cc47ea3bc
1 parent
5274a181
兑换记录填地址
Showing
4 changed files
with
56 additions
and
2 deletions
src/components/addressToast/addressToast.vue
| @@ -356,7 +356,7 @@ export default { | @@ -356,7 +356,7 @@ export default { | ||
| 356 | // 返回处理 | 356 | // 返回处理 |
| 357 | if (res.code == 200) { | 357 | if (res.code == 200) { |
| 358 | Toast("提交成功等待发货"); | 358 | Toast("提交成功等待发货"); |
| 359 | - this.$emit("toUpdate"); | 359 | + this.$emit("toUpdate", ext.ext.id); |
| 360 | } else { | 360 | } else { |
| 361 | // 兑换礼品失败 | 361 | // 兑换礼品失败 |
| 362 | Toast(res.message); | 362 | Toast(res.message); |
src/pages/pointsExchangeRecords/pointsExchangeRecords.less
| @@ -16,6 +16,7 @@ | @@ -16,6 +16,7 @@ | ||
| 16 | height: 190px; | 16 | height: 190px; |
| 17 | } | 17 | } |
| 18 | .right{ | 18 | .right{ |
| 19 | + flex: 1; | ||
| 19 | margin-left: 32px; | 20 | margin-left: 32px; |
| 20 | .name{ | 21 | .name{ |
| 21 | height: 80px; | 22 | height: 80px; |
| @@ -47,6 +48,30 @@ | @@ -47,6 +48,30 @@ | ||
| 47 | color: #9B9B9B; | 48 | color: #9B9B9B; |
| 48 | line-height: 33px; | 49 | line-height: 33px; |
| 49 | } | 50 | } |
| 51 | + .btn-box{ | ||
| 52 | + display: flex; | ||
| 53 | + justify-content: flex-end; | ||
| 54 | + margin-top: 30px; | ||
| 55 | + .btn{ | ||
| 56 | + width: 157px; | ||
| 57 | + height: 50px; | ||
| 58 | + border-radius: 26px; | ||
| 59 | + border: 1px solid #FC1541; | ||
| 60 | + padding:10px 20px; | ||
| 61 | + font-size: 24px; | ||
| 62 | + color: #FF415F; | ||
| 63 | + text-align: center; | ||
| 64 | + display: flex; | ||
| 65 | + align-items: center; | ||
| 66 | + justify-content: center; | ||
| 67 | + } | ||
| 68 | + img{ | ||
| 69 | + display: block; | ||
| 70 | + width: 22px; | ||
| 71 | + height: 22px; | ||
| 72 | + margin: 6px 0 0 4px; | ||
| 73 | + } | ||
| 74 | + } | ||
| 50 | } | 75 | } |
| 51 | } | 76 | } |
| 52 | } | 77 | } |
src/pages/pointsExchangeRecords/pointsExchangeRecords.vue
| @@ -28,6 +28,12 @@ | @@ -28,6 +28,12 @@ | ||
| 28 | <div class="exchange_time"> | 28 | <div class="exchange_time"> |
| 29 | 兑换时间 {{item.create_time*1000 | datetime('yyyy-MM-dd hh:mm:ss')}} | 29 | 兑换时间 {{item.create_time*1000 | datetime('yyyy-MM-dd hh:mm:ss')}} |
| 30 | </div> | 30 | </div> |
| 31 | + <div v-show="item.shop_type == 1 && !item.address_name && !item.address_name" class="btn-box"> | ||
| 32 | + <div @click="addAddressInfo(item)" class="btn"> | ||
| 33 | + 填写地址 | ||
| 34 | + <img src="static/img/red_right_icon.png" alt=""/> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 31 | </div> | 37 | </div> |
| 32 | </div> | 38 | </div> |
| 33 | </div> | 39 | </div> |
| @@ -39,12 +45,15 @@ | @@ -39,12 +45,15 @@ | ||
| 39 | <div v-show="list.length>0 && isMore ==0" class="is_more"> | 45 | <div v-show="list.length>0 && isMore ==0" class="is_more"> |
| 40 | 没有更多了 | 46 | 没有更多了 |
| 41 | </div> | 47 | </div> |
| 48 | + <!-- 地址信息组件 --> | ||
| 49 | + <address-toast ref="itemsInfo" @toUpdate="updateAddressInfo" v-show="pointsToast_control"></address-toast> | ||
| 42 | </div> | 50 | </div> |
| 43 | </template> | 51 | </template> |
| 44 | 52 | ||
| 45 | <script> | 53 | <script> |
| 46 | // 引入组件 | 54 | // 引入组件 |
| 47 | import { Toast, Indicator } from "mint-ui"; | 55 | import { Toast, Indicator } from "mint-ui"; |
| 56 | +import addressToast from "@/components/addressToast/addressToast"; | ||
| 48 | export default { | 57 | export default { |
| 49 | data () { | 58 | data () { |
| 50 | return { | 59 | return { |
| @@ -52,11 +61,13 @@ export default { | @@ -52,11 +61,13 @@ export default { | ||
| 52 | page: 0, | 61 | page: 0, |
| 53 | isMore: 1, // 0没有更多1有更多 | 62 | isMore: 1, // 0没有更多1有更多 |
| 54 | addressInfo: null, // 暂存已选商品发货地址信息 | 63 | addressInfo: null, // 暂存已选商品发货地址信息 |
| 55 | - isCall: false // 是否调用接口 | 64 | + isCall: false, // 是否调用接口 |
| 65 | + pointsToast_control: this.$route.query.pointsToast_control, | ||
| 56 | } | 66 | } |
| 57 | }, | 67 | }, |
| 58 | //部件 | 68 | //部件 |
| 59 | components: { | 69 | components: { |
| 70 | + addressToast | ||
| 60 | }, | 71 | }, |
| 61 | //静态 | 72 | //静态 |
| 62 | props: [ | 73 | props: [ |
| @@ -85,6 +96,24 @@ export default { | @@ -85,6 +96,24 @@ export default { | ||
| 85 | } | 96 | } |
| 86 | } | 97 | } |
| 87 | }, | 98 | }, |
| 99 | + // 填写地址 | ||
| 100 | + addAddressInfo (item) { | ||
| 101 | + // 如果是实物弹起填写地址弹窗 | ||
| 102 | + this.pointsToast_control = true; | ||
| 103 | + // 礼品兑换弹框派发 | ||
| 104 | + this.$refs.itemsInfo.getItemInfo(item, item.id); | ||
| 105 | + }, | ||
| 106 | + // 填写完地址回调 | ||
| 107 | + updateAddressInfo (orderId) { | ||
| 108 | + this.list.forEach(item => { | ||
| 109 | + let obj = item; | ||
| 110 | + for (let key in obj) { | ||
| 111 | + if (item.id == orderId) { | ||
| 112 | + this.$set(item, "shop_type", 2); | ||
| 113 | + } | ||
| 114 | + } | ||
| 115 | + }); | ||
| 116 | + }, | ||
| 88 | // 下拉刷新 | 117 | // 下拉刷新 |
| 89 | loadMore () { | 118 | loadMore () { |
| 90 | this.loading = true; | 119 | this.loading = true; |
static/img/red_right_icon.png
0 → 100755
357 Bytes