Browse Source

Squashed commit of the following:

commit 502f85ea5d25816fad579f2e5bf4c42ce8a68eab
Author: twt <178638311@qq.com>
Date:   Mon Feb 26 15:43:27 2024 +0800

    门店bug修改
twt 1 year ago
parent
commit
348b31fb3f

+ 2 - 1
pages/index/confirmRescue.vue

@@ -135,7 +135,8 @@
 		},
 		onLoad(opt) {
 			this.themeColor = uni.getStorageSync("themeColor");
-			this.userInfo = uni.getStorageSync("userInfo");
+			//this.userInfo = uni.getStorageSync("userInfo");
+			this.userInfo = this.$store.state.userInfo;
 			this.shopName=opt.shopName;
 			this.opt=opt;
 			if(this.opt.type==2){

+ 2 - 1
pages/index/confirmYuyue.vue

@@ -92,7 +92,8 @@
 			this.stationID=this.yuyueData[0].StationID
 			this.totalPrice=opt.totalPrice
 			//this.carInfo=this.$store.state.carInfo
-			this.userInfo = uni.getStorageSync("userInfo");
+			//this.userInfo = uni.getStorageSync("userInfo");
+			this.userInfo = this.$store.state.userInfo;
 			this.yyshopInfo=uni.getStorageSync("yyshopInfo")
 			//this.getOrderTimes()
 			

+ 11 - 3
pages/index/onlineBooking.vue

@@ -193,13 +193,16 @@
 				wxOpenData:'',
 				code:'',
 				scene:'',
+				naUnionId:'',
 			}
 		},
 		onLoad(opt) {
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
-			this.userInfo = uni.getStorageSync("userInfo");
+			//this.userInfo = uni.getStorageSync("userInfo");
+			this.userInfo = this.$store.state.userInfo;
 			this.themeColor = uni.getStorageSync("themeColor");
 			this.naShopId = opt.naShopId;
+			this.naUnionId=opt.naUnionId
 			if (this.naShopId == null || this.naShopId == 'null') {
 				this.naShopId = ''
 			}
@@ -252,7 +255,6 @@
 					 var data= JSON.parse(res.data) ;
 					 console.log(data)
 					 this.naShopId=data.naShopId;
-					
 					 this.getInfo(); 
 				 })
 			},
@@ -321,10 +323,16 @@
 				uni.showLoading({
 					title: '加载中'
 				});
