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
b5ae19cc
Commit
b5ae19cc
authored
Jun 18, 2020
by
ziyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement: 首页搜索
parent
e70a0a93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
3 deletions
+78
-3
app.wpy
src/app.wpy
+1
-0
index.wpy
src/pages/index.wpy
+25
-3
search.wpy
src/pages/search.wpy
+52
-0
No files found.
src/app.wpy
View file @
b5ae19cc
...
...
@@ -50,6 +50,7 @@ wepy.app({
'pages/prize',
'pages/myraffles',
'pages/help',
'pages/search'
],
window: {
backgroundTextStyle: 'light',
...
...
src/pages/index.wpy
View file @
b5ae19cc
...
...
@@ -41,6 +41,19 @@
height: 80rpx;
border-radius: 50%;
}
.search{
position: fixed;
z-index: 10;
top:100rpx;
left: 310rpx;
font-size: @font-middle;
color: @whitecolor;
.searchimg {
width: 34rpx;
height: 34rpx;
vertical-align: middle;
}
}
@-webkit-keyframes fadeout {
0% {
opacity:1 ;
...
...
@@ -164,12 +177,16 @@
<prize-list :videoList="videoList" :userAccount="mainInfo && mainInfo.account && mainInfo.account.quantity || 0" bindchange="changeVideo" @getAwardsInfo="getAwardsInfo">
</prize-list>
</view>
<view class="userInfo" style="{{
safeAreaStyle
}}">
<view class="userInfo" style="{{
safeAreaStyle
}}">
<button v-if="authmodal" open-type="getUserInfo" bindgetuserinfo="getUserInfo" class="userinfo-button">
<image class="userinfo-image" :src="userInfo.avatarUrl"></image>
</button>
<image v-if="!authmodal" @tap="showMenu(!showModal)" :src="userInfo.avatarUrl" mode="cover" class="userimage"></image>
</view>
<!--<view class="search" style="{{ searchStyle }}" bindtap="toSearch">
<image src="/static/images/search.png" class="searchimg"></image>
搜索
</view>-->
<view>
<gold type="gold" :des="mainInfo && mainInfo.account && mainInfo.account.quantity || 0" :gold="sign" :isReceive="isReceive" @resetAddGold="resetAddGold" @showCorn="cornModalShow"></gold>
<sign type="sign" des="签到" :sign="sign" @sign-in="signIn"></sign>
...
...
@@ -182,7 +199,7 @@
<shared-popup v-if="showModal === 1" :inviteinfo="mainInfo && mainInfo.inviteRecord" @getSharedGold="getSharedGold"/>
<popup @showMenu="showMenu" :showMenus="showModal === 3"/>
<!--商品推荐列表-->
<
goods-list></goods-list
>
<
!--<goods-list></goods-list>--
>
<van-dialog id="van-dialog"/>
<van-notify id="van-notify"/>
<van-popup show="{{ cornModal }}" bind:close="cornModalClose" custom-style="background-color:transparent">
...
...
@@ -222,7 +239,8 @@
cornModal: false,
cornCode: '', // 克币充值码
cornText: '',
cornTextShow: false
cornTextShow: false,
searchStyle:''
},
computed: {
...
...
@@ -432,6 +450,9 @@
},
resetAddGold() {
this.isReceive = false;
},
toSearch() {
wx.navigateTo({url: '/pages/search'});
}
},
async onLoad (options) {
...
...
@@ -444,6 +465,7 @@
// 获取头像安全距离
let statusHeight = this.$app.$options.globalData.statusBarHeight || '';
this.setSafeAreaStyle('top:' + statusHeight + 'px');
this.searchStyle = 'top:' + (statusHeight+12) + 'px'
// 获取openid
await this.getOpenId();
...
...
src/pages/search.wpy
View file @
b5ae19cc
<template>
<view>
<view class="search-head">
<view class="search-wrapper">
<van-field clearable left-icon="/static/images/searchgrey.png" placeholder="搜索"></van-field>
</view>
</view>
</view>
</template>
<script>
import wepy from '@wepy/core';
wepy.page({
data: {
}
});
</script>
<config>
{
navigationBarTitleText: 'Luckii',
"usingComponents": {
"van-field": "../components/vant/field/index",
}
}
</config>
<style lang="less">
@import "../style/common";
.search-head{
background-color: @whiteback;
padding:35rpx 30rpx;
border-radius:0 0 10rpx 10rpx;
.search-wrapper{
width:88%;
.van-cell {
border:1rpx solid @maincolor;
background-color: #f6f6f6;
border-radius: 30rpx;
padding:15rpx 20rpx;
font-size: 26rpx;
}
.van-cell__left-icon-wrap {
height:28rpx;
}
.van-field__input{
height:30rpx;
}
}
.search-cont {
padding: 15rpx 20rpx;
}
}
</style>
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