Commit fd48b2da by songbingqi

完成部分开发

parent 46804ace
......@@ -159,12 +159,7 @@ export default {
loginInfo: "",
img: "",
isInRange: true,
dayTitle: "",
list1: [
'https://cdn.uviewui.com/uview/swiper/swiper1.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
]
dayTitle: ""
};
},
computed: {
......@@ -357,7 +352,6 @@ export default {
console.log(data)
},
async getHomeOrder(id = this.shopInfo.id) {
console.log(123)
if (!this.userms) return;
const res = await Order.getHomeOrder({ shopId: id });
const data = res?.data;
......@@ -398,10 +392,20 @@ export default {
this.$refs.AreaPicker.showArea();
},
// 手机号授权登录
getPhoneNumber(e) {
async getPhoneNumber(e) {
if (e.detail.errMsg == "getPhoneNumber:ok") {
e.loginInfo = this.loginInfo;
User.getPhoneNumber(e, this.getHomeOrder);
await User.getPhoneNumber(e,()=>{
this.getHomeOrder()
uni.getSetting({
success: (res) => {
// 已经授权位置不获取默认店铺
if (!res.authSetting["scope.userLocation"]) {
this.getShopMenus()
}
},
});
});
} else if (e.detail.errMsg == "getPhoneNumber:fail user deny") {
this.showToast({
title: "已拒绝手机号授权,请同意授权",
......@@ -427,7 +431,7 @@ export default {
},
fail: (err) => {
//1.2 拒绝授权
this.getShopMenus();
// this.getShopMenus();
wx.exitMiniProgram({ success: (res) => {} });
console.log("获取位置失败")
this.showToast({
......
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