Commit f1b8a809 authored by Mac's avatar Mac

修改参数

parent 9d07596d
function AMapWX(a){this.key=a.key,this.requestConfig={key:a.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"}}AMapWX.prototype.getWxLocation=function(a,b){wx.getLocation({type:"gcj02",success:function(a){var c=a.longitude+","+a.latitude;wx.setStorage({key:"userLocation",data:c}),b(c)},fail:function(c){wx.getStorage({key:"userLocation",success:function(a){a.data&&b(a.data)}}),a.fail({errCode:"0",errMsg:c.errMsg||""})}})},AMapWX.prototype.getRegeo=function(a){function c(c){var d=b.requestConfig;wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:b.key,location:c,extensions:"all",s:d.s,platform:d.platform,appname:b.key,sdkversion:d.sdkversion,logversion:d.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){var d,e,f,g,h,i,j,k,l;b.data.status&&"1"==b.data.status?(d=b.data.regeocode,e=d.addressComponent,f=[],g="",d&&d.roads[0]&&d.roads[0].name&&(g=d.roads[0].name+"附近"),h=c.split(",")[0],i=c.split(",")[1],d.pois&&d.pois[0]&&(g=d.pois[0].name+"附近",j=d.pois[0].location,j&&(h=parseFloat(j.split(",")[0]),i=parseFloat(j.split(",")[1]))),e.provice&&f.push(e.provice),e.city&&f.push(e.city),e.district&&f.push(e.district),e.streetNumber&&e.streetNumber.street&&e.streetNumber.number?(f.push(e.streetNumber.street),f.push(e.streetNumber.number)):(k="",d&&d.roads[0]&&d.roads[0].name&&(k=d.roads[0].name),f.push(k)),f=f.join(""),l=[{iconPath:a.iconPath,width:a.iconWidth,height:a.iconHeight,name:f,desc:g,longitude:h,latitude:i,id:0,regeocodeData:d}],a.success(l)):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}var b=this;a.location?c(a.location):b.getWxLocation(a,function(a){c(a)})},AMapWX.prototype.getWeather=function(a){function d(d){var e="base";a.type&&"forecast"==a.type&&(e="all"),wx.request({url:"https://restapi.amap.com/v3/weather/weatherInfo",data:{key:b.key,city:d,extensions:e,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){function c(a){var b={city:{text:"城市",data:a.city},weather:{text:"天气",data:a.weather},temperature:{text:"温度",data:a.temperature},winddirection:{text:"风向",data:a.winddirection+"风"},windpower:{text:"风力",data:a.windpower+"级"},humidity:{text:"湿度",data:a.humidity+"%"}};return b}var d,e;b.data.status&&"1"==b.data.status?b.data.lives?(d=b.data.lives,d&&d.length>0&&(d=d[0],e=c(d),e["liveData"]=d,a.success(e))):b.data.forecasts&&b.data.forecasts[0]&&a.success({forecast:b.data.forecasts[0]}):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}function e(e){wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:b.key,location:e,extensions:"all",s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){var c,e;b.data.status&&"1"==b.data.status?(e=b.data.regeocode,e.addressComponent?c=e.addressComponent.adcode:e.aois&&e.aois.length>0&&(c=e.aois[0].adcode),d(c)):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}var b=this,c=b.requestConfig;a.city?d(a.city):b.getWxLocation(a,function(a){e(a)})},AMapWX.prototype.getPoiAround=function(a){function d(d){var e={key:b.key,location:d,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.querytypes&&(e["types"]=a.querytypes),a.querykeywords&&(e["keywords"]=a.querykeywords),wx.request({url:"https://restapi.amap.com/v3/place/around",data:e,method:"GET",header:{"content-type":"application/json"},success:function(b){var c,d,e,f;if(b.data.status&&"1"==b.data.status){if(b=b.data,b&&b.pois){for(c=[],d=0;d<b.pois.length;d++)e=0==d?a.iconPathSelected:a.iconPath,c.push({latitude:parseFloat(b.pois[d].location.split(",")[1]),longitude:parseFloat(b.pois[d].location.split(",")[0]),iconPath:e,width:22,height:32,id:d,name:b.pois[d].name,address:b.pois[d].address});f={markers:c,poisData:b.pois},a.success(f)}}else a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}var b=this,c=b.requestConfig;a.location?d(a.location):b.getWxLocation(a,function(a){d(a)})},AMapWX.prototype.getStaticmap=function(a){function f(b){c.push("location="+b),a.zoom&&c.push("zoom="+a.zoom),a.size&&c.push("size="+a.size),a.scale&&c.push("scale="+a.scale),a.markers&&c.push("markers="+a.markers),a.labels&&c.push("labels="+a.labels),a.paths&&c.push("paths="+a.paths),a.traffic&&c.push("traffic="+a.traffic);var e=d+c.join("&");a.success({url:e})}var e,b=this,c=[],d="https://restapi.amap.com/v3/staticmap?";c.push("key="+b.key),e=b.requestConfig,c.push("s="+e.s),c.push("platform="+e.platform),c.push("appname="+e.appname),c.push("sdkversion="+e.sdkversion),c.push("logversion="+e.logversion),a.location?f(a.location):b.getWxLocation(a,function(a){f(a)})},AMapWX.prototype.getInputtips=function(a){var b=this,c=b.requestConfig,d={key:b.key,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.location&&(d["location"]=a.location),a.keywords&&(d["keywords"]=a.keywords),a.type&&(d["type"]=a.type),a.city&&(d["city"]=a.city),a.citylimit&&(d["citylimit"]=a.citylimit),wx.request({url:"https://restapi.amap.com/v3/assistant/inputtips",data:d,method:"GET",header:{"content-type":"application/json"},success:function(b){b&&b.data&&b.data.tips&&a.success({tips:b.data.tips})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})},AMapWX.prototype.getDrivingRoute=function(a){var b=this,c=b.requestConfig,d={key:b.key,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.origin&&(d["origin"]=a.origin),a.destination&&(d["destination"]=a.destination),a.strategy&&(d["strategy"]=a.strategy),a.waypoints&&(d["waypoints"]=a.waypoints),a.avoidpolygons&&(d["avoidpolygons"]=a.avoidpolygons),a.avoidroad&&(d["avoidroad"]=a.avoidroad),wx.request({url:"https://restapi.amap.com/v3/direction/driving",data:d,method:"GET",header:{"content-type":"application/json"},success:function(b){b&&b.data&&b.data.route&&a.success({paths:b.data.route.paths,taxi_cost:b.data.route.taxi_cost||""})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})},AMapWX.prototype.getWalkingRoute=function(a){var b=this,c=b.requestConfig,d={key:b.key,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.origin&&(d["origin"]=a.origin),a.destination&&(d["destination"]=a.destination),wx.request({url:"https://restapi.amap.com/v3/direction/walking",data:d,method:"GET",header:{"content-type":"application/json"},success:function(b){b&&b.data&&b.data.route&&a.success({paths:b.data.route.paths})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})},AMapWX.prototype.getTransitRoute=function(a){var b=this,c=b.requestConfig,d={key:b.key,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.origin&&(d["origin"]=a.origin),a.destination&&(d["destination"]=a.destination),a.strategy&&(d["strategy"]=a.strategy),a.city&&(d["city"]=a.city),a.cityd&&(d["cityd"]=a.cityd),wx.request({url:"https://restapi.amap.com/v3/direction/transit/integrated",data:d,method:"GET",header:{"content-type":"application/json"},success:function(b){if(b&&b.data&&b.data.route){var c=b.data.route;a.success({distance:c.distance||"",taxi_cost:c.taxi_cost||"",transits:c.transits})}},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})},AMapWX.prototype.getRidingRoute=function(a){var b=this,c=b.requestConfig,d={key:b.key,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.origin&&(d["origin"]=a.origin),a.destination&&(d["destination"]=a.destination),wx.request({url:"https://restapi.amap.com/v4/direction/bicycling",data:d,method:"GET",header:{"content-type":"application/json"},success:function(b){b&&b.data&&b.data.data&&a.success({paths:b.data.data.paths})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})},module.exports.AMapWX=AMapWX;
\ No newline at end of file
...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
<view class="g_top"> <view class="g_top">
<view class="row"> <view class="row">
<u-icon name="location" :size="32" color="#EE4454"></u-icon> <u-icon name="location" :size="32" color="#EE4454"></u-icon>
<span>成都站</span> <span>{{Pickcar}}</span>
<view style="width: 2px;color: #E7E7E7;height: 20px;margin:0 10px;"></view> <view style="width: 2px;color: #E7E7E7;height: 20px;margin:0 10px;"></view>
</view> </view>
<view class='row' style="justify-content: space-between;width: 220px;"> <view class='row' style="justify-content: space-between;width: 220px;">
<view class="topB" @click=""> <view class="topB" @click="">
<span class='ztext'>9月5</span> <span class='ztext'>{{STime.month}}{{STime.day}}</span>
<span class='titext'>周三 18:20:00</span> <span class='titext'>{{STime.week+' '+STime.hour+':'+STime.minute}}</span>
</view> </view>
<view class="topB" style="height: 20px;align-items: center;"> <view class="topB" style="height: 20px;align-items: center;">
<span style='font-size: 11px;color: #1C1E1F;'>6天</span> <span style='font-size: 11px;color: #1C1E1F;'>{{intervalDay}}</span>
<image src="../../static/images/sanjiao.png" mode="aspectFill" style="width: 55px;height: 4px;"></image> <image src="../../static/images/sanjiao.png" mode="aspectFill" style="width: 55px;height: 4px;"></image>
</view> </view>
<view class="topB" @click=""> <view class="topB" @click="">
<span class='ztext'>9月11</span> <span class='ztext'>{{ETime.month}}{{ETime.day}}</span>
<span class='titext'>周三 18:20:00</span> <span class='titext'>{{ETime.week+' '+ETime.hour+':'+ETime.minute}}</span>
</view> </view>
</view> </view>
</view> </view>
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
style="margin-left: 5px; font-size: 12px;" style="margin-left: 5px; font-size: 12px;"
>{{ g.goods_marketing_award.integral.title }}</text> >{{ g.goods_marketing_award.integral.title }}</text>
</view> </view>
<view <!-- <view
style="display: flex;flex-direction: row;align-items: center" style="display: flex;flex-direction: row;align-items: center"
v-if="g.goods_marketing_award.PresentFXGradeMsg != ''" v-if="g.goods_marketing_award.PresentFXGradeMsg != ''"
@click="goVIP" @click="goVIP"
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<text <text
style="margin-left: 5px; font-size: 12px;" style="margin-left: 5px; font-size: 12px;"
>{{ g.goods_marketing_award.PresentFXGradeMsg }}</text> >{{ g.goods_marketing_award.PresentFXGradeMsg }}</text>
</view> </view> -->
</view> </view>
...@@ -251,14 +251,52 @@ ...@@ -251,14 +251,52 @@
comments: [], comments: [],
bian: false, bian: false,
path:'', path:'',
STime:{},
ETime:{},
intervalDay:'',
address:'',
Pickcar:'',
} }
}, },
onLoad(option){ onLoad(option){
if(option && option.GoodsId){ if(option && option.GoodsId){
this.GoodsId = option.GoodsId this.GoodsId = option.GoodsId
} }
if(option && option.address){
this.address = option.address
}
if(option && option.Pickcar){
this.Pickcar = option.Pickcar
}
if(option && option.StartTime){
this.STime = this.getTime(option.StartTime)
}
if(option && option.EndTime){
this.ETime = this.getTime(option.EndTime)
}
if(option&& option.StartTime && option.EndTime){
let startTime = new Date(option.StartTime); // 开始时间
let endTime = new Date(option.EndTime); // 结束时间
let usedTime = endTime - startTime; // 相差的毫秒数
let days = Math.floor(usedTime / (24 * 3600 * 1000)); // 计算出天数
let leavel = usedTime % (24 * 3600 * 1000); // 计算天数后剩余的时间
let hours = Math.floor(leavel / (3600 * 1000)); // 计算剩余的小时数
if(days>0){
if(leavel>0){
this.intervalDay=days+1+'天'
}else{
this.intervalDay=days+'天'
}
}else{
if(hours>=6){
this.intervalDay='1天'
}else{
this.intervalDay='半天'
}
}
}
this.init()//商品详情 this.init()//商品详情
this.getAppletGoodsCommentPageList()//获取商品评论数 this.getAppletGoodsCommentPageList()//获取商品评论数
let u = uni.getStorageSync("mall_UserInfo"); let u = uni.getStorageSync("mall_UserInfo");
...@@ -320,6 +358,35 @@ ...@@ -320,6 +358,35 @@
} }
); );
}, },
getTime(time){
let myDate = new Date(time);
let obj = {}
obj.year = myDate.getFullYear(); //年
obj.month = myDate.getMonth() + 1; //月
obj.day = myDate.getDate(); //日
obj.hour = myDate.getHours(); //时
obj.minute = myDate.getMinutes(); //分
let days = myDate.getDay();
obj.week = this.getweek(days)//星期几
return obj
},
getweek(day){//根据值返回当前时间的星期几
if(day==1){
return '星期一'
}else if(day==2){
return '星期二'
}else if(day==3){
return '星期三'
}else if(day==4){
return '星期四'
}else if(day==5){
return '星期五'
}else if(day==6){
return '星期六'
}else if(day==0){
return '星期日'
}
},
getAppletGoodsCommentPageList(){ getAppletGoodsCommentPageList(){
this.request2( this.request2(
{ {
...@@ -378,7 +445,7 @@ ...@@ -378,7 +445,7 @@
//跳转 //跳转
goUrl(){ goUrl(){
uni.navigateTo({ uni.navigateTo({
url:'/pages/guidecar/place_order' url:'/pages/guidecar/place_order?GoodsId='+this.GoodsId+'&Number='+this.g.ride_num+'&ShoppingAddress='+this.address
}) })
} }
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<span class='ztext'>{{ETime.month}}{{ETime.day}}</span> <span class='ztext'>{{ETime.month}}{{ETime.day}}</span>
<span class='titext'>{{ETime.week+' '+ETime.hour+':'+ETime.minute}}</span> <span class='titext'>{{ETime.week+' '+ETime.hour+':'+ETime.minute}}</span>
</view> </view>
</div> </div>
<view style="padding: 10px 0 0;position: relative;background: #fff;width: 100%;height: 55px;"> <view style="padding: 10px 0 0;position: relative;background: #fff;width: 100%;height: 55px;">
<view style=" border-bottom: 1px solid #E2E2E2;"> <view style=" border-bottom: 1px solid #E2E2E2;">
...@@ -34,7 +33,7 @@ ...@@ -34,7 +33,7 @@
</view> </view>
</view> </view>
<div style='display: flex;width: 100%;'> <div style='display: flex;width: 100%;overflow: hidden;overflow-y: auto;'>
<view v-if="screenshow==true" class="Mask" @click="screenshow=false"></view> <view v-if="screenshow==true" class="Mask" @click="screenshow=false"></view>
<div class="left-slider"> <div class="left-slider">
<sidebar <sidebar
...@@ -120,6 +119,7 @@ export default { ...@@ -120,6 +119,7 @@ export default {
classList:[], classList:[],
current:0, current:0,
screenshow:false, screenshow:false,
Pickcar:'',
tic:0, tic:0,
msg:{ msg:{
pageIndex:1, pageIndex:1,
...@@ -152,6 +152,7 @@ export default { ...@@ -152,6 +152,7 @@ export default {
STime:'', STime:'',
ETime:'', ETime:'',
intervalDay:'', intervalDay:'',
address:'',//出发地址
BrandList:[],//品牌列表 BrandList:[],//品牌列表
g: [], g: [],
page_count: 1, page_count: 1,
...@@ -176,16 +177,38 @@ export default { ...@@ -176,16 +177,38 @@ export default {
this.msg.RegionIds = item.RegionIds this.msg.RegionIds = item.RegionIds
this.msg.RideNum = item.RideNum this.msg.RideNum = item.RideNum
this.msg.StartTime = item.StartTime this.msg.StartTime = item.StartTime
}
if(options && options.STime){ this.STime = this.getTime(item.StartTime)
this.STime = JSON.parse(decodeURIComponent(options.STime)) this.ETime = this.getTime(item.EndTime)
let startTime = new Date(this.msg.StartTime); // 开始时间
let endTime = new Date(this.msg.EndTime); // 结束时间
let usedTime = endTime - startTime; // 相差的毫秒数
let days = Math.floor(usedTime / (24 * 3600 * 1000)); // 计算出天数
let leavel = usedTime % (24 * 3600 * 1000); // 计算天数后剩余的时间
let hours = Math.floor(leavel / (3600 * 1000)); // 计算剩余的小时数
if(days>0){
if(leavel>0){
this.intervalDay=days+1+'天'
}else{
this.intervalDay=days+'天'
}
}else{
if(hours>=6){
this.intervalDay='1天'
}else{
this.intervalDay='半天'
} }
if(options && options.ETime){
this.ETime = JSON.parse(decodeURIComponent(options.ETime))
} }
if(options && options.intervalDay){ }
this.intervalDay = options.intervalDay
if(options && options.address){
this.address = options.address
}
if(options && options.Pickcar){
this.Pickcar = options.Pickcar
} }
if(options && options.tic){ if(options && options.tic){
this.tic = options.tic this.tic = options.tic
...@@ -224,6 +247,36 @@ export default { ...@@ -224,6 +247,36 @@ export default {
} }
); );
}, },
getTime(time){
let myDate = new Date(time);
let obj = {}
obj.year = myDate.getFullYear(); //年
obj.month = myDate.getMonth() + 1; //月
obj.day = myDate.getDate(); //日
obj.hour = myDate.getHours(); //时
obj.minute = myDate.getMinutes(); //分
let days = myDate.getDay();
obj.week = this.getweek(days)//星期几
return obj
},
getweek(day){//根据值返回当前时间的星期几
if(day==1){
return '星期一'
}else if(day==2){
return '星期二'
}else if(day==3){
return '星期三'
}else if(day==4){
return '星期四'
}else if(day==5){
return '星期五'
}else if(day==6){
return '星期六'
}else if(day==0){
return '星期日'
}
},
getGuideCarBrandList(){ getGuideCarBrandList(){
this.request2( this.request2(
{ {
...@@ -297,7 +350,10 @@ getGuideCarBrandList(){ ...@@ -297,7 +350,10 @@ getGuideCarBrandList(){
}, },
goDetails(x){//跳转商品详情 goDetails(x){//跳转商品详情
uni.navigateTo({ uni.navigateTo({
url:'/pages/guidecar/guidecarOrderdetails?GoodsId='+x.id url:'/pages/guidecar/guidecarGoodsdetails?GoodsId='+x.id +'&address='+this.address+'&Pickcar='+this.Pickcar+
'&StartTime='+this.msg.StartTime+
'&EndTime='+this.msg.EndTime
}) })
}, },
lower(e) { lower(e) {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</view> </view>
<view class="topB" v-if="info.IsShowCarpooling==1&& msg.CarType==5" style="align-items: center;"> <view class="topB" v-if="info.IsShowCarpooling==1&& msg.CarType==5" style="align-items: center;">
<span class='titext'>是否拼车</span> <span class='titext'>是否拼车</span>
<u-switch v-model="msg.IsSpell" size='30' active-value="1" inactive-value="2"></u-switch> <u-switch v-model="Ischecked" size='30' @change='goIsSpell'></u-switch>
</view> </view>
</view> </view>
<view class="c_row"> <view class="c_row">
...@@ -160,6 +160,7 @@ ...@@ -160,6 +160,7 @@
<script> <script>
import AddressParse from '../address/zh-address-parse.min.js' import AddressParse from '../address/zh-address-parse.min.js'
import amap from './components/amap-wx.js'
export default{ export default{
data(){ data(){
return{ return{
...@@ -184,6 +185,7 @@ ...@@ -184,6 +185,7 @@
ETime:{},//显示的结束时间 ETime:{},//显示的结束时间
intervalDay:'',//间隔天数 intervalDay:'',//间隔天数
address:'',//详情地址 address:'',//详情地址
Ischecked:false,
msg:{ msg:{
StartTime:'',//取车时间 StartTime:'',//取车时间
EndTime:'',//还车时间 EndTime:'',//还车时间
...@@ -203,6 +205,8 @@ ...@@ -203,6 +205,8 @@
minute: true, minute: true,
}, },
amapPlugin:null,
key: 'c785085c46d1eb41b1ebe8d1ec7fd945'
} }
}, },
created() { created() {
...@@ -231,8 +235,23 @@ ...@@ -231,8 +235,23 @@
this.init()//获取司导首页配置 this.init()//获取司导首页配置
this.getCarClassList()//车辆分类下拉 this.getCarClassList()//车辆分类下拉
this.getOrderListExportEnumList()//获取出行类型 this.getOrderListExportEnumList()//获取出行类型
this.amapPlugin = new amap.AMapWX({
key: this.key
});
this.getRegeo()
}, },
methods:{ methods:{
getRegeo() {
uni.showLoading({
title: '获取信息中'
});
this.amapPlugin.getRegeo({
success: (data) => {
this.Pickcar = data[0].regeocodeData.addressComponent.city
uni.hideLoading();
}
});
} ,
init(){ init(){
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
...@@ -282,6 +301,9 @@ ...@@ -282,6 +301,9 @@
} }
); );
}, },
getPickcar(Name){//选择取消地址
this.Pickcar = Name
},
radioChange(item){//车辆类型 radioChange(item){//车辆类型
this.carName = item.Name; this.carName = item.Name;
this.msg.CarClass = item.Id; this.msg.CarClass = item.Id;
...@@ -304,6 +326,13 @@ ...@@ -304,6 +326,13 @@
delta: 1, delta: 1,
}); });
}, },
goIsSpell(val){
if(val==true){
this.msg.IsSpell=1
}else{
this.msg.IsSpell=2
}
},
btnStart(val){ btnStart(val){
if(this.timeType ==1){//出行时间的选择 if(this.timeType ==1){//出行时间的选择
this.msg.StartTime = val.year+'-'+val.month+'-'+val.day+' '+val.hour+':'+val.minute+':00'; this.msg.StartTime = val.year+'-'+val.month+'-'+val.day+' '+val.hour+':'+val.minute+':00';
...@@ -403,25 +432,20 @@ ...@@ -403,25 +432,20 @@
url:'/pages/guidecar/pickcarcity' url:'/pages/guidecar/pickcarcity'
}) })
}, },
goList(){ goList(){
let that = this let that = this
let msg = that.msg
let tic= 0; let tic= 0;
that.classList.forEach((x,i)=>{ that.classList.forEach((x,i)=>{
if(x.Id == that.msg.CarClass){ if(x.Id == msg.CarClass){
tic = i+1 tic = i+1
console.log(tic)
} }
}) })
uni.navigateTo({ uni.navigateTo({
url: "/pages/guidecar/guidecarList?item=" + encodeURIComponent(JSON.stringify(that.msg)) url: "/pages/guidecar/guidecarList?item=" + encodeURIComponent(JSON.stringify(msg))+'&tic='+tic+'&address='+that.address+'&Pickcar='+that.Pickcar
+'&STime='+encodeURIComponent(JSON.stringify(that.STime))+'&ETime='+encodeURIComponent(JSON.stringify(that.ETime))
+'&intervalDay='+that.intervalDay+'&tic='+tic+'&address='+that.address
}); });
} }
} }
} }
</script> </script>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</view> </view>
<view class="kaitong"> <view class="kaitong">
<div style='width: 100%;'><span style='color: #9A9A9A;font-size: 12px;'>已开通城市</span></div> <div style='width: 100%;'><span style='color: #9A9A9A;font-size: 12px;'>已开通城市</span></div>
<view v-for="(item, index) in RegionList" :key="index" class="region" @click="goback(item)"> <view v-for="(item, index) in RegionList" :key="index" class="region" @click="goback(item,1)">
{{item.RegionName}} {{item.RegionName}}
</view> </view>
</view> </view>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<u-index-list :scrollTop="scrollTop"> <u-index-list :scrollTop="scrollTop">
<view v-for="(item, index) in indexList" :key="index"> <view v-for="(item, index) in indexList" :key="index">
<u-index-anchor :index="item.ti" /> <u-index-anchor :index="item.ti" />
<view class="list-cell" v-for="(x,y) in item.children" :key='y' @click="goback(x)"> <view class="list-cell" v-for="(x,y) in item.children" :key='y' @click="goback(x,2)">
{{x.Name}} {{x.Name}}
</view> </view>
...@@ -115,8 +115,25 @@ ...@@ -115,8 +115,25 @@
onPageScroll(e) { onPageScroll(e) {
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
}, },
goback(item){ goback(item,type){
console.log(item) let Name
if(type==1){
Name=item.RegionName
}else{
Name=item.Name
}
let pages = getCurrentPages(); // 当前页面
let beforePage
beforePage = pages[pages.length - 2]; // 前一个页面
setTimeout(()=>{
uni.navigateBack({
delta:1,
success: function() {
beforePage.$vm.getPickcar(Name); // 执行前一个页面的方法
}
});
},100)
}, },
searchHandler(val){ searchHandler(val){
console.log(val) console.log(val)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment