Browse Source

安徒生修改

twt 1 year ago
parent
commit
cb47d426a2
6 changed files with 68 additions and 40 deletions
  1. 2 2
      pages.json
  2. 3 2
      pages/index/index.vue
  3. 49 23
      pages/index/shopList.vue
  4. 5 5
      pages/user/user.vue
  5. 5 5
      utils/common.js
  6. 4 3
      utils/request.js

+ 2 - 2
pages.json

@@ -573,13 +573,13 @@
 	
 		"tabBar": {
 			"color": "#8a8a8a",
-			"selectedColor": "#D53533",
+			"selectedColor": "#1677FF",
 			"borderStyle": "black",
 			"backgroundColor": "#ffffff",
 			"list": [{
 					"pagePath": "pages/index/index",
 					"iconPath": "./static/tabimg/index2.png",
-					"selectedIconPath": "./static/tabimg/index1.png",
+					"selectedIconPath": "./static/tabimg/index1677FF.png",
 					"text": "首页"
 				},
 				{

+ 3 - 2
pages/index/index.vue

@@ -282,7 +282,7 @@
 				InsuranceExpireDate:'',
 				NextCareDate:'',
 				NextAuditDate:'',
-				themeColor:'',
+				themeColor:'1677FF',
 				getwxLoing:false,
 				shareID:'',
 				discount:'',
@@ -335,7 +335,8 @@
 				this.uniLogin()
 			}
 			//版本更新
-		    this.UpdateManager()
+		    this.UpdateManager();
+			
 		},
 		onShow() {
 			this.userInfo=this.$store.state.userInfo;

+ 49 - 23
pages/index/shopList.vue

@@ -110,35 +110,35 @@
 				index:'',
 				areaName:'区域',
 				loading:false,
+				ext:'',
+				authorizShow:false,
+				wxOpenData:'',
+				userInfo: '',
 			}
 		},
 
 		onLoad() {
 			var that = this;
 			uni.removeStorageSync('selectCity');
-			uni.authorize({
-				scope: 'scope.userLocation',
-				success() {
-					uni.getLocation({
-						type: 'gcj02',
-						success: function(res) {
-							console.log(res)
-							that.location.lat = res.latitude
-							that.location.lng = res.longitude
-					        that.getAdress();
-							//that.getqueryShopList() //获取全部门店列表
-					
-						},
-						fail(err) {
-							console.log("定位失败")
-					        that.getqueryShopList();
-						}
-					});
-				},
-				fail: (err) => {
-					 that.getqueryShopList();
-					 
-				}})
+			this.userInfo = uni.getStorageSync("userInfo");
+			this.ext=this.$common.getExtStoreId();
+			 if(this.userInfo){
+				 this.themeColor = uni.getStorageSync("themeColor");
+				 this.wxOpenData=this.$store.state.wxOpenData;
+				 this.init()
+			 }else{
+				 this.$common.automaticlogin().then(val => {
+				 	this.themeColor = uni.getStorageSync("themeColor");
+				 	this.userInfo=this.$store.state.userInfo;
+				 	this.wxOpenData=this.$store.state.wxOpenData;
+				 	this.init()
+					if(!this.userInfo){
+						uni.hideLoading();
+						this.authorizShow=true
+					}
+				 })
+			 }
+			
 			
 			// that.getqueryShopList();
 			
@@ -157,6 +157,32 @@
 			}
 		},
 		methods: {
+			init(){
+				var that = this;
+				uni.authorize({
+					scope: 'scope.userLocation',
+					success() {
+						uni.getLocation({
+							type: 'gcj02',
+							success: function(res) {
+								console.log(res)
+								that.location.lat = res.latitude
+								that.location.lng = res.longitude
+						        that.getAdress();
+								//that.getqueryShopList() //获取全部门店列表
+						
+							},
+							fail(err) {
+								console.log("定位失败")
+						        that.getqueryShopList();
+							}
+						});
+					},
+					fail: (err) => {
+						 that.getqueryShopList();
+						 
+					}})
+			},
 			quCilck(){
 				this.$refs.popup.open("right")
 				this.popupShow=true;

+ 5 - 5
pages/user/user.vue

@@ -402,7 +402,7 @@
 				nickName: '',
 				phone: '',
 				ext: '',
-				themeColor: '',
+				themeColor: '1677FF',
 				release_version: '',
 				qrimg:'',
 				qrSHow:false,
@@ -639,14 +639,14 @@
 			},
 			goorder(num) {
 				if (this.userInfo) {
-					
+					uni.navigateTo({
+						url: './myOrder/myOrder?num=' + num
+					})
 				} else {
 					this.authorizShow = true;
 					return false;
 				}
-				uni.navigateTo({
-					url: './myOrder/myOrder?num=' + num
-				})
+				
 			},
 
 			queryMyDetail() {

+ 5 - 5
utils/common.js

@@ -73,11 +73,11 @@ function noMultipleClicks(methods, info) {
 function getExtStoreId(type){
 	try{
 	 var extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {shopId:'默认的门店id'};
-	/* 	 extConfig={
-		  	"shopId": "935D2FA9-1DA3-4C8B-944C-DB40D5C6F132",
-		  	"url":"https://apidms.66km.com",
-		  	"unionId":"1933D569-A2A4-4090-87C3-8E84B33FF15A",
-		  	"appId":"wx09ff516cd194a04d"
+		/*  extConfig={
+		  	"shopId": "23173848-292E-4AEA-B590-73AC9A763F1D",
+		  	"url":"https://store-api.qdbtl.cn/",
+		  	"unionId":"C3748B46-B778-40AA-8C60-A9B0F2FA23A7",
+		  	"appId":"wxc023ff04deb28f2d"
 	      } */
 		console.log(extConfig,'extJson对象');
 		//return extConfig[type];

+ 4 - 3
utils/request.js

@@ -10,14 +10,15 @@ const extConfig = uni.getExtConfigSync();
 console.log(extConfig)
 const baseUrl=extConfig.url+'/'
 //const baseUrl='http://192.168.0.129:20189/'
-//const baseUrl='http://192.168.0.174:20187/'
-//const baseUrl='http://dms.66km.com.cn/'
+//const baseUrl='https://store-api.qdbtl.cn/'
+//const baseUrl='http://api.dms.66km.com.cn/'
 
-//wx2c6f04c0dcd15984正式  wx33053a645546ec31 E37BB296-5A08-4534-859D-B351BA611AF9 EEADACCD-8A19-499D-8AD7-6975D2C93243 
+//wxc023ff04deb28f2d正式  wx33053a645546ec31 E37BB296-5A08-4534-859D-B351BA611AF9 EEADACCD-8A19-499D-8AD7-6975D2C93243 
 //测试地址
 //const webUrl = 'http://dms.32che.cn/'
 //正式
 const webUrl = 'https://webwx.66km.com/'
+console.log(baseUrl)
 const http = (url = '', date = {}, type = 'POST', header = {
 }) => {
     return new Promise((resolve, reject) => {