Commit 49e5949f authored by liwei's avatar liwei

liwei

parent ea380ef6
......@@ -24,8 +24,9 @@
<div class="text">
<p>地址修改时间:{{deliverDetail.updated_at}}</p>
<p v-if="deliverDetail.express_no">发货时间:{{deliverDetail.deliver_at}}</p>
<div v-if="deliverDetail.express_no">
物流信息:{{deliverDetail.express_name}} {{deliverDetail.express_no}}
<div v-if="deliverDetail.express_no" class="express-no">
<span>物流信息:</span>
<span style="flex: 1;">{{deliverDetail.express_name}} {{deliverDetail.express_no}}</span>
<van-button round size="small" @click="search(1)" type="info">查看物流</van-button>
</div>
<div v-if="!deliverDetail.express_no">物流信息:- -</div>
......@@ -56,8 +57,10 @@
<div class="timeInfo">
<div class="text">
<p>地址修改时间:{{noDeliverDetail.updated_at}}</p>
<p v-if="!noDeliverDetail.express_no">预计发货时间:{{noDeliverDetail.deliver_start_at}}</p>
<div v-if="noDeliverDetail.express_no">
<p
v-if="!noDeliverDetail.express_no"
>预计发货时间:{{noDeliverDetail.deliver_start_at}}-{{noDeliverDetail.deliver_end_at}}</p>
<div v-if="noDeliverDetail.express_no" style="justify-content:space-between;">
物流信息:{{noDeliverDetail.express_name}} {{noDeliverDetail.express_no}}
<van-button round size="small" @click="search(2)" type="info">查看物流</van-button>
</div>
......@@ -75,7 +78,7 @@
style="text-align: center;padding-top: 20vh;font-size: 5vw;"
>{{addressInfo.msg}}</div>
</div>
<!-- <div class="address2">
<!-- <div class="address2">
<div class="content">
<div class="top">
<span>{{addressInfo.receive_name}}</span>
......@@ -90,7 +93,7 @@
<p>(最新地址修改时间:{{addressInfo.updated_at}})</p>
<p>*若要修改收货地址,请联系您的专属班主任老师</p>
</div>
</div> -->
</div>-->
</template>
<script>
......@@ -190,6 +193,10 @@ export default {
background: #f5f5f9;
.van-button {
margin-left: 20 * @toVw;
margin-right: 20 * @toVw;
}
.van-button__text {
padding: 10 * @toVw;
}
.head {
i {
......@@ -241,13 +248,18 @@ export default {
font-size: 12 * @toVw;
margin-left: 0;
line-height: 26 * @toVw;
width: 100%;
.express-no {
display: flex;
justify-content: space-between;
}
}
.right {
margin-top: 43 * @toVw;
}
.van-button--info {
background: white;
width: 74 * @toVw;
// width: 74 * @toVw;
color: #60adf0;
border-color: #60adf0;
}
......@@ -264,7 +276,8 @@ export default {
-webkit-transform: scale(1, 0.5);
}
.tip {
padding: 10 * @toVw 20 * @toVw;
width: 90%;
margin: 10 * @toVw auto;
color: #999999;
font-size: 12 * @toVw;
line-height: 23 * @toVw;
......
......@@ -74,7 +74,7 @@ import { mineImage } from "../../util/imgUrl";
import { Cell, Toast } from "vant";
import {
getStarSumberApi,
// getUserAdressApi,
getUserAdressApi,
getNewestAddressListAPi,
getUserDetailApi
} from "../../service/api";
......@@ -86,7 +86,7 @@ export default {
},
data() {
return {
isShowAddress: true,
isShowAddress: false,
noDeliverDetail: null, //下期收货地址
deliverDetail: null, //本期收货地址
image: mineImage,
......@@ -109,32 +109,47 @@ export default {
// getUserAdressApi().then(res => {
// this.addressInfo = res;
// });
getNewestAddressListAPi().then(res => {
if (res) {
if (res.deliver_detail && res.deliver_detail.length > 0) {
this.deliverDetail = res.deliver_detail;
}
if (res.no_deliver_detail && res.no_deliver_detail.length > 0) {
this.noDeliverDetail = res.no_deliver_detail;
}
if (!this.deliverDetail && !this.noDeliverDetail) {
this.isShowAddress = false;
}
if (this.deliverDetail && this.noDeliverDetail) {
if (
this.deliverDetail.express_no &&
this.deliverDetail.express_no.length === 0
) {
getNewestAddressListAPi()
.then(res => {
if (res) {
if (res.deliver_detail && res.deliver_detail.length > 0) {
this.deliverDetail = res.deliver_detail[0];
}
if (res.no_deliver_detail && res.no_deliver_detail.length > 0) {
this.noDeliverDetail = res.no_deliver_detail[0];
}
if (!this.deliverDetail && !this.noDeliverDetail) {
this.isShowAddress = false;
}
if (this.deliverDetail && this.noDeliverDetail) {
if (
this.noDeliverDetail.express_no &&
this.noDeliverDetail.express_no.length === 0
(this.deliverDetail.express_no &&
this.deliverDetail.express_no.length > 0) ||
(this.noDeliverDetail.express_no &&
this.noDeliverDetail.express_no.length > 0)
) {
this.isShowAddress = false;
this.isShowAddress = true;
}
if (
this.deliverDetail.express_no &&
this.deliverDetail.express_no.length === 0
) {
if (
this.noDeliverDetail.express_no &&
this.noDeliverDetail.express_no.length === 0
) {
this.isShowAddress = false;
}
}
}
}
}
});
})
.then(res => {
console.log(res);
})
.catch(error => {
console.log(JSON.stringify(error));
});
if (this.userDetail.mobile) {
this.phoneNumber = this.userDetail.mobile;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment