Commit cc3f53b8 authored by 黄奎's avatar 黄奎

1

parent 6fcd69df
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<view class="triangle-up" :style="{ top: pagePaddingBottom }"></view> <view class="triangle-up" :style="{ top: pagePaddingBottom }"></view>
</view> </view>
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="goLook" @closeBtn="closeBtn"></coupon> <coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="goLook" @closeBtn="closeBtn"></coupon>
<template v-show="setting&&setting.is_show_auth==1"> <template v-if="setting&&setting.is_show_auth&& setting.is_show_auth==1">
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</template> </template>
<!-- <official-account></official-account> --> <!-- <official-account></official-account> -->
...@@ -425,12 +425,14 @@ ...@@ -425,12 +425,14 @@
let set = uni.getStorageSync("basedata") ? let set = uni.getStorageSync("basedata") ?
uni.getStorageSync("basedata").mall.setting : {}; uni.getStorageSync("basedata").mall.setting : {};
this.setting = set;
if (!uni.getStorageSync("add_top_app")) { if (!uni.getStorageSync("add_top_app")) {
uni.setStorageSync("add_top_app", { uni.setStorageSync("add_top_app", {
add_top_app_show: 1, add_top_app_show: 1,
}); });
} }
this.setting = set;
this.add_show = uni.getStorageSync("add_top_app") ? this.add_show = uni.getStorageSync("add_top_app") ?
uni.getStorageSync("add_top_app").add_top_app_show : uni.getStorageSync("add_top_app").add_top_app_show :
1; 1;
...@@ -537,34 +539,7 @@ ...@@ -537,34 +539,7 @@
}, },
methods: { methods: {
getunilogin(res) {
let that = this;
//静默登录操作
uni.login({
provider: "weixin",
success: (info) => {
let obj = {
Name: res.userInfo.nickName,
Photo: res.userInfo.avatarUrl,
code: info.code,
};
that.getCode(obj);
},
fail: () => {
uni.showToast({
title: "微信登录授权失败",
icon: "none",
});
if (!that.u) {
that.u = {
nickName: "未登录",
avatarUrl: "",
};
that.showAuth = true;
}
},
});
},
//获取IsOpenReserve //获取IsOpenReserve
getIsOpenReserve() { getIsOpenReserve() {
this.request2({ this.request2({
...@@ -644,6 +619,34 @@ ...@@ -644,6 +619,34 @@
}, },
}); });
}, },
getunilogin(res) {
let that = this;
//静默登录操作
uni.login({
provider: "weixin",
success: (info) => {
let obj = {
Name: res.userInfo.nickName,
Photo: res.userInfo.avatarUrl,
code: info.code,
};
that.getCode(obj);
},
fail: () => {
uni.showToast({
title: "微信登录授权失败",
icon: "none",
});
if (!that.u) {
that.u = {
nickName: "未登录h",
avatarUrl: "",
};
that.showAuth = true;
}
},
});
},
//调用获取code //调用获取code
getCode(obj) { getCode(obj) {
var that = this; var that = this;
......
This diff is collapsed.
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