|
@@ -6,107 +6,106 @@
|
|
|
<!-- 258px -->
|
|
|
<view id="HeadArea" style="height: 25%;"></view>
|
|
|
<view id="MidArea">
|
|
|
- <view class="action-row align-center " style="background-color: rgba(0, 0, 0, 0.2); padding: 29px 104rpx 29px 104rpx;">
|
|
|
- <!-- <view class="text-white text-22px text-center" style="width: 100%;" @tap="onSwitchLogin(true)">手机登录</view> -->
|
|
|
- <view class=" text-white " :class="bMobileLogin?'text-22px':'text-16px'" @tap="onSwitchLogin(true)">手机登录</view>
|
|
|
- <view class="text-bold text-white">|</view>
|
|
|
- <view class=" text-white " :class="!bMobileLogin?'text-22px':'text-16px'" @tap="onSwitchLogin(false)">账号登录</view>
|
|
|
+ <view class="action-row align-center position-relative"
|
|
|
+ style="background-color: rgba(146, 146, 255, 0.15); padding: 29px 104rpx 29px 104rpx;">
|
|
|
+ <view class="text-white " :class="bMobileLogin?'text-22px':'text-16px'" @tap="onSwitchLogin(true)">
|
|
|
+ 手机登录</view>
|
|
|
+ <view class="text-white " :class="!bMobileLogin?'text-22px':'text-16px'"
|
|
|
+ @tap="onSwitchLogin(false)">邮箱登录</view>
|
|
|
+ <view class="position-absolute-center"
|
|
|
+ style="height: 29px ;width: 1px; background-color: rgba(255, 255, 255, 0.25);"></view>
|
|
|
</view>
|
|
|
- <view v-if="bMobileLogin">
|
|
|
- <!-- 手机端登录,获取验证码 -->
|
|
|
- <view v-if="bGetCode">
|
|
|
- <view class="input-container" style="margin: 32px 102rpx 0 68rpx;">
|
|
|
- <view class="input-row padding" style="width: 318px;">
|
|
|
- <m-input type="number" maxlength="11" clearable v-model="account" placeholder="请填写11位手机号码"></m-input>
|
|
|
+ <!-- bMobileLogin -->
|
|
|
+ <view v-if="bPhoneNumberAndPasswordLogin">
|
|
|
+ <view class="input-container" style="margin: 10px 102rpx 0 68rpx;">
|
|
|
+ <view class="input-row padding align-center" style="width: 318px;">
|
|
|
+ <view class="text-18px text-regular " style="width: 72rpx;">
|
|
|
+ {{bMobileLogin?' +86':'邮箱'}}
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="btn-row" style="margin: 32px 0 0 0;">
|
|
|
- <view class="btn-confirm" @tap="onNavToReg">获取验证码</view>
|
|
|
- </view>
|
|
|
- <!-- <view v-if="appleOauth" class="btn-row" style="margin: 5px 0 0 0;">
|
|
|
- <view class="btn-apple-confirm" @tap="onAppleReg">
|
|
|
- <image style="width: 48rpx;height: 48rpx;margin-right: 5px;" src="../../../static/img/apple.png"></image>
|
|
|
- <view>通过Apple注册</view>
|
|
|
+ <view class="margin-left-sm margin-right-sm"
|
|
|
+ style="width: 2rpx; height: 25rpx; background-color: rgba(209, 209, 209, 1);">
|
|
|
</view>
|
|
|
- </view> -->
|
|
|
- </view>
|
|
|
- <view v-else>
|
|
|
- <!-- 手机端登录 -->
|
|
|
- <view class="text-22px make-text-bPurple" style="margin: 34px 0 0 96rpx;">输入验证码</view>
|
|
|
- <view class="text-16px text-gray" style="margin: 20px 0 0 96rpx;">已发送4位验证码至 +86 {{phoneNumber}}</view>
|
|
|
-
|
|
|
- <view class="code-input-main">
|
|
|
- <view class="inputLine">
|
|
|
- <!-- <view class="input-item" maxlength="1" :value="inputCode[0]">{{inputCode[0]}}</input> -->
|
|
|
- <view class="input-item">{{inputCode[0]}}</view>
|
|
|
- <view class="input-item">{{inputCode[1]}}</view>
|
|
|
- <view class="input-item">{{inputCode[2]}}</view>
|
|
|
- <view class="input-item">{{inputCode[3]}}</view>
|
|
|
- </view>
|
|
|
- <!-- @input="inputEvent" -->
|
|
|
- <input class="code-input-input" v-model="inputCode" maxlength="4" type="number" />
|
|
|
+ <m-input type="number" clearable v-model="account"
|
|
|
+ :placeholder="bMobileLogin?'请填写11位手机号码':'请输入邮箱'"></m-input>
|
|
|
</view>
|
|
|
|
|
|
- <view class="btn-row">
|
|
|
- <!-- :disabled="inputCode.length<4" -->
|
|
|
- <view class="btn-confirm " :class="inputCode.length<4?'disabledBtn':''" @tap="onConfirm">确认</view>
|
|
|
+ </view>
|
|
|
+ <view class="input-container" style="margin: 8px 102rpx 0 68rpx;">
|
|
|
+ <view class="input-row padding align-center" style="width: 318px;">
|
|
|
+ <view class="text-18px text-regular " style="width: 72rpx;">
|
|
|
+ 密码
|
|
|
+ </view>
|
|
|
+ <view class="margin-left-sm margin-right-sm"
|
|
|
+ style="width: 2rpx; height: 25rpx; background-color: rgba(209, 209, 209, 1);">
|
|
|
+ </view>
|
|
|
+ <m-input type="password" maxlength="14" displayable v-model="password" placeholder="请输入密码">
|
|
|
+ </m-input>
|
|
|
</view>
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
- <view v-if="bCodeDisabled" class="action-row-text">
|
|
|
- <view class="action-child text-gray">重新获取({{count}})</view>
|
|
|
- <!-- <text style="color: #FFFFFF;">|</text>
|
|
|
- <navigator url="../pwd/pwd">忘记密码</navigator> -->
|
|
|
- </view>
|
|
|
- <view v-else class="action-row-text">
|
|
|
- <view class="action-child text-gray" @tap="onGetCode">重新发送验证码</view>
|
|
|
- <!-- <text style="color: #FFFFFF;">|</text>
|
|
|
- <navigator url="../pwd/pwd">忘记密码</navigator> -->
|
|
|
+ <view class="btn-row" style="margin: 20px 0 0 0;">
|
|
|
+ <view class="btn-confirm" @tap="bindLogin">登录</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 手机端登录或者邮箱,获取验证码 -->
|
|
|
+ <view v-else-if="bGetCode">
|
|
|
+ <view class="input-container" style="margin: 32px 102rpx 0 68rpx;">
|
|
|
+ <view class="input-row padding align-center" style="width: 318px;">
|
|
|
+ <view class="text-18px text-regular " style="width: 72rpx;">
|
|
|
+ {{bMobileLogin?' +86':'邮箱'}}
|
|
|
+ </view>
|
|
|
+ <view class="margin-left-sm margin-right-sm"
|
|
|
+ style="width: 2rpx; height: 25rpx; background-color: rgba(209, 209, 209, 1);">
|
|
|
+ </view>
|
|
|
+ <m-input :type="bMobileLogin?'number':'string'" :maxlength="bMobileLogin?'11':'20'" clearable v-model="account"
|
|
|
+ :placeholder="bMobileLogin?'请填写11位手机号码':'请输入邮箱'"></m-input>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
- <input class='ipt' type="number" :maxlength="Length" :focus="bFocus" @input="onInputFocus" @focus="onFocus"></input>
|
|
|
-
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
+ <view class="btn-row" style="margin: 32px 0 0 0;">
|
|
|
+ <view class="btn-confirm" @tap="onNavToReg">获取验证码</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
- <!-- 密码登录 -->
|
|
|
- <!-- <view class="text-26px text-white" style="margin: 116px 0 0 58rpx;">密码登录</view>
|
|
|
- <view class="text-16px text-white" style="margin: 32px 0 0 58rpx;">记录你的运动轨迹,呵护你的身体健康</view> -->
|
|
|
- <view class="input-container" style="margin: 10px 102rpx 0 68rpx;">
|
|
|
- <view class="input-row padding" style="width: 318px;">
|
|
|
- <m-input type="number" clearable v-model="account" placeholder="输入手机号码"></m-input>
|
|
|
- </view>
|
|
|
-
|
|
|
+ <!-- 手机端登录 -->
|
|
|
+ <view class="text-22px make-text-bPurple" style="margin: 34px 0 0 96rpx;">输入验证码</view>
|
|
|
+ <view v-if="bMobileLogin" class="text-16px text-gray" style="margin: 20px 0 0 96rpx;">已发送4位验证码至 +86
|
|
|
+ {{phoneNumber}}
|
|
|
</view>
|
|
|
- <view class="input-container" style="margin: 8px 102rpx 0 68rpx;">
|
|
|
- <view class="input-row padding" style="width: 318px;">
|
|
|
- <m-input type="password" maxlength="14" displayable v-model="password" placeholder="请输入密码"></m-input>
|
|
|
+ <view v-else class="text-16px text-gray" style="margin: 20px 0 0 96rpx;">已发送4位验证码至 {{mailboxNumber}}
|
|
|
+ 邮箱</view>
|
|
|
+
|
|
|
+ <view class="code-input-main">
|
|
|
+ <view class="inputLine">
|
|
|
+ <!-- <view class="input-item" maxlength="1" :value="inputCode[0]">{{inputCode[0]}}</input> -->
|
|
|
+ <view class="input-item">{{inputCode[0]}}</view>
|
|
|
+ <view class="input-item">{{inputCode[1]}}</view>
|
|
|
+ <view class="input-item">{{inputCode[2]}}</view>
|
|
|
+ <view class="input-item">{{inputCode[3]}}</view>
|
|
|
</view>
|
|
|
-
|
|
|
+ <!-- @input="inputEvent" -->
|
|
|
+ <input class="code-input-input" v-model="inputCode" maxlength="4" type="number" />
|
|
|
</view>
|
|
|
|
|
|
- <!-- border: 1rpx solid #007AFF; -->
|
|
|
- <view class="btn-row" style="margin: 20px 0 0 0;">
|
|
|
- <view class="btn-confirm" @tap="bindLogin">登录</view>
|
|
|
+ <view class="btn-row">
|
|
|
+ <!-- :disabled="inputCode.length<4" -->
|
|
|
+ <view class="btn-confirm " :class="inputCode.length<4?'disabledBtn':''" @tap="onConfirm">确认
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <!-- <view class="action-row " style="margin: 29px 58rpx 0 58rpx;">
|
|
|
- <view class="text-14px text-gray">
|
|
|
- <text class="cuIcon-roundcheck "></text>
|
|
|
- 我已阅读并同意使用<span style="color: rgba(151, 151, 255, 1);">服务协议</span></view>
|
|
|
- <view class="text-14px" style="color: rgba(151, 151, 255, 1);">忘记密码?</view>
|
|
|
- </view> -->
|
|
|
-
|
|
|
-
|
|
|
+ <view v-if="bCodeDisabled" class="action-row-text">
|
|
|
+ <view class="action-child text-gray">重新获取({{count}})</view>
|
|
|
+ </view>
|
|
|
+ <view v-else class="action-row-text">
|
|
|
+ <view class="action-child text-gray" @tap="onGetCode">重新发送验证码</view>
|
|
|
+ </view>
|
|
|
+ <input class='ipt' type="number" :maxlength="Length" :focus="bFocus" @input="onInputFocus"
|
|
|
+ @focus="onFocus"></input>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- v-if="hasProvider" style="border: 1rpx solid #000000;"-->
|
|
|
- <view class="oauth-row" v-if="bGetCode" v-bind:style="{top: positionTop + 'px'}" >
|
|
|
+ <view class="oauth-row" v-if="bGetCode" v-bind:style="{top: positionTop + 'px'}">
|
|
|
<view v-if="hasProvider&&providerList.length>0">
|
|
|
<view v-if="(bInstallWechat&&!bHideWeixin)||appleOauth" class="text-14px text-gray">其他登录方式</view>
|
|
|
<!-- <view v-else style="height: 50px;"></view> -->
|
|
@@ -114,24 +113,33 @@
|
|
|
<!-- <view class="oauth-image" v-for="provider in providerList" :key="provider.value">
|
|
|
<image :src="provider.image" @tap="oauth(provider.value)"></image>
|
|
|
</view> -->
|
|
|
- <view v-if="bInstallWechat&&!bHideWeixin" v-for="provider in providerList" :key="provider.value">
|
|
|
+ <view v-if="bInstallWechat&&!bHideWeixin" v-for="provider in providerList"
|
|
|
+ :key="provider.value">
|
|
|
<view class="btn-apple-confirm" @tap="oauth(provider.value)">
|
|
|
- <image style="width: 48rpx;height: 48rpx;margin-right: 5px;" :src="provider.image"></image>
|
|
|
+ <image style="width: 48rpx;height: 48rpx;margin-right: 5px;" :src="provider.image">
|
|
|
+ </image>
|
|
|
<view>通过微信注册</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-if="appleOauth" class="btn-apple-confirm" @tap="onAppleReg">
|
|
|
- <image style="width: 48rpx;height: 48rpx;margin-right: 5px;" src="../../../static/img/apple.png"></image>
|
|
|
+ <image style="width: 48rpx;height: 48rpx;margin-right: 5px;"
|
|
|
+ src="../../../static/img/apple.png"></image>
|
|
|
<view>通过Apple注册</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="action-row-text">
|
|
|
- <view class=" ">登录即代表同意哔蹦</view>
|
|
|
- <view class="text-bold text-decoration" @tap="onSwitchAgree('agreement')">用户协议</view>
|
|
|
- <view class=" ">和</view>
|
|
|
- <view class="text-bold text-decoration" @tap="onSwitchAgree('privacy')">隐私政策</view>
|
|
|
+ <view class="">
|
|
|
+ <view class="action-row-text" style="margin-top: 0;">
|
|
|
+ <view class="text-gray">登录即代表同意哔蹦</view>
|
|
|
+ <view class="text-bold text-decoration make-text-bPurple" @tap="onSwitchAgree('agreement')">用户协议
|
|
|
+ </view>
|
|
|
+ <view class=" ">和</view>
|
|
|
+ <view class="text-bold text-decoration make-text-bPurple" @tap="onSwitchAgree('privacy')">隐私政策
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view @click="onSwitchGetCode" class="make-text-bPurple text-right text-bold"
|
|
|
+ style="margin: 20rpx 120rpx 0 0;">{{bPhoneNumberAndPasswordLogin?'验证码登录':'密码登录'}} </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -161,6 +169,8 @@
|
|
|
return {
|
|
|
//获取验证码页面
|
|
|
bGetCode: true,
|
|
|
+ //默认手机号和密码登录
|
|
|
+ bPhoneNumberAndPasswordLogin: true,
|
|
|
bMobileLogin: true,
|
|
|
providerList: [],
|
|
|
hasProvider: true,
|
|
@@ -177,8 +187,9 @@
|
|
|
appleOauth: null,
|
|
|
}
|
|
|
},
|
|
|
- computed: mapState(['bNewUser', 'forcedLogin', 'phoneNumber', 'bCodeDisabled', 'count', 'bInstallWechat',
|
|
|
- 'bHideWeixin','clientName'
|
|
|
+ computed: mapState(['bNewUser', 'forcedLogin', 'phoneNumber', 'mailboxNumber', 'bCodeDisabled', 'count',
|
|
|
+ 'bInstallWechat',
|
|
|
+ 'bHideWeixin', 'clientName'
|
|
|
]),
|
|
|
methods: {
|
|
|
...mapMutations(['login', 'addUserAvatarAndLogin', 'appleUserInfoLogin', 'accountLogin', 'countDown',
|
|
@@ -216,9 +227,9 @@
|
|
|
}, data => {
|
|
|
// console.log("得到节点信息1" + JSON.stringify(data));
|
|
|
let headHeight = data.height;
|
|
|
- if(_self.clientName.indexOf('iPad')>-1){
|
|
|
+ if (_self.clientName.indexOf('iPad') > -1) {
|
|
|
_self.positionTop = headHeight + 390;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
_self.positionTop = headHeight + 280;
|
|
|
}
|
|
|
// let midView = uni.createSelectorQuery().in(this).select('#MidArea');
|
|
@@ -352,8 +363,10 @@
|
|
|
key: 'token',
|
|
|
data: resData.data.token,
|
|
|
success: function() {
|
|
|
- _self.$store.state.bNewUser = resData.data.newUser;
|
|
|
- console.log("wx token = ", resData.data.token);
|
|
|
+ _self.$store.state.bNewUser = resData.data
|
|
|
+ .newUser;
|
|
|
+ console.log("wx token = ", resData.data
|
|
|
+ .token);
|
|
|
//如果是新用户,则获取用户信息
|
|
|
if (_self.bNewUser) {
|
|
|
uni.getUserInfo({
|
|
@@ -361,42 +374,67 @@
|
|
|
success: (infoRes) => {
|
|
|
//获取了用户信息后
|
|
|
let userInfo = {
|
|
|
- username: infoRes.userInfo.nickName,
|
|
|
+ username: infoRes
|
|
|
+ .userInfo
|
|
|
+ .nickName,
|
|
|
gender: 0 //默认是男性
|
|
|
}
|
|
|
//服务器0是男,1是女
|
|
|
//微信的2 对应的女
|
|
|
- if (infoRes.userInfo.gender == 2) {
|
|
|
+ if (infoRes
|
|
|
+ .userInfo
|
|
|
+ .gender == 2) {
|
|
|
//服务器记录的是1
|
|
|
- userInfo.gender = 1;
|
|
|
+ userInfo
|
|
|
+ .gender =
|
|
|
+ 1;
|
|
|
}
|
|
|
- console.log("微信数据:", infoRes, userInfo);
|
|
|
+ console.log(
|
|
|
+ "微信数据:",
|
|
|
+ infoRes,
|
|
|
+ userInfo);
|
|
|
|
|
|
uni.downloadFile({
|
|
|
- url: infoRes.userInfo.avatarUrl,
|
|
|
- success: (res) => {
|
|
|
+ url: infoRes
|
|
|
+ .userInfo
|
|
|
+ .avatarUrl,
|
|
|
+ success: (
|
|
|
+ res
|
|
|
+ ) => {
|
|
|
// if (res.statusCode === 200) {
|
|
|
// console.log('下载成功');
|
|
|
// }
|
|
|
// console.log(res.tempFilePath);
|
|
|
- _self.addUserAvatarAndLogin({
|
|
|
- params: userInfo,
|
|
|
- filePath: res.tempFilePath,
|
|
|
- callback: () => {
|
|
|
- _self.$store.state.openid = infoRes.userInfo.openId || '';
|
|
|
- uni.hideToast();
|
|
|
-
|
|
|
- uni.reLaunch({
|
|
|
- url: "../../my-page/perfectInfo/perfectInfo"
|
|
|
- })
|
|
|
- }
|
|
|
- });
|
|
|
+ _self
|
|
|
+ .addUserAvatarAndLogin({
|
|
|
+ params: userInfo,
|
|
|
+ filePath: res
|
|
|
+ .tempFilePath,
|
|
|
+ callback: () => {
|
|
|
+ _self
|
|
|
+ .$store
|
|
|
+ .state
|
|
|
+ .openid =
|
|
|
+ infoRes
|
|
|
+ .userInfo
|
|
|
+ .openId ||
|
|
|
+ '';
|
|
|
+ uni
|
|
|
+ .hideToast();
|
|
|
+
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "../../my-page/perfectInfo/perfectInfo"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
fail: (failRes) => {
|
|
|
uni.hideToast();
|
|
|
- console.log('getUserInfo failRes:', failRes);
|
|
|
+ console.log(
|
|
|
+ 'getUserInfo failRes:',
|
|
|
+ failRes);
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
@@ -448,13 +486,16 @@
|
|
|
url: config.URL.WXGETUSERINFO,
|
|
|
data: {
|
|
|
appid: 'wxd6dfd60729d33d17',
|
|
|
- encryptedData: infoRes.encryptedData,
|
|
|
+ encryptedData: infoRes
|
|
|
+ .encryptedData,
|
|
|
iv: infoRes.iv,
|
|
|
signature: infoRes.signature,
|
|
|
rawData: infoRes.rawData
|
|
|
},
|
|
|
success: (wxInfoRes) => {
|
|
|
- console.log('WXGETUSERINFO 请求返回:', wxInfoRes);
|
|
|
+ console.log(
|
|
|
+ 'WXGETUSERINFO 请求返回:',
|
|
|
+ wxInfoRes);
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -478,24 +519,29 @@
|
|
|
console.log('callbackUserInfo:', userinfo);
|
|
|
},
|
|
|
onSwitchLogin(bMobileLogin) {
|
|
|
- // console.log(bMobileLogin);
|
|
|
this.bMobileLogin = bMobileLogin;
|
|
|
//如果是已获取的验证码页面,返回获取验证码界面
|
|
|
if (this.bGetCode == false)
|
|
|
this.bGetCode = true;
|
|
|
- // this.bMobileLogin = !this.bMobileLogin;
|
|
|
+ },
|
|
|
+ onSwitchGetCode() {
|
|
|
+ this.bPhoneNumberAndPasswordLogin = !this.bPhoneNumberAndPasswordLogin;
|
|
|
},
|
|
|
onNavToReg() {
|
|
|
- if (!verify.checkPhone(this.account)) {
|
|
|
- uni.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: '输入手机号错误'
|
|
|
- });
|
|
|
- return;
|
|
|
+ if(this.bMobileLogin){
|
|
|
+ if (!verify.checkPhone(this.account)) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '输入手机号错误'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$store.state.phoneNumber = this.account;
|
|
|
+ }else{
|
|
|
+ //todo 后面要验证邮箱
|
|
|
+
|
|
|
+ this.$store.state.mailboxNumber = this.account;
|
|
|
}
|
|
|
- // console.log("手机号正确:",this.account);
|
|
|
- // return;
|
|
|
- this.$store.state.phoneNumber = this.account;
|
|
|
this.bGetCode = false;
|
|
|
this.onGetCode();
|
|
|
},
|
|
@@ -576,10 +622,19 @@
|
|
|
onGetCode() {
|
|
|
//置灰状态
|
|
|
if (this.bCodeDisabled) return;
|
|
|
-
|
|
|
-
|
|
|
//调用store 倒计时
|
|
|
- this.countDown(this.phoneNumber);
|
|
|
+ if (this.bMobileLogin) {
|
|
|
+ this.countDown({
|
|
|
+ count: this.phoneNumber,
|
|
|
+ type: 0
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.countDown({
|
|
|
+ count: this.mailboxNumber,
|
|
|
+ type: 1
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
},
|
|
|
onTap() {
|
|
@@ -645,15 +700,23 @@
|
|
|
key: 'token',
|
|
|
data: res.data.token,
|
|
|
success: function() {
|
|
|
- _self.$store.state.bNewUser = res.data.newUser;
|
|
|
+ _self.$store.state.bNewUser = res
|
|
|
+ .data.newUser;
|
|
|
// console.log("apple token = ", res.data.token);
|
|
|
//如果是新用户,则获取用户信息
|
|
|
if (_self.bNewUser) {
|
|
|
//获取了用户信息后
|
|
|
let tempName = "匿名";
|
|
|
- if (resUser.userInfo.fullName.hasOwnProperty("familyName") &&
|
|
|
- resUser.userInfo.fullName.hasOwnProperty("givenName")) {
|
|
|
- tempName = resUser.userInfo.fullName.familyName + resUser.userInfo.fullName.givenName;
|
|
|
+ if (resUser.userInfo.fullName
|
|
|
+ .hasOwnProperty(
|
|
|
+ "familyName") &&
|
|
|
+ resUser.userInfo.fullName
|
|
|
+ .hasOwnProperty(
|
|
|
+ "givenName")) {
|
|
|
+ tempName = resUser.userInfo
|
|
|
+ .fullName.familyName +
|
|
|
+ resUser.userInfo
|
|
|
+ .fullName.givenName;
|
|
|
}
|
|
|
let userInfo = {
|
|
|
username: tempName,
|
|
@@ -665,8 +728,16 @@
|
|
|
params: userInfo,
|
|
|
callback: () => {
|
|
|
//这里是记录appleid,不是微信
|
|
|
- _self.$store.state.appleid = resUser.userInfo.openId || '';
|
|
|
- uni.hideToast();
|
|
|
+ _self
|
|
|
+ .$store
|
|
|
+ .state
|
|
|
+ .appleid =
|
|
|
+ resUser
|
|
|
+ .userInfo
|
|
|
+ .openId ||
|
|
|
+ '';
|
|
|
+ uni
|
|
|
+ .hideToast();
|
|
|
|
|
|
uni.reLaunch({
|
|
|
url: "../../my-page/perfectInfo/perfectInfo"
|
|
@@ -769,7 +840,7 @@
|
|
|
}
|
|
|
|
|
|
.action-row-text {
|
|
|
- margin-top: 25px;
|
|
|
+ margin-top: 18px;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: center;
|