预览
第一步导入插件
在引入的页面的登录按钮下拷贝一下代码
<template>
<view class="content">
<button type="primary" @click="login">微信登录</button>
</view>
<TC-WXlogin :wxlogin='wxlogin' />
</template>
<script setup>
import {ref} from 'vue';
import TCWXlogin from '/uni_modules/TC-WXlogin/pages/index.vue';
// 定义空值
const wxlogin = ref()
// 微信登录
function login(){
wxlogin.value = 'true'
}
</script>
第二步配置manifest.json
填写自己的AppID
第三步修改请求AppID和secret
第四步 下载链接:ext.dcloud.net.cn/plugin?id=1…
提需求 问题反馈 联系作者 V:ANKR6699
有什么不足之处所以留言提出,我将更新和更改
公众号也望大家关注一下