提交 a98d1cdd 编写于 作者: DCloud_JSON's avatar DCloud_JSON

重要更新 兼容微信小程序

上级 2b6bce7f
...@@ -3,18 +3,21 @@ import config from '@/uni_modules/uni-id-pages-x/config.uts'; ...@@ -3,18 +3,21 @@ import config from '@/uni_modules/uni-id-pages-x/config.uts';
export const loginSuccess = (_ : UTSJSONObject) => { export const loginSuccess = (_ : UTSJSONObject) => {
// console.log('loginSuccess', e); // console.log('loginSuccess', e);
// console.log("新用户uid", e["uid"]); // console.log("新用户uid", e["uid"]);
// state.currentUserInfo = uniCloud.getCurrentUserInfo() // state.currentUserInfo = uniCloud.getCurrentUserInfo()
mutations.updateUserInfo(null) mutations.updateUserInfo(null)
// state.userInfo["_id"] = e["uid"] // state.userInfo["_id"] = e["uid"]
state.isLogin = true state.isLogin = true
uni.$emit('uni-id-pages-x-login-success', '') uni.$emit('uni-id-pages-x-login-success', '')
// 登录后重定向设置 // 登录后重定向设置
function loginAfterToPage() { function loginAfterToPage() {
const pages = getCurrentPages() const pages = getCurrentPages()
const currentPage = pages[pages.length - 1] const currentPage = pages[pages.length - 1]
const uniIdRedirectUrl = currentPage.options["uniIdRedirectUrl"]; let uniIdRedirectUrl = currentPage.options["uniIdRedirectUrl"];
if (uniIdRedirectUrl != null) { if (uniIdRedirectUrl != null) {
// #ifndef APP
uniIdRedirectUrl = decodeURIComponent(uniIdRedirectUrl)
// #endif
// console.log('uniIdRedirectUrl', uniIdRedirectUrl); // console.log('uniIdRedirectUrl', uniIdRedirectUrl);
uni.redirectTo({ uni.redirectTo({
url: uniIdRedirectUrl, url: uniIdRedirectUrl,
...@@ -102,4 +105,4 @@ export const checkPassword = (password : string) : UTSJSONObject => { ...@@ -102,4 +105,4 @@ export const checkPassword = (password : string) : UTSJSONObject => {
res["pass"] = passwordRegExp.test(password); res["pass"] = passwordRegExp.test(password);
res["errMsg"] = passwordRules.getString(passwordStrength + '.errMsg'); res["errMsg"] = passwordRules.getString(passwordStrength + '.errMsg');
return res return res
} }
<template> <template>
<view class="agreements-root" v-if="agreements.length != 0"> <view class="agreements-root" v-if="agreements.length != 0">
<template v-if="needAgreements"> <template v-if="needAgreements">
<checkbox-group @change="setAgree"> <checkbox-group @change="setAgree" class="checkbox-group">
<checkbox class="checkbox" style="transform: scale(0.7);margin-right: -6px;padding-right: 3px;margin-left: 1px;" <checkbox class="checkbox" :checked="!pendingAgreements" value="agreement">
:checked="!pendingAgreements" value="agreement"> <text class="text">同意</text>
<text class="checkbox-text">同意</text> </checkbox>
</checkbox>
</checkbox-group> </checkbox-group>
<view class="content"> <view class="content">
<view class="agreements-item" v-for="(agreement,index) in agreements" :key="index"> <view class="agreements-item" v-for="(agreement,index) in agreements" :key="index">
...@@ -140,21 +139,41 @@ ...@@ -140,21 +139,41 @@
margin-left: -9px; margin-left: -9px;
} }
.checkbox-text { .checkbox-group {
transform: scale(1.3); transform: scale(0.6);
margin-left: 3px; margin-left: -6px;
color: #8a8f8b; margin-right: -18px;
font-size: 12px; padding-right: 10px;
} .checkbox {
margin-left: 5px;
padding-right: 15px;
.text {
margin-left: 8px;
margin-right: 10px;
transform: scale(1.8);
color: #8a8f8b;
font-size: 12px;
line-height: 24px;
}
}
/* #ifdef MP-WEIXIN */
// 解决微信小程序中外层有transform: scale内层再设置transform: scale无效的问题
.checkbox {
padding-right: 40px;
.text {
position: absolute;
margin-right: 0;
top: 0;
}
}
/* #endif */
}
.agreements-item { .agreements-item {
flex-direction: row; flex-direction: row;
} }
.text {
line-height: 26px;
font-size: 12px;
}
.popup-text{ .popup-text{
line-height: 30px; line-height: 30px;
font-size:14px; font-size:14px;
......
<template> <template>
<view class="avatar-box-root"> <view class="avatar-box-root">
<!-- #ifdef MP-WEIXIN --> <!-- #ifdef MP-WEIXIN -->
<button open-type="chooseAvatar" @chooseavatar="bindchooseavatar" @click="uploadAvatarImg" class="box" <button open-type="chooseAvatar" @chooseavatar="bindchooseavatar" @click="uploadAvatarImg" class="box chooseAvatar"
:class="{'showBorder':border}" :style="{width,height,lineHeight:height}"> :class="{'showBorder':border}" :style="{width,height,lineHeight:height}">
<!-- #endif --> <!-- #endif -->
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
:style="{width,height}"> :style="{width,height}">
<!-- #endif --> <!-- #endif -->
<!-- {{avatar_file!.getString("url")}} --> <cloud-image v-if="avatar_file != null" :src="avatar_file!['url']" :width="width" :height="height"></cloud-image>
<cloud-image v-if="avatar_file != null" :src="avatar_file!.getString('url')" :width="width" :height="height"></cloud-image>
<image v-else-if="readOnly" class="default-avatarUrl" src="@/uni_modules/uni-id-pages-x/static/default-avatar.png" mode="widthFix"></image> <image v-else-if="readOnly" class="default-avatarUrl" src="@/uni_modules/uni-id-pages-x/static/default-avatar.png" mode="widthFix"></image>
<view v-else class="upload-img-icon"> <view v-else class="upload-img-icon">
<uni-id-pages-x-icons :size="35" color="#eee" type="jiahao"></uni-id-pages-x-icons> <uni-id-pages-x-icons :size="35" color="#eee" type="jiahao"></uni-id-pages-x-icons>
...@@ -73,7 +72,7 @@ ...@@ -73,7 +72,7 @@
return state.userInfo return state.userInfo
}, },
avatar_file() : UTSJSONObject | null { avatar_file() : UTSJSONObject | null {
return this.userInfo.getJSON("avatar_file") return this.userInfo["avatar_file"] as UTSJSONObject | null
} }
}, },
methods: { methods: {
...@@ -81,36 +80,37 @@ ...@@ -81,36 +80,37 @@
// 使用 clientDB 提交数据 // 使用 clientDB 提交数据
// mutations.updateUserInfo({avatar_file}) // mutations.updateUserInfo({avatar_file})
}, },
bindchooseavatar() { async bindchooseavatar(res:any) {
// res // #ifdef MP-WEIXIN
// let avatarUrl = res.detail.avatarUrl let avatarUrl = res.detail.avatarUrl
// let avatar_file = { let avatar_file = {
// extname: avatarUrl.split('.')[avatarUrl.split('.').length - 1], extname: avatarUrl.split('.')[avatarUrl.split('.').length - 1],
// name:'', name:'',
// url:'' url:''
// } }
// //上传到服务器 //上传到服务器
// let cloudPath = this.userInfo._id + '' + Date.now() let cloudPath = this.userInfo._id + '' + Date.now()
// avatar_file.name = cloudPath avatar_file.name = cloudPath
// try{ try{
// uni.showLoading({ uni.showLoading({
// title: "更新中", title: "更新中",
// mask: true mask: true
// }); });
// let { let {
// fileID fileID
// } = await uniCloud.uploadFile({ } = await uniCloud.uploadFile({
// filePath:avatarUrl, filePath:avatarUrl,
// cloudPath, cloudPath,
// fileType: "image" fileType: "image"
// }); });
// avatar_file.url = fileID avatar_file.url = fileID
// uni.hideLoading() uni.hideLoading()
// }catch(e){ }catch(e){
// console.error(e); console.error(e);
// } }
// console.log('avatar_file',avatar_file); console.log('avatar_file',avatar_file);
// this.setAvatarFile(avatar_file) mutations.updateUserInfo({ avatar_file } as UTSJSONObject)
// #endif
}, },
uploadAvatarImg() { uploadAvatarImg() {
if(this.readOnly){ if(this.readOnly){
...@@ -216,10 +216,10 @@ ...@@ -216,10 +216,10 @@
}, },
fail:(err)=>{ fail:(err)=>{
console.error('chooseImage fail: ', err) console.error('chooseImage fail: ', err)
uni.showModal({ // uni.showModal({
content: '失败,' + err.errMsg, // content: '失败,' + err.errMsg,
showCancel: false // showCancel: false
}); // });
} }
}) })
// #endif // #endif
...@@ -242,20 +242,19 @@ ...@@ -242,20 +242,19 @@
padding: 0; padding: 0;
} }
.chooseAvatar { /* #ifdef MP */
/* #ifndef UNI-APP-X */ .chooseAvatar {
display: inline-block; border-radius: 0;
box-sizing: border-box; }
/* #endif */ .chooseAvatar:after{
border-radius: 100px; display: none;
text-align: center; }
padding: 1px; /* #endif */
}
.upload-img-icon { .upload-img-icon {
border: 1px dotted #c8c8c8; border: 1px dotted #c8c8c8;
width: 55px; width: 100%;
height: 55px; height: 100%;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
......
<template> <template>
<view> <view @click="clickHandle">
<text class="uni-id-icon" :style="{color,'fontSize':size + 'px'}">{{iconCode}}</text> <text class="uni-id-icon" :style="{color,'fontSize':size + 'px'}">{{iconCode}}</text>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
emits: ["click"],
props: { props: {
type: { type: {
type: String, type: String,
...@@ -21,6 +22,11 @@ ...@@ -21,6 +22,11 @@
default: 16 default: 16
}, },
}, },
methods: {
clickHandle() {
this.$emit("click");
}
},
computed: { computed: {
iconCode() : string { iconCode() : string {
const iconCode : UTSJSONObject = { const iconCode : UTSJSONObject = {
...@@ -51,4 +57,4 @@ ...@@ -51,4 +57,4 @@
font-size: 16px; font-size: 16px;
font-style: normal; font-style: normal;
} }
</style> </style>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<text v-if="hasTitleAndContent" class="title">{{title}}</text> <text v-if="hasTitleAndContent" class="title">{{title}}</text>
<input class="input" ref="input" :placeholder="_placeholder" :class="{'move-down':hasTitleAndContent}" <input class="input" ref="input" :placeholder="_placeholder" :class="{'move-down':hasTitleAndContent}"
:value="modelValue" @input="updateValue" :type="type" :maxlength="maxlength" :value="modelValue" @input="updateValue" :type="type" :maxlength="maxlength"
:password="password && !visiblePwd" :focus="focus" @blur="onBlur" @focus="onFocus" @confirm="confirm" :password="password && !visiblePwd" :focus="focusInput" @blur="onBlur" @focus="onFocus" @confirm="confirm"
:confirm-type="confirmType" /> :confirm-type="confirmType" />
<view class="my-input-icon-box" v-if="modelValue"> <view class="my-input-icon-box" v-if="modelValue">
<uni-id-pages-x-icons v-if="password" :color="visiblePwd?'#0070ff':'#ddd'" <uni-id-pages-x-icons v-if="password" :color="visiblePwd?'#0070ff':'#ddd'"
...@@ -23,9 +23,15 @@ ...@@ -23,9 +23,15 @@
emits: ["blur", "focus", "confirm", "update:modelValue"], emits: ["blur", "focus", "confirm", "update:modelValue"],
data() { data() {
return { return {
visiblePwd: false visiblePwd: false,
focusInput: false
} }
}, },
mounted(){
if(this.focus){
this.setFocus(true)
}
},
computed: { computed: {
_placeholder() : string { _placeholder() : string {
if (this.placeholder.length > 0) { if (this.placeholder.length > 0) {
...@@ -78,7 +84,10 @@ ...@@ -78,7 +84,10 @@
default: "done" default: "done"
}, },
/** /**
* @param touch click * 显示密码的方式
* @type {String}
* @default click
* @example click | touch
*/ */
visiblePwdOption:{ visiblePwdOption:{
type: String, type: String,
...@@ -103,31 +112,29 @@ ...@@ -103,31 +112,29 @@
// this.$emit('update:focus', true); // this.$emit('update:focus', true);
}, },
setFocus(state : boolean) { setFocus(state : boolean) {
const inputEl = this.$refs['input'] as UniElement // console.error('setFocus',state)
if (state) { this.focusInput = state
inputEl.focus();
} else {
inputEl.blur();
}
}, },
confirm(event : InputConfirmEvent) { confirm(event : InputConfirmEvent) {
this.$emit('confirm', event) this.$emit('confirm', event)
}, },
setVisiblePwd(eventName:string){ setVisiblePwd(eventName:string){
console.error('eventName',eventName)
if(eventName == "click" && this.visiblePwdOption == 'click'){ if(eventName == "click" && this.visiblePwdOption == 'click'){
this.visiblePwd = !this.visiblePwd this.visiblePwd = !this.visiblePwd
}else if(eventName == "touch"){ }else if(eventName.includes("touch") && this.visiblePwdOption == 'touch'){
// switch (eventName){ console.error('eventName',eventName)
// case "touchstart": switch (eventName){
// this.visiblePwd = true case "touchstart":
// break; this.visiblePwd = true
// case "touchend": break;
// this.visiblePwd = false case "touchend":
// break; this.visiblePwd = false
// case "touchcancel": break;
// this.visiblePwd = false case "touchcancel":
// break; this.visiblePwd = false
// } break;
}
} }
} }
} }
...@@ -137,7 +144,6 @@ ...@@ -137,7 +144,6 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.input-box { .input-box {
position: relative; position: relative;
margin: 0;
background-color: #F8F8F8; background-color: #F8F8F8;
height: 50px !important; height: 50px !important;
border-radius: 5rpx; border-radius: 5rpx;
...@@ -179,6 +185,7 @@ ...@@ -179,6 +185,7 @@
right: 10px; right: 10px;
bottom:14px; bottom:14px;
flex-direction: row; flex-direction: row;
z-index: 2;
} }
.password-icon { .password-icon {
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<view class="code-input-list"> <view class="code-input-list">
<template v-for="(_,i) in smsCodeList" :key="i"> <template v-for="(_,i) in smsCodeList" :key="i">
<!-- TODO APP :value="item" 第一次不触发@input --> <!-- TODO APP :value="item" 第一次不触发@input -->
<input @input="setSmsCode(i,$event as InputEvent)" type="number" ref="code-input" <input @input="setSmsCode(i,$event as InputEvent)" type="number" ref="code-input" :value="smsCodeList[i]"
class="code-input" maxlength="7" @focus="onFocus(i)" /> class="code-input" :maxlength="i == 0 ? 7 : 2" @focus="onFocus(i)" @blur="onBlur(i)" :focus="focusInputs[i]" />
</template> </template>
</view> </view>
<view class="fab-sms-code-input-foot"> <view class="fab-sms-code-input-foot">
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
data() { data() {
return { return {
smsCodeList: ["\u200b", "\u200b", "\u200b", "\u200b", "\u200b", "\u200b"], smsCodeList: ["\u200b", "\u200b", "\u200b", "\u200b", "\u200b", "\u200b"],
focusInputs: [false, false, false, false, false, false],
isOpen: false isOpen: false
} }
}, },
...@@ -60,11 +61,17 @@ ...@@ -60,11 +61,17 @@
this.$emit('update:modelValue', smsCode); this.$emit('update:modelValue', smsCode);
}, },
}, },
// mounted() {
// this.show()
// },
methods: { methods: {
onBlur(i : number) {
this.focusInputs[i] = false
},
show() { show() {
(this.$refs['popup'] as UniPopupComponentPublicInstance).open(); (this.$refs['popup'] as UniPopupComponentPublicInstance).open();
this.$nextTick(() => { this.$nextTick(() => {
(this.$refs["code-input"] as UniElement[])[0].focus(); this.focusInputs[0] = true;
}) })
this.isOpen = true this.isOpen = true
}, },
...@@ -75,7 +82,7 @@ ...@@ -75,7 +82,7 @@
clear() { clear() {
this.smsCodeList = ["\u200b", "\u200b", "\u200b", "\u200b", "\u200b", "\u200b"]; this.smsCodeList = ["\u200b", "\u200b", "\u200b", "\u200b", "\u200b", "\u200b"];
if (this.isOpen) { if (this.isOpen) {
(this.$refs["code-input"] as UniElement[])[0].focus(); this.focusInputs[0] = true;
// console.log('clear success'); // console.log('clear success');
} else { } else {
// console.log('已经关了,不能清空'); // console.log('已经关了,不能清空');
...@@ -84,10 +91,10 @@ ...@@ -84,10 +91,10 @@
setSmsCode(i : number, e : InputEvent) { setSmsCode(i : number, e : InputEvent) {
const { value } = e.detail const { value } = e.detail
// console.log('~~',value,value.length); // console.log('~~',value,value.length);
// 已满6位数就直接调登录 // 已满6位数就直接调登录
let $value = value.replace(/\u200b/g, '') let $value = value.replace(/\u200b/g, '')
if ($value.length == 6) { if ($value.length == 6) {
// (this.$refs["code-input"] as Element[])[0].focus();
$value.split('').forEach((item : string, index : number) => { $value.split('').forEach((item : string, index : number) => {
this.smsCodeList[index] = "\u200b" + item this.smsCodeList[index] = "\u200b" + item
}) })
...@@ -107,13 +114,13 @@ ...@@ -107,13 +114,13 @@
this.smsCodeList[i] = '\u200b' this.smsCodeList[i] = '\u200b'
}) })
if (i != 0) { if (i != 0) {
(this.$refs["code-input"] as UniElement[])[i - 1].focus(); this.focusInputs[i - 1] = true;
this.smsCodeList[i - 1] = "" this.smsCodeList[i - 1] = ""
} }
} else if (value != "\u200b") { } else if (value != "\u200b") {
this.smsCodeList[i] = value; this.smsCodeList[i] = value;
if (i != (this.smsCodeList.length - 1)) { if (i != (this.smsCodeList.length - 1)) {
(this.$refs["code-input"] as UniElement[])[i + 1].focus(); this.focusInputs[i + 1] = true;
} else { } else {
// console.log(i, (this.smsCodeList.length - 1)); // console.log(i, (this.smsCodeList.length - 1));
} }
......
...@@ -152,8 +152,7 @@ export default async function () { ...@@ -152,8 +152,7 @@ export default async function () {
// needLogin相关代码-start(此代码仅为版本兼容提示使用,如已知晓可删除) // needLogin相关代码-start(此代码仅为版本兼容提示使用,如已知晓可删除)
const needLogin = config.getArray<string>('needLogin') const needLogin = config.getArray<string>('needLogin')
const uniCompileVersionCode = uni.getSystemInfoSync().uniCompileVersionCode if(needLogin != null){
if(needLogin != null && (uniCompileVersionCode >= 3.99 ) ){
const tipText = "uni-id-pages x v1.0.4+ 不再支持配置项config.needLogin,请升级HBuilderX 版本为3.99+,使用更强大 uni-id-router替代。详情查看:https://uniapp.dcloud.net.cn/uniCloud/uni-id/summary.html#uni-id-router" const tipText = "uni-id-pages x v1.0.4+ 不再支持配置项config.needLogin,请升级HBuilderX 版本为3.99+,使用更强大 uni-id-router替代。详情查看:https://uniapp.dcloud.net.cn/uniCloud/uni-id/summary.html#uni-id-router"
console.error(tipText) console.error(tipText)
uni.showModal({ uni.showModal({
......
<template> <template>
<view class="page"> <view class="page">
<uni-navbar-lite title="设置昵称" class="uni-navbar-lite"> <uni-navbar-lite title="设置昵称" class="uni-navbar-lite">
<template v-slot:right> <!-- #ifndef MP-WEIXIN -->
<text class="submit" :class="{disabled:!hasChange || nickname == ''}" @click="setNickname">完成</text> <template v-slot:right>
<text class="submit" :class="{disabled:!hasChange || nickname == ''}" @click="setNickname">完成</text>
</template> </template>
<!-- #endif -->
</uni-navbar-lite> </uni-navbar-lite>
<uni-id-pages-x-input class="my-input" v-model="nickname" @confirm="setNickname" placeholder="请输入昵称" :focus="true" <uni-id-pages-x-input class="my-input" v-model="nickname" @confirm="setNickname" placeholder="请输入昵称" :focus="true"
:maxlength="25"></uni-id-pages-x-input> :maxlength="25"></uni-id-pages-x-input>
<!-- #ifdef MP-WEIXIN -->
<button class="submit-mp" :disabled="!hasChange || nickname == ''" type="primary" @click="setNickname">完成</button>
<!-- #endif -->
</view> </view>
</template> </template>
...@@ -24,7 +29,8 @@ ...@@ -24,7 +29,8 @@
return this.currentNickname != this.nickname return this.currentNickname != this.nickname
}, },
currentNickname() : string { currentNickname() : string {
return state.userInfo.get("nickname") == null?'':(state.userInfo.get("nickname") as string) const nickname = state.userInfo["nickname"]
return nickname == null ? '' : nickname as string
} }
}, },
onLoad() { onLoad() {
...@@ -83,7 +89,7 @@ ...@@ -83,7 +89,7 @@
} }
.my-input { .my-input {
background-color: #FFF; background-color: #FFF!important;
} }
.uni-navbar-lite .right-content { .uni-navbar-lite .right-content {
...@@ -106,4 +112,13 @@ ...@@ -106,4 +112,13 @@
background-color: #EFEFEF; background-color: #EFEFEF;
color: #AAA; color: #AAA;
} }
/* #ifdef MP-WEIXIN */
.submit-mp {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
border-radius: 0;
}
/* #endif */
</style> </style>
...@@ -9,12 +9,9 @@ ...@@ -9,12 +9,9 @@
<text class="title">昵称</text> <text class="title">昵称</text>
<view @click="setNickname" class="content"> <view @click="setNickname" class="content">
<text class="unset" v-if="!isLogin">未登录</text> <text class="unset" v-if="!isLogin">未登录</text>
<text class="value" <text class="value" v-else-if="userInfo['nickname'] != null && userInfo['nickname'] != ''">{{userInfo['nickname']}}</text>
v-else-if="userInfo['nickname'] != null && userInfo['nickname'] != ''">{{userInfo['nickname']}}
</text>
<text class="unset" v-else>未设置</text> <text class="unset" v-else>未设置</text>
<uni-id-pages-x-icons v-if="isLogin" :size="16" type="right-arrow" <uni-id-pages-x-icons v-if="isLogin" :size="16" type="right-arrow" class="link-icon"></uni-id-pages-x-icons>
class="link-icon"></uni-id-pages-x-icons>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
......
...@@ -23,7 +23,7 @@ function initState() { ...@@ -23,7 +23,7 @@ function initState() {
// #ifdef APP-IOS // #ifdef APP-IOS
userInfo = new UTSJSONObject(userInfo) userInfo = new UTSJSONObject(userInfo)
// #endif // #endif
if (userInfo instanceof UTSJSONObject) { if (userInfo != null) {
state.userInfo = userInfo as UTSJSONObject state.userInfo = userInfo as UTSJSONObject
// console.log('init userInfo',userInfo); // console.log('init userInfo',userInfo);
} }
...@@ -62,15 +62,13 @@ export const mutations = { ...@@ -62,15 +62,13 @@ export const mutations = {
customUI: true customUI: true
}) })
uniIdCo uniIdCo.getRealNameInfo()
.getRealNameInfo() .then((realNameInfo) => {
.then((realNameInfo) => { state.userInfo = Object.assign(res.data[0], {
state.userInfo = Object.assign(res.data[0], { realNameInfo
realNameInfo }) as UTSJSONObject
afterUpdateUserInfo()
}) })
afterUpdateUserInfo()
})
}) })
.catch((err: any | null) => { .catch((err: any | null) => {
const error = err as UniCloudError const error = err as UniCloudError
...@@ -79,7 +77,7 @@ export const mutations = { ...@@ -79,7 +77,7 @@ export const mutations = {
} else { } else {
param.toMap().forEach((value, key) => { param.toMap().forEach((value, key) => {
state.userInfo.set(key, value) state.userInfo[key] = value
}) })
usersCollection usersCollection
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册