Browse Source

前端gjy

gjy 3 năm trước cách đây
mục cha
commit
befba2fa39
2 tập tin đã thay đổi với 22 bổ sung7 xóa
  1. 3 0
      pages/public/code.vue
  2. 19 7
      pages/public/register.vue

+ 3 - 0
pages/public/code.vue

@@ -166,6 +166,9 @@
 					})
 					this.$api.doRequest('get','/commonUser/loginVerifyCode',{phone:this.phone,verifyCode:this.inputList}).then(res => {
 					    if(res.data.code==200){
+							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
+							password: "y123456",
+							username: "13333333333"}).then(res => {})
 							uni.setStorageSync('userInfo', res.data.data)
 					        that.$store.commit('login', res.data.data)
 					        that.liangxinLogin()

+ 19 - 7
pages/public/register.vue

@@ -219,13 +219,25 @@
 							mask:true
 						})
 						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(res => {
-							// 获得数据
-							uni.setStorageSync('userInfo', res.data)
-							that.$store.commit('login', res.data)
-							that.liangxinLogin()
-							uni.switchTab({
-								url: '/pages/sale/information'
-							});
+							
+							if(res.data.code==200){
+								// pc登录
+								this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
+								password: "y123456",
+								username: "13333333333"}).then(res => {})
+								uni.setStorageSync('userInfo', res.data)
+								that.$store.commit('login', res.data)
+								that.liangxinLogin()
+								uni.switchTab({
+									url: '/pages/sale/information'
+								});
+							}else{
+								uni.showToast({
+									title: res.data.message,
+									icon:'none',
+									duration: 2000
+								})
+							}
 							uni.hideLoading()
 						})
 						.catch(res => {