Commit 1739e3ce authored by ziyu's avatar ziyu

improvement: 优化

parent 6f5ee41c
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
activityList(val) { activityList(val) {
let list = val || []; let list = val || [];
this.list = list; this.list = list;
if(list.length < 3) { if(list.length && list.length < 3) {
this.onActivityChange(); this.onActivityChange();
} }
} }
......
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
}, },
toViewPage(e) { toViewPage(e) {
let item = e.$wx.currentTarget.dataset.item; let item = e.$wx.currentTarget.dataset.item;
if(this.showLoading) return;
this.showLoading = true; this.showLoading = true;
getGoodsUrl({skuId:item.sourceId,couponUrl:item.couponUrl||null}).then(data=>{ getGoodsUrl({skuId:item.sourceId,couponUrl:item.couponUrl||null}).then(data=>{
this.showLoading = false; this.showLoading = false;
......
...@@ -504,10 +504,12 @@ ...@@ -504,10 +504,12 @@
// 获取头像安全距离 // 获取头像安全距离
let statusHeight = this.$app.$options.globalData.statusBarHeight || ''; let statusHeight = this.$app.$options.globalData.statusBarHeight || '';
this.setSafeAreaStyle('top:' + statusHeight + 'px'); this.setSafeAreaStyle('top:' + statusHeight + 'px');
this.searchStyle = 'top:' + (statusHeight+12) + 'px' this.searchStyle = 'top:' + (statusHeight+12) + 'px';
// 获取openid // 获取openid
await this.getOpenId(); await this.getOpenId();
// 获取奖品列表
this.videoList = await getPrizeList(options.prizeId);
this.getMainInfo(); this.getMainInfo();
flag = true; flag = true;
...@@ -527,8 +529,6 @@ ...@@ -527,8 +529,6 @@
// 获取活动信息 // 获取活动信息
this.showActivity(); this.showActivity();
// 获取奖品列表
this.videoList = await getPrizeList(options.prizeId);
}, },
async onShow() { async onShow() {
// 获取主页信息 // 获取主页信息
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view> <view>
<view class="search-head"> <view class="search-head">
<view class="search-wrapper"> <view class="search-wrapper">
<van-field clearable left-icon="search" placeholder="搜索" bind:confirm="search" value="{{value}}" bind:input ="setValue"></van-field> <van-field clearable left-icon="search" placeholder="搜索" bind:confirm="search" value="{{value}}" bind:input ="setValue" auto-focus ></van-field>
</view> </view>
<view class="search-cancel" bindtap="search">搜索</view> <view class="search-cancel" bindtap="search">搜索</view>
</view> </view>
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
toJingdong(event) { toJingdong(event) {
const item = event.$wx.currentTarget.dataset.item; const item = event.$wx.currentTarget.dataset.item;
if(item === undefined) return; if(item === undefined) return;
if(this.showLoading) return;
this.showLoading = true; this.showLoading = true;
getGoodsUrl({skuId:item.sourceId,couponUrl:item.couponUrl||null}).then(data=>{ getGoodsUrl({skuId:item.sourceId,couponUrl:item.couponUrl||null}).then(data=>{
this.showLoading = false; this.showLoading = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment