feat: 更新收货地址

This commit is contained in:
eric
2022-11-26 22:44:57 +08:00
parent 1821fb53be
commit f5032ceb90
6 changed files with 45 additions and 27 deletions

View File

@@ -20,7 +20,7 @@ export default {
desc: "你的位置信息将用于小程序位置接口的效果展示", // 高速公路行驶持续后台定位
},
},
requiredPrivateInfos: ["getLocation", "chooseLocation"],
requiredPrivateInfos: ["getLocation", "chooseLocation",'chooseAddress'],
window: {
backgroundTextStyle: "light",
navigationBarBackgroundColor: "#fff",

View File

@@ -562,6 +562,8 @@ const Home = () => {
})
}}>订阅消息</View> */}
<Toast id="vanToast-demo2" />
<TabbarCom active={0} />

View File

@@ -204,27 +204,45 @@ const my = (props: any) => {
</View> */}
<View className="cellArr">
{type !== "people" ||
(true && (
<Cell
icon="star"
title="打卡记录"
isLink
onClick={() => {
if (isin) {
// 跳转到目的页面,打开新页面
Taro.navigateTo({
url: "/pages/my/components/CheckinDetail/index",
});
} else {
Toast.fail({
message: "请先登录",
selector: "#vanToast-demo2",
});
}
}}
/>
))}
<Cell
icon="star"
title="打卡记录"
isLink
onClick={() => {
if (isin) {
// 跳转到目的页面,打开新页面
Taro.navigateTo({
url: "/pages/my/components/CheckinDetail/index",
});
} else {
Toast.fail({
message: "请先登录",
selector: "#vanToast-demo2",
});
}
}}
/>
<Cell
icon="coupon"
title="更新收货地址"
isLink
onClick={() => {
// 获取收获地址
Taro.chooseAddress({
success: function (res) {
console.log(res.userName);
console.log(res.postalCode);
console.log(res.provinceName);
console.log(res.cityName);
console.log(res.countyName);
console.log(res.detailInfo);
console.log(res.nationalCode);
console.log(res.telNumber);
},
});
}}
/>
{/* <Cell
icon="star"
@@ -313,8 +331,6 @@ const my = (props: any) => {
});
}}
/> */}
</View>
<Toast id="vanToast-demo2" />