Compare commits

...

8 Commits

23 changed files with 605 additions and 60 deletions

View File

@ -339,7 +339,11 @@ export default {
page,
name_search: name_search
})
}
},
// 是否弹出新人优惠券
isNewmembervoucher() {
return vm.$u.post('Coupon/isNewmembervoucher')
},
}
}

View File

@ -174,7 +174,6 @@
.backes{
position: absolute;
top: 0;
background: rgba(0,0,0,0.6);
width: 100%;
height: 100%;
color: #fff;
@ -233,6 +232,7 @@ export default {
}
})
},
//
articleAddShield() {
this.$u.api.articleAddShield({
article_id: this.item.article_id,

View File

@ -46,8 +46,8 @@
/* #ifndef APP-PLUS-NVUE */
display: flex;
/* #endif */
position: relative;
align-items: center;
padding-bottom: 20rpx;
}
.avatar {
@ -60,6 +60,7 @@
}
.follow {
z-index: 100;
position: absolute;
top: 90rpx;
left: 40rpx;
@ -67,7 +68,7 @@
height: 36rpx;
text-align: center;
line-height: 36rpx;
font-size: 36rpx;
font-size: 34rpx;
border-radius: 50%;
color: #fff;
background-color: #FF780F;
@ -148,7 +149,7 @@
this.is_follow = !this.is_follow;
console.log(this.is_follow);
uni.showToast({
title: res.data.data.message,
title: res.data.message,
icon: "none"
})
}

253
pageB/coupon/details.vue Normal file
View File

@ -0,0 +1,253 @@
<template>
<view class="coupon-details">
<view class="coupon-container">
<view class="title">新人专享好礼</view>
<view class="coupon-main">
<image src="/static/image/common/29.png" class="bg"></image>
<view class="left">
<view class="price"><text class="sign"></text><text class="value">{{ price }}</text></view>
<view class="label">专属优惠券</view>
</view>
<view class="btn" @click="exchangeCoupon">立即领取</view>
</view>
<view class="tag">
<view>
<image src="/static/image/common/25.png"></image>
<text>全场包邮</text>
</view>
<view>
<image src="/static/image/common/26.png"></image>
<text>延误必赔</text>
</view>
<view>
<image src="/static/image/common/27.png"></image>
<text>免费上门取件</text>
</view>
<view>
<image src="/static/image/common/28.png"></image>
<text>退货免运费</text>
</view>
</view>
</view>
<view class="title-container">
<image src="/static/image/common/22.png" class="bg"></image>
<view class="title">首席搭配师</view>
</view>
<view class="content-container">
<image src="/static/image/common/23.png" class="people"></image>
<view class="tag">
<view class="">双十一成交破亿</view>
<view class="">单场千万级大咖</view>
<view class="">品牌特卖TOP1</view>
</view>
<view class="btn">
<view class="bg-view"></view>
<view>我们有万能穿搭公式</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
price: 0
}
},
onLoad(option) {
this.price = option.price;
// this.isNewmembervoucher();
},
methods: {
//
isNewmembervoucher() {
this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) {
this.price = res.data.price;
}
})
},
exchangeCoupon() {
this.$u.api.getCoupon({ id: 1 }).then(res => {
this.$u.toast(res.message);
if(res.errCode == 0) {}
})
},
}
};
</script>
<style lang="scss" scoped>
.coupon-details {
min-height: calc(100vh - var(--window-top));
background-color: #FFDFAC;
padding-top: 30rpx;
.coupon-container {
width: 690rpx;
height: 368rpx;
background: linear-gradient(-87deg, rgba(247,162,30,1), rgba(255,120,15,1));
box-shadow: 0rpx 4rpx 2rpx 0rpx rgba(102,102,102,0.2);
border-radius: 20rpx;
margin: 0 auto 70rpx;
padding: 22rpx {
top: 40rpx
};
.title {
font-size: 48rpx;
font-weight: bold;
color: rgba(255,255,255,1);
line-height: 34rpx;
text-shadow: 0rpx 4rpx 2rpx rgba(102,102,102,0.2);
text-align: center;
}
.coupon-main {
margin: 26rpx auto 20rpx;
width: 665rpx;
height: 194rpx;
position: relative;
.bg {
position: absolute;
top: 0;
left: 0;
width: 665rpx;
height: 194rpx;
z-index: 1;
}
.left {
z-index: 2;
position: absolute;
top: 40rpx;
left: 122rpx;
.price {
margin-bottom: 16rpx;
display: flex;
align-items: flex-end;
line-height: 80rpx;
> text {
font-weight: bold;
color: rgba(255,120,15,1);
}
.sign {
font-size: 54rpx;
}
.value {
font-size: 102rpx;
}
}
.label {
font-size: 32rpx;
font-weight: 500;
color: rgba(255,120,15,1);
}
}
.btn {
z-index: 2;
position: absolute;
top: 62rpx;
right: 60rpx;
width: 192rpx;
height: 70rpx;
background: linear-gradient(-87deg, rgba(247,162,30,1), rgba(255,120,15,1));
border-radius: 20rpx;
line-height: 70rpx;
text-align: center;
font-size: 27rpx;
font-weight: bold;
color: rgba(255,255,255,1);
}
}
.tag {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 20rpx;
font-weight: 500;
color: rgba(255,255,255,1);
> view {
> image {
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
}
}
}
}
.title-container {
position: relative;
height: 124rpx;
.bg {
position: absolute;
width: 504rpx;
height: 124rpx;
z-index: 1;
top: 50%;
left: 50%;
transform: translate(-50%, -75%);
}
.title {
position: absolute;
z-index: 2;
width: 750rpx;
height: 59rpx;
background: rgba(255,255,255,0.27);
font-size: 60rpx;
font-weight: 800;
color: rgba(255,122,16,1);
text-align: center;
top: 0;
left: 0;
}
}
.content-container {
height: 684rpx;
position: relative;
.people {
width: 348rpx;
height: 684rpx;
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%, 0%);
}
.tag {
> view {
position: absolute;
height: 48rpx;
background: rgba(229,0,79,0.36);
border-radius: 20rpx;
font-size: 24rpx;
font-weight: bold;
color: rgba(255,255,255,1);
line-height: 48rpx;
padding: 0 24rpx;
&:nth-child(1) {
top: 104rpx;
right: 71rpx;
}
&:nth-child(2) {
top: 271rpx;
left: 30rpx;
}
&:nth-child(3) {
top: 373rpx;
right: 33rpx;
}
}
}
.btn {
position: absolute;
top: 459rpx;
left: 50%;
transform: translate(-50%, 0%);
width: 581rpx;
height: 86rpx;
background: linear-gradient(-87deg,rgba(247,162,30,1),rgba(255,120,15,1));
border-radius: 20rpx;
font-size: 40rpx;
font-weight: bold;
color: rgba(255,255,255,1);
line-height: 86rpx;
text-align: center;
}
}
}
</style>

