This commit is contained in:
@@ -12,6 +12,7 @@ const url = ref('');
|
||||
|
||||
Taro.useDidShow(() => {
|
||||
const token = Taro.getStorageSync('token');
|
||||
// url.value = 'http://huakk.jdt168.com/#/pages/index/index';
|
||||
if (token) {
|
||||
url.value = `${process.env.TARO_APP_GAME}${Taro.getStorageSync('token')}`;
|
||||
} else {
|
||||
|
||||
@@ -87,6 +87,22 @@ const clickSearch = () => {
|
||||
};
|
||||
|
||||
Taro.useLoad(async () => {
|
||||
Taro.getPrivacySetting({
|
||||
success: res => {
|
||||
if (res.needAuthorization) {
|
||||
Taro.requirePrivacyAuthorize({
|
||||
success: res => {
|
||||
console.log('用户同意授权');
|
||||
console.log(res);
|
||||
},
|
||||
fail: () => {
|
||||
console.log('用户拒绝授权');
|
||||
Taro.exitMiniProgram();
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
getNavLists();
|
||||
getUserLocal();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user