|
@@ -3,14 +3,14 @@
|
|
<!-- 轮播图 -->
|
|
<!-- 轮播图 -->
|
|
<view class="bBannerList">
|
|
<view class="bBannerList">
|
|
<swiper class="swiper" :autoplay="autoplay" :interval="interval" :duration="duration" :circular="true">
|
|
<swiper class="swiper" :autoplay="autoplay" :interval="interval" :duration="duration" :circular="true">
|
|
- <swiper-item v-for="(item,index) in homeData.bBannerList" @click="carBswpClick(item)" v-if="!shopId">
|
|
|
|
|
|
+ <swiper-item v-for="(item,index) in imgData" @click="carBswpClick(item)" v-if="!shopId">
|
|
<view class="swiper-item uni-bg-red">
|
|
<view class="swiper-item uni-bg-red">
|
|
<image :src="item.logo" mode="" class="swpImg"></image>
|
|
<image :src="item.logo" mode="" class="swpImg"></image>
|
|
</view>
|
|
</view>
|
|
</swiper-item>
|
|
</swiper-item>
|
|
- <swiper-item v-for="(item,index) in homeData.bBannerList" @click="carBswpClickshop(item)" v-if="shopId">
|
|
|
|
|
|
+ <swiper-item v-for="(item,index) in imgData" @click="carBswpClickshop(item)" v-if="shopId">
|
|
<view class="swiper-item uni-bg-red">
|
|
<view class="swiper-item uni-bg-red">
|
|
- <image :src="item.Logo" mode="" class="swpImg"></image>
|
|
|
|
|
|
+ <image :src="item.logo" mode="" class="swpImg"></image>
|
|
</view>
|
|
</view>
|
|
</swiper-item>
|
|
</swiper-item>
|
|
</swiper>
|
|
</swiper>
|
|
@@ -26,9 +26,9 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="mesView">
|
|
<view class="mesView">
|
|
- <view class="leftTitle">车牌号</view>
|
|
|
|
-
|
|
|
|
- <view class="rightView" v-if="!joinFirst">
|
|
|
|
|
|
+ <view class="leftTitle">车牌号</view>
|
|
|
|
+
|
|
|
|
+ <view class="rightView" v-if="!memberCar">
|
|
<view class="plateNumber noSelectColor">请添加您的爱车</view>
|
|
<view class="plateNumber noSelectColor">请添加您的爱车</view>
|
|
|
|
|
|
<view class="changeCarBg" @click="addCar()">
|
|
<view class="changeCarBg" @click="addCar()">
|
|
@@ -37,14 +37,14 @@
|
|
<view style="color: #FF2400; font-size: 28rpx;">添加</view>
|
|
<view style="color: #FF2400; font-size: 28rpx;">添加</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="rightView" v-else>
|
|
|
|
- <view class="plateNumber selectColor">{{plateNo}}</view>
|
|
|
|
-
|
|
|
|
- <view class="changeCarBg" @click="goCarList()">
|
|
|
|
- <image src="../../static/img/icon_change.png"
|
|
|
|
- style="width: 32rpx; height: 34rpx; margin-right: 5rpx;"></image>
|
|
|
|
- <view style="color: #FF2400; font-size: 28rpx;">换车</view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="rightView" v-else>
|
|
|
|
+ <view class="plateNumber selectColor">{{memberCar.plateNumber}}</view>
|
|
|
|
+
|
|
|
|
+ <view class="changeCarBg" @click="goCarList()">
|
|
|
|
+ <image src="../../static/img/icon_change.png"
|
|
|
|
+ style="width: 32rpx; height: 34rpx; margin-right: 5rpx;"></image>
|
|
|
|
+ <view style="color: #FF2400; font-size: 28rpx;">换车</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@@ -52,7 +52,7 @@
|
|
|
|
|
|
<view class="mesView">
|
|
<view class="mesView">
|
|
<view class="leftTitle">车型</view>
|
|
<view class="leftTitle">车型</view>
|
|
- <view class="carModBtn selectColor" v-if="!carMod">{{carMod}}</view>
|
|
|
|
|
|
+ <view class="carModBtn selectColor" v-if="memberCar">{{memberCar.carModel}}</view>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -85,115 +85,74 @@
|
|
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- homeData: '',
|
|
|
|
|
|
+ imgData: [],
|
|
uid: '',
|
|
uid: '',
|
|
cityname: '',
|
|
cityname: '',
|
|
showCity: false,
|
|
showCity: false,
|
|
location: '',
|
|
location: '',
|
|
- cityCode: '',
|
|
|
|
- joinFirst: false,
|
|
|
|
- carMod: '',
|
|
|
|
- time: '',
|
|
|
|
|
|
+ memberCar: '',
|
|
mileage: '',
|
|
mileage: '',
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
|
|
|
|
- console.log('index-----onLoad')
|
|
|
|
|
|
+ },
|
|
|
|
+ onShow() {
|
|
|
|
+
|
|
var that = this;
|
|
var that = this;
|
|
this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
|
this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
|
|
|
|
|
- //#ifdef H5
|
|
|
|
- var logodata = {
|
|
|
|
- uid: '10E96C26-92CD-4559-8019-ADBE4F83851A',
|
|
|
|
- token: "7994AC696DB441F5A9DCD738CD9943D5",
|
|
|
|
- memberInfo: {
|
|
|
|
- nickName: '布克',
|
|
|
|
- name: '66',
|
|
|
|
- headUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/PHgdyF2l1fvicOPTicZlAdhuK65E6VFnNJIhA9QWFCUwftgc9hySDltLEEWic27eMLkiaoQG9emzqg0s87JaW28HFQ/132'
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- var obj = {
|
|
|
|
- cityname: "济南市",
|
|
|
|
- lat: 36.68013,
|
|
|
|
- lng: 117.06533,
|
|
|
|
- cityCode: 370100
|
|
|
|
- }
|
|
|
|
- uni.setStorage({
|
|
|
|
- key: 'location',
|
|
|
|
- data: obj,
|
|
|
|
- success: function() {}
|
|
|
|
- });
|
|
|
|
- uni.setStorage({
|
|
|
|
- key: 'logodata',
|
|
|
|
- data: logodata,
|
|
|
|
- success: function() {}
|
|
|
|
- });
|
|
|
|
- var wxOpend = {
|
|
|
|
- openid: "oqeJ-5Lsmi-vM1Oirso6z9-MrD3g",
|
|
|
|
- session_key: "sxV2xbqNvOkk+p7i/KosiQ=="
|
|
|
|
- }
|
|
|
|
- uni.setStorage({
|
|
|
|
- key: 'wxOpendata',
|
|
|
|
- data: wxOpend,
|
|
|
|
- success: function() {}
|
|
|
|
- });
|
|
|
|
- that.queryHomeDetail();
|
|
|
|
- that.getqueryMemberCarShop()
|
|
|
|
-
|
|
|
|
- // #endif
|
|
|
|
this.uid = uni.getStorageSync("logodata").uid;
|
|
this.uid = uni.getStorageSync("logodata").uid;
|
|
- console.log(this.shopId)
|
|
|
|
|
|
+
|
|
this.location = uni.getStorageSync("location");
|
|
this.location = uni.getStorageSync("location");
|
|
|
|
+
|
|
|
|
+
|
|
if (this.location) {
|
|
if (this.location) {
|
|
this.lng = this.location.lng;
|
|
this.lng = this.location.lng;
|
|
this.lat = this.location.lat;
|
|
this.lat = this.location.lat;
|
|
this.cityname = this.location.cityname;
|
|
this.cityname = this.location.cityname;
|
|
this.cityCode = this.location.cityCode;
|
|
this.cityCode = this.location.cityCode;
|
|
- //that.queryHomeDetail();
|
|
|
|
- if (that.uid) {
|
|
|
|
- that.getqueryMemberCarShop()
|
|
|
|
- } else {
|
|
|
|
- that.queryHomeDetail();
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- uni.getLocation({
|
|
|
|
- type: 'gcj02',
|
|
|
|
- success: function(res) {
|
|
|
|
- console.log(res)
|
|
|
|
- that.lng = res.longitude
|
|
|
|
- that.lat = res.latitude
|
|
|
|
-
|
|
|
|
- that.getAdress();
|
|
|
|
- //登录状态下获取车辆信息
|
|
|
|
- if (that.uid) {
|
|
|
|
- that.getqueryMemberCarShop()
|
|
|
|
- } else {
|
|
|
|
- that.queryHomeDetail();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- fail(err) {
|
|
|
|
- console.log(err)
|
|
|
|
- that.queryHomeDetail();
|
|
|
|
- //登录状态下获取车辆信息
|
|
|
|
- if (that.uid) {
|
|
|
|
- that.getqueryMemberCarShop()
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ that.queryHomeDetail();
|
|
|
|
|
|
|
|
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请选择城市'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
+
|
|
methods: {
|
|
methods: {
|
|
-<<<<<<< HEAD
|
|
|
|
- gomodule(){
|
|
|
|
|
|
+ queryHomeDetail() {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '加载中'
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.$http('worldKeepCar/worldHome/queryHomeDetail', {
|
|
|
|
+ cityCode: this.cityCode
|
|
|
|
+ }, 'GET').then(res => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ this.imgData = res.data.banners
|
|
|
|
+ this.memberCar = res.data.memberCar
|
|
|
|
+ this.mileage = res.data.memberCar.milage
|
|
|
|
+
|
|
|
|
+ var cardata = uni.getStorageSync("maintainCarData")
|
|
|
|
+
|
|
|
|
+ if (cardata) {
|
|
|
|
+ this.memberCar = cardata
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ gomodule() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:'../module/maintain'
|
|
|
|
-=======
|
|
|
|
|
|
+ url: '../module/maintain'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
goCarList() {
|
|
goCarList() {
|
|
if (this.uid) {
|
|
if (this.uid) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -204,7 +163,6 @@
|
|
addCar() {
|
|
addCar() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: 'addCar'
|
|
url: 'addCar'
|
|
->>>>>>> 5f1951434fab0da9eac36f8d24ee46ce362c96a8
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
selectCity(item) {
|
|
selectCity(item) {
|
|
@@ -232,39 +190,7 @@
|
|
this.time = e.target.value
|
|
this.time = e.target.value
|
|
},
|
|
},
|
|
|
|
|
|
- getAdress() {
|
|
|
|
- var location = this.lng + ',' + this.lat
|
|
|
|
- uni.request({
|
|
|
|
- url: 'https://restapi.amap.com/v3/place/around', //仅为示例,并非真实接口地址。
|
|
|
|
- data: {
|
|
|
|
- key: '064b6a4a8ade55656edcde2f528876de',
|
|
|
|
- location: location,
|
|
|
|
- types: "190000",
|
|
|
|
- extensions: "all",
|
|
|
|
- radius: 100
|
|
|
|
- },
|
|
|
|
- dataType: "json",
|
|
|
|
- success: (res) => {
|
|
|
|
- console.log(res);
|
|
|
|
- this.cityname = res.data.pois[0].cityname;
|
|
|
|
- var cityCode = res.data.pois[0].adcode
|
|
|
|
- cityCode = cityCode.slice(0, -2)
|
|
|
|
- cityCode = cityCode + '00'
|
|
|
|
- var obj = {
|
|
|
|
- cityname: this.cityname,
|
|
|
|
- lng: this.lng,
|
|
|
|
- lat: this.lat,
|
|
|
|
- cityCode: cityCode
|
|
|
|
- }
|
|
|
|
- uni.setStorage({
|
|
|
|
- key: 'location',
|
|
|
|
- data: obj,
|
|
|
|
- success: function() {}
|
|
|
|
- });
|
|
|
|
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -279,7 +205,7 @@
|
|
.bBannerList {
|
|
.bBannerList {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 300rpx;
|
|
height: 300rpx;
|
|
- background-color: #3F536E;
|
|
|
|
|
|
+ background-color: #F4F5F7;
|
|
}
|
|
}
|
|
|
|
|
|
.swpImg {
|
|
.swpImg {
|
|
@@ -344,13 +270,13 @@
|
|
width: 65%;
|
|
width: 65%;
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|
|
}
|
|
}
|
|
-
|
|
|
|
- .rightView{
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- width: 80%;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ .rightView {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ width: 80%;
|
|
|
|
+ }
|
|
|
|
+
|
|
.plateNumber {
|
|
.plateNumber {
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|
|
}
|
|
}
|