This commit is contained in:
2025-11-25 05:36:02 +08:00
parent 8e036cc171
commit b10e4b4336
65 changed files with 2672 additions and 2270 deletions
+15 -21
View File
@@ -7,10 +7,10 @@
</view>
<u-tabs :list="list" :current="active" @click="click"></u-tabs>
<u-form class="loginForm" labelPosition="top" :model="loginInfo" :labelStyle="{
fontSize: '14px',
marginTop: '20rpx',
width: 'max-content',
}" ref="loginForm">
fontSize: '14px',
marginTop: '20rpx',
width: 'max-content',
}" ref="loginForm">
<u-form-item v-if="active === 0" label="" prop="phoneNumber">
<u-input v-model="loginInfo.phoneNumber" border="surround" placeholder="请输入手机号码" clearable>
<view slot="prefix" class="phoneNumber_areacode" @click="showPicker">
@@ -53,7 +53,7 @@
<view class="action_bar">
<text>还没有账号<text class="register" @click="toRegisterOrForget(true)">立即注册</text></text>
<text style="margin-bottom: 16rpx" @click="copy">{{ v }}</text>
<text style="margin-bottom: 16rpx" @click="copy">{{ appversion }}</text>
</view>
</view>
</template>
@@ -62,7 +62,6 @@
import { mapGetters } from "vuex";
import { v4 as uuidv4 } from "uuid";
import md5 from "md5";
import { version } from '@/common/config'
import { businessLogin, businessSendSms } from "@/api/login";
import AreaPicker from "@/components/AreaPicker";
import { checkLoginError } from "@/util/common";
@@ -89,6 +88,7 @@
areaCode: "86",
verificationCode: "",
},
appversion:0,
eying: false,
loading: false,
count: 0,
@@ -97,12 +97,7 @@
};
},
computed: {
...mapGetters([
"config",
]),
v() {
return this.config.name+' '+version
},
...mapGetters(["config"]),
canLogin() {
return (
(this.loginInfo.phoneNumber || this.loginInfo.email) &&
@@ -111,16 +106,18 @@
},
},
onLoad(options) {
const _this = this;
plus.runtime.getProperty(plus.runtime.appid,(inf) => {
console.log(inf);
_this.appversion = inf.version
});
// if(options.isRedirect){
// plus.navigator.closeSplashscreen();
// }
this.version = version
this.init();
},
methods: {
click({
index
}) {
click({index}) {
this.active = index;
},
copy() {
@@ -164,14 +161,11 @@
email: this.loginInfo.email,
areaCode: `+${this.loginInfo.areaCode}`,
password: this.isPwdLogin ? md5(this.loginInfo.password) : "",
platform: uni.$u.os() === "ios" ? 1 : 2,
platform: uni.$u.os(),
type: this.active === 0 ? 'mobile' : 'email',
code: this.loginInfo.verificationCode,
});
const {
imToken,
userID
} = data;
const {imToken,userID} = data;
await IMSDK.asyncApi(IMSDK.IMMethods.Login, uuidv4(), {
userID,
token: imToken,