parent
66b4d2baca
commit
6d936e67da
@ -1,36 +1,65 @@ |
||||
<template> |
||||
<view class="presale"> |
||||
<view class="title">预售规则:</view> |
||||
<view class="p">1、选择心仪的商品,邀请好友一起砍价,每次砍价金额以页面显示为准,参与好友越多商品到手价越低。</view> |
||||
<view class="p">2、砍价商品会设置可砍金额,在规定时间内砍到可砍金额后即可按对应金额优惠下单。选择下单购买后该笔砍价订单不再支持继续砍价。</view> |
||||
<view class="p">3、发起砍价后,需要在指定时间内完成砍价 (以页面显示为准),未完成最终砍价可按已砍金额进行下单购买,砍价进行中也可按已砍金额进行下单购买</view> |
||||
<view class="p">4、砍价结束后,需要在指定时间内完成下单 (以页面显示为准),未在指定时间内完成下单所造成的砍价优惠无法使用,平台不再额外补发。</view> |
||||
<view class="p">5、每个新用户 (注册24小时内的用户) 可帮好友完成一次砍价,如出现用户ID不同,但存在下列情形的: 包括但不限于微信账户、收货人姓名、详细地址、联系方式、支付信息、IP地址、设备号等信息的任意一项或数项相同或重叠的,均将被认定为同一用户。 同一设备仅支持一个账号登录进行该活动。</view> |
||||
<view class="p"> |
||||
6、如小当严选发现用户存在弄虚作假、作弊、套现、洗钱、赌博等违规行为 (包括并不仅限于恶意刷单、非正常手段砍成,使用非法工具分享、下载、安装、注册、登录多个账号及其他不正当手段) 侵害小当严选利益的,小当严选有权对用户进行异常标记,小当严选将取消用户的活动资格并有权不发放奖励、撤销剩余奖励、收回用户可领取的奖励,追讨已发放的奖励,并保留追究该用户责任的权利。 |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
</script> |
||||
|
||||
<view class="p" v-html="content"></view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import img from "@/static/rank/top.png" |
||||
import * as Api from '@/api/activity' |
||||
export default { |
||||
data() { |
||||
return { |
||||
background: { |
||||
background: 'url(' + img + ') center top no-repeat', |
||||
backgroundSize: '100% auto', |
||||
}, |
||||
content: '', |
||||
type: 4 |
||||
} |
||||
}, |
||||
onLoad(op) { |
||||
uni.setNavigationBarTitle({ |
||||
title: op.type == 5 ? '预售规则' : '排行榜规则' |
||||
}) |
||||
this.type = op.type |
||||
this.getCarouselList(op.type) |
||||
}, |
||||
onShow() {}, |
||||
methods: { |
||||
// 获取预售规则 |
||||
getCarouselList(type) { |
||||
const app = this; |
||||
Api.getImage({ |
||||
type: type |
||||
}) |
||||
.then(result => { |
||||
this.content = result.data.content[0] |
||||
}) |
||||
.finally(() => app.isLoading = false) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.presale{ |
||||
.presale { |
||||
height: 100vh; |
||||
background-color: #fff; |
||||
padding: 0 40rpx; |
||||
overflow-y: auto; |
||||
.title{ |
||||
|
||||
.title { |
||||
padding: 40rpx 0; |
||||
font-size: 32rpx; |
||||
font-weight: 500; |
||||
color: #000000; |
||||
} |
||||
.p{ |
||||
|
||||
.p { |
||||
font-size: 26rpx; |
||||
line-height: 46rpx; |
||||
color: #212121; |
||||
} |
||||
} |
||||
</style> |
||||
} |
||||
</style> |
||||
|
@ -1,123 +1,198 @@ |
||||
<template> |
||||
<view class="record"> |
||||
<view class="item" v-for="o in 10" :key="o"> |
||||
<template> |
||||
<view class="record"> |
||||
<view class="item" v-for="(item,index) in presaList" :key="index"> |
||||
<view class="hd"> |
||||
<image src="@/static/home/phone.jpg"></image> |
||||
<image :src="item.image"></image> |
||||
<view class="info"> |
||||
<view class="a">iphone13 绿色 128GBiphone13 绿色 128GBiphone13 绿色 128GBiphone13 绿色 128GB</view> |
||||
<view class="b"><text>倒计时</text><u-count-down :timestamp="timestamp" format="HH:mm:ss"></u-count-down></view> |
||||
<view class="c">预约价:¥<text>3599</text></view> |
||||
<view class="a">{{item.goods_name}}</view> |
||||
<view class="b"><text>倒计时</text> |
||||
<u-count-down :timestamp="item.p_time"></u-count-down> |
||||
</view> |
||||
<view class="c">预约价:¥<text>{{item.goods_price_min}}</text></view> |
||||
</view> |
||||
<view class="status">已预约</view> |
||||
</view> |
||||
<view class="bd"> |
||||
<view class="btn">取消</view> |
||||
<view class="btn btn-01">详情</view> |
||||
<view class="btn" @click="onCancel(item)">取消预约</view> |
||||
<!-- <view class="btn btn-01">详情</view> --> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
timestamp: 24*3600*1000, |
||||
}; |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.record{ |
||||
padding: 0 16rpx 20rpx; |
||||
overflow: hidden; |
||||
.item{ |
||||
width: 100%; |
||||
padding: 0 30rpx; |
||||
box-sizing: border-box; |
||||
background-color: #fff; |
||||
margin-top: 20rpx; |
||||
.hd{ |
||||
display: flex; |
||||
align-items: flex-start; |
||||
overflow: hidden; |
||||
padding: 15rpx 0; |
||||
overflow: hidden; |
||||
border-bottom: 1px solid #F2F2F2; |
||||
image{ |
||||
width: 190rpx; |
||||
height: 190rpx; |
||||
margin-right: 20rpx; |
||||
</view> |
||||
<u-empty text="暂无记录" v-if="presaList.length == 0" mode="list" style="margin-top: 160rpx;"></u-empty> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import * as GoodsApi from '@/api/goods' |
||||
export default { |
||||
data() { |
||||
return { |
||||
presaList: [], |
||||
isLoading: false, |
||||
}; |
||||
}, |
||||
onLoad() { |
||||
this.getPresaleList(); |
||||
}, |
||||
methods: { |
||||
beginTime(end) { |
||||
const now = new Date(); |
||||
const year = now.getFullYear(); |
||||
const month = now.getMonth() + 1; |
||||
const day = now.getDate(); |
||||
const hour = now.getHours(); |
||||
const minute = now.getMinutes(); |
||||
const second = now.getSeconds(); |
||||
let start= year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second |
||||
return (Date.parse(end.replace(/-/g, '/'))-Date.parse(start.replace(/-/g, '/'))) |
||||
}, |
||||
onCancel(item) { |
||||
let app = this |
||||
uni.showModal({ |
||||
title: "温馨提示", |
||||
content: "是否取消该订单?", |
||||
confirmColor: "#F21A1C", |
||||
complete(res) { |
||||
if (res.confirm) { |
||||
GoodsApi.canlpresale({ |
||||
id: item.id |
||||
}) |
||||
.then(result => { |
||||
if (result.status == 200) { |
||||
uni.showToast({ |
||||
title:'取消成功', |
||||
icon:'none' |
||||
}) |
||||
app.getPresaleList() |
||||
} |
||||
}) |
||||
.finally(() => app.isLoading = false) |
||||
} |
||||
} |
||||
}) |
||||
}, |
||||
async getPresaleList() { |
||||
let app = this |
||||
let { |
||||
status, |
||||
message, |
||||
data |
||||
} = await GoodsApi.presaleList(); |
||||
if (status == 200 && data.length>0) { |
||||
data.forEach(function(item) { |
||||
item.p_time = app.beginTime(item.p_time) |
||||
}); |
||||
app.presaList =data |
||||
} |
||||
.info{ |
||||
flex: 1; |
||||
max-width: 320rpx; |
||||
.a{ |
||||
white-space: nowrap; |
||||
font-size: 32rpx; |
||||
font-weight: 400; |
||||
color: #1E1E1E; |
||||
text-overflow: ellipsis; |
||||
overflow: hidden; |
||||
margin-top: 30rpx; |
||||
}, |
||||
}, |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.record { |
||||
padding: 0 16rpx 20rpx; |
||||
overflow: hidden; |
||||
|
||||
.item { |
||||
width: 100%; |
||||
padding: 0 30rpx; |
||||
box-sizing: border-box; |
||||
background-color: #fff; |
||||
margin-top: 20rpx; |
||||
|
||||
.hd { |
||||
display: flex; |
||||
align-items: flex-start; |
||||
overflow: hidden; |
||||
padding: 15rpx 0; |
||||
overflow: hidden; |
||||
border-bottom: 1px solid #F2F2F2; |
||||
|
||||
image { |
||||
width: 190rpx; |
||||
height: 190rpx; |
||||
margin-right: 20rpx; |
||||
} |
||||
.b{ |
||||
display: flex; |
||||
align-items: center; |
||||
margin-top: 10rpx; |
||||
text{ |
||||
color: #949494; |
||||
margin-right: 20rpx; |
||||
|
||||
.info { |
||||
flex: 1; |
||||
max-width: 320rpx; |
||||
|
||||
.a { |
||||
white-space: nowrap; |
||||
font-size: 32rpx; |
||||
font-weight: 400; |
||||
color: #1E1E1E; |
||||
text-overflow: ellipsis; |
||||
overflow: hidden; |
||||
margin-top: 30rpx; |
||||
} |
||||
font-size: 28rpx; |
||||
font-weight: 400; |
||||
color: #FF0E0E; |
||||
} |
||||
.c{ |
||||
margin-top: 10rpx; |
||||
text{ |
||||
font-size: 36rpx; |
||||
font-weight: 600; |
||||
color: #F21A1C; |
||||
|
||||
.b { |
||||
display: flex; |
||||
align-items: center; |
||||
margin-top: 10rpx; |
||||
|
||||
text { |
||||
color: #949494; |
||||
margin-right: 20rpx; |
||||
} |
||||
|
||||
font-size: 28rpx; |
||||
font-weight: 400; |
||||
color: #FF0E0E; |
||||
} |
||||
font-size: 28rpx; |
||||
|
||||
.c { |
||||
margin-top: 10rpx; |
||||
|
||||
text { |
||||
font-size: 36rpx; |
||||
font-weight: 600; |
||||
color: #F21A1C; |
||||
} |
||||
|
||||
font-size: 28rpx; |
||||
font-weight: 400; |
||||
color: #FF0E0E; |
||||
} |
||||
} |
||||
|
||||
.status { |
||||
flex: 1; |
||||
text-align: right; |
||||
font-size: 32rpx; |
||||
font-weight: 400; |
||||
color: #FF0E0E; |
||||
color: #529C30; |
||||
} |
||||
} |
||||
.status{ |
||||
flex: 1; |
||||
text-align: right; |
||||
font-size: 32rpx; |
||||
font-weight: 400; |
||||
color: #529C30; |
||||
} |
||||
} |
||||
.bd{ |
||||
padding: 30rpx 0; |
||||
overflow: hidden; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: flex-end; |
||||
.btn{ |
||||
width: 158rpx; |
||||
line-height: 62rpx; |
||||
background: #FFFFFF; |
||||
border-radius: 62rpx; |
||||
text-align: center; |
||||
border: 1px solid #C6C6C6; |
||||
font-size: 28rpx; |
||||
font-weight: 400; |
||||
color: #3D3D3D; |
||||
margin-left: 20rpx; |
||||
&-01{ |
||||
background: #F19592; |
||||
border-color: #F19592; |
||||
color: #fff; |
||||
|
||||
.bd { |
||||
padding: 30rpx 0; |
||||
overflow: hidden; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: flex-end; |
||||
|
||||
.btn { |
||||
width: 158rpx; |
||||
line-height: 62rpx; |
||||
background: #FFFFFF; |
||||
border-radius: 62rpx; |
||||
text-align: center; |
||||
border: 1px solid #C6C6C6; |
||||
font-size: 28rpx; |
||||
font-weight: 400; |
||||
color: #3D3D3D; |
||||
margin-left: 20rpx; |
||||
|
||||
&-01 { |
||||
background: #F19592; |
||||
border-color: #F19592; |
||||
color: #fff; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</style> |
||||
|
Loading…
Reference in new issue