Merge pull request 'xbx' (#54) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/54
This commit is contained in:
		
						commit
						d925db690b
					
				@ -6,7 +6,9 @@
 | 
			
		||||
                'font-size':'32rpx',
 | 
			
		||||
                'color':'#FF780F',
 | 
			
		||||
                'overflow':'unset'
 | 
			
		||||
            }"></u-search>
 | 
			
		||||
            }"
 | 
			
		||||
            @search="search"
 | 
			
		||||
            ></u-search>
 | 
			
		||||
        </view>
 | 
			
		||||
        <view class="list">
 | 
			
		||||
            <view class="title">搜索发现</view>
 | 
			
		||||
@ -23,6 +25,18 @@ export default {
 | 
			
		||||
        return{
 | 
			
		||||
            keyword:""
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    methods:{
 | 
			
		||||
        search(value){
 | 
			
		||||
            // console.log(value)
 | 
			
		||||
            this.$u.route({
 | 
			
		||||
                url:"/pageB/search/out",
 | 
			
		||||
                params:{
 | 
			
		||||
                    value,
 | 
			
		||||
                    type:"shop"
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
@ -4,8 +4,8 @@
 | 
			
		||||
            <image></image>
 | 
			
		||||
            <u-search placeholder="搜索您需要的商品" v-model="keyword" height="60" :show-action="false"></u-search>
 | 
			
		||||
        </view>
 | 
			
		||||
        <u-tabs-swiper @change="tabsChange" :show-bar="false" :bold="false" :font-size="32" active-color="#FF780F" ref="uTabs" :list="list" :is-scroll="false" style="border-bottom: 1px solid #ececec;flex-shrink:0" height="88"></u-tabs-swiper>
 | 
			
		||||
        <swiper class="swiper"  :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
 | 
			
		||||
        <u-tabs-swiper v-if="type == 'dianpu'" @change="tabsChange" :show-bar="false" :bold="false" :font-size="32" active-color="#FF780F" ref="uTabs" :list="list" :is-scroll="false" style="border-bottom: 1px solid #ececec;flex-shrink:0" height="88"></u-tabs-swiper>
 | 
			
		||||
        <swiper  v-if="type == 'dianpu'" class="swiper"  :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
 | 
			
		||||
            <swiper-item>
 | 
			
		||||
                <scroll-view :scroll-y="true" style="height:100%">
 | 
			
		||||
                    <view style="padding-top:30rpx">
 | 
			
		||||
@ -25,6 +25,18 @@
 | 
			
		||||
                </scroll-view>
 | 
			
		||||
            </swiper-item>
 | 
			
		||||
        </swiper>
 | 
			
		||||
        <view class="select">
 | 
			
		||||
            <view  @click="sx(1)" data-type="xl">销量</view>
 | 
			
		||||
            <view class="xz" @click="sx(2)">
 | 
			
		||||
                <text>价格</text>
 | 
			
		||||
                <view class="jiage">
 | 
			
		||||
                    <view class="top"></view>
 | 
			
		||||
                    <view class="bottom bottomxz"></view>
 | 
			
		||||
                </view>
 | 
			
		||||
            </view>
 | 
			
		||||
            <view  data-type="hp"  @click="sx(3)">好评</view>
 | 
			
		||||
        </view>
 | 
			
		||||
 | 
			
		||||
    </view>
 | 
			
		||||
</template>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
@ -59,6 +71,49 @@
 | 
			
		||||
            padding-left: 30rpx;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    .select{
 | 
			
		||||
        width: 100%;
 | 
			
		||||
        height: 89rpx;
 | 
			
		||||
        border-bottom: 1rpx solid #ececec;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        padding: 0 40rpx;
 | 
			
		||||
        flex-shrink: 0;
 | 
			
		||||
        justify-content: space-between;
 | 
			
		||||
        >view{
 | 
			
		||||
            font-size: 32rpx;
 | 
			
		||||
            color: #333;
 | 
			
		||||
            display: flex;
 | 
			
		||||
            font-weight:400;
 | 
			
		||||
            .jiage{
 | 
			
		||||
                display: flex;
 | 
			
		||||
                flex-direction: column;
 | 
			
		||||
                .top{ 
 | 
			
		||||
                    width: 12rpx;
 | 
			
		||||
                    border-bottom: 12rpx solid #707070;
 | 
			
		||||
                    border-left: 11rpx solid #fff ;
 | 
			
		||||
                    border-right: 11rpx solid #fff ;
 | 
			
		||||
                    margin-bottom: 2rpx;
 | 
			
		||||
                }
 | 
			
		||||
                .bottom{
 | 
			
		||||
                    width: 12rpx;
 | 
			
		||||
                    border-top: 12rpx solid #707070;
 | 
			
		||||
                    border-left: 11rpx solid #fff ;
 | 
			
		||||
                    border-right: 11rpx solid #fff ;
 | 
			
		||||
                }
 | 
			
		||||
                .topxz{
 | 
			
		||||
                    border-bottom: 12rpx solid #FF780F;
 | 
			
		||||
                }
 | 
			
		||||
                .bottomxz{
 | 
			
		||||
                    border-top: 12rpx solid #FF780F;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        .xz{
 | 
			
		||||
            color:#FF780F;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<script>
 | 
			
		||||
@ -81,7 +136,8 @@ export default {
 | 
			
		||||
            ],
 | 
			
		||||
            current: 0, 
 | 
			
		||||
            swiperCurrent: 0,
 | 
			
		||||
            keyword:""
 | 
			
		||||
            keyword:"",
 | 
			
		||||
            type:""
 | 
			
		||||
        }
 | 
			
		||||
    }, methods: { 
 | 
			
		||||
        tabsChange(index) {
 | 
			
		||||
@ -96,7 +152,14 @@ export default {
 | 
			
		||||
            this.$refs.uTabs.setFinishCurrent(current); 
 | 
			
		||||
            this.swiperCurrent = current; 
 | 
			
		||||
            this.current = current; 
 | 
			
		||||
        },
 | 
			
		||||
        sx(type){
 | 
			
		||||
            console.log(type)
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    onLoad(o){
 | 
			
		||||
        this.type = o.type
 | 
			
		||||
        this.keyword = o.value
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
@ -6,7 +6,9 @@
 | 
			
		||||
                <text class="u-line-1">{{ area }}</text>
 | 
			
		||||
                <image src="/static/image/shop/2.png"></image>
 | 
			
		||||
            </view>
 | 
			
		||||
            <u-search placeholder="日照香炉生紫烟" v-model="keyword" :show-action="false" bg-color="#fff" border-color="#999999"></u-search>
 | 
			
		||||
            <view @click="sousuo">
 | 
			
		||||
                <u-search placeholder="日照香炉生紫烟" v-model="keyword" :show-action="false" bg-color="#fff" border-color="#999999" :disabled="true"></u-search>
 | 
			
		||||
            </view>
 | 
			
		||||
            <image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
 | 
			
		||||
        </view>
 | 
			
		||||
        <u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
 | 
			
		||||
@ -91,6 +93,12 @@ export default {
 | 
			
		||||
		this.getGoodsRecommend();
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
        sousuo(){
 | 
			
		||||
            // console.log(123)
 | 
			
		||||
            this.$u.route({
 | 
			
		||||
                url:"pageB/search/index"
 | 
			
		||||
            })
 | 
			
		||||
        },
 | 
			
		||||
		getShopTopList() {
 | 
			
		||||
			this.$u.api.getShopTopList().then((res)=>{
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user