|
|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
- <fs-modal v-model="modelValue" :showTitle="false" :showCancel="false" :showConfirm="false" :maskClickable="maskClickable">
|
|
|
+ <fs-modal v-model="visible" :showTitle="false" :showCancel="false" :showConfirm="false" :maskClickable="maskClickable">
|
|
|
<view style="padding: 20rpx;">
|
|
|
- <view class="title bold" style="font-size: 18px;margin-bottom: 30rpx;">授权微信访问</view>
|
|
|
- <view class="content" style="font-size: 15px;">
|
|
|
+ <view class="title bold" style="font-size:20px;margin-bottom: 60rpx;">授权微信访问</view>
|
|
|
+ <!-- <view class="content" style="font-size: 15px;">
|
|
|
为了保护他人的隐私,授权后可查看对方的名片
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="wxlogin-btn">
|
|
|
<fs-button full round type="success" @click="getUserProfile" v-if="canIUseGetUserProfile">授权微信</fs-button>
|
|
|
<fs-button full round type="success" open-type="getUserInfo" @getuserinfo="getUserInfo" v-else>授权微信</fs-button>
|
|
|
@@ -23,7 +23,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref } from 'vue'
|
|
|
+import { ref, computed } from 'vue'
|
|
|
import { wxLogin } from '@/services/common'
|
|
|
|
|
|
const props = defineProps({
|
|
|
@@ -31,10 +31,17 @@ const props = defineProps({
|
|
|
maskClickable: {
|
|
|
type: Boolean,
|
|
|
default: true
|
|
|
- }
|
|
|
+ },
|
|
|
})
|
|
|
const emits = defineEmits(['update:modelValue', 'success'])
|
|
|
|
|
|
+const visible = computed(
|
|
|
+ {
|
|
|
+ get: () => props.modelValue,
|
|
|
+ set: value => emits('update:modelValue', value)
|
|
|
+ }
|
|
|
+)
|
|
|
+
|
|
|
const checkboxArray = ref(['1'])
|
|
|
|
|
|
const canIUseGetUserProfile = ref(wx.getUserProfile ? true : false)
|