Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
张文文
5 years ago
Commit
eb1978ccec7de44a581b24ff4457a298d5edfa4a
1 parent
a0277185
编辑地址下拉刷新问题修改
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
84 deletions
apps/pages/address/address/address.vue
apps/pages/address/address/addressEdit.vue
apps/pages/order/components/order-actions.vue
apps/pages/address/address/address.vue
View file @
eb1978c
...
...
@@ -102,12 +102,12 @@ export default {
}
}
this.STORE_UPDATE_ADDRESS_INFO(item);
let addressInfo = JSON.parse(item || "{}");
Object.assign(addressInfo, { isUpdate: !isAdd, orderCode: "" });
this.STORE_UPDATE_ADDRESS_INFO(addressInfo);
this.$router.push({
name: "addressEdit",
params: {
update: !isAdd
}
name: "addressEdit"
});
}
},
...
...
@@ -156,17 +156,17 @@ export default {
display: flex;
padding-top: 40px;
padding-bottom: 44px;
padding-left: 28px;
padding-right: 40px;
align-items: center;
.check-item {
margin-left: 28px;
width: 40px;
height: 40px;
background: url(~statics/image/address/selected.png) no-repeat;
background-size: cover;
}
.uncheck-item {
margin-left: 28px;
width: 40px;
height: 40px;
background: url(~statics/image/address/unselected.png) no-repeat;
...
...
@@ -174,65 +174,64 @@ export default {
}
.user-info {
flex-grow: 1;
overflow: hidden;
margin-left: 32px;
}
width: calc(100% - 140px);
.extra {
display: flex;
flex-direction: row;
.extra {
display: flex;
flex-direction: row;
.name {
font-size: 28px;
font-weight: 400;
color: #000000;
line-height: 40px;
}
.name {
font-size: 28px;
font-weight: 400;
color: #000000;
line-height: 40px;
}
.mobile {
display: block;
margin-left: 20px;
font-size: 28px;
font-weight: 400;
color: #000000;
line-height: 40px;
}
.mobile {
display: block;
margin-left: 20px;
font-size: 28px;
font-weight: 400;
color: #000000;
line-height: 40px;
}
.tag-btn {
width: 80px;
line-height: 44px;
font-size: 22px;
text-align: center;
background-color: #002b47;
margin-left: 18px;
color: white;
border-radius: 4px;
.tag-btn {
width: 80px;
line-height: 44px;
font-size: 22px;
text-align: center;
background-color: #002b47;
margin-left: 18px;
color: white;
border-radius: 4px;
}
.option-btn {
display: block;
width: 48px;
line-height: 44px;
letter-spacing: -0.29;
color: black;
font-size: 24px;
position: absolute;
right: 40px;
}
}
.option-btn {
display: block;
width: 48px;
line-height: 44px;
letter-spacing: -0.29;
color: black;
.address {
font-size: 24px;
position: absolute;
right: 40px;
line-height: 34px;
margin-top: 16px;
color: #999;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
}
.address {
width: 100%;
font-size: 24px;
line-height: 34px;
margin-top: 16px;
color: #999;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
}
.add-btn {
...
...
apps/pages/address/address/addressEdit.vue
View file @
eb1978c
...
...
@@ -11,12 +11,7 @@
></CInput>
</FormItem>
<FormItem>
<CInput
label="手机号"
place-holder="请填写手机号"
v-model="model.mobile"
:textValue="model.mobile"
></CInput>
<CInput label="手机号" place-holder="请填写手机号" v-model="model.mobile" :textValue="model.mobile"></CInput>
</FormItem>
<template>
...
...
@@ -45,7 +40,7 @@
></CInput>
</FormItem>
<!-- 订单修改地址隐藏 -->
<div v-if="!
$route.params.
orderCode" class="wrapper-tag">
<div v-if="!orderCode" class="wrapper-tag">
<p class="tag-text">设置标签:</p>
<RadioGroup class="wrapper-radio">
<div v-for="(tag, index) in addressTags" :key="index">
...
...
@@ -59,7 +54,7 @@
</RadioGroup>
</div>
<!-- 订单修改地址隐藏 -->
<div v-if="!
$route.params.
orderCode" class="wrapper-del">
<div v-if="!orderCode" class="wrapper-del">
<Radio
class="radio"
:label="{ text: '设为默认地址', value: true }"
...
...
@@ -67,9 +62,7 @@
checked="model.is_default"
v-model="model.is_default"
></Radio>
<div v-if="isUpdate" class="del-address" @click="delAddress">
删除地址
</div>
<div v-if="isUpdate" class="del-address" @click="delAddress">删除地址</div>
</div>
<div :class="submitClass" @touchend="onSubmit">确 认</div>
...
...
@@ -114,6 +107,7 @@ export default {
updateMobileNum: "",
isMobileNumEdit: false,
title: "",
orderCode: "",
model: {
consignee: "",
address_id: "",
...
...
@@ -167,7 +161,7 @@ export default {
async onSubmit() {
let data = this.validator();
// 订单编辑地址
const
{ orderCode } = this.$route.params
;
const
orderCode = this.orderCode
;
if (!data) {
return;
...
...
@@ -309,19 +303,18 @@ export default {
},
activated() {
let { update, orderCode } = this.$route.params;
let addressInfo = this.updateAddressInfo;
this.isUpdate = addressInfo.isUpdate;
this.orderCode = addressInfo.orderCode;
this.title = addressInfo.isUpdate ? "编辑地址" : "添加地址";
// 订单编辑 不查标签
if (!orderCode) {
if (!
this.
orderCode) {
this.fetchAddressTags();
}
this.isUpdate = update;
this.title = update ? "编辑地址" : "添加地址";
let addressInfo = this.updateAddressInfo;
if (update) {
addressInfo = JSON.parse(addressInfo || "{}");
if (addressInfo.isUpdate) {
this.updateMobileNum = addressInfo.mobile;
this.model.consignee = addressInfo.consignee;
this.model.address_id = addressInfo.address_id;
...
...
apps/pages/order/components/order-actions.vue
View file @
eb1978c
...
...
@@ -112,15 +112,12 @@ export default {
// 修改地址
case orderActionsMap.MODIFY_ADDRESS.name: {
// 保存地址到store
this.STORE_UPDATE_ADDRESS_INFO(
JSON.stringify(addressInfo || userAddress || {})
);
let info = JSON.stringify(addressInfo || userAddress || {});
let updateInfo = JSON.parse(info || "{}");
Object.assign(updateInfo, { isUpdate: true, orderCode: orderCode });
this.STORE_UPDATE_ADDRESS_INFO(updateInfo);
this.$router.push({
name: "addressEdit",
params: {
orderCode,
update: true
}
name: "addressEdit"
});
break;
}
...
...
Please
register
or
login
to post a comment