Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mini-program-wepy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
mini-program-wepy
Commits
1739e3ce
Commit
1739e3ce
authored
Jun 29, 2020
by
ziyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement: 优化
parent
6f5ee41c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
activityList.wpy
src/components/custom/activityList.wpy
+1
-1
goodsList.wpy
src/components/custom/goodsList.wpy
+1
-0
index.wpy
src/pages/index.wpy
+4
-4
search.wpy
src/pages/search.wpy
+2
-1
No files found.
src/components/custom/activityList.wpy
View file @
1739e3ce
...
...
@@ -38,7 +38,7 @@
activityList(val) {
let list = val || [];
this.list = list;
if(list.length < 3) {
if(list.length
&& list.length
< 3) {
this.onActivityChange();
}
}
...
...
src/components/custom/goodsList.wpy
View file @
1739e3ce
...
...
@@ -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;
...
...
src/pages/index.wpy
View file @
1739e3ce
...
...
@@ -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() {
// 获取主页信息
...
...
src/pages/search.wpy
View file @
1739e3ce
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment