-
-
+
+
-
-
-
-
+
+
+
+
@@ -22,12 +28,10 @@ import { useRouter } from 'vue-router'
import { ref, getCurrentInstance } from 'vue';
import { getPhoneCode, PhoneCodeLogin } from "@/api/system/logins";
const { proxy } = getCurrentInstance();
-const phone = ref('')
+const phone = ref()
const phoneCode = ref('')
const type = ref("");
-function getPlat() {
- type.value = uni.getSystemInfoSync().uniPlatform
-}
+
const wxXCode = ref('')
const wxLogin = async () => {
uni.login({
@@ -77,8 +81,8 @@ const phoneLogin = () => {
}
-getPlat();
-//wxLogin();
+
+
const countDown = ref(60);
const isCounting = ref(false);
const phoneLoginCode = async () => {
@@ -126,7 +130,7 @@ const PhoneCodeLoginInfo = async () => {
try {
await store.dispatch('loginByPhoneCode', data).then(res => {
uni.hideLoading()
-
+
})
await loginSuccess()
} catch (error) {
@@ -140,7 +144,18 @@ function validatePhoneNumber(phoneNumber) {
return regex.test(phoneNumber);
}
-
+function getPlat() {
+ type.value = uni.getSystemInfoSync().uniPlatform
+ console.log("当前环境是:",type.value);
+ if(type.value == "mp-weixin"){
+ wxLogin();
+ }
+}
+getPlat();
-
\ No newline at end of file
+
diff --git a/pages/mine/setting/index.vue b/pages/mine/setting/index.vue
index f06dfa4..7a392e9 100644
--- a/pages/mine/setting/index.vue
+++ b/pages/mine/setting/index.vue
@@ -50,7 +50,7 @@
handleLogout() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
this.$store.dispatch('LogOut').then(() => {
- this.$tab.reLaunch('/pages/loginInfo/login')
+ this.$tab.reLaunch('/')
})
})
}