zhengkaixin 3 tahun lalu
induk
melakukan
6042fc6a1e
5 mengubah file dengan 85 tambahan dan 118 penghapusan
  1. 0 47
      apis/finance.js
  2. 0 70
      apis/my.js
  3. 1 1
      pages/index/index.vue
  4. 72 0
      pages/login/welcome.vue
  5. 12 0
      utils/mixin.js

+ 0 - 47
apis/finance.js

@@ -1,47 +0,0 @@
-import request from '../utils/request.js';
-import requestWhite from '../utils/requestWhite.js';
-
-import Qs from 'qs';
-
-export function merchantUser(data) {
-	return requestWhite({
-		jp_identity:"merchantUser",// 分润接口
-		method: 'post',
-		data: Qs.stringify(data),
-		url: '/mobile/merchantUser'
-	})
-}
-
-export function findByOpenId(data) {
-	var url='/mobile/merchantUser/findByOpenId';
-	return requestWhite({
-		jp_identity:"merchantUser",// 分润接口
-		method: 'get',
-		data: data,
-		url: url
-	})
-}
-
-
-
-export function validateCode(data) {
-	 
-	return requestWhite({
-		method: 'post',
-			jp_identity:"merchantUser",// 分润接口
-		data:data ,
-		url: '/mobile/merchantUser/validateCode'
-	})
-} 
-
-export function getVerifyCode(tel) {
-	 
-	return requestWhite({
-		method: 'post',
-		jp_identity:"merchantUser",// 分润接口
-		data:{
-			telephone:tel
-		} ,
-		url: '/mobile/merchantUser/getVerifyCode'
-	})
-} 

+ 0 - 70
apis/my.js

@@ -1,70 +0,0 @@
-import request from '../utils/request.js';
-import Qs from 'qs';
-
-export function passengerRecordList(data) {
-	return request({
-		method: 'post',
-		data: Qs.stringify(data),
-		url: '/mobile/passengerApi/passengerRecordList'
-	})
-}
-
-export function updateUserInfo(data) {
-	return request({
-		method: 'post',
-		data: Qs.stringify(data),
-		url: '/mobile/passengerApi/updateUserInfo'
-	})
-}
-
-
-export function problemFeedback(data) {
-	return request({
-		method: 'post',
-		data: Qs.stringify(data),
-		url: '/mobile/passengerApi/problemFeedback'
-		
-	})
-}
-
-export function userPhone(data) {
-	return request({
-		method: 'post',
-		data: Qs.stringify(data),
-		url: '/mobile/passengerApi/userPhone'
-		
-	})
-}
-
-export function userUpdatePhone(data) {
-	return request({
-		method: 'post',
-		data: Qs.stringify(data),
-		url: '/mobile/passengerApi/userUpdatePhone'
-		
-	})
-}
-
-
-
-export function passengerRecordDetail(id) {
-	return request({
-		method: 'post',
-		data: {
-			id:id
-		},
-		url: '/mobile/passengerApi/passengerRecordDetail'
-		
-	})
-}
-
-
-
-export function helpCenterList() {
-	return request({
-		method: 'post',
-	
-		url: '/mobile/passengerApi/helpCenterList'
-	})
-}
-

+ 1 - 1
pages/index/index.vue

@@ -93,7 +93,7 @@
 					</view>
 				</view>
 				<view class="img-box">
-					<img src="/static/img/暂无网络信号-缺省页 1.png"">
+					<img src="/static/img/暂无网络信号-缺省页 1.png">
 		  </view>
 		</view>
 		

+ 72 - 0
pages/login/welcome.vue

@@ -28,7 +28,79 @@
 			}
 		},
 		methods: {
+			gotoMain(k){
+				if(k){
+					uni.navigateTo({
+						url:"/pagesA/pages/login/index"
+					})
+				}else{
+					uni.switchTab({
+						url: '/pages/index/index'
+					});
+				}
+			},
+			findByOpenId(){
+				var openId=this.carhelp.getOpenId()
+				if(openId==""){
+					console.log("--------findByOpenId----------")
+					setTimeout(()=>{
+						this.findByOpenId()
+					},1000)
+					return
+				}
+				uni.request({
+					method:'get',
+					url: process.car.BASE_URL + "/mobile/regUser/findByOpenId",
+					data: {
+						openId:openId,			
+					},
+					header: {
+						'Content-Type': 'application/x-www-form-urlencoded',
+						'X-Requested-With': 'XMLHttpRequest',
+					}
+				}).then((response) => {
+					let [error, res] = response;
+					
+					//var backImg="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
+					this.carhelp.setConfig(res.data.data.configure) 
+					this.setBackImg()
+					
+					if (res.data.code == 200&&res.data.result) {			
+						var token = res ? res.data.data.token : '';					
+						this.carhelp.setPersonInfo(res.data.data.memberInfo );
+						this.carhelp.setToken(token);
+						this.carhelp.setPersonInfoPlus(res.data.data);
+						
+						setTimeout(()=>{
+							uni.switchTab({
+								url: '/pages/index/index'
+							});
+						},1000)
+					
+					} else{
+						this.carhelp.logoff()
+						this.bottonShow=true
+					}
+				}).catch(error => {
+					this.carhelp.logoff()
+					this.bottonShow=true
+				})
+			},
+			setBackImg(){
+				var  img=this.carhelp.getConfig().homepageLogo
+				if(img){
+					this.customStyle0="background:url("+img+") no-repeat;background-size: 100%;"
+				}
+			}
+		},
+		onLoad() {
+			 
+				this.setBackImg( )
+			 
+		},
+		onReady() {
 			
+			this.findByOpenId()
 		}
 	}
 </script>

+ 12 - 0
utils/mixin.js

@@ -7,6 +7,18 @@ var app = {
 
 	set : (key, value) => uni.setStorageSync(prefix + key, value),
 	remove: key =>  uni.removeStorageSync(prefix + key),
+	getConfig : () => {
+		var config = uni.getStorageSync(prefix + '_config_$')
+		var configure={}
+		if(config){
+			for(var  i in config){
+				var con=config[i];
+				configure[con.key]=con.value
+			}
+		}
+		 return configure;
+	},
+	setConfig : (value) => uni.setStorageSync(prefix + '_config_$', value),
 	
 	getPersonInfo : () => {
 		 return uni.getStorageSync(prefix + 'personInfo')