|
@@ -35,7 +35,6 @@
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
|
|
|
<view class="main">
|
|
|
<view class="itemBg" v-for="(item,index) in items" @click="goDetail(item)">
|
|
@@ -82,6 +81,7 @@
|
|
|
<view class="typeLine" :class="{typeactive:typeLineIndex==4}" @click="typeLineCk(4)">救援订单</view>
|
|
|
<view class="typeLine":class="{typeactive:typeLineIndex==5}" @click="typeLineCk(5)">钣喷订单</view>
|
|
|
</view> -->
|
|
|
+
|
|
|
<view class="typelineBox">
|
|
|
<view class="typeLine " v-for="(item,index) in tabList"
|
|
|
:class="{typeactive:item.ck}" @click="typeLineCk2(item)">{{item.name}}
|
|
@@ -90,14 +90,20 @@
|
|
|
</view>
|
|
|
<view class="screenBt">门店</view>
|
|
|
<view class="">
|
|
|
- <picker @change="bindPickerChange" :value="pickerindex" :range-key="'shopName'" :range="pickerarray">
|
|
|
- <view class="uniPicker">
|
|
|
+ <!-- <picker @change="bindPickerChange" :value="pickerindex" :range-key="'shopName'" :range="pickerarray">
|
|
|
+ <view class="uniPicker" @click="ckShopAppFn">
|
|
|
<view class="uniPickerName">
|
|
|
{{shopName}}
|
|
|
</view>
|
|
|
<image src="../../static/img/jt.png" mode=" " class="jtShopImg"></image>
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </picker> -->
|
|
|
+ <view class="uniPicker" @click="ckShopAppFn">
|
|
|
+ <view class="uniPickerName">
|
|
|
+ {{shopName?shopName:'请选择门店'}}
|
|
|
+ </view>
|
|
|
+ <image src="../../static/img/jt.png" mode=" " class="jtShopImg"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="screenBt">下单时间</view>
|
|
|
<view class="sdTimeBox">
|
|
@@ -158,29 +164,129 @@
|
|
|
{
|
|
|
name:'钣喷订单',ck:false,sheetType:'5',
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ androidE:'',
|
|
|
+ iosE:'',
|
|
|
+ iStatusBarHeight:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
|
|
|
|
//this.getData();
|
|
|
this.getShopinfo();
|
|
|
+ //app交互
|
|
|
+ var standalone = window.navigator.standalone
|
|
|
+ var userAgent = window.navigator.userAgent.toLowerCase()
|
|
|
+ var safari = /safari/.test(userAgent)
|
|
|
+ var ios = /iphone|ipod|ipad|mac/.test(userAgent)
|
|
|
+ var android = /android/.test(userAgent)
|
|
|
+ if (ios) {
|
|
|
+ window.shopAppCallbackios=this.shopAppCallbackios;
|
|
|
+ } else if (android) {
|
|
|
+ window.shopAppCallback=this.shopAppCallback;
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
onShow() {
|
|
|
- console.log(this.tabIndex)
|
|
|
- this.getShopinfo();
|
|
|
+ /* console.log(this.tabIndex)
|
|
|
+ this.getShopinfo(); */
|
|
|
//this.getData();
|
|
|
-
|
|
|
+ const onshow = uni.getStorageSync('onshow');
|
|
|
+ if(onshow==1){
|
|
|
+ uni.removeStorageSync('onshow');
|
|
|
+ // this.getShopinfo();
|
|
|
+ this.getData()
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ ckShopAppFn(){
|
|
|
+ /* this.shopAppCallbackios('{"value":"0DA5DE64-36B8-4F21-A624-72C24F4F3E5A","key":"测试开店申请"}')
|
|
|
+ return false */
|
|
|
+ //this.shopAppCallback()
|
|
|
+ var obj={
|
|
|
+ value:this.mrshopId,
|
|
|
+ key:this.mrshopName
|
|
|
+ }
|
|
|
+ console.log(obj)
|
|
|
+ //app交互
|
|
|
+ var standalone = window.navigator.standalone
|
|
|
+ var userAgent = window.navigator.userAgent.toLowerCase()
|
|
|
+ var safari = /safari/.test(userAgent)
|
|
|
+ var ios = /iphone|ipod|ipad|mac/.test(userAgent)
|
|
|
+ var android = /android/.test(userAgent)
|
|
|
+ if (ios) {
|
|
|
+ if ( true) {//!standalone&& !safari
|
|
|
+ if(this.iosE){
|
|
|
+ window.webkit.messageHandlers.shopApp.postMessage(this.iosE)
|
|
|
+ }else{
|
|
|
+ window.webkit.messageHandlers.shopApp.postMessage(JSON.stringify(obj))
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ } else if (android) {
|
|
|
+ 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
|
|
|
+ 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);
|
|
|
+ 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();
|
|
|
+ },
|
|
|
ssql(){
|
|
|
this.name='';
|
|
|
this.getData();
|
|
|
},
|
|
|
sub(){
|
|
|
+ this.page=1
|
|
|
this.screenSHow=false;
|
|
|
var arr=[]
|
|
|
this.items=[]
|
|
@@ -205,6 +311,8 @@
|
|
|
this.tabList[2].ck=false
|
|
|
this.tabList[3].ck=false
|
|
|
this.tabList[4].ck=false
|
|
|
+ this.androidE=''
|
|
|
+ this.iosE=''
|
|
|
},
|
|
|
typeLineCk(num){
|
|
|
this.typeLineIndex=num;
|
|
@@ -301,7 +409,8 @@
|
|
|
this.page = 1;
|
|
|
this.getData()
|
|
|
},
|
|
|
- goDetail(item) {
|
|
|
+ goDetail(item) {
|
|
|
+ uni.setStorageSync('onshow', '1');
|
|
|
//SheetType 1 商品2项目3套餐4救援5钣喷6集客
|
|
|
if((item.SheetType==1)||(item.SheetType==2)||(item.SheetType==3)){
|
|
|
uni.navigateTo({
|
|
@@ -324,6 +433,7 @@
|
|
|
this.getData()
|
|
|
},
|
|
|
getData() {
|
|
|
+ //this.shopId='95FC6989-644F-491F-B5B3-F9F0995C1694'
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
|
});
|