|
@@ -1,374 +1,159 @@
|
|
|
<config>
|
|
<config>
|
|
|
{
|
|
{
|
|
|
- "navigationBarTitleText": "确认订单",
|
|
|
|
|
|
|
+ "navigationBarTitleText": "收货地址",
|
|
|
"navigationBarBackgroundColor": "#ffffff",
|
|
"navigationBarBackgroundColor": "#ffffff",
|
|
|
|
|
+ "navigationBarTextStyle": "black",
|
|
|
|
|
+ "backgroundTextStyle":"light"
|
|
|
}
|
|
}
|
|
|
</config>
|
|
</config>
|
|
|
<template>
|
|
<template>
|
|
|
<div class="container">
|
|
<div class="container">
|
|
|
- <div class="box-top">
|
|
|
|
|
- <p>平台担保交易,确认收货后,钱款才会打入对方账户</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="box-address">
|
|
|
|
|
- <div class="box-lr">
|
|
|
|
|
- <span class="box-lr-sp" v-if="!addressList">选择收获地址</span>
|
|
|
|
|
- <div class="box-con2" v-else>
|
|
|
|
|
|
|
+ <div class="box" v-for="(item, index) in addressList" :key="index">
|
|
|
|
|
+ <div class="box-con">
|
|
|
|
|
+ <div @click="add(item)">
|
|
|
<div class="box-con-top">
|
|
<div class="box-con-top">
|
|
|
<p>收货人</p>
|
|
<p>收货人</p>
|
|
|
- <span class="box-con-span">{{ addressList.name }}</span>
|
|
|
|
|
- <span class="box-con-code">{{ addressList.phone }}</span>
|
|
|
|
|
|
|
+ <span class="box-con-span">{{ item.name }}</span>
|
|
|
|
|
+ <span class="box-con-code">{{ item.phone }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="box-con-top">
|
|
<div class="box-con-top">
|
|
|
<p>收货地址</p>
|
|
<p>收货地址</p>
|
|
|
- <span class="box-con-sp">
|
|
|
|
|
- {{ addressList.province + addressList.city + addressList.district + addressList.detail }}
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <span class="box-con-sp">{{ item.province + item.city + item.district + item.detail }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <p class="box-p" @click="address">></p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <img src="../static/imgs/img_dizhitiao@3x.png" alt="" />
|
|
|
|
|
- <div class="box-tit">
|
|
|
|
|
- <img src="/native/tabbar/icon_kapai_shangjia_da.png" alt="" />
|
|
|
|
|
- <p>光之城卡牌</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="box-con">
|
|
|
|
|
- <div class="box-con-Cards">
|
|
|
|
|
- <img src="../static/imgs/home_top_bg.png" alt="" />
|
|
|
|
|
- <div class="box-con-right">
|
|
|
|
|
- <p class="box-con-tit">1105皇权破晓</p>
|
|
|
|
|
- <div class="box-con-today">
|
|
|
|
|
- <p>卡盒选号: 卡包02—A</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="box-con-money">
|
|
|
|
|
- <div class="box-con-num">
|
|
|
|
|
- <p>¥320</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <p>×1</p>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="box-con-buttom">
|
|
|
|
|
+ <div class="box-con-default" v-if="item.enabled == true">默认</div>
|
|
|
|
|
+ <div class="box-con-edit">编辑</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="box-buttom">
|
|
|
|
|
- <div class="box-buttom-con">
|
|
|
|
|
- <p>商品价格</p>
|
|
|
|
|
- <p class="box-buttom-p">¥960</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="box-buttom">
|
|
|
|
|
- <div class="box-buttom-con">
|
|
|
|
|
- <p>邮费</p>
|
|
|
|
|
- <p class="box-buttom-p">¥10</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="box-buttom">
|
|
|
|
|
- <div class="box-buttom-con">
|
|
|
|
|
- <p>支付方式</p>
|
|
|
|
|
- <p class="box-buttom-p">微信支付</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="box-buttom">
|
|
|
|
|
- <div class="box-buttom-con">
|
|
|
|
|
- <p>订单留言</p>
|
|
|
|
|
- <div class="box-buttom-p2">选填,备注对本次交易的说明</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="box-total">
|
|
|
|
|
- <div class="box-con-num">
|
|
|
|
|
- <span>总计</span>
|
|
|
|
|
- <img src="../static/imgs/icon_jiage.png" alt="" />
|
|
|
|
|
- <p>1320</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <van-button type="warning" @click="order">确认订单</van-button>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <van-goods-action>
|
|
|
|
|
+ <div class="container-but" @click="address">新增地址</div>
|
|
|
|
|
+ </van-goods-action>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- addressList: undefined,
|
|
|
|
|
- userAddressId: ''
|
|
|
|
|
|
|
+ addressList: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ addRess() {
|
|
|
|
|
+ this.$http.get('/address/showMy').then(res => {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ this.addressList = res;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
address() {
|
|
address() {
|
|
|
|
|
+ console.log(111);
|
|
|
wx.redirectTo({
|
|
wx.redirectTo({
|
|
|
- url: './add'
|
|
|
|
|
|
|
+ url: './receiving'
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- order() {
|
|
|
|
|
- let caseId = this.$mp.query.caseId;
|
|
|
|
|
- let boxIds = this.$mp.query.boxIds;
|
|
|
|
|
- console.log(caseId);
|
|
|
|
|
- console.log('===========');
|
|
|
|
|
- console.log(boxIds);
|
|
|
|
|
- console.log('===========');
|
|
|
|
|
- console.log(this.userAddressId);
|
|
|
|
|
- this.$http
|
|
|
|
|
- .post('/orderInfo/createOrderInfo', {
|
|
|
|
|
- caseId,
|
|
|
|
|
- remark: '',
|
|
|
|
|
- boxIds,
|
|
|
|
|
- userAddressId: this.userAddressId
|
|
|
|
|
- })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- console.log(res);
|
|
|
|
|
- });
|
|
|
|
|
- // wx.redirectTo({
|
|
|
|
|
- // url: './order'
|
|
|
|
|
- // });
|
|
|
|
|
|
|
+ // 添加到确认订单
|
|
|
|
|
+ add(item) {
|
|
|
|
|
+ let pages = getCurrentPages();
|
|
|
|
|
+ let prevPage = pages[pages.length - 2];
|
|
|
|
|
+ prevPage.rootVM.userAddressId = item.id;
|
|
|
|
|
+ prevPage.rootVM.addressList = item;
|
|
|
|
|
+ wx.navigateBack();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- onLoad(option) {
|
|
|
|
|
- if (option.address) {
|
|
|
|
|
- let data = JSON.parse(option.address);
|
|
|
|
|
- this.addressList = data;
|
|
|
|
|
- this.userAddressId = data.id;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.addRess();
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
|
.container {
|
|
.container {
|
|
|
|
|
+ background: #f5f7fa;
|
|
|
|
|
+ padding-top: 8px;
|
|
|
padding-bottom: 100px;
|
|
padding-bottom: 100px;
|
|
|
- // 按钮
|
|
|
|
|
- /deep/ .van-button {
|
|
|
|
|
- height: 48px;
|
|
|
|
|
- width: 210px;
|
|
|
|
|
- background: #ff6c00;
|
|
|
|
|
- border-radius: 12px;
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- color: #ffffff;
|
|
|
|
|
- margin-right: 16px;
|
|
|
|
|
- }
|
|
|
|
|
- .box-top {
|
|
|
|
|
- height: 44px;
|
|
|
|
|
- background: #ff6c00;
|
|
|
|
|
- opacity: 0.46;
|
|
|
|
|
- p {
|
|
|
|
|
- margin: 0 38px;
|
|
|
|
|
- line-height: 18px;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- width: 299px;
|
|
|
|
|
- height: 18px;
|
|
|
|
|
- font-size: 13px;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- color: #000000;
|
|
|
|
|
- line-height: 48px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .box-address {
|
|
|
|
|
- .box-lr {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- margin: 0 23px;
|
|
|
|
|
- height: 120px;
|
|
|
|
|
- .box-con2 {
|
|
|
|
|
- .box-con-top {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- margin-bottom: 8px;
|
|
|
|
|
- p {
|
|
|
|
|
- width: 68px;
|
|
|
|
|
- height: 24px;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- color: #c8c9cc;
|
|
|
|
|
- line-height: 24px;
|
|
|
|
|
- }
|
|
|
|
|
- .box-con-span {
|
|
|
|
|
- height: 24px;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #000000;
|
|
|
|
|
- line-height: 24px;
|
|
|
|
|
- }
|
|
|
|
|
- .box-con-code {
|
|
|
|
|
- height: 24px;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #000000;
|
|
|
|
|
- line-height: 24px;
|
|
|
|
|
- margin-left: 14px;
|
|
|
|
|
- }
|
|
|
|
|
- .box-con-sp {
|
|
|
|
|
- width: 235px;
|
|
|
|
|
- height: 24px;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #000000;
|
|
|
|
|
- line-height: 24px;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .box {
|
|
|
|
|
+ padding: 8px 20px;
|
|
|
|
|
+ .box-con {
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ padding: 16px 0 16px 16px;
|
|
|
|
|
+ .box-con-top {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ margin-bottom: 8px;
|
|
|
|
|
+ p {
|
|
|
|
|
+ width: 68px;
|
|
|
|
|
+ height: 24px;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ color: #c8c9cc;
|
|
|
|
|
+ line-height: 24px;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- .box-lr-sp {
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- color: #c8c9cc;
|
|
|
|
|
- line-height: 120px;
|
|
|
|
|
- }
|
|
|
|
|
- .box-p {
|
|
|
|
|
- line-height: 120px;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- img {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- height: 6px;
|
|
|
|
|
- background: #ffffff;
|
|
|
|
|
- }
|
|
|
|
|
- .box-tit {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- margin: 20px 0 0 20px;
|
|
|
|
|
- img {
|
|
|
|
|
- width: 17px;
|
|
|
|
|
- height: 17px;
|
|
|
|
|
- }
|
|
|
|
|
- p {
|
|
|
|
|
- height: 22px;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #000000;
|
|
|
|
|
- line-height: 22px;
|
|
|
|
|
- margin-left: 2px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .box-con {
|
|
|
|
|
- height: 160px;
|
|
|
|
|
- background: #ffffff;
|
|
|
|
|
- border-radius: 12px;
|
|
|
|
|
- .box-con-Cards {
|
|
|
|
|
- margin: 16px 0 20px 20px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- img {
|
|
|
|
|
- width: 90px;
|
|
|
|
|
- height: 130px;
|
|
|
|
|
- border-radius: 6px;
|
|
|
|
|
- }
|
|
|
|
|
- .box-con-right {
|
|
|
|
|
- width: 237px;
|
|
|
|
|
- margin-left: 8px;
|
|
|
|
|
- .box-con-tit {
|
|
|
|
|
|
|
+ .box-con-span {
|
|
|
height: 24px;
|
|
height: 24px;
|
|
|
- font-size: 16px;
|
|
|
|
|
|
|
+ font-size: 14px;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
color: #000000;
|
|
color: #000000;
|
|
|
line-height: 24px;
|
|
line-height: 24px;
|
|
|
- margin: 5px 0 10px 0;
|
|
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- .box-con-today {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- height: 30px;
|
|
|
|
|
- background: #f5f7fa;
|
|
|
|
|
- border-radius: 6px;
|
|
|
|
|
- width: 142px;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- p {
|
|
|
|
|
|
|
+ .box-con-code {
|
|
|
height: 24px;
|
|
height: 24px;
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
- font-weight: 400;
|
|
|
|
|
- color: #303133;
|
|
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #000000;
|
|
|
line-height: 24px;
|
|
line-height: 24px;
|
|
|
|
|
+ margin-left: 14px;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- .box-con-money {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- margin-top: 28px;
|
|
|
|
|
- .box-con-num {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- img {
|
|
|
|
|
- width: 16px;
|
|
|
|
|
- height: 16px;
|
|
|
|
|
- }
|
|
|
|
|
- p {
|
|
|
|
|
- height: 22px;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- font-weight: normal;
|
|
|
|
|
- color: #c8c9cc;
|
|
|
|
|
- line-height: 22px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- p {
|
|
|
|
|
|
|
+ .box-con-sp {
|
|
|
|
|
+ width: 235px;
|
|
|
height: 24px;
|
|
height: 24px;
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
- font-weight: 400;
|
|
|
|
|
- color: #c8c9cc;
|
|
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #000000;
|
|
|
line-height: 24px;
|
|
line-height: 24px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .box-buttom {
|
|
|
|
|
- margin: 35px 20px;
|
|
|
|
|
- .box-buttom-con {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- p {
|
|
|
|
|
- height: 20px;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #000000;
|
|
|
|
|
- line-height: 20px;
|
|
|
|
|
- }
|
|
|
|
|
- .box-buttom-p {
|
|
|
|
|
- height: 22px;
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #000000;
|
|
|
|
|
- line-height: 22px;
|
|
|
|
|
- }
|
|
|
|
|
- .box-buttom-p2 {
|
|
|
|
|
- height: 22px;
|
|
|
|
|
- font-size: 13px;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- color: #c8c9cc;
|
|
|
|
|
|
|
+ .box-con-buttom {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ margin: 40px 10px 0 0;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
|
+ .box-con-default {
|
|
|
|
|
+ width: 60px;
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ line-height: 32px;
|
|
|
|
|
+ border: 1px solid #000;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ color: #c8c9cc;
|
|
|
|
|
+ margin-right: 16px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .box-con-edit {
|
|
|
|
|
+ width: 60px;
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ border: 1px solid #ff6c00;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ line-height: 32px;
|
|
|
|
|
+ color: #ff6c00;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .box-total {
|
|
|
|
|
- .bottom();
|
|
|
|
|
- display: flex;
|
|
|
|
|
- height: 60px;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- background: #ffffff;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- position: fixed;
|
|
|
|
|
- bottom: 0;
|
|
|
|
|
- .box-con-num {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- margin-left: 16px;
|
|
|
|
|
- span {
|
|
|
|
|
- height: 22px;
|
|
|
|
|
- font-size: 13px;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- color: #c8c9cc;
|
|
|
|
|
- line-height: 22px;
|
|
|
|
|
- }
|
|
|
|
|
- img {
|
|
|
|
|
- width: 10px;
|
|
|
|
|
- height: 10px;
|
|
|
|
|
- margin: 7px 0 0 5px;
|
|
|
|
|
- }
|
|
|
|
|
- p {
|
|
|
|
|
- height: 22px;
|
|
|
|
|
- font-size: 24px;
|
|
|
|
|
- font-weight: normal;
|
|
|
|
|
- color: #f42202;
|
|
|
|
|
- line-height: 22px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .container-but {
|
|
|
|
|
+ width: 290px;
|
|
|
|
|
+ height: 48px;
|
|
|
|
|
+ background: #ff6c00;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ line-height: 48px;
|
|
|
|
|
+ margin: 6px 43px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|