|
@@ -10,7 +10,11 @@
|
|
/>
|
|
/>
|
|
|
|
|
|
<!-- 2. 短信登录 smsLogin -->
|
|
<!-- 2. 短信登录 smsLogin -->
|
|
- <sms-login v-if="authType === 'smsLogin'" :agreeStatus="state.protocol" @onConfirm="onConfirm" />
|
|
|
|
|
|
+ <sms-login
|
|
|
|
+ v-if="authType === 'smsLogin'"
|
|
|
|
+ :agreeStatus="state.protocol"
|
|
|
|
+ @onConfirm="onConfirm"
|
|
|
|
+ />
|
|
|
|
|
|
<!-- 3. 忘记密码 resetPassword-->
|
|
<!-- 3. 忘记密码 resetPassword-->
|
|
<reset-password v-if="authType === 'resetPassword'" />
|
|
<reset-password v-if="authType === 'resetPassword'" />
|
|
@@ -32,7 +36,11 @@
|
|
<!-- 7.1 微信小程序的快捷登录 -->
|
|
<!-- 7.1 微信小程序的快捷登录 -->
|
|
<view v-if="sheep.$platform.name === 'WechatMiniProgram'" class="ss-flex register-box">
|
|
<view v-if="sheep.$platform.name === 'WechatMiniProgram'" class="ss-flex register-box">
|
|
<view class="register-title">还没有账号?</view>
|
|
<view class="register-title">还没有账号?</view>
|
|
- <button class="ss-reset-button login-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
|
|
|
|
|
+ <button
|
|
|
|
+ class="ss-reset-button login-btn"
|
|
|
|
+ open-type="getPhoneNumber"
|
|
|
|
+ @getphonenumber="getPhoneNumber"
|
|
|
|
+ >
|
|
快捷登录
|
|
快捷登录
|
|
</button>
|
|
</button>
|
|
<view class="circle" />
|
|
<view class="circle" />
|
|
@@ -81,17 +89,13 @@
|
|
/>
|
|
/>
|
|
<view class="agreement-text ss-flex ss-col-center ss-m-l-8">
|
|
<view class="agreement-text ss-flex ss-col-center ss-m-l-8">
|
|
我已阅读并遵守
|
|
我已阅读并遵守
|
|
- <view class="tcp-text" @tap.stop="onProtocol('用户协议')">
|
|
|
|
- 《用户协议》
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="tcp-text" @tap.stop="onProtocol('用户协议')"> 《用户协议》 </view>
|
|
<view class="agreement-text">与</view>
|
|
<view class="agreement-text">与</view>
|
|
- <view class="tcp-text" @tap.stop="onProtocol('隐私协议')">
|
|
|
|
- 《隐私协议》
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="tcp-text" @tap.stop="onProtocol('隐私协议')"> 《隐私协议》 </view>
|
|
</view>
|
|
</view>
|
|
</label>
|
|
</label>
|
|
</view>
|
|
</view>
|
|
- <view class="safe-box"/>
|
|
|
|
|
|
+ <view class="safe-box" />
|
|
</view>
|
|
</view>
|
|
</su-popup>
|
|
</su-popup>
|
|
</template>
|
|
</template>
|
|
@@ -107,8 +111,6 @@
|
|
import mpAuthorization from './components/mp-authorization.vue';
|
|
import mpAuthorization from './components/mp-authorization.vue';
|
|
import { closeAuthModal, showAuthModal } from '@/sheep/hooks/useModal';
|
|
import { closeAuthModal, showAuthModal } from '@/sheep/hooks/useModal';
|
|
|
|
|
|
- const appInfo = computed(() => sheep.$store('app').info);
|
|
|
|
-
|
|
|
|
const modalStore = sheep.$store('modal');
|
|
const modalStore = sheep.$store('modal');
|
|
// 授权弹窗类型
|
|
// 授权弹窗类型
|
|
const authType = computed(() => modalStore.auth);
|
|
const authType = computed(() => modalStore.auth);
|
|
@@ -154,9 +156,11 @@
|
|
if (loginRes) {
|
|
if (loginRes) {
|
|
const userInfo = await sheep.$store('user').getInfo();
|
|
const userInfo = await sheep.$store('user').getInfo();
|
|
closeAuthModal();
|
|
closeAuthModal();
|
|
- // 如果用户已经有头像和昵称,不要每次登录都要重新上传头像。
|
|
|
|
- if(userInfo.avatar && userInfo.nickname) return;
|
|
|
|
-
|
|
|
|
|
|
+ // 如果用户已经有头像和昵称,不需要再次授权
|
|
|
|
+ if (userInfo.avatar && userInfo.nickname) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
// 触发小程序授权信息弹框
|
|
// 触发小程序授权信息弹框
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
showAuthModal('mpAuthorization');
|
|
showAuthModal('mpAuthorization');
|