优化页面,适配微信小程序
This commit is contained in:
parent
7a80e64e7f
commit
56e06b2adc
|
@ -66,7 +66,11 @@
|
|||
"scope.userLocation" : {
|
||||
"desc" : "请求获取您的位置信息"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos": [
|
||||
"chooseAddress",
|
||||
"chooseLocation"
|
||||
]
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
|
|
|
@ -11,7 +11,11 @@
|
|||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
>
|
||||
<view class="address-box" @click="selectAddress(item)">
|
||||
<view
|
||||
class="address-box"
|
||||
@click="selectAddress(item)"
|
||||
@longpress="deleteAddress(item.id, index)"
|
||||
>
|
||||
<view class="checkbox">
|
||||
<widget-check-box
|
||||
:size="52"
|
||||
|
@ -67,7 +71,7 @@ export default {
|
|||
id: 1,
|
||||
isDefault: false,
|
||||
address: "四川省绵阳市高新区",
|
||||
detail: "火炬东路110号",
|
||||
detail: "火炬东街110号",
|
||||
name: "李(先生)",
|
||||
mobile: "18200000001",
|
||||
},
|
||||
|
@ -75,7 +79,7 @@ export default {
|
|||
id: 2,
|
||||
isDefault: false,
|
||||
address: "四川省绵阳市高新区",
|
||||
detail: "火炬东路110号",
|
||||
detail: "火炬东街110号",
|
||||
name: "李(先生)",
|
||||
mobile: "18200000001",
|
||||
},
|
||||
|
@ -83,7 +87,7 @@ export default {
|
|||
id: 3,
|
||||
isDefault: true,
|
||||
address: "四川省绵阳市高新区",
|
||||
detail: "火炬东路110号",
|
||||
detail: "火炬东街110号",
|
||||
name: "李(先生)",
|
||||
mobile: "18200000001",
|
||||
},
|
||||
|
@ -121,15 +125,21 @@ export default {
|
|||
}
|
||||
},
|
||||
getWechatAddress() {
|
||||
console.log("获取微信地址");
|
||||
// #ifndef H5
|
||||
let wechatAddress = {};
|
||||
uni.chooseAddress({
|
||||
success: (d) => {
|
||||
console.log(d);
|
||||
},
|
||||
fail: (error) => {
|
||||
console.log(error);
|
||||
},
|
||||
success: (data) => {
|
||||
wechatAddress.address =
|
||||
data.provinceName + data.cityName + data.countyName;
|
||||
wechatAddress.detail = data.detailInfo;
|
||||
wechatAddress.mobile = data.telNumber;
|
||||
wechatAddress.name = data.userName;
|
||||
wechatAddress.gender = 1;
|
||||
wechatAddress.isDefault = false;
|
||||
console.log(wechatAddress);
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
addAddress() {
|
||||
uni.navigateTo({
|
||||
|
@ -141,6 +151,17 @@ export default {
|
|||
url: "/pages/address/edit?id=" + id,
|
||||
});
|
||||
},
|
||||
deleteAddress(id, index) {
|
||||
uni.showModal({
|
||||
title: "删除地址?",
|
||||
content: "数据删除后不可恢复,请谨慎操作!",
|
||||
complete: (res) => {
|
||||
if (res.confirm) {
|
||||
this.list.splice(index, 1);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -149,7 +170,7 @@ export default {
|
|||
.address-group {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0 18rpx;
|
||||
padding: 0 18rpx 120rpx 18rpx;
|
||||
.address-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -239,7 +260,7 @@ export default {
|
|||
}
|
||||
}
|
||||
.btn.add-address {
|
||||
background: rgba(139, 155, 235, 0);
|
||||
background: #f6f6f6;
|
||||
border: 1px solid #4b65ed;
|
||||
box-sizing: border-box;
|
||||
.text {
|
||||
|
|
|
@ -200,6 +200,8 @@ export default {
|
|||
}
|
||||
.input-box.map {
|
||||
.address-text {
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
font-size: 28rpx;
|
||||
color: #c9c9c9;
|
||||
box-sizing: border-box;
|
||||
|
|
|
@ -176,6 +176,7 @@ export default {
|
|||
.form-container {
|
||||
width: 100%;
|
||||
margin-top: 16rpx;
|
||||
padding-bottom: 120rpx;
|
||||
}
|
||||
.select-group {
|
||||
width: 100%;
|
||||
|
|
|
@ -128,7 +128,7 @@ export default {
|
|||
require("@/static/temp/cate/5.png"),
|
||||
require("@/static/temp/cate/5.png"),
|
||||
],
|
||||
content: "<p>这是服务内容</p>",
|
||||
content: "<p>这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容这是服务内容</p>",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
@ -288,7 +288,7 @@ export default {
|
|||
}
|
||||
}
|
||||
.service-section.detail-box {
|
||||
padding-bottom: 205rpx;
|
||||
padding-bottom: 100rpx;
|
||||
.detail {
|
||||
position: relative;
|
||||
width: 670rpx;
|
||||
|
|
Loading…
Reference in New Issue