Commit 1e47e363 authored by 付清曌's avatar 付清曌

Merge branch 'feature/goods' into 'master'

Feature/goods

See merge request !58
parents 3c3f216e fc194110
This diff is collapsed.
......@@ -15,6 +15,7 @@ import promisify from '@wepy/use-promisify';
wepy.use(promisify);
wepy.use(vuex);
import { checkUpdateVersion } from './common/raffleProbability';
wepy.app({
hooks: {
......@@ -24,8 +25,9 @@ wepy.app({
globalData: {
statusBarHeight: ''
},
async onLaunch() {
onLaunch() {
let that = this;
checkUpdateVersion();
wx.getSystemInfo({
success: function (res) {
that.$options.globalData.statusBarHeight = res.statusBarHeight;
......@@ -50,7 +52,8 @@ wepy.app({
'pages/prize',
'pages/myraffles',
'pages/help',
'pages/morehelp',
'pages/search',
'pages/agreement'
],
window: {
backgroundTextStyle: 'light',
......
......@@ -53,5 +53,14 @@ module.exports = {
},
checkCornCode(params) {
return http.post('/api/user/addCoins', params);
},
getGoodsList(params) {
return http.post(`/api/goods/list/${params}`);
},
getSearchList(params) {
return http.post('/api/goods/query', params);
},
getGoodsUrl(params) {
return http.post('/api/goods/promotionUrl', params);
}
};
......@@ -13,20 +13,10 @@ function computClass (current,index,length,circular) {
function getClass (status) {
var cls=['','green','grey','','red','red'];
var index = status.value || 0;
console.log(status)
return cls[index]
};
function showVideo(item,current,index) {
if(item.showType && item.showType.value ==2) {
if(current === index) {
return true
} else {
return false;
}
}
}
module.exports = {
computClass:computClass,
getClass:getClass,
showVideo:showVideo
}
......@@ -21,6 +21,40 @@ function getProbability (quantity, coinQuantity) {
return value + '/' + value2;
}
}
function checkUpdateVersion() {
// 创建 UpdateManager 实例
const updateManager = wx.getUpdateManager();
// 检测版本更新
updateManager.onCheckForUpdate(function(res) {
console.log(res, '版本更新');
// 请求完新版本信息的回调
if (res.hasUpdate) {
// 监听小程序有版本更新事件
updateManager.onUpdateReady(function() {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success(res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate();
}
}
});
});
updateManager.onUpdateFailed(function() {
// 新版本下载失败
wx.showModal({
title: '已经有新版本咯~',
content: '请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开呦~'
});
});
}
});
}
module.exports = {
getProbability
getProbability,
checkUpdateVersion
};
......@@ -8,8 +8,14 @@ if (env === 'test') {
// baseUrl = 'https://luckiiapi.q-gp.com/yapi/mock/325';
}
const request = async (url, options) => {
const pages = getCurrentPages();
const safeAreaInsetTop = pages && pages.length > 0 ? pages[pages.length - 1].route === 'pages/index' : false;
const pages = getCurrentPages() || [];
let safeAreaInsetTop = false;
if (pages.length === 0) {
// 如果页面还没加载出来,只能说明现在刚进入首页
safeAreaInsetTop = true;
} else if (pages[pages.length - 1].route === 'pages/index') {
safeAreaInsetTop = true;
}
const defaultOptions = {
method: 'post',
header: { 'content-type': 'application/x-www-form-urlencoded' }
......
......@@ -21,7 +21,6 @@
</template>
<script>
import wepy from '@wepy/core';
wepy.component({
props: {
activityList: {
......@@ -39,19 +38,22 @@
activityList(val) {
let list = val || [];
this.list = list;
if (list.length && list.length < 3) {
this.onActivityChange();
}
}
},
methods: {
onActivityChange(e) {
const lastIndex = this.list.length - this.activityDisplayItems;
if (e.$wx.detail.current === lastIndex) {
if (!e || e.$wx.detail.current === lastIndex) {
this.isAuto = false;
// 当最后一个出来的时候等一秒再消失
setTimeout(() => {
this.isActiveDone = 'anima';
setTimeout(() => {
this.isActiveDone = 'anima hide';
}, 2000);
this.isActiveDone = 'hide';
}, 1500);
}, 2000);
}
}
......
<template>
<div class="loading-wrapper">
<van-popup show="{{show}}" close-on-click-overlay="{{false}}" overlay-style="{{overLayStyle}}" round>
<view class="loading" v-show="!overLayStyle">
<van-loading type="spinner">跳转中...</van-loading>
</view>
</van-popup>
</div>
</template>
<script>
import wepy from '@wepy/core';
wepy.component({
props: {
show: {
type: Boolean,
default: false
}
},
data: {
overLayStyle: 'background-color:transparent'
},
watch: {
show(val) {
if (val) {
this.overLayStyle = 'background-color:transparent';
setTimeout(() => {
this.overLayStyle = '';
}, 500);
}
}
},
created() {
},
methods: {
}
});
</script>
<style lang="less">
.loading{
padding:40rpx;
}
</style>
<config>
{
usingComponents: {
'van-popup':'~@/components/vant/popup/index',
'van-loading': '~@/components/vant/loading/index'
}
}
</config>
<wxs module="tools" src="../../common/common.wxs"></wxs>
<template>
<view class="footer">
<swiper
class="footswiper"
display-multiple-items="{{swiperItem}}"
current="{{current}}"
bindchange="moveSwiper"
circular="{{circular}}"
previous-margin="140rpx"
next-margin="120rpx"
catch:touchmove
>
<!--bindtouchstart="touchStart"
bindtouchend="touchEnd"-->
<swiper-item wx:for="{{list}}" wx:key="index">
<view
data-itemid="{{index}}"
bindtap="toViewPage"
data-item="{{item}}"
class="list-item {{item.select?'delete':''}} {{tools.computClass(currentIndex,index,list.length,circular)}}"
bindtouchstart="touchStart"
bindtouchend="touchEnd"
>
<image src="{{item.imgsrc}}" class="img"></image>
<view class="text">{{item.text}}</view>
<p class="price">{{item.price}}</p>
<p class="buy">{{item.people}}人购买</p>
</view>
</swiper-item>
</swiper>
<view>
<view class="footer">
<swiper
class="footswiper"
display-multiple-items="{{swiperItem}}"
duration="300"
current="{{current}}"
bindchange="moveSwiper"
circular="{{circular}}"
previous-margin="140rpx"
next-margin="120rpx"
catch:touchmove
bindanimationfinish="swipermoveDone"
>
<!--bindtouchstart="touchStart"
bindtouchend="touchEnd"-->
<!-- {{item.select?'delete':''}} -->
<swiper-item wx:for="{{list}}" wx:key="index">
<view
data-itemid="{{index}}"
bindtap="toViewPage"
data-item="{{item}}"
class="list-item {{tools.computClass(currentIndex,index,list.length,circular)}}"
>
<van-image use-loading-slot src="{{item.images}}" class="img" width="220rpx" height="210rpx" radius="10rpx" fit="cover">
<van-loading slot="loading" type="spinner" size="20" vertical />
</van-image>
<!--<image src="{{item.images}}" class="img"></image>-->
<view class="title">{{item.title}}</view>
<p class="price">¥{{item.price}}</p>
<p class="buy">{{item.saleCount}}人购买</p>
</view>
</swiper-item>
</swiper>
</view>
<go-loading show="{{showLoading}}"></go-loading>
</view>
</template>
<script>
import wepy from '@wepy/core';
import { getGoodsList, getGoodsUrl } from '../../common/api';
let touchDotX = 0;
let touchDotY = 0;
let page = 0;
wepy.component({
props: {
goodsList: {
type: Array,
default: []
}
},
data: {
swiperItem: 2,
current: 1,
currentIndex: 1, // 商品当前滑动到第几个
circular: false, // 商品是否无限循环
topPage: 0,
lastPage: 0,
list: []
},
watch: {
goodsList(val) {
/* let list = val || [];
this.list = list; */
}
list: [],
showLoading: false,
isListDone: false
},
created() {
// 获取推荐的商品列表
this.list = [{value: 11, text: '白色条纹马克杯,马克吐温同款11', imgsrc: '/static/images/test1.jpg', price: '¥9.89', people: 2200, sku: '100004549235'},
{value: 12, text: '白色条纹马克杯,马克吐温同款12', imgsrc: '/static/images/test2.png', price: '¥19.20', people: '2200', sku: '100004549235'},
{value: 13, text: '白色条纹马克杯,马克吐温同款13', imgsrc: '/static/images/peo1.jpg', price: '¥39.08', people: 2200, sku: '100004549235'},
{value: 14, text: '白色条纹马克杯,马克吐温同款14', imgsrc: '/static/images/peo2.jpg', price: '¥599.20', people: 2200, sku: '100004549235'},
{value: 15, text: '白色条纹马克杯,马克吐温同款15', imgsrc: '/static/images/peo3.jpg', price: '¥2399.01', people: 2200, sku: '100004549235'}, {value: 11, text: '白色条纹马克杯,马克吐温同款11', imgsrc: '/static/images/test1.jpg', price: '¥9.89', people: 2200, sku: '100004549235'},
{value: 12, text: '白色条纹马克杯,马克吐温同款12', imgsrc: '/static/images/test2.png', price: '¥19.20', people: '2200', sku: '100004549235'}
];
attached() {
this.getList();
},
methods: {
moveSwiper(e) {
......@@ -89,49 +79,48 @@
if (e.$wx.detail.source === 'touch') {
let current = e.$wx.detail.current;
let totalPage = 0;
let nextlist = [
{value: 11, text: '白色条纹马克杯,马克吐温同款11', imgsrc: '/static/images/test1.jpg', price: '¥9.89', people: 2200, sku: '100004549235'},
{value: 12, text: '白色条纹马克杯,马克吐温同款12', imgsrc: '/static/images/test2.png', price: '¥19.20', people: '2200', sku: '100004549235'},
{value: 13, text: '白色条纹马克杯,马克吐温同款13', imgsrc: '/static/images/peo1.jpg', price: '¥39.08', people: 2200, sku: '100004549235'},
{value: 14, text: '白色条纹马克杯,马克吐温同款14', imgsrc: '/static/images/peo2.jpg', price: '¥599.20', people: 2200, sku: '100004549235'},
{value: 15, text: '白色条纹马克杯,马克吐温同款15', imgsrc: '/static/images/peo3.jpg', price: '¥2399.01', people: 2200, sku: '100004549235'}
];
let that = this;
/* if(current <= 2) {
debounce(setTimeout(function(){
that.topPage +=1;
if(that.lastPage+that.topPage >= totalPage) {
that.circular = true;
return;
}
that.list = [...newlist, ...that.list];
// that.current = current+1;
// that.currentIndex = current+1;
},1000),500);
} */
if (current >= this.list.length - 3) {
debounce(setTimeout(function() {
that.lastPage += 1;
if (that.lastPage + that.topPage >= totalPage) {
that.getList();
// 当新得到的list长度不足20个时,表明商品全部得到,开启无限循环
/* if(nextlist.length < goodsNum) {
that.circular = true;
}
that.list = [...that.list, ...nextlist];
that.list = [...that.list, ...nextlist]; */
}, 1000), 500);
}
}
},
getList() {
if (this.isListDone) return;
page++;
getGoodsList(page).then(data => {
// 没有更多了
if (!data.hasMore) {
// 如果小于4个商品,一行就能显示,不用循环
this.list.length > 4 && (this.circular = true);
this.isListDone = true;
}
this.list = [...this.list, ...data.items];
});
},
toViewPage(e) {
let item = e.$wx.currentTarget.dataset.item;
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: 'pages/item/detail/detail?sku=' + item.sku, // 跳转小程序的路径
// 有效值 develop(开发版),trial(体验版),release(正式版)
envVersion: 'release',
success(res) {
// console.log('跳转成功');
}
if (this.showLoading) return;
this.showLoading = true;
getGoodsUrl({skuId: item.sourceId, couponUrl: item.couponUrl || null}).then(data => {
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(data), // 跳转小程序的路径
// 有效值 develop(开发版),trial(体验版),release(正式版)
envVersion: 'release',
success(res) {
}
});
this.showLoading = false;
}).catch(() => {
this.showLoading = false;
});
},
touchStart (event) {
......@@ -199,7 +188,6 @@
if (list.length <= 4) {
this.circular = false;
}
console.log(current.itemid, this.currentIndex, this.current, 111);
if (current.itemid >= list.length - 1) {
this.current = this.currentIndex - 1;
}
......@@ -214,7 +202,6 @@
that.current = Math.max(that.current - 1, 0);
}
// 删除完成之后
console.log(current.itemid, that.currentIndex, that.current, 222);
}, 500);
}
}
......@@ -245,13 +232,13 @@
position: relative;
}
.list-item .img {
width: 210rpx;
width: 220rpx;
display: block;
height: 210rpx;
margin:0 auto;
border-radius: 10rpx;
}
.list-item .text {
.list-item .title {
font-size: @font-small;
text-overflow: ellipsis;
display: -webkit-box;
......@@ -259,6 +246,7 @@
-webkit-box-orient: vertical;
overflow: hidden;
line-height:24rpx;
word-break:break-all;
margin-top:10rpx;
}
.list-item .price{
......@@ -286,5 +274,11 @@
}
</style>
<config>
{}
{
"usingComponents": {
"go-loading": "~@/components/custom/goloading",
"van-image": "~@/components/vant/image/index",
"van-loading": "~@/components/vant/loading/index",
}
}
</config>
......@@ -7,7 +7,7 @@
</div>
<div class="popup-item">
<button class="help-button" open-type="contact"></button>
<image class="image" src="/static/images/feedback@2x.png"></image>
<image class="image" src="/static/images/feedback.png"></image>
<span class="desc">问题反馈</span>
</div>
</div>
......@@ -26,6 +26,7 @@
data: {
menus: [
{ img: '/static/images/awards@2x.png', title: '我的抽奖', path: '/pages/myraffles' },
{ img: '/static/images/order.png', title: '我的订单', path: 'jd' },
{ img: '/static/images/help@2x.png', title: '规则与帮助', path: '/pages/help' }
],
show: false,
......@@ -54,6 +55,17 @@
},
goNextPage: function(path) {
this.$emit('showMenu', false);
if (path === 'jd') {
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: 'pages/order/list/list',
// 有效值 develop(开发版),trial(体验版),release(正式版)
envVersion: 'release',
success(res) {
}
});
return;
}
wx.navigateTo({
url: path
});
......@@ -72,13 +84,13 @@
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
z-index: 9;
z-index: 10;
// animation: menuEnter .3s linear forwards;
.popup-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
width: 350rpx;
width: 430rpx;
height: 114rpx;
position: absolute;
left: 20rpx;
......
......@@ -20,8 +20,9 @@
<div class="content">
<div class="des">恭喜您!</div>
<image class="image" src="/static/images/gold@2x.png"></image>
<div class="info">通过邀请以下好友,您获得{{goldNum}}克币</div>
<div class="user" :class="{'one-user': inviteinfo.length === 1 }">
<div class="info" v-if="showFriends">通过邀请以下好友,您获得{{goldNum}}克币</div>
<div class="info padding" v-if="!showFriends">购买成功,获得{{goldNum}}克币</div>
<div class="user" :class="{'one-user': inviteinfo.length === 1 }" v-if="showFriends">
<image class="user-img" v-for="item in users" :src="item.avatarUrl"></image>
<span class="user-rest" v-if="inviteinfo.length > 3">...</span>
</div>
......@@ -39,7 +40,8 @@
props: {
inviteinfo: {
type: Array
}
},
type: String
},
computed: {
goldNum() {
......@@ -56,8 +58,17 @@
p.push(n.accountItemId);
return p;
}, []);
},
showFriends() {
if (this.type === 'buy') {
return false;
} else {
return true;
}
}
},
created() {
},
methods: {
getGold: function() {
this.$emit('getSharedGold', {
......@@ -230,6 +241,9 @@
text-overflow: ellipsis;
font-size: @font-middle;
text-align: center;
&.padding {
padding-bottom:25rpx;
}
}
.user {
height: 84rpx;
......
......@@ -73,7 +73,7 @@
lotteryUrl: '/static/images/lottery@2x.png',
containerStyle: '',
flyAnimation: false,
isFirst:true,
isFirst: true
},
props: {
title: '',
......
<template>
<web-view src="https://luckii.q-gp.com/agreement.html"></web-view>
</template>
<script>
import wepy from '@wepy/core';
wepy.page({
data: {
}
});
</script>
<config>
{
}
</config>
This diff is collapsed.
......@@ -78,7 +78,7 @@
<view class="prize-info">中奖概率: {{chance}}</view>
<view class="prize-info">中奖结果: <text class="red">已中奖</text></view>
</view>
<view class="prize-address" v-show="!prize.cash">
<view class="prize-address" v-show="!prize.cash&&prize.cash!==undefined">
<view class="address-title">添加收货地址</view>
<view class="address-cont">
<van-field value="{{name}}" data-form="name" placeholder="收货人" bind:input ="setValue"></van-field>
......
......@@ -92,6 +92,7 @@
border-radius: 4rpx;
vertical-align: middle;
position: relative;
margin-right:10rpx;
&.checked{
background-color: @maincolor;
border:3rpx solid @maincolor;
......@@ -107,9 +108,11 @@
}
}
.checktext{
margin-left:10rpx;
position: relative;
top:3rpx;
&.red {
color:@maincolor
}
}
}
.joinin {
......@@ -227,7 +230,9 @@
<view class="checkimg {{isCheck?'checked':''}}">
<van-icon name="success" color="#fff" size="24rpx" class="checkicon {{isCheck?'':'hide'}}"/>
</view>
<text class="checktext">我同意花费所有克币参与抽奖,并承诺商品不退货。</text>
<text class="checktext">阅读</text>
<text class="checktext red" catchtap="toAgreement">《隐私协议》</text>
<text class="checktext">并同意花费所有克币参与抽奖且商品不退货</text>
</view>
<button class="joinin" open-type="{{opentype}}" bindtap="joinin" bindgetphonenumber="getPhoneNumber">{{btnfont}}</button>
<van-notify id="van-notify" />
......@@ -253,7 +258,7 @@
import Dialog from '../components/vant/dialog/dialog';
import { updateUserPhone, confirmRaffle, register, login, getAwardsDetail, checkInnerCode } from '../common/api';
import store from '../store';
let hasPhone = false, innerActivity= '', batchId = null;
let innerActivity = '';
wepy.page({
store,
data: {
......@@ -269,7 +274,9 @@
isError: false,
code: '',
errorText: '',
errorBtn: '确定'
errorBtn: '确定',
hasPhone: false,
batchId: null
},
methods: {
check() {
......@@ -284,7 +291,7 @@
updateUserPhone(detail).then(() => {
wx.setStorageSync('hasPhone', true);
that.btnfont = '立即参与';
hasPhone = true;
that.hasPhone = true;
that.joinin();
}).catch(() => {
that.btnfont = '立即参与';
......@@ -317,12 +324,12 @@
await register(store.state.userInfo);
wx.setStorageSync('isRegister', true);
}
if (!batchId) {
if (!this.batchId) {
Notify({message: '数据加载中,请稍后重试!'});
return;
}
this.btnfont = '参与中...';
confirmRaffle({batchId: batchId}).then(data => {
confirmRaffle({batchId: this.batchId}).then(data => {
this.btnfont = '立即参与';
let code = data.joinCode;
if (code === undefined) code = 3;
......@@ -334,7 +341,7 @@
title: title[code],
message: message[code]
}).then(() => {
wx.navigateBack({url: '/pages/index'});
wx.navigateBack({delta: 1});
});
}).catch(() => {
this.btnfont = '立即参与';
......@@ -345,7 +352,7 @@
Notify({message: '勾选同意后才可以抽奖!'});
return;
}
if (hasPhone) {
if (this.hasPhone) {
// 当有innerActivity并且没有邀请码(没有验证过)并且不是VIP的时候才显示modal
if (innerActivity && !innerActivity.haveCode && !innerActivity.vip) {
this.showModal();
......@@ -357,7 +364,7 @@
async getProgress(id) {
let detail = await getAwardsDetail({ prizeId: id });
detail = detail || {};
batchId = detail.id;
this.batchId = detail.id;
if (detail.quantity) {
if (detail.join > detail.quantity) detail.join = detail.quantity;
const progressFloat = detail.join / detail.quantity * 100;
......@@ -378,6 +385,9 @@
this.isError = false;
this.code = '';
},
toAgreement() {
wx.navigateTo({url: '/pages/agreement'});
},
checkCode () {
if (this.code === '') {
this.errorText = '请输入邀请码';
......@@ -406,7 +416,7 @@
},
computed: {
opentype() {
if (this.isCheck && !hasPhone) {
if (this.isCheck && !this.hasPhone) {
return 'getPhoneNumber';
} else {
return '';
......@@ -427,7 +437,7 @@
this.name = name;
this.chance = chance;
this.photoUrl = decodeURIComponent(photoUrl);
hasPhone = wx.getStorageSync('hasPhone');
this.hasPhone = wx.getStorageSync('hasPhone');
innerActivity = wx.getStorageSync('innerActivity');
}
});
......
<template>
<view>
<view class="search-head">
<view class="search-wrapper">
<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>
<view class="search-list" v-show="list.length">
<view class="search-item" wx:for="{{list}}" wx:key="index" bindtap="toJingdong" data-item="{{item}}">
<view class="image-left">
<van-image use-loading-slot src="{{item.images}}" class="img" width="240rpx" height="240rpx" radius="10rpx" fit="cover">
<van-loading slot="loading" type="spinner" size="20" vertical />
</van-image>
</view>
<view class="cont-right">
<view class="cont-wrap">
<view class="cont-title">
{{item.title}}
</view>
<view class="cont-price"><text class="dollar">¥</text>{{item.price}}</view>
<view class="cont-count">{{item.shopName || '京东自营店'}}</view>
</view>
</view>
</view>
</view>
<view class="search-last" v-show="isLoading"><van-loading type="spinner" text-size="26rpx">加载中</van-loading></view>
<view class="search-last" v-show="isDone">没有更多了~</view>
<go-loading show="{{showLoading}}"></go-loading>
</view>
</template>
<script>
import wepy from '@wepy/core';
import { getSearchList, getGoodsUrl } from '../common/api';
let page = 1;
wepy.page({
data: {
list: [],
isDone: false,
isLoading: false,
showLoading: false,
value: ''
},
methods: {
setValue(event) {
this.value = event.$wx.detail || '';
},
search() {
page = 1;
this.list = [];
this.getList();
},
getList() {
this.isLoading = true;
this.isDone = false;
getSearchList({keyword: this.value, page: page}).then(data => {
this.isLoading = false;
if (!data.hasMore) {
this.isDone = true;
}
this.list = [...this.list, ...data.items];
}).catch(() => {
this.isLoading = false;
});
},
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 => {
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(data), // 跳转小程序的路径
// 有效值 develop(开发版),trial(体验版),release(正式版)
envVersion: 'release',
success(res) {
}
});
this.showLoading = false;
}).catch(() => {
this.showLoading = false;
});
}
},
onReachBottom() {
if (this.isDone) return;
page++;
this.getList();
}
});
</script>
<config>
{
navigationBarTitleText: '搜索',
"usingComponents": {
"van-field": "../components/vant/field/index",
"van-image": "../components/vant/image/index",
"van-loading": "../components/vant/loading/index",
"go-loading": "~@/components/custom/goloading",
}
}
</config>
<style lang="less">
@import "../style/common";
.search-head{
background-color: @whiteback;
padding:35rpx 30rpx;
position: relative;
.search-wrapper{
width:88%;
.van-cell {
border:1rpx solid @maincolor;
background-color: #f6f6f6;
border-radius: 35rpx;
padding:10rpx 25rpx;
font-size: 26rpx;
}
.van-cell::after{
border:none;
}
.van-field__input{
height:30rpx;
outline:none;
}
}
.search-cancel{
font-size: @font-middle;
width:90rpx;
height:60rpx;
position: absolute;
right:10rpx;
top:40rpx;
text-align: center;
line-height:60rpx;
}
}
.search-list {
background-color: @whiteback;
margin-top:20rpx;
padding-left:30rpx;
}
.search-item {
padding-top:30rpx;
overflow: hidden;
}
.image-left {
width: 240rpx;
float: left;
height: 240rpx;
.img{
width:100%;
height:100%;
}
}
.cont-right {
padding-left:260rpx;
.cont-wrap {
border-bottom:1rpx solid #E6E6E6;
min-height: 240rpx;
padding-bottom: 20rpx;
padding-right:30rpx;
position: relative;
}
.cont-title {
font-size: @font-middle;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2; //行数
-webkit-box-orient: vertical;
overflow: hidden;
word-break:break-all;
}
.cont-count {
position: absolute;
bottom:20rpx;
left:0;
font-size: @font-common;
color:@lightgrey;
}
.cont-price {
.dollar{
font-size: @font-common;
}
position: absolute;
bottom:55rpx;
left:0;
font-size:34rpx;
color:@maincolor;
}
}
.search-item:last-child {
.cont-wrap {
border-bottom: none;
}
}
.search-last {
text-align: center;
padding:30rpx 0;
font-size: @font-middle;
color:@greycolor;
}
</style>
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