Commit 1739e3ce authored by ziyu's avatar ziyu

improvement: 优化

parent 6f5ee41c
......@@ -38,7 +38,7 @@
activityList(val) {
let list = val || [];
this.list = list;
if(list.length < 3) {
if(list.length && list.length < 3) {
this.onActivityChange();
}
}
......
......@@ -106,6 +106,7 @@
},
toViewPage(e) {
let item = e.$wx.currentTarget.dataset.item;
if(this.showLoading) return;
this.showLoading = true;
getGoodsUrl({skuId:item.sourceId,couponUrl:item.couponUrl||null}).then(data=>{
this.showLoading = false;
......
......@@ -504,10 +504,12 @@
// 获取头像安全距离
let statusHeight = this.$app.$options.globalData.statusBarHeight || '';
this.setSafeAreaStyle('top:' + statusHeight + 'px');
this.searchStyle = 'top:' + (statusHeight+12) + 'px'
this.searchStyle = 'top:' + (statusHeight+12) + 'px';
// 获取openid
await this.getOpenId();
// 获取奖品列表
this.videoList = await getPrizeList(options.prizeId);
this.getMainInfo();
flag = true;
......@@ -527,8 +529,6 @@
// 获取活动信息
this.showActivity();
// 获取奖品列表
this.videoList = await getPrizeList(options.prizeId);
},
async onShow() {
// 获取主页信息
......
......@@ -2,7 +2,7 @@
<view>
<view class="search-head">
<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 class="search-cancel" bindtap="search">搜索</view>
</view>
......@@ -72,6 +72,7 @@
toJingdong(event) {
const item = event.$wx.currentTarget.dataset.item;
if(item === undefined) return;
if(this.showLoading) return;
this.showLoading = true;
getGoodsUrl({skuId:item.sourceId,couponUrl:item.couponUrl||null}).then(data=>{
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