Parcourir la source

[首页banner][修改]:[修改首页无用的接口]

tags/湖南版5.1.4
meo il y a 6 ans
Parent
révision
d491bd9446
2 fichiers modifiés avec 20 ajouts et 20 suppressions
  1. +1
    -1
      components/banner/index.wxml
  2. +19
    -19
      pages/main/index.js

+ 1
- 1
components/banner/index.wxml Voir le fichier

@@ -5,7 +5,7 @@
<swiper class="index-slide" bindchange="swiperChange" autoplay="true" circular="false"> <swiper class="index-slide" bindchange="swiperChange" autoplay="true" circular="false">
<block wx:for="{{list}}" wx:key="unique"> <block wx:for="{{list}}" wx:key="unique">
<swiper-item> <swiper-item>
<image data-id="{{item.id}}" data-data="{{item}}" bindtap='gotobannerdetail' src="{{item.coverImg}}" class="index-slide-image" />
<image data-id="{{item.id}}" data-data="{{item}}" mode='aspectFill' bindtap='gotobannerdetail' src="{{item.coverImg}}" class="index-slide-image" />
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>


+ 19
- 19
pages/main/index.js Voir le fichier

@@ -425,15 +425,15 @@ Page({
pageSize: 7 pageSize: 7
} }
}).then(res => { }).then(res => {
that.getmemberId(app.globalData.token);
that.checkUserCarStatus();
// that.getmemberId(app.globalData.token);
// that.checkUserCarStatus();
that.setData({ that.setData({
list: res.data.list list: res.data.list
}); });
}) })
.catch(err => { .catch(err => {
that.getmemberId(app.globalData.token);
that.checkUserCarStatus();
// that.getmemberId(app.globalData.token);
// that.checkUserCarStatus();
}) })
; ;
}, },
@@ -441,21 +441,21 @@ Page({
/** /**
* 检查用户是否有车 * 检查用户是否有车
*/ */
checkUserCarStatus: function() {
var that = this;
Http.get({
url: config.api.userCarCount,
data: {}
}).then(res => {
if (res.data > 0) {
// 用户名下有车
app.globalData.phone = res.data.phone;
app.globalData.supportCar = true;
// 共同登录
that.userCarLogin();
}
});
},
// checkUserCarStatus: function() {
// var that = this;
// Http.get({
// url: config.api.userCarCount,
// data: {}
// }).then(res => {
// if (res.data > 0) {
// // 用户名下有车
// app.globalData.phone = res.data.phone;
// app.globalData.supportCar = true;
// // 共同登录
// that.userCarLogin();
// }
// });
// },
/** /**
* car共同登录 * car共同登录
*/ */


Chargement…
Annuler
Enregistrer