123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- <template>
- <view class="">
- <u-navbar
- :title="title"
- :placeholder="true"
- :autoBack="false"
- @leftClick="leftClick"
- :safeAreaInsetTop="true"
- >
- </u-navbar>
- <view class="search-wrap">
- <u-search
- placeholder="请输入关键词"
- :clearabled="true"
- :showAction="false"
- height="80rpx"
- @search="search"
- @custom="search"
- @clear="reloadList"
- bgColor="#fff"
- borderColor="#ee0808"
- v-model="params.goodsName">
- </u-search>
- </view>
-
- {{item.name}}
- <mescroll-body class="" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
- <view class="page-wrap" >
- <view class="" v-for="item in dataList" :key="item.id" @click="bookticket(item)">
- <view class="programme">
- <image class="img" :src="item.showImg" ></image>
- <view class="text u-flex u-row-between">
- <view class="left">
- <view class="name">{{item.name}}</view>
- </view>
- <view class="btn" @click="bookticket(item)">立即报名</view>
- </view>
- </view>
- </view>
- </view>
- </mescroll-body>
- <u-toast ref="uToast"></u-toast>
- </view>
- </template>
- <script>
-
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin],
- components: {
-
- },
- data() {
- return {
- staticUrl:this.$commonConfig.staticUrl,
- downOption: {},
-
- upOption: {
- page: {
- size: 10
- },
- noMoreSize: 3,
- empty: {
- tip: '没有搜到相关结果'
- }
- },
- title:'搜索',
- params:{
- name:'',
-
- },
-
- dataList: [],
- searchHistory:[],
- }
- },
- onLoad(page) {
- let that = this;
- this.params.name = page.keyword;
- uni.getStorage({
- key:'searchgoodshistory',
- success: function(storagedata) {
- that.searchHistory = storagedata.data;
- console.log('storagedata',storagedata.data);
- }
- })
- },
- onShow() {
- },
- methods: {
- leftClick(e){
- let pages = getCurrentPages();
- if(pages.length==1){
- uni.$u.route('/pages/index/index')
- }else{
- uni.navigateBack()
- };
- },
-
- </script>
- <style>
- page{
- background-color: #f4f4f4;
- }
- </style>
- <style lang="scss" scoped>
- .search-history{
- color: #333333;
- margin-bottom: 30rpx;
- .search-title{
- font-size: 32rpx;
- font-weight: 600;
- line-height: 45rpx;
- margin-bottom: 20rpx;
- }
- .history{
- display: inline-block;
- height: 48rpx;
- line-height: 48rpx;
- background: #F5F5F5;
- border-radius: 24rpx;
- padding: 0 24rpx;
- min-width: 100rpx;
- margin-left: 20rpx;
- margin-bottom: 20rpx;
- text-align: center;
- }
- }
- .programme{
- margin-bottom: 24rpx;
- }
- </style>
|