作者 LiFangYin-lfy

假期修改结束

... ... @@ -97,6 +97,8 @@ page {
.listList {
width: 100%;
padding-bottom: 150rpx;
box-sizing: border-box;
.bind_item {
width: 100%;
... ...
... ... @@ -82,6 +82,8 @@ page {
}
.container .listList {
width: 100%;
padding-bottom: 150rpx;
box-sizing: border-box;
}
.container .listList .bind_item {
width: 100%;
... ...
... ... @@ -61,7 +61,7 @@ page {
.listList {
width: 100%;
padding: 0 32rpx;
padding: 0 32rpx 150rpx;
box-sizing: border-box;
margin-top: 150rpx;
... ...
... ... @@ -51,7 +51,7 @@ page {
}
.container .listList {
width: 100%;
padding: 0 32rpx;
padding: 0 32rpx 150rpx;
box-sizing: border-box;
margin-top: 150rpx;
}
... ...
... ... @@ -57,7 +57,7 @@
</view>
<view class="btnbuy">
<button class="btnbuy__" size="default" bindtap="toggleDialog" wx:if="{{texts != 1}}">
立即报名
立即预约
</button>
<button class="btnbuy__2 btnbuy__" size="default" wx:else>您已参加活动</button>
</view>
... ...
... ... @@ -45,64 +45,11 @@ Page({
let that = this
that.gethomeIndex()
that.gethomeLoop()
that.getStarModel()
that.getS4Info()
that.getindexUser()
that.getCitied()
},
getCitied() { // 获取城市信息
let that = this
wx.getLocation({
type: 'wgs84', //默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标 
success: function (res) {
qqmapsdk.reverseGeocoder({
//位置坐标,默认获取当前位置,非必须参数
//Object格式
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: function (res) { //成功后的回调
console.log(res);
var res = res.result;
let city = res.ad_info.city
that.saveCity(city)
},
fail: function (error) {
console.error(error);
},
complete: function (res) {
// console.log(res);
}
})
},
fail: res => {}
})
return
},
async saveCity(city) {
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/citys/getCity',
data: {
city: city
}
})
console.log(data, "首页全局城市定位");
that.setData({
city_id: data.city_id
})
that.getSuccessPage()
} catch (err) {
console.log(err);
that.popTest(err.msg)
}
},
gohome() {
wx.switchTab({
url: '/pages/home/home'
... ... @@ -140,33 +87,6 @@ Page({
that.goLogin()
}
},
async getSuccessPage() { // 获取推荐
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/index2/tuiList2',
data: {
city_id: that.data.city_id
}
})
console.log(data);
that.setData({
groom: data
})
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
},
async gethomeIndex() { // 获取首页
let that = this
try {
... ... @@ -217,42 +137,7 @@ Page({
}
},
async getStarModel() { // 获取明星车型
let that = this
let bind_car = that.data.bind_car
if (bind_car == 1) {
try {
const {
data
} = await request({
url: 'api/index2/mingXing',
})
console.log(data);
if (data.code == 1) {
that.setData({
starModel: data.data,
bind_car: 1,
})
} else {
//code为0的话,说明没绑定4s店
that.setData({
msg: data.msg,
bind_car: 0
})
that.popTest()
}
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
}
},
async getS4Info() { // 获取 4s店数据
async getS4Info() { // 获取4s店数据
let that = this
try {
const {
... ... @@ -272,12 +157,9 @@ Page({
that.setData({
msg: data.msg,
bind_car: 0,
})
that.popTest()
}
} catch (err) {
console.log(err);
that.setData({
... ... @@ -311,11 +193,88 @@ Page({
})
} catch (err) {
console.log(err);
if (err.code == 0) {
a.popTest(err.msg)
}
},
getCitied() { // 获取城市信息
let that = this
wx.getLocation({
type: 'wgs84', //默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标 
success: function (res) {
qqmapsdk.reverseGeocoder({
//位置坐标,默认获取当前位置,非必须参数
//Object格式
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: function (res) { //成功后的回调
console.log(res);
var res = res.result;
let city = res.ad_info.city
that.saveCity(city)
},
fail: function (error) {
console.error(error);
},
complete: function (res) {
// console.log(res);
}
})
},
fail: res => {}
})
return
},
async saveCity(city) {
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/citys/getCity',
data: {
city: city
}
})
console.log(data, "首页全局城市定位");
that.setData({
bind_car: 0,
city_id: data.city_id
})
if (that.data.index4S.length == 0) {
that.getSuccessPage()
}
} catch (err) {
console.log(err);
a.popTest(err.msg)
}
},
async getSuccessPage() { // 获取推荐
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/index2/tuiList2',
data: {
city_id: that.data.city_id
}
})
console.log(data);
that.setData({
groom: data
})
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
},
... ... @@ -335,25 +294,15 @@ Page({
})
console.log(data);
if (data.code == 1) {
that.setData({
msg: data.msg
})
that.popSuccessTest()
} else {
that.setData({
msg: data.msg
})
that.popTest()
a.popSuccessTest(data.msg)
}
setTimeout(() => {
that.getSuccessPage()
setTimeout(() => { // 一旦有关注的店,就不显示推荐好店
// that.getSuccessPage()
that.getindexUser()
}, 500);
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
a.popTest(err.msg)
}
} else {
that.goLogin()
... ...
... ... @@ -329,24 +329,15 @@ page {
.bind_box {
width: 100%;
.wu_bind {
width: 100%;
padding: 0 32rpx 32rpx;
box-sizing: border-box;
margin-bottom: 20rpx;
background: #ffffff;
border-radius: 8rpx;
.bind_have {
width: 100%;
padding: 32rpx 0 32rpx;
padding: 32rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #eeeeee;
// border-bottom: 1rpx solid #eeeeee;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
.bind_lf,
.bind_rt {
... ... @@ -373,6 +364,17 @@ page {
}
}
.wu_bind {
width: 100%;
padding: 0 32rpx 0;
box-sizing: border-box;
margin-bottom: 20rpx;
background: #ffffff;
border-radius: 8rpx;
.no_bind {
width: 100%;
... ...
... ... @@ -105,8 +105,7 @@
</view>
<view class="bind_nm">
<view class="bind_box">
<view class="wu_bind" wx:if="{{bind_car== 0}}">
<view class="bind_have" bindtap="gobind4S">
<view class="bind_have" bindtap="gobind4S" wx:if="{{bind_car== 0}}">
<view class="bind_lf">
<image src="{{imagesUrl}}assets/static/img/v-r.png" />
<view class="bind_tex">未绑定4S店</view>
... ... @@ -116,7 +115,8 @@
<image src="{{imagesUrl}}assets/static/img/x-h.png" style="width : 28rpx ;height : 20rpx" />
</view>
</view>
<view class="no_bind">
<view class="wu_bind">
<view class="no_bind" wx:if="{{bind_car== 0 && index4S.length ==0}}">
<view class="bind_good">推荐好店</view>
<view class="bind_list">
<block wx:for="{{groom}}" wx:key="index" wx:for-index="index" wx:for-item="item">
... ... @@ -134,7 +134,7 @@
</view>
</view>
</view>
<view class="you_bind" wx:if="{{bind_car== 1}}">
<view class="you_bind" wx:if="{{index4S.length !=0}}">
<block wx:for="{{index4S}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="s_bind_box">
<view class="bind_have" catchtap="goV4Sstores" data-id="{{item.s4_data.id}}">
... ...
... ... @@ -254,46 +254,46 @@ page {
.container .health .center_nav .bind_nm .bind_box {
width: 100%;
}
.container .health .center_nav .bind_nm .bind_box .wu_bind {
.container .health .center_nav .bind_nm .bind_box .bind_have {
width: 100%;
padding: 0 32rpx 32rpx;
box-sizing: border-box;
margin-bottom: 20rpx;
background: #ffffff;
border-radius: 8rpx;
}
.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have {
width: 100%;
padding: 32rpx 0 32rpx;
padding: 32rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #eeeeee;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
}
.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_lf,
.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_rt {
.container .health .center_nav .bind_nm .bind_box .bind_have .bind_lf,
.container .health .center_nav .bind_nm .bind_box .bind_have .bind_rt {
display: flex;
align-items: center;
}
.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_lf image,
.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_rt image {
.container .health .center_nav .bind_nm .bind_box .bind_have .bind_lf image,
.container .health .center_nav .bind_nm .bind_box .bind_have .bind_rt image {
width: 32rpx;
height: 32rpx;
}
.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_lf .bind_tex,
.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_rt .bind_tex {
.container .health .center_nav .bind_nm .bind_box .bind_have .bind_lf .bind_tex,
.container .health .center_nav .bind_nm .bind_box .bind_have .bind_rt .bind_tex {
margin-left: 10rpx;
font-size: 28rpx;
color: #06121F;
font-weight: 600;
}
.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_lf .bind_tdt,
.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_rt .bind_tdt {
.container .health .center_nav .bind_nm .bind_box .bind_have .bind_lf .bind_tdt,
.container .health .center_nav .bind_nm .bind_box .bind_have .bind_rt .bind_tdt {
font-size: 22rpx;
color: #06121F;
margin-right: 10rpx;
}
.container .health .center_nav .bind_nm .bind_box .wu_bind {
width: 100%;
padding: 0 32rpx 0;
box-sizing: border-box;
margin-bottom: 20rpx;
background: #ffffff;
border-radius: 8rpx;
}
.container .health .center_nav .bind_nm .bind_box .wu_bind .no_bind {
width: 100%;
}
... ...
... ... @@ -10,9 +10,9 @@
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"newFeature": false,
"coverView": true,
"nodeModules": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
... ... @@ -29,14 +29,14 @@
"outputPath": ""
},
"enableEngineNative": false,
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": false,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"bundle": false
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "2.11.0",
... ...