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,
+1 -1
View File
@@ -106,7 +106,7 @@
areaCode: `+${this.userInfo.areaCode}`,
code: this.codeValue,
password: this.formData.password,
platform: uni.$u.os() === "ios" ? 1 : 2,
platform: uni.$u.os(),
operationID: Date.now() + "",
};
businessReset(options)
+12 -15
View File
@@ -27,7 +27,7 @@
</u-form>
<view class="btn">
<u-button :loading="loading" type="primary" @click="doNext">
进入OpenIM
进入{{config.name}}
</u-button>
</view>
</view>
@@ -36,12 +36,9 @@
<script>
import md5 from "md5";
import MyAvatar from "@/components/MyAvatar/index.vue";
import {
businessRegister
} from "@/api/login";
import {
checkLoginError
} from "@/util/common";
import { mapGetters } from "vuex";
import { businessRegister } from "@/api/login";
import { checkLoginError } from "@/util/common";
export default {
components: {
MyAvatar,
@@ -100,19 +97,19 @@
},
};
},
computed:{
...mapGetters(["config"]),
},
onLoad(options) {
const {
userInfo,
codeValue
} = options;
const {userInfo,codeValue} = options;
this.userInfo = {
...this.userInfo,
...JSON.parse(userInfo),
};
this.codeValue = codeValue;
if(process.env.NODE_ENV == 'development'){
this.userInfo.email = "commiu@outlook.com";
this.userInfo.nickname = "commiu";
//this.userInfo.email = "commiu@outlook.com";
this.userInfo.nickname = "";
this.userInfo.password = "qwe123";
this.userInfo.confirmPassword = "qwe123";
}
@@ -135,12 +132,12 @@
this.loading = true;
const options = {
code: this.codeValue,
platform: uni.$u.os() === "ios" ? 1 : 2,
platform: uni.$u.os(),
autoLogin: true,
...this.userInfo,
areaCode: `+${this.userInfo.areaCode}`,
password: md5(this.userInfo.password),
mobile: `+${this.userInfo.phoneNumber}`,
mobile: this.userInfo.phoneNumber
};
try {
await businessRegister(options);