更新
This commit is contained in:
@@ -64,15 +64,17 @@ import { ref,onMounted,getCurrentInstance} from "vue";
|
||||
const { proxy } = getCurrentInstance()
|
||||
import * as GenerateTestUserSig from "@/debug/GenerateTestUserSig-es.js";
|
||||
import { CallManager } from "@/TUICallKit/src/TUICallService/serve/callManager";
|
||||
import { onLaunch, onShow, onHide, onError ,onShareAppMessage} from '@dcloudio/uni-app'
|
||||
let userID = ref("4");
|
||||
let avatarUrl = ref(""); // 声明为响应式变量
|
||||
uni.CallManager = new CallManager();
|
||||
|
||||
onMounted(() => {
|
||||
onLaunch(() => {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: function (loginRes) {
|
||||
|
||||
|
||||
|
||||
wxcode(loginRes.code)
|
||||
// 获取用户信息
|
||||
|
||||
@@ -105,7 +107,8 @@ onShareAppMessage((res) =>{
|
||||
});
|
||||
|
||||
const wxcode = async (code) => {
|
||||
|
||||
|
||||
return
|
||||
try {
|
||||
// 通过 proxy 调用全局的 apiUrl
|
||||
const res = await proxy.apiUrl({
|
||||
@@ -115,7 +118,7 @@ const wxcode = async (code) => {
|
||||
code: code
|
||||
},
|
||||
}, false) // 不显示加载中
|
||||
|
||||
|
||||
loginHandler(res.data.diagnosis.patient_id)
|
||||
} catch (err) {
|
||||
uni.showToast({ title: '请求失败', icon: 'none' })
|
||||
|
||||
Reference in New Issue
Block a user