<template>
|
<PageLayout title="微信授权设置" class="wxSetting-page-wrapper" hasBorder>
|
<List>
|
<ListItem title="地理位置" :showArrow="false">
|
<template #extra>
|
<nut-switch
|
v-model="authSetting['scope.userLocation']"
|
@change="(v) => handleSetting(v, 'scope.userLocation')"
|
/>
|
</template>
|
</ListItem>
|
</List>
|
</PageLayout>
|
</template>
|
|
<script setup lang="ts">
|
import { List, ListItem } from '@12333/components';
|
import Taro from '@tarojs/taro';
|
|
defineOptions({
|
name: 'wxSetting',
|
});
|
|
const authSetting = reactive<Taro.AuthSetting>({
|
'scope.userLocation': false,
|
});
|
|
onMounted(() => {
|
Taro.getSetting({
|
success: function (res) {
|
authSetting['scope.userLocation'] = res.authSetting['scope.userLocation'];
|
},
|
});
|
});
|
|
function handleSetting(val: boolean, key: keyof Taro.AuthSetting) {}
|
</script>
|
|
<style lang="scss">
|
@import '@/styles/common.scss';
|
</style>
|