ccjgmwz vor 3 Jahren
Ursprung
Commit
a30a7bd655
5 geänderte Dateien mit 28 neuen und 3 gelöschten Zeilen
  1. 12 0
      App.vue
  2. 1 1
      pages/public/code.vue
  3. 6 0
      pages/public/login.vue
  4. 8 1
      pages/public/login_account_number.vue
  5. 1 1
      pages/public/register.vue

+ 12 - 0
App.vue

@@ -18,6 +18,18 @@
 			if(type == "android"){
 				appUpdate()
 			}
+			var that = this
+			plus.push.getClientInfoAsync((info) => {
+				var name = 'clientId'
+				var value = info.clientid
+				that.$store.commit('$uStore', {
+					name,
+					value
+				});
+				uni.setStorageSync("clientId",info.clientid)
+				console.log("info.clientid",info.clientid)
+			   }, err => {
+			});
 			// #endif
 			this.$socket.initWebIM(this.$ws, true, true)
 			let userInfo = uni.getStorageSync('userInfo') || '';

+ 1 - 1
pages/public/code.vue

@@ -169,7 +169,7 @@
 						title: '登录中',
 						mask:true
 					})
-					this.$api.doRequest('get','/commonUser/loginVerifyCode',{phone:this.phone,verifyCode:this.inputList}).then(res => {
+					this.$api.doRequest('get','/commonUser/loginVerifyCode',{phone:this.phone,verifyCode:this.inputList,cid:this.clientId}).then(res => {
 					    if(res.data.code==200){
 							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
 password: "y123456",

+ 6 - 0
pages/public/login.vue

@@ -27,6 +27,9 @@
 	} from 'vuex';
 	import { openFSqlite, createFSQL, selectFSQL, addFSQL } from '../../util/f.js'
 	import { queryData, upData, initData } from '../../util/dbUtil.js'
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -61,6 +64,9 @@
 				codestatus:false
 			}
 		},
+		computed: {
+			...mapState(['clientId'])
+		},
 		onShow() {
 			// this.loginType = "wechat"
 			this.$api.logout()

+ 8 - 1
pages/public/login_account_number.vue

@@ -32,6 +32,9 @@
 	} from 'vuex';
 	import { openFSqlite, createFSQL, selectFSQL, addFSQL } from '../../util/f.js'
 	import { queryData, upData, initData } from '../../util/dbUtil.js'
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -65,6 +68,9 @@
 				canIUseProfile:false
 			}
 		},
+		computed: {
+			...mapState(['clientId'])
+		},
 		onShow() {
 			// this.loginType = "wechat"
 			this.$api.logout()
@@ -96,7 +102,8 @@
 					title: '登录中',
 					mask:true
 				})
-				this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(res => {
+				console.log("clinetId",this.clientId)
+				this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password,cid:this.clientId}).then(res => {
 					if(res.data.code==200){
 						uni.setStorageSync('userInfo', res.data.data)
 						this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",

+ 1 - 1
pages/public/register.vue

@@ -218,7 +218,7 @@
 							title: '登录中',
 							mask:true
 						})
-						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(res => {
+						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password,cid:this.clientId}).then(res => {
 							
 							if(res.data.code==200){
 								// pc登录