作者 LiFangYin-lfy

假期修改结束

@@ -97,6 +97,8 @@ page { @@ -97,6 +97,8 @@ page {
97 97
98 .listList { 98 .listList {
99 width: 100%; 99 width: 100%;
  100 + padding-bottom: 150rpx;
  101 + box-sizing: border-box;
100 102
101 .bind_item { 103 .bind_item {
102 width: 100%; 104 width: 100%;
@@ -82,6 +82,8 @@ page { @@ -82,6 +82,8 @@ page {
82 } 82 }
83 .container .listList { 83 .container .listList {
84 width: 100%; 84 width: 100%;
  85 + padding-bottom: 150rpx;
  86 + box-sizing: border-box;
85 } 87 }
86 .container .listList .bind_item { 88 .container .listList .bind_item {
87 width: 100%; 89 width: 100%;
@@ -61,7 +61,7 @@ page { @@ -61,7 +61,7 @@ page {
61 61
62 .listList { 62 .listList {
63 width: 100%; 63 width: 100%;
64 - padding: 0 32rpx; 64 + padding: 0 32rpx 150rpx;
65 box-sizing: border-box; 65 box-sizing: border-box;
66 margin-top: 150rpx; 66 margin-top: 150rpx;
67 67
@@ -51,7 +51,7 @@ page { @@ -51,7 +51,7 @@ page {
51 } 51 }
52 .container .listList { 52 .container .listList {
53 width: 100%; 53 width: 100%;
54 - padding: 0 32rpx; 54 + padding: 0 32rpx 150rpx;
55 box-sizing: border-box; 55 box-sizing: border-box;
56 margin-top: 150rpx; 56 margin-top: 150rpx;
57 } 57 }
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
57 </view> 57 </view>
58 <view class="btnbuy"> 58 <view class="btnbuy">
59 <button class="btnbuy__" size="default" bindtap="toggleDialog" wx:if="{{texts != 1}}"> 59 <button class="btnbuy__" size="default" bindtap="toggleDialog" wx:if="{{texts != 1}}">
60 - 立即报名 60 + 立即预约
61 </button> 61 </button>
62 <button class="btnbuy__2 btnbuy__" size="default" wx:else>您已参加活动</button> 62 <button class="btnbuy__2 btnbuy__" size="default" wx:else>您已参加活动</button>
63 </view> 63 </view>
@@ -45,64 +45,11 @@ Page({ @@ -45,64 +45,11 @@ Page({
45 let that = this 45 let that = this
46 that.gethomeIndex() 46 that.gethomeIndex()
47 that.gethomeLoop() 47 that.gethomeLoop()
48 - that.getStarModel()  
49 that.getS4Info() 48 that.getS4Info()
50 that.getindexUser() 49 that.getindexUser()
51 that.getCitied() 50 that.getCitied()
52 }, 51 },
53 - getCitied() { // 获取城市信息  
54 - let that = this  
55 - wx.getLocation({  
56 - type: 'wgs84', //默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标   
57 - success: function (res) {  
58 - qqmapsdk.reverseGeocoder({  
59 - //位置坐标,默认获取当前位置,非必须参数  
60 - //Object格式  
61 - location: {  
62 - latitude: res.latitude,  
63 - longitude: res.longitude  
64 - },  
65 - success: function (res) { //成功后的回调  
66 - console.log(res);  
67 - var res = res.result;  
68 - let city = res.ad_info.city  
69 - that.saveCity(city)  
70 - },  
71 - fail: function (error) {  
72 - console.error(error);  
73 - },  
74 - complete: function (res) {  
75 - // console.log(res);  
76 - }  
77 - })  
78 - },  
79 - fail: res => {}  
80 - })  
81 - return  
82 - },  
83 - async saveCity(city) {  
84 - let that = this  
85 - try {  
86 - const {  
87 - data: {  
88 - data  
89 - }  
90 - } = await request({  
91 - url: 'api/citys/getCity',  
92 - data: {  
93 - city: city  
94 - }  
95 - })  
96 - console.log(data, "首页全局城市定位");  
97 - that.setData({  
98 - city_id: data.city_id  
99 - })  
100 - that.getSuccessPage()  
101 - } catch (err) {  
102 - console.log(err);  
103 - that.popTest(err.msg)  
104 - }  
105 - }, 52 +
106 gohome() { 53 gohome() {
107 wx.switchTab({ 54 wx.switchTab({
108 url: '/pages/home/home' 55 url: '/pages/home/home'
@@ -140,33 +87,6 @@ Page({ @@ -140,33 +87,6 @@ Page({
140 that.goLogin() 87 that.goLogin()
141 } 88 }
142 }, 89 },
143 - async getSuccessPage() { // 获取推荐  
144 - let that = this  
145 - try {  
146 - const {  
147 - data: {  
148 - data  
149 - }  
150 - } = await request({  
151 - url: 'api/index2/tuiList2',  
152 - data: {  
153 - city_id: that.data.city_id  
154 - }  
155 - })  
156 - console.log(data);  
157 - that.setData({  
158 - groom: data  
159 - })  
160 -  
161 - } catch (err) {  
162 - console.log(err);  
163 - that.setData({  
164 - msg: err.msg  
165 - })  
166 - that.popTest()  
167 - }  
168 -  
169 - },  
170 async gethomeIndex() { // 获取首页 90 async gethomeIndex() { // 获取首页
171 let that = this 91 let that = this
172 try { 92 try {
@@ -217,42 +137,7 @@ Page({ @@ -217,42 +137,7 @@ Page({
217 } 137 }
218 138
219 }, 139 },
220 - async getStarModel() { // 获取明星车型  
221 - let that = this  
222 - let bind_car = that.data.bind_car  
223 - if (bind_car == 1) {  
224 - try {  
225 - const {  
226 - data  
227 - } = await request({  
228 - url: 'api/index2/mingXing',  
229 - })  
230 - console.log(data);  
231 - if (data.code == 1) {  
232 - that.setData({  
233 - starModel: data.data,  
234 - bind_car: 1,  
235 - })  
236 - } else {  
237 - //code为0的话,说明没绑定4s店  
238 - that.setData({  
239 - msg: data.msg,  
240 - bind_car: 0  
241 - })  
242 - that.popTest()  
243 - }  
244 -  
245 -  
246 - } catch (err) {  
247 - console.log(err);  
248 - that.setData({  
249 - msg: err.msg  
250 - })  
251 - that.popTest()  
252 - }  
253 - }  
254 - },  
255 - async getS4Info() { // 获取 4s店数据 140 + async getS4Info() { // 获取4s店数据
256 let that = this 141 let that = this
257 try { 142 try {
258 const { 143 const {
@@ -272,12 +157,9 @@ Page({ @@ -272,12 +157,9 @@ Page({
272 that.setData({ 157 that.setData({
273 msg: data.msg, 158 msg: data.msg,
274 bind_car: 0, 159 bind_car: 0,
275 -  
276 }) 160 })
277 that.popTest() 161 that.popTest()
278 } 162 }
279 -  
280 -  
281 } catch (err) { 163 } catch (err) {
282 console.log(err); 164 console.log(err);
283 that.setData({ 165 that.setData({
@@ -311,11 +193,88 @@ Page({ @@ -311,11 +193,88 @@ Page({
311 }) 193 })
312 } catch (err) { 194 } catch (err) {
313 console.log(err); 195 console.log(err);
314 - if (err.code == 0) { 196 + a.popTest(err.msg)
  197 + }
  198 +
  199 + },
  200 + getCitied() { // 获取城市信息
  201 + let that = this
  202 + wx.getLocation({
  203 + type: 'wgs84', //默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标 
  204 + success: function (res) {
  205 + qqmapsdk.reverseGeocoder({
  206 + //位置坐标,默认获取当前位置,非必须参数
  207 + //Object格式
  208 + location: {
  209 + latitude: res.latitude,
  210 + longitude: res.longitude
  211 + },
  212 + success: function (res) { //成功后的回调
  213 + console.log(res);
  214 + var res = res.result;
  215 + let city = res.ad_info.city
  216 + that.saveCity(city)
  217 + },
  218 + fail: function (error) {
  219 + console.error(error);
  220 + },
  221 + complete: function (res) {
  222 + // console.log(res);
  223 + }
  224 + })
  225 + },
  226 + fail: res => {}
  227 + })
  228 + return
  229 + },
  230 + async saveCity(city) {
  231 + let that = this
  232 + try {
  233 + const {
  234 + data: {
  235 + data
  236 + }
  237 + } = await request({
  238 + url: 'api/citys/getCity',
  239 + data: {
  240 + city: city
  241 + }
  242 + })
  243 + console.log(data, "首页全局城市定位");
315 that.setData({ 244 that.setData({
316 - bind_car: 0, 245 + city_id: data.city_id
317 }) 246 })
  247 + if (that.data.index4S.length == 0) {
  248 + that.getSuccessPage()
  249 + }
  250 + } catch (err) {
  251 + console.log(err);
  252 + a.popTest(err.msg)
  253 + }
  254 + },
  255 + async getSuccessPage() { // 获取推荐
  256 + let that = this
  257 + try {
  258 + const {
  259 + data: {
  260 + data
  261 + }
  262 + } = await request({
  263 + url: 'api/index2/tuiList2',
  264 + data: {
  265 + city_id: that.data.city_id
318 } 266 }
  267 + })
  268 + console.log(data);
  269 + that.setData({
  270 + groom: data
  271 + })
  272 + } catch (err) {
  273 + console.log(err);
  274 + that.setData({
  275 + msg: err.msg
  276 + })
  277 + that.popTest()
319 } 278 }
320 279
321 }, 280 },
@@ -335,25 +294,15 @@ Page({ @@ -335,25 +294,15 @@ Page({
335 }) 294 })
336 console.log(data); 295 console.log(data);
337 if (data.code == 1) { 296 if (data.code == 1) {
338 - that.setData({  
339 - msg: data.msg  
340 - })  
341 - that.popSuccessTest()  
342 - } else {  
343 - that.setData({  
344 - msg: data.msg  
345 - })  
346 - that.popTest() 297 + a.popSuccessTest(data.msg)
347 } 298 }
348 - setTimeout(() => {  
349 - that.getSuccessPage() 299 + setTimeout(() => { // 一旦有关注的店,就不显示推荐好店
  300 + // that.getSuccessPage()
  301 + that.getindexUser()
350 }, 500); 302 }, 500);
351 } catch (err) { 303 } catch (err) {
352 console.log(err); 304 console.log(err);
353 - that.setData({  
354 - msg: err.msg  
355 - })  
356 - that.popTest() 305 + a.popTest(err.msg)
357 } 306 }
358 } else { 307 } else {
359 that.goLogin() 308 that.goLogin()
@@ -329,24 +329,15 @@ page { @@ -329,24 +329,15 @@ page {
329 .bind_box { 329 .bind_box {
330 width: 100%; 330 width: 100%;
331 331
332 -  
333 -  
334 - .wu_bind {  
335 - width: 100%;  
336 - padding: 0 32rpx 32rpx;  
337 - box-sizing: border-box;  
338 - margin-bottom: 20rpx;  
339 - background: #ffffff;  
340 - border-radius: 8rpx;  
341 -  
342 .bind_have { 332 .bind_have {
343 width: 100%; 333 width: 100%;
344 - padding: 32rpx 0 32rpx; 334 + padding: 32rpx;
345 box-sizing: border-box; 335 box-sizing: border-box;
346 - border-bottom: 1rpx solid #eeeeee; 336 + // border-bottom: 1rpx solid #eeeeee;
347 display: flex; 337 display: flex;
348 align-items: center; 338 align-items: center;
349 justify-content: space-between; 339 justify-content: space-between;
  340 + background-color: #fff;
350 341
351 .bind_lf, 342 .bind_lf,
352 .bind_rt { 343 .bind_rt {
@@ -373,6 +364,17 @@ page { @@ -373,6 +364,17 @@ page {
373 } 364 }
374 } 365 }
375 366
  367 +
  368 + .wu_bind {
  369 + width: 100%;
  370 + padding: 0 32rpx 0;
  371 + box-sizing: border-box;
  372 + margin-bottom: 20rpx;
  373 + background: #ffffff;
  374 + border-radius: 8rpx;
  375 +
  376 +
  377 +
376 .no_bind { 378 .no_bind {
377 width: 100%; 379 width: 100%;
378 380
@@ -105,8 +105,7 @@ @@ -105,8 +105,7 @@
105 </view> 105 </view>
106 <view class="bind_nm"> 106 <view class="bind_nm">
107 <view class="bind_box"> 107 <view class="bind_box">
108 - <view class="wu_bind" wx:if="{{bind_car== 0}}">  
109 - <view class="bind_have" bindtap="gobind4S"> 108 + <view class="bind_have" bindtap="gobind4S" wx:if="{{bind_car== 0}}">
110 <view class="bind_lf"> 109 <view class="bind_lf">
111 <image src="{{imagesUrl}}assets/static/img/v-r.png" /> 110 <image src="{{imagesUrl}}assets/static/img/v-r.png" />
112 <view class="bind_tex">未绑定4S店</view> 111 <view class="bind_tex">未绑定4S店</view>
@@ -116,7 +115,8 @@ @@ -116,7 +115,8 @@
116 <image src="{{imagesUrl}}assets/static/img/x-h.png" style="width : 28rpx ;height : 20rpx" /> 115 <image src="{{imagesUrl}}assets/static/img/x-h.png" style="width : 28rpx ;height : 20rpx" />
117 </view> 116 </view>
118 </view> 117 </view>
119 - <view class="no_bind"> 118 + <view class="wu_bind">
  119 + <view class="no_bind" wx:if="{{bind_car== 0 && index4S.length ==0}}">
120 <view class="bind_good">推荐好店</view> 120 <view class="bind_good">推荐好店</view>
121 <view class="bind_list"> 121 <view class="bind_list">
122 <block wx:for="{{groom}}" wx:key="index" wx:for-index="index" wx:for-item="item"> 122 <block wx:for="{{groom}}" wx:key="index" wx:for-index="index" wx:for-item="item">
@@ -134,7 +134,7 @@ @@ -134,7 +134,7 @@
134 </view> 134 </view>
135 </view> 135 </view>
136 </view> 136 </view>
137 - <view class="you_bind" wx:if="{{bind_car== 1}}"> 137 + <view class="you_bind" wx:if="{{index4S.length !=0}}">
138 <block wx:for="{{index4S}}" wx:for-index="index" wx:for-item="item" wx:key="index"> 138 <block wx:for="{{index4S}}" wx:for-index="index" wx:for-item="item" wx:key="index">
139 <view class="s_bind_box"> 139 <view class="s_bind_box">
140 <view class="bind_have" catchtap="goV4Sstores" data-id="{{item.s4_data.id}}"> 140 <view class="bind_have" catchtap="goV4Sstores" data-id="{{item.s4_data.id}}">
@@ -254,46 +254,46 @@ page { @@ -254,46 +254,46 @@ page {
254 .container .health .center_nav .bind_nm .bind_box { 254 .container .health .center_nav .bind_nm .bind_box {
255 width: 100%; 255 width: 100%;
256 } 256 }
257 -.container .health .center_nav .bind_nm .bind_box .wu_bind { 257 +.container .health .center_nav .bind_nm .bind_box .bind_have {
258 width: 100%; 258 width: 100%;
259 - padding: 0 32rpx 32rpx;  
260 - box-sizing: border-box;  
261 - margin-bottom: 20rpx;  
262 - background: #ffffff;  
263 - border-radius: 8rpx;  
264 -}  
265 -.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have {  
266 - width: 100%;  
267 - padding: 32rpx 0 32rpx; 259 + padding: 32rpx;
268 box-sizing: border-box; 260 box-sizing: border-box;
269 - border-bottom: 1rpx solid #eeeeee;  
270 display: flex; 261 display: flex;
271 align-items: center; 262 align-items: center;
272 justify-content: space-between; 263 justify-content: space-between;
  264 + background-color: #fff;
273 } 265 }
274 -.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_lf,  
275 -.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_rt { 266 +.container .health .center_nav .bind_nm .bind_box .bind_have .bind_lf,
  267 +.container .health .center_nav .bind_nm .bind_box .bind_have .bind_rt {
276 display: flex; 268 display: flex;
277 align-items: center; 269 align-items: center;
278 } 270 }
279 -.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_lf image,  
280 -.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_rt image { 271 +.container .health .center_nav .bind_nm .bind_box .bind_have .bind_lf image,
  272 +.container .health .center_nav .bind_nm .bind_box .bind_have .bind_rt image {
281 width: 32rpx; 273 width: 32rpx;
282 height: 32rpx; 274 height: 32rpx;
283 } 275 }
284 -.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_lf .bind_tex,  
285 -.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_rt .bind_tex { 276 +.container .health .center_nav .bind_nm .bind_box .bind_have .bind_lf .bind_tex,
  277 +.container .health .center_nav .bind_nm .bind_box .bind_have .bind_rt .bind_tex {
286 margin-left: 10rpx; 278 margin-left: 10rpx;
287 font-size: 28rpx; 279 font-size: 28rpx;
288 color: #06121F; 280 color: #06121F;
289 font-weight: 600; 281 font-weight: 600;
290 } 282 }
291 -.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_lf .bind_tdt,  
292 -.container .health .center_nav .bind_nm .bind_box .wu_bind .bind_have .bind_rt .bind_tdt { 283 +.container .health .center_nav .bind_nm .bind_box .bind_have .bind_lf .bind_tdt,
  284 +.container .health .center_nav .bind_nm .bind_box .bind_have .bind_rt .bind_tdt {
293 font-size: 22rpx; 285 font-size: 22rpx;
294 color: #06121F; 286 color: #06121F;
295 margin-right: 10rpx; 287 margin-right: 10rpx;
296 } 288 }
  289 +.container .health .center_nav .bind_nm .bind_box .wu_bind {
  290 + width: 100%;
  291 + padding: 0 32rpx 0;
  292 + box-sizing: border-box;
  293 + margin-bottom: 20rpx;
  294 + background: #ffffff;
  295 + border-radius: 8rpx;
  296 +}
297 .container .health .center_nav .bind_nm .bind_box .wu_bind .no_bind { 297 .container .health .center_nav .bind_nm .bind_box .wu_bind .no_bind {
298 width: 100%; 298 width: 100%;
299 } 299 }
@@ -10,9 +10,9 @@ @@ -10,9 +10,9 @@
10 "postcss": true, 10 "postcss": true,
11 "preloadBackgroundData": false, 11 "preloadBackgroundData": false,
12 "minified": true, 12 "minified": true,
13 - "newFeature": true, 13 + "newFeature": false,
14 "coverView": true, 14 "coverView": true,
15 - "nodeModules": true, 15 + "nodeModules": false,
16 "autoAudits": false, 16 "autoAudits": false,
17 "showShadowRootInWxmlPanel": true, 17 "showShadowRootInWxmlPanel": true,
18 "scopeDataCheck": false, 18 "scopeDataCheck": false,
@@ -29,14 +29,14 @@ @@ -29,14 +29,14 @@
29 "outputPath": "" 29 "outputPath": ""
30 }, 30 },
31 "enableEngineNative": false, 31 "enableEngineNative": false,
  32 + "bundle": false,
32 "useIsolateContext": true, 33 "useIsolateContext": true,
33 - "useCompilerModule": false, 34 + "useCompilerModule": true,
34 "userConfirmedUseCompilerModuleSwitch": false, 35 "userConfirmedUseCompilerModuleSwitch": false,
35 "userConfirmedBundleSwitch": false, 36 "userConfirmedBundleSwitch": false,
36 "packNpmManually": false, 37 "packNpmManually": false,
37 "packNpmRelationList": [], 38 "packNpmRelationList": [],
38 - "minifyWXSS": true,  
39 - "bundle": false 39 + "minifyWXSS": true
40 }, 40 },
41 "compileType": "miniprogram", 41 "compileType": "miniprogram",
42 "libVersion": "2.11.0", 42 "libVersion": "2.11.0",