twt 1 kuukausi sitten
vanhempi
commit
6ec635bd96
2 muutettua tiedostoa jossa 53 lisäystä ja 9 poistoa
  1. 2 1
      pages/addjk/jkDetail.vue
  2. 51 8
      pages/rescue/rescueOrder.vue

+ 2 - 1
pages/addjk/jkDetail.vue

@@ -152,7 +152,8 @@
 				this.bgmMusic = uni.createInnerAudioContext();
 				this.bgmMusic.autoplay = true;//自动播放
 				this.bgmMusic.loop = true;//循环播放
-				this.bgmMusic.src = 'http://dmsimg.66km.com/music/sakuratears.mp3';//背景音乐地址
+				//this.bgmMusic.src = 'http://dmsimg.66km.com/music/sakuratears.mp3';//背景音乐地址
+				this.bgmMusic.src=this.ckmusic.music
 				this.bgmMusic.onPlay(function(){
 				   console.log('背景音乐播放中');
 						

+ 51 - 8
pages/rescue/rescueOrder.vue

@@ -98,7 +98,7 @@
 		
 		
 		<view class="main">
-		<!-- 	<view>{{ms}}</view> -->
+		 <!-- 	<view>{{androidE}}</view> -->
 			<view class="itemBg" v-for="(item,index) in items" @click="goDetail(item)">
 				<view class="itemTop">
 					<view class="itemType" >
@@ -227,6 +227,8 @@
 				iStatusBarHeight:'',
 				olddate1:'',
 				olddate2:'',
+				androidE:'',
+				iosE:'',
 			}
 		},
 		onLoad(opt) {
@@ -272,6 +274,7 @@
 			},
 			
 			ckShopAppFn(){
+				//this.shopAppCallback()
 				var obj={
 					value:this.mrshopId,
 					key:this.mrshopName
@@ -285,24 +288,63 @@
 				var android = /android/.test(userAgent)
 				if (ios) {
 					 if ( true) {//!standalone&& !safari
-					   window.webkit.messageHandlers.shopApp.postMessage(JSON.stringify(obj))
+					 if(this.iosE){
+						   window.webkit.messageHandlers.shopApp.postMessage(this.iosE)
+					 }else{
+						   window.webkit.messageHandlers.shopApp.postMessage(JSON.stringify(obj))
+					 }
+					 
 					 }
 				} else if (android) {
-					 window.android.shopApp(JSON.stringify(obj))
+					if(this.androidE){
+						window.android.shopApp(JSON.stringify(this.androidE))
+					}else{
+						var arr =[]
+						arr.push(obj)
+						window.android.shopApp(JSON.stringify(arr))
+					}
+					
+					
 				}
 			},
 			shopAppCallback(e){
+				//e=[{"isDefault":false,"isLogin":false,"isSelected":false,"isShow":false,"key":"连锁一号测试店铺","value":"1B43BADD-B670-4B27-B6C1-604523287EAF"},{"isDefault":false,"isLogin":false,"isSelected":true,"isShow":false,"key":"JM-乌海市昱盛汽贸有限公司Q","suggest":"JM-乌海市昱盛汽贸有限公司Q|JM-wuhaishizuoshengqimaoyouxiangongsiQ|jm-whs昱sqmyxgsq|JM-WHS昱SQMYXGSQ","value":"95FC6989-644F-491F-B5B3-F9F0995C1694"}]
 				//this.ms=e.key
 				//this.ms=JSON.parse(e).key
-			//	var obj=JSON.parse(e);
-				this.shopName=e.key
-				this.shopId=e.value
+				this.androidE=e
+				var obj=e;
+			 //	var obj=JSON.parse(e);
+			    var length= obj.length
+				console.log(obj)
+				if(length==1){
+					this.shopName=obj[0].key
+					this.shopId=obj[0].value
+				}else{
+					var idarr=[]
+					obj.forEach(item=>{
+						idarr.push(item.value)
+					})
+					//var num = length -1
+				//	this.shopName=obj[0].key+"+"+ num
+				    this.shopName='已选('+length+')个门店'
+					this.shopId=idarr.join(',')
+				}
+				
+			
 				this.page=1
 				this.getData();
 			},
 			shopAppCallbackios(e){
+				this.iosE=e
 				var obj=JSON.parse(e);
-				this.shopName=obj.key
+				var names=obj.key.split(',')
+				var length= names.length
+				if(length==1){
+					this.shopName=obj.key
+				}else{
+					 this.shopName='已选('+length+')个门店'
+				}
+				//this.shopName=obj.key
 				this.shopId=obj.value
 				this.page=1
 				this.getData();
@@ -493,7 +535,8 @@
 					createTimeStart:createTimeStart,
 					createTimeEnd:createTimeEnd,
 					helpType:this.sheetTypeList,
-					shopID:this.shopId,
+					//shopID:this.shopId,
+					shopIds:this.shopId,
 				}
 
 				this.$http('openH5ShopHelpSheetOrder/getOpenShopHelpSheetOrderList', padata, 'GET').then(res => {