+				if(this.naUnionId){
+					var unionId=this.naUnionId
+				}else{
+					var unionId=this.userInfo.unionId
+				}
+				
 				//openreservation/listBigTags
 				this.$http('openreservation/listItemWxCategory', {
 					shopId: this.shopInfo.id,
-					unionId: this.userInfo.unionId
+					unionId: unionId
 				}, 'GET').then(res => {
 					uni.hideLoading();
 					this.bizTagId = res.data[0].ID

+ 2 - 2
pages/index/shopList.vue

@@ -133,7 +133,7 @@
 		onLoad() {
 			var that = this;
 			uni.removeStorageSync('selectCity');
-			this.userInfo = uni.getStorageSync("userInfo");
+			this.userInfo = this.$store.state.userInfo;
 			this.ext=this.$common.getExtStoreId();
 			 if(this.userInfo){
 				 this.themeColor = uni.getStorageSync("themeColor");
@@ -423,7 +423,7 @@
 				// })
 				if (this.userInfo) {
 					uni.navigateTo({
-						url:'onlineBooking?naShopId='+item.shopId
+						url:'onlineBooking?naShopId='+item.shopId+'naUnionId='+item.unionId
 					})
 				} else {
 					this.authorizShow = true;

+ 2 - 1
pages/partner/bonus.vue

@@ -59,7 +59,8 @@
 		},
 		onLoad(opt) {
 			this.themeColor = uni.getStorageSync("themeColor");
-			this.userInfo = uni.getStorageSync("userInfo");
+			//this.userInfo = uni.getStorageSync("userInfo");
+			this.userInfo = this.$store.state.userInfo;
 			this.userInfo=this.$store.state.userInfo;
 			this.ext=this.$common.getExtStoreId();
 			if(this.userInfo){

+ 3 - 30
pages/user/historySpend.vue

@@ -86,36 +86,9 @@
 				<view class="dan">{{item.code}}</view>
 				
 				<!-- SheetType单据类型(1维修单 2销售单3洗车单4销售退货) -->
-				<view class="stateBox" v-if="item.SheetType == 1">
-					<!-- 0待施工(已保存)1施工中(已派工)2已完工 3已质检 4 已作废 -->
-					<view class="danState"  :class="{danState2:item.PayState == 2}" v-if="item.SheetState == 0">待施工</view>
-					<view class="danState"  :class="{danState2:item.PayState == 2}" v-if="item.SheetState == 1">施工中</view>
-					<view class="danState"  :class="{danState2:item.PayState == 2}" v-if="item.SheetState == 2">已完工</view>
-					<view class="danState"  :class="{danState2:item.PayState == 2}" v-if="item.SheetState == 3">已质检</view>
-					<view class="danState"  :class="{danState2:item.PayState == 2}" v-if="item.SheetState == 4">已作废</view>
-					<!-- 结算状态 -->
-					<view class="danState" v-if="item.PayState == 0">/未结算</view>
-					<view class="danState2" v-if="item.PayState == 2">/已结算</view>
-					
-				</view>
-				<view class="stateBox"  v-if="item.SheetType == 2">
-					<!-- 0待施工(已保存)1施工中(已派工)2已审核 3已质检 4 已作废 -->
-					<view class="danState"  :class="{danState2:item.PayState == 2}" v-if="item.SheetState < 2 ">未审核</view>
-					<view class="danState"  :class="{danState2:item.PayState == 2}" v-if="item.SheetState == 2">已审核</view>
-					<view class="danState"  :class="{danState2:item.PayState == 2}" v-if="item.SheetState == 4">已作废</view>
-					<!-- 结算状态 -->
-					<view class="danState" v-if="item.PayState == 0">/未结算</view>
-					<view class="danState2" v-if="item.PayState == 2">/已结算</view>
-					
-					
-				</view>
-				<view class="stateBox"  v-if="item.SheetType == 3">
-					<!-- 0待施工(已保存)1施工中(已派工)2已完工 3已质检 4 已作废 -->
-					<view class="danState" :class="{danState2:item.PayState == 2}" v-if="item.SheetState == 0">已保存</view>
-					<view class="danState" :class="{danState2:item.PayState == 2}" v-if="item.SheetState == 4">已作废</view>
-					<!-- 结算状态 -->
-					<view class="danState" v-if="item.PayState == 0">/未结算</view>
-					<view class="danState2" v-if="item.PayState == 2">/已结算</view>
+				
+				<view class="stateBox" >
+					<view class="danState2">{{item.CheckoutState?item.CheckoutState:''}}</view>
 				</view>
 				
 			</view>

+ 16 - 3
utils/common.js

@@ -12,8 +12,15 @@ const isUserId = function() {
 const automaticlogin = function() {
 	//console.log($store.state.userInfo)
 	var that=this;
-	const extConfig = uni.getExtConfigSync();
-	//console.log(extConfig)
+	var extConfig = uni.getExtConfigSync();
+	/* extConfig={
+		"shopId": "23173848-292E-4AEA-B590-73AC9A763F1D",
+		"url":"https://store-api.qdbtl.cn/",
+		"unionId":"C3748B46-B778-40AA-8C60-A9B0F2FA23A7",
+		"appId":"wxc023ff04deb28f2d"
+	} */
+	console.log("automaticlogin")
+	console.log(extConfig)
 	
 	 return new Promise((resolve, reject) => {
 		 if($store.state.userInfo){
@@ -73,12 +80,18 @@ function noMultipleClicks(methods, info) {
 function getExtStoreId(type){
 	try{
 	 var extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {shopId:'默认的门店id'};
-		/*  extConfig={
+		  /* extConfig={
 		  	"shopId": "23173848-292E-4AEA-B590-73AC9A763F1D",
 		  	"url":"https://store-api.qdbtl.cn/",
 		  	"unionId":"C3748B46-B778-40AA-8C60-A9B0F2FA23A7",
 		  	"appId":"wxc023ff04deb28f2d"
 	      } */
+		  /* 
+		  "shopId": "E37BB296-5A08-4534-859D-B351BA611AF9",
+		  "url":"http://api.dms.66km.com.cn",
+		  "unionId":"EEADACCD-8A19-499D-8AD7-6975D2C93243",
+		  "appId":"wx33053a645546ec31"
+		  */
 		console.log(extConfig,'extJson对象');
 		//return extConfig[type];
 		return extConfig

+ 1 - 1
utils/request.js

@@ -53,7 +53,7 @@ const http = (url = '', date = {}, type = 'POST', header = {
 				//  	 icon:'none',
 				//      duration: 3000,
 				//  });
-				// uni.clearStorageSync()
+				 uni.clearStorageSync()
 				//  uni.navigateTo({
 				// 	url:'../login/login'
 				// })