View File

@ -4,10 +4,10 @@
<view class="spike-view" v-if="type == 3">
<view class="left">
<view class="price">
<view class="now-price">{{ groupbuyInfo.groupbuy_price }}</view>
<view class="origin-price">{{ groupbuyInfo.goods_price }}</view>
<view class="now-price">{{ groupbuyInfo.groupbuy_price || '0.00' }}</view>
<view class="origin-price">{{ groupbuyInfo.goods_price || '0.00' }}</view>
</view>
<view class="num">剩余数量{{ groupbuyInfo.inventory - groupbuyInfo.groupbuy_buy_quantity }}</view>
<view class="num">剩余数量{{ groupbuyInfo.inventory - groupbuyInfo.groupbuy_buy_quantity || '0' }}</view>
</view>
<view class="right" v-if="!isSrartSpike || !isEndSpike">
<view class="title">{{ isSrartSpike ? '结束倒计时' : '秒杀倒计时' }}</view>
@ -24,8 +24,8 @@
</view>
<view class="price-collect">
<view class="pic" v-if="type != 3">
<text>{{ goodsInfo.goods_price }}</text>
<s>{{ goodsInfo.goods_marketprice }}</s>
<text>{{ goodsInfo.pintuan_price || '0.00' }}</text>
<s>{{ goodsInfo.goods_price || '0.00' }}</s>
</view>
<view class="collect" @click="switchCollect(goodsInfo.goods_collect)">
<u-icon name="star" color="#474747" size="28" v-if="!goodsInfo.goods_collect"></u-icon>
@ -378,7 +378,7 @@ export default {
//
ordinaryDetails(id) {
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
console.log(res)
// console.log(res)
if (res.errCode == 0) {
this.evaluate = res.data.goods_evaluate_info;
this.goodsInfo = res.data.goods;
@ -536,7 +536,7 @@ export default {
xuanze(id){
// console.log(id)
// type = 1
this.type = 1;
// this.type = 1;
this.getGoodsDetails(this.glist[id])
this.id = this.glist[id];
},

View File

@ -80,11 +80,11 @@ export default {
this.value = option.value;
this.setViewHeight();
this.ShopSearch()
this.setNavSearchInput();
this.setNavSearchInput(this.value);
},
onNavigationBarSearchInputConfirmed(value) {
this.value = value.text
console.log(this.value)
// console.log(this.value)
this.ShopSearch()
},
methods: {

View File

@ -1,7 +1,7 @@
<template>
<view>
<video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing" @timeupdate="timeupdate"
:show-play-btn="false" controls="false" @click="stoping" :enable-progress-gesture="false"></video>
<video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing"
@timeupdate="timeupdate" :show-play-btn="false" controls="false" @click="stoping" :enable-progress-gesture="false"></video>
<cover-image class="close" @click="goBack" src="../../static/close.png">
</cover-image>
<cover-image class="pause" @click="stoping" src="../../static/videoPlay.png" v-if="!is_play">
@ -29,6 +29,40 @@
</block>
</view>
</cover-view>
<cover-view class="content-box" v-if="is_comment">
<view class="content-title">
<text class="tips">评论</text>
<text class="close-down" @click="closeComment">×</text>
</view>
<scroller class="comment-list">
<view class="" v-for="(item,index) in commentList" :key="index">
<view class="comment-list-box">
<view class="comment-list-header">
<image class="avatar" :src="item.member_avatar" mode=""></image>
<view>
<text class="comment-title">{{ item.member_nickname }}</text>
<text class="comment-time">{{ item.create_time }}</text>
</view>
</view>
<text class="reply">回复</text>
</view>
<view class="content-main">
<text class="content-style">{{ item.content }}</text>
</view>
</view>
<view class="send-box">
<input class="send-val" type="text" value="" />
<text class="btn-send">发送</text>
</view>
<loading class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'">
<loading-indicator class="indicator"></loading-indicator>
<text class="indicator-text">努力加载中</text>
</loading>
</scroller>
</cover-view>
<list class="cart-box">
<cell></cell>
</list>
</view>
</template>
@ -46,13 +80,17 @@
cart_type: false, // 显示购物车
is_comment: false, // 显示评论
comment_num: 0, // 评论数
page: 0,
commentList: [], // 评论列表
src: "",
is_play: true,
time_count: 0,
linear: null,
loadinging: false,
};
},
onLoad(option) {
this.article_id = option.id;
this.getVideoInfo(option.id);
this.getInfo();
},
@ -89,6 +127,23 @@
}
})
},
// 获取评论
getComment() {
uni.request({
url: "https://dmmall.sdbairui.com/api/article/articleCommentList",
method: "POST",
data: {
article_id: this.article_id,
page: this.page,
},
success: (res) => {
if (res.data.errCode == 0) {
console.log(res.data);
this.commentList = res.data.data;
}
}
})
},
// 获取手机信息
getInfo() {
uni.getSystemInfo({
@ -103,8 +158,7 @@
// 播放
playing(e) {
// console.log(e);
if (e.type == "play") {
}
if (e.type == "play") {}
},
// 暂停
stoping() {
@ -125,6 +179,28 @@
// this.linear = num + "%";
// console.log(this.time_count);
},
// 打开弹窗
openPopup(data) {
console.log(data);
this.cart_type = data.cart;
this.is_comment = data.comment;
if (this.is_comment) {
this.page = 0;
this.getComment();
}
},
// 关闭评论
closeComment() {
this.is_comment = false;
},
// 下拉加载
onloading(e) {
console.log(e);
this.loadinging = true;
setTimeout(() => {
this.loadinging = false;
}, 2000)
},
goBack() {
uni.navigateBack({
delta: 1
@ -180,6 +256,109 @@
background-color: rgba(255, 255, 255, .6);
}
.content-box {
z-index: 99;
position: fixed;
bottom: 0;
left: 0;
width: 750rpx;
height: 700rpx;
margin-bottom: 88rpx;
background-color: #fff;
}
.content-title {
justify-content: space-between;
flex-direction: row;
align-items: center;
height: 88rpx;
padding: 0 20rpx;
background-color: #ECECEC;
}
.comment-list {
margin-bottom: 50rpx;
}
.comment-list-box {
padding: 30rpx;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.content-main {
flex-direction: row;
padding-left: 100rpx;
}
.content-style {
width: 600rpx;
font-size: 26rpx;
color: #333;
lines: 2;
}
.comment-list-header {
flex-direction: row;
}
.avatar {
width: 60rpx;
height: 60rpx;
margin-right: 20rpx;
border-radius: 50%;
}
.comment-title {
font-size: 26rpx;
color: #333;
}
.comment-time,
.reply {
font-size: 22rpx;
color: #999;
}
.tips {
font-size: 30rpx;
font-weight: 500;
color: #333;
}
.send-box {
z-index: 10000;
position: fixed;
bottom: 0;
left: 0;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 750rpx;
height: 88rpx;
padding: 10rpx 30rpx;
border-top-width: 1rpx;
border-color: #ececec;
background-color: #fff;
}
.send-val {
width: 600rpx;
height: 88rpx;
font-size: 36rpx;
}
.btn-send {
font-size: 30rpx;
color: #303133;
}
.close-down {
font-size: 50rpx;
text-align: center;
color: #333;
}
.image-play {
width: 22rpx;
height: 20rpx;
@ -235,4 +414,23 @@
border-radius: 10rpx;
background-color: rgba(255, 255, 255, .6);
}
.loading {
width: 750rpx;
flex-direction: row;
align-items: center;
justify-content: center;
}
.indicator-text {
font-size: 20rpx;
text-align: center;
color: #999;
}
.indicator {
width: 30rpx;
height: 30rpx;
color: #999;
}
</style>

View File

@ -26,7 +26,7 @@
<view class="info">
<view class="name u-line-2">{{ goods.goods_name }}</view>
<view class="cart-info">
<view class="price">{{ goods.goods_price }}</view>
<view class="price">{{ goods.goods_total }}</view>
<view>×{{ goods.goods_num }}</view>
</view>
</view>

View File

@ -154,6 +154,9 @@ export default {
case 4:
state = '2';
break;
case 5:
state = '3';
break;
case 6:
state = '7';
break;

View File

@ -259,6 +259,16 @@ export default {
this.getAreaData();
this.getClothesTypeList();
},
watch: {
swiperCurrent() {
this.goodsStatus = '';
this.type = {};
this.name = '';
this.phone = '';
this.area = '';
this.address = '';
}
},
methods: {
getClothesTypeList() {
this.$u.api.getClothesTypeList().then(res => {
@ -424,12 +434,6 @@ export default {
})
},
animationfinish(e) {
this.goodsStatus = '';
this.type = {};
this.name = '';
this.phone = '';
this.area = '';
this.address = '';
//
this.debounce = true;
let current = e.detail.current;

View File

@ -237,6 +237,18 @@
"softinputMode": "adjustResize"
}
}
},
{
"path": "coupon/details",
"style": {
"navigationBarTitleText": "优惠券介绍",
"app-plus": {
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
}
]
},

View File

@ -14,7 +14,7 @@
inactive-color="#333" :active-item-style="{
'color':'#333'
}" :bold="false"
@change="dianji"></u-tabs>
@change="dianji($event)"></u-tabs>
</view>
<view class="sosuo"></view>
</view>
@ -87,6 +87,13 @@
</swiper-item>
</swiper>
</view>
<u-popup v-model="showCoupon" mode="center" class="u-coupon-popup">
<view class="coupon">
<view class="price">{{ newMemberCoupon.price }}</view>
<image src="/static/image/common/30.png" class="coupon-image" @click="viewCoupon"></image>
<image src="/static/image/common/24.png" class="close-image" @click="showCoupon=false"></image>
</view>
</u-popup>
</view>
</template>
@ -96,6 +103,7 @@
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
.top {
display: flex;
@ -113,6 +121,7 @@
.tabs {
width: 334rpx;
// pointer-events: none;
/deep/ .u-tab-item {
font-weight: bold;
@ -123,6 +132,7 @@
.card {
height: 100%;
width: 100%;
// pointer-events: none;
.box {
width: 100%;
@ -198,6 +208,42 @@
margin: 200rpx auto 0;
text-align: center;
}
.u-coupon-popup {
/deep/ .u-mode-center-box {
background-color: transparent;
}
.coupon {
width: 750rpx;
height: 583rpx;
position: relative;
.price {
z-index: 3;
color: #EBB36E;
position: absolute;
font-size: 108rpx;
font-weight: bold;
top: 200rpx;
left: 50%;
transform: translate(-68%, 0);
}
.coupon-image {
width: 568rpx;
height: 583rpx;
position: absolute;
top: 0;
left: 50%;
transform: translate(-60%, 0);
}
.close-image {
position: absolute;
top: 0;
right: 155rpx;
width: 60rpx;
height: 60rpx;
}
}
}
</style>
<script>
@ -237,7 +283,9 @@
loadmore: '轻轻上拉',
loading: '努力加载中',
nomore: '实在没有了'
}
},
showCoupon: false,
newMemberCoupon: {},
}
},
components: {
@ -254,6 +302,7 @@
},
onLoad(){
if(this.$store.state.hasLogin){
this.isNewmembervoucher();
const user = uni.getStorageSync('user_info');
console.log(user)
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
@ -296,7 +345,6 @@
this.$u.api.attentionMember({
member_id: member_id
}).then((res) => {
console.log(res);
this.follow_page = 0;
this.getRecommendList(); //
this.getFollowList(); //
@ -312,12 +360,14 @@
//
dianji(a) {
// console.log(a);
if (typeof a == "object") {
if (a.type == "change") {
this.num = a.detail.current
} else {
this.num = a
this.num = a;
}
// console.log(this.num);
//
if (a.type == "change") { //
if (this.num == 0) {
this.page = 0;
this.status = "loadmore";
@ -328,11 +378,12 @@
this.tabLiveList();
} else if (this.num == 2) {
this.follow_page = 0;
this.status = "loadmore";
this.fansList = [];
if (this.hasLogin) {
this.getFollowList(); //
}
this.getRecommendList(); //
}
}
},
//
@ -384,11 +435,14 @@
}).then(res => {
this.status_1 = "loading";
if (res.errCode == 0) {
if (this.fansList.length < 4) {
this.status_1 = "nomore";
}
// uni.stopPullDownRefresh();
// console.log('37647744ghj', res)
if (this.follow_page == 0) {
this.fansList = res.data.list;
this.status_1 = "loadmore";
// this.status_1 = "loadmore";
} else if (res.data.list.length == 0 && this.follow_page > 0) {
this.status_1 = "nomore";
} else {
@ -445,6 +499,22 @@
this.$u.route("/pageB/search/index", {
type: 2,
});
},
//
isNewmembervoucher() {
this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) {
this.newMemberCoupon = res.data;
this.showCoupon = true;
} else {
this.showCoupon = false;
}
})
},
viewCoupon() {
this.$u.route('/pageB/coupon/details', {
price: this.newMemberCoupon.price
});
}
},
}

View File

@ -24,7 +24,7 @@
<view class="danmufasongbox" @click="danmu = $store.state.hasLogin">
<view class="danmufasongboxback"></view>
<image src="../../static/danmu.png" class="danmubianji"></image>
<text style="font-size:26rpx;color:#fff;margin-left:20rpx">{{$store.state.hasLogin '想说点什么' : '请先登录'}}</text>
<text style="font-size:26rpx;color:#fff;margin-left:20rpx">{{ $store.state.hasLogin ? '想说点什么' : '请先登录'}}</text>
</view>
<image class="liketap" src="../../static/like.png" @click="">

BIN
static/image/common/21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 KiB

BIN
static/image/common/22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
static/image/common/23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 KiB

BIN
static/image/common/24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
static/image/common/25.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/image/common/26.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/image/common/27.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/image/common/28.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/image/common/29.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
static/image/common/30.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB