作者 李芳银

更改了倒计时

@@ -18,13 +18,16 @@ Page({ @@ -18,13 +18,16 @@ Page({
18 city_id: '', 18 city_id: '',
19 pin_id: '', 19 pin_id: '',
20 shortnameCity: '', 20 shortnameCity: '',
  21 + home_form: '', // 从首页搜索过来
21 }, 22 },
22 onLoad: function (options) { 23 onLoad: function (options) {
23 let that = this 24 let that = this
24 console.log(options); 25 console.log(options);
  26 +
25 that.setData({ 27 that.setData({
26 - kw: options.kw || '',  
27 - searchValue: options.kw || '', 28 + // kw: options.kw || '',
  29 + // searchValue: options.kw || '',
  30 + home_form: options.home || '',
28 }) 31 })
29 }, 32 },
30 onShow: function () { 33 onShow: function () {
@@ -35,7 +38,10 @@ Page({ @@ -35,7 +38,10 @@ Page({
35 }) 38 })
36 } 39 }
37 console.log(this.data.city_id); 40 console.log(this.data.city_id);
  41 + let home_form = that.data.home_form
  42 + if (home_form == '') {
38 that.getmoreList() 43 that.getmoreList()
  44 + }
39 }, 45 },
40 goback() { 46 goback() {
41 wx.navigateBack() 47 wx.navigateBack()
@@ -148,17 +154,15 @@ Page({ @@ -148,17 +154,15 @@ Page({
148 that.setData({ 154 that.setData({
149 kw: kw 155 kw: kw
150 }) 156 })
151 - // console.log(kw); 157 + console.log(kw);
152 that.getmoreList() 158 that.getmoreList()
153 }, 159 },
154 getInput(e) { 160 getInput(e) {
155 - console.log(e);  
156 let that = this 161 let that = this
157 let kw = e.detail.value 162 let kw = e.detail.value
158 that.setData({ 163 that.setData({
159 kw: kw 164 kw: kw
160 }) 165 })
161 - that.getmoreList()  
162 }, 166 },
163 changed4S(e) { // 去4sd店 167 changed4S(e) { // 去4sd店
164 let that = this 168 let that = this
@@ -71,7 +71,7 @@ Page({ @@ -71,7 +71,7 @@ Page({
71 klist: data, 71 klist: data,
72 time_data: data.time_num, 72 time_data: data.time_num,
73 content: data.content, 73 content: data.content,
74 - time: data.time_num * 1000, 74 + time: data.time_num,
75 content2: that.text(data.say) 75 content2: that.text(data.say)
76 }) 76 })
77 WxParse.wxParse('content', 'html', that.data.content, that, 5); 77 WxParse.wxParse('content', 'html', that.data.content, that, 5);
@@ -92,7 +92,8 @@ @@ -92,7 +92,8 @@
92 display: flex; 92 display: flex;
93 93
94 .card_left { 94 .card_left {
95 - flex: 1; 95 + // flex: 1;
  96 + width: 60%;
96 align-items: center; 97 align-items: center;
97 line-height: 55rpx; 98 line-height: 55rpx;
98 99
@@ -161,7 +162,8 @@ @@ -161,7 +162,8 @@
161 } 162 }
162 163
163 .card_right { 164 .card_right {
164 - flex: 1; 165 + // flex: 1;
  166 + width: 40%;
165 align-items: center; 167 align-items: center;
166 line-height: 55rpx; 168 line-height: 55rpx;
167 padding-left: 20rpx; 169 padding-left: 20rpx;
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 display: flex; 82 display: flex;
83 } 83 }
84 .container .cards .card .card_box .card_left { 84 .container .cards .card .card_box .card_left {
85 - flex: 1; 85 + width: 60%;
86 align-items: center; 86 align-items: center;
87 line-height: 55rpx; 87 line-height: 55rpx;
88 } 88 }
@@ -137,7 +137,7 @@ @@ -137,7 +137,7 @@
137 line-height: 63rpx; 137 line-height: 63rpx;
138 } 138 }
139 .container .cards .card .card_box .card_right { 139 .container .cards .card .card_box .card_right {
140 - flex: 1; 140 + width: 40%;
141 align-items: center; 141 align-items: center;
142 line-height: 55rpx; 142 line-height: 55rpx;
143 padding-left: 20rpx; 143 padding-left: 20rpx;
@@ -120,7 +120,7 @@ Page({ @@ -120,7 +120,7 @@ Page({
120 }, 120 },
121 goSearch() { 121 goSearch() {
122 wx.navigateTo({ 122 wx.navigateTo({
123 - url: '/pages/search/search?S4_num=1' 123 + url: '/pages/Vmore4SList/Vmore4SList?home=1'
124 }) 124 })
125 }, 125 },
126 addLoveCared() { // 去添加车辆 126 addLoveCared() { // 去添加车辆
@@ -303,6 +303,9 @@ Page({ @@ -303,6 +303,9 @@ Page({
303 url: 'api/index2/indexUnder', 303 url: 'api/index2/indexUnder',
304 }) 304 })
305 console.log(data, "4SD店列表"); 305 console.log(data, "4SD店列表");
  306 + if (data.length == 0) { // 如果是空数组,你调用的是【推荐4s店】这个接口
  307 + that.getCitied()
  308 + }
306 that.setData({ 309 that.setData({
307 index4S: data 310 index4S: data
308 }) 311 })
@@ -321,7 +324,6 @@ Page({ @@ -321,7 +324,6 @@ Page({
321 let id = e.currentTarget.dataset.id 324 let id = e.currentTarget.dataset.id
322 let token = wx.getStorageSync('token') 325 let token = wx.getStorageSync('token')
323 if (token) { 326 if (token) {
324 -  
325 try { 327 try {
326 const { 328 const {
327 data 329 data
@@ -646,6 +648,8 @@ Page({ @@ -646,6 +648,8 @@ Page({
646 default: 648 default:
647 break; 649 break;
648 } 650 }
  651 + } else {
  652 + a.popTest('该4s店暂未运营')
649 } 653 }
650 }, 654 },
651 655