|
@@ -20,22 +20,23 @@
|
|
|
@click="agreeBtn('ystk')" class="agreement-text">《隐私政策》</view>
|
|
@click="agreeBtn('ystk')" class="agreement-text">《隐私政策》</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <ezyActiveVue class="ezy-btn-active login-btn" @aclick="getYzmBtn" :class="indexData.telStatus">发送验证码</ezyActiveVue>
|
|
|
|
|
|
|
+ <ezyActiveVue class="ezy-btn-active login-btn" @aclick="getYzmBtn" :class="indexData.telStatus">发送验证码
|
|
|
|
|
+ </ezyActiveVue>
|
|
|
<view class="bottom-btn-box">
|
|
<view class="bottom-btn-box">
|
|
|
- <view class="bottom-tip">选择第三方登录</view>
|
|
|
|
|
|
|
+ <view class="bottom-tip">选择游客登录</view>
|
|
|
<view class="btn-box">
|
|
<view class="btn-box">
|
|
|
- <view v-if="wxFlag" class="wx-btn" @click="wxLoginClick">
|
|
|
|
|
|
|
+ <!-- <view v-if="wxFlag" class="wx-btn" @click="wxLoginClick">
|
|
|
<icon></icon>
|
|
<icon></icon>
|
|
|
<view>微信登录</view>
|
|
<view>微信登录</view>
|
|
|
- </view>
|
|
|
|
|
- <!-- <view class="yk-btn" @click="ykBtn">
|
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <view class="yk-btn" @click="ykBtn">
|
|
|
<icon></icon>
|
|
<icon></icon>
|
|
|
<view>游客登录</view>
|
|
<view>游客登录</view>
|
|
|
- </view> -->
|
|
|
|
|
- <view class="apple-btn" v-if="showAppleLogin" @click="appleLoginClick">
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <!-- <view class="apple-btn" v-if="showAppleLogin" @click="appleLoginClick">
|
|
|
<icon></icon>
|
|
<icon></icon>
|
|
|
<view>苹果登录</view>
|
|
<view>苹果登录</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -63,7 +64,8 @@
|
|
|
import agreeDialog from './agreeDialog.vue'
|
|
import agreeDialog from './agreeDialog.vue'
|
|
|
import {
|
|
import {
|
|
|
wxLogin,
|
|
wxLogin,
|
|
|
- getVersion
|
|
|
|
|
|
|
+ getVersion,
|
|
|
|
|
+ youkeLogin
|
|
|
} from "@/api/login.js"
|
|
} from "@/api/login.js"
|
|
|
import {
|
|
import {
|
|
|
toast,
|
|
toast,
|
|
@@ -77,7 +79,7 @@
|
|
|
error
|
|
error
|
|
|
} from "uview-plus";
|
|
} from "uview-plus";
|
|
|
import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
|
|
import ezyActiveVue from "@/components/ezyActive/ezyActive.vue";
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
let indexData = reactive({
|
|
let indexData = reactive({
|
|
|
phoneNumber: null,
|
|
phoneNumber: null,
|
|
|
clearTelIcon: false,
|
|
clearTelIcon: false,
|
|
@@ -97,12 +99,14 @@
|
|
|
|
|
|
|
|
const version = config.appInfo.version;
|
|
const version = config.appInfo.version;
|
|
|
const tipDialogRef = ref(null);
|
|
const tipDialogRef = ref(null);
|
|
|
|
|
+ const uuid = ref(null);
|
|
|
const tipTitle = '升级提醒';
|
|
const tipTitle = '升级提醒';
|
|
|
const tipContent = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!';
|
|
const tipContent = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!';
|
|
|
|
|
|
|
|
onLoad((options) => {
|
|
onLoad((options) => {
|
|
|
showAppleLogin.value = isIOS13OrAbove();
|
|
showAppleLogin.value = isIOS13OrAbove();
|
|
|
getLoginInit()
|
|
getLoginInit()
|
|
|
|
|
+ getUUid()
|
|
|
if (plus.runtime.isApplicationExist({
|
|
if (plus.runtime.isApplicationExist({
|
|
|
pname: 'com.tencent.mm',
|
|
pname: 'com.tencent.mm',
|
|
|
action: 'weixin://'
|
|
action: 'weixin://'
|
|
@@ -207,6 +211,20 @@
|
|
|
}
|
|
}
|
|
|
agreeContentDialogRef.value.handleShow();
|
|
agreeContentDialogRef.value.handleShow();
|
|
|
};
|
|
};
|
|
|
|
|
+ const getUUid = (data) => {
|
|
|
|
|
+ plus.device.getInfo({
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ // res.uuid 是设备的 UUID(iOS 下为 identifierForVendor)
|
|
|
|
|
+ console.log('res', res);
|
|
|
|
|
+ uuid.value = res.uuid;
|
|
|
|
|
+ console.log('iOS 设备 UUID:', uuid.value);
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ fail: (err) => {
|
|
|
|
|
+ console.error('获取设备信息失败:', err);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
const handleAgreementChange = (event) => {
|
|
const handleAgreementChange = (event) => {
|
|
|
if (event.detail.value[0] === 'agree') {
|
|
if (event.detail.value[0] === 'agree') {
|
|
@@ -217,10 +235,31 @@
|
|
|
}
|
|
}
|
|
|
// 游客登录
|
|
// 游客登录
|
|
|
const ykBtn = () => {
|
|
const ykBtn = () => {
|
|
|
|
|
+ const systemInfo = uni.getSystemInfoSync();
|
|
|
if (indexData.isAgreed === true) {
|
|
if (indexData.isAgreed === true) {
|
|
|
- uni.redirectTo({
|
|
|
|
|
- url: `/pages/selectGradesTerms/index`
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!uuid.value) {
|
|
|
|
|
+ toast("设备id丢失")
|
|
|
|
|
+ getUUid()
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ let req = {
|
|
|
|
|
+ uuid: uuid.value
|
|
|
|
|
+ }
|
|
|
|
|
+ youkeLogin(req).then(res => {
|
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
|
+ cacheManager.set('auth', res.data)
|
|
|
|
|
+ uni.switchTab({
|
|
|
|
|
+ url: `/pages/chanpinXuanze/index`
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // uni.redirectTo({
|
|
|
|
|
+ // url: `/pages/selectGradesTerms/index`
|
|
|
|
|
+ // })
|
|
|
} else {
|
|
} else {
|
|
|
agreeYkDialog.value.handleShow();
|
|
agreeYkDialog.value.handleShow();
|
|
|
}
|
|
}
|