Compare commits

...

12 Commits

Author SHA1 Message Date
7393fefdf4 Merge pull request '修复' (#186) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/186
2020-08-14 08:50:27 +08:00
gyh
f4ae3578a2 Merge pull request 'gdpao' (#185) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/185
2020-08-13 19:42:28 +08:00
Gdpao
137279b774 gdpao 2020-08-13 19:41:46 +08:00
5a1a8f01c0 Merge pull request '秒杀时间样式 8.13' (#184) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/184
2020-08-13 18:08:25 +08:00
ca5c1a37ba 秒杀时间样式 8.13 2020-08-13 18:07:55 +08:00
f746e39440 Merge pull request 'store route 8.13' (#183) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/183
2020-08-13 17:26:50 +08:00
c4adcbc182 store route 8.13 2020-08-13 17:26:26 +08:00
5688828bad Merge pull request 'mine index css 8.13' (#182) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/182
2020-08-13 17:19:08 +08:00
b9b32fb655 mine index css 8.13 2020-08-13 17:18:44 +08:00
3de426b55e Merge pull request 'coupon goods 8.13' (#181) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/181
2020-08-13 17:05:33 +08:00
e224cffc1c coupon goods 8.13 2020-08-13 17:05:02 +08:00
281c12e502 Merge pull request '直播头像' (#180) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/180
2020-08-13 16:36:54 +08:00
11 changed files with 302 additions and 37 deletions

View File

@ -411,6 +411,14 @@ export default {
attentionMemberList({ page = 1 } = {}) {
return vm.$u.post('member/attentionMemberList', { page: page });
},
// 可用优惠券商品
couponGoodsList({ voucher_id, page, order }) {
return vm.$u.post('Coupon/couponGoodsList', {
page: page,
voucher_id: voucher_id,
order: order,
});
},
}
}
}

View File

@ -24,7 +24,7 @@
</view>
</view>
</view>
<view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
<view class="order-btn" v-if="[1, 2, 3, 4, 8, 11].indexOf(order.view_type) >= 0">
<!-- || order.view_type == 2 -->
<view class="cancel" v-if="(order.view_type == 3) && order.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
<view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
@ -56,6 +56,7 @@ export default {
methods: {
viewState() {
let state;
// console.log(this.order.view_type);
switch (this.order.view_type) {
case 1:
state = '待支付';
@ -84,6 +85,9 @@ export default {
case 10:
state = '已取消';
break;
case 11:
state = '已拒绝';
break;
default:
break;
}

View File

@ -8,7 +8,7 @@
@openCart="openPopup"></userinfo>
<!-- 视频信息 -->
<cover-view class="info-box" @click="stopClick">
<view class="video-info-box">
<view class="video-info-box" :style="{ width: time_count > 99 ? '200rpx' : '160rpx' }">
<image class="image-play" src="../../static/videoIcon.png" mode=""></image>
<text class="video-slip">视频</text>
<text class="time">{{ time_count }}s</text>
@ -63,14 +63,14 @@
<text class="content-style">{{ item.content }}</text>
</view>
<view class="more-content-box">
<!-- <view class="child-box" v-for="(child,cid) in allList[item.id]" :key="cid">
<view class="info">
<image :src="child.member_avatar" mode=""></image>
<text>{{ child.member_nickname }}</text>
<view class="child-box" v-for="(child,cid) in allList[item.id]" :key="cid">
<view class="child-info">
<image class="child-avatar" :src="child.member_avatar" mode=""></image>
<text class="child-name">{{ child.member_nickname }}</text>
<text v-if="0">{{ child.reply_member_nickname }}</text>
</view>
<view class="child_content">{{ child.content }}</view>
</view> -->
</view>
<view class="more-comment" v-if="item.reply_count">
展开更多回复
</view>
@ -153,6 +153,7 @@
edit_text_other: "有爱评论,说点好听的 ~",
pid: 0, // 主键
reply_id: 0, // 回复id
allList: {}, // 全部子评论
page: 0,
comment_id: 0,
send_value: "", // 评论
@ -168,6 +169,7 @@
this.article_id = option.id;
this.getVideoInfo(option.id);
this.getInfo();
this.allList = {};
},
onReady() {
this.videoBox = uni.createVideoContext("videoId", this);
@ -238,6 +240,7 @@
},
// 发布评论
sendComment() {
console.log(this.article_id,this.send_value,this.pid,this.reply_id);
if (this.send_value.length == 0) {
this.$u.toast("内容不能为空!");
return;
@ -255,6 +258,7 @@
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: (res) => {
console.log(res);
this.is_edit = false;
if (res.data.errCode == 0) {
this.send_value = "";
@ -265,10 +269,10 @@
this.commentList[this.comment_id].reply_count = true;
console.log(this.allList[p_id]);
if (this.allList[p_id]) {
this.allList[p_id].push(res.data.data);
this.allList[p_id].push(res.data.data.data);
} else {
this.allList[p_id] = [];
this.allList[p_id].push(res.data.data);
this.allList[p_id].push(res.data.data.data);
}
console.log(this.allList);
} else {
@ -471,7 +475,6 @@
.video-info-box {
flex-direction: row;
align-items: center;
width: 160rpx;
height: 40rpx;
padding: 4rpx 10rpx;
margin-bottom: 20rpx;
@ -569,7 +572,7 @@
.content-style {
width: 600rpx;
font-size: 26rpx;
font-size: 28rpx;
color: #333;
lines: 2;
}
@ -578,6 +581,34 @@
margin-left: 100rpx;
}
.child-box {
}
.child-info {
margin: 10rpx 0;
flex-direction: row;
align-items: center;
}
.child-avatar {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 50%;
}
.child-name {
font-size: 22rpx;
color: #333;
}
.child_content {
padding: 4rpx 0;
margin-left: 40rpx;
font-size: 26rpx;
}
.more-comment {
margin: 10rpx 0;
font-size: 22rpx;

View File

@ -1,5 +1,5 @@
<template>
<view class="videoTop" @click="toDetailsPage">
<view class="videoTop">
<image :src="url" mode="aspectFill" class="video"></image>
<image src="/static/videoPlay.png" mode="aspectFill" class="play-video"></image>
</view>
@ -35,12 +35,5 @@ export default {
}
},
props:['url'],
methods: {
toDetailsPage(id) {
this.$u.route('pageB/video/video', {
id: id
});
},
}
}
</script>

View File

@ -16,7 +16,7 @@
</view> -->
<view class="top" :style="{'background':'url(' + info.store_banner + ') 100% 100% no-repeat' }">
<view class="mantle"></view>
<view class="main-container">
<view class="main-container" :style="{ 'padding-top': paddingTop }">
<image :src="info.store_avatar"></image>
<view class="info">
<view class="name u-line-1">{{info.store_name}}</view>
@ -93,6 +93,7 @@ export default {
info: {},
page: 1,
scrollHeiht: '',
paddingTop: 0,
}
},
components:{
@ -111,6 +112,11 @@ export default {
if(e.index == 0) this.$u.route('/pageC/cart/index');
// if(e.index == 0) this.show = true;
},
onNavigationBarSearchInputClicked() {
this.$u.route('pageB/search/index', {
type: 2
});
},
methods: {
customers(){
console.log(this.$store.state.hasLogin)
@ -212,6 +218,8 @@ export default {
setViewHeight() {
const res = uni.getSystemInfoSync();
this.scrollHeiht = res.windowHeight - (73 + 20 + 170) + 'px';
this.paddingTop = res.windowWidth / 750 * (90 + 50) + 'px';
console.log(this.paddingTop);
}
},
onLoad(option){
@ -250,7 +258,8 @@ export default {
.main-container {
display: flex;
align-items: center;
padding: 54rpx 60rpx 0 30rpx;
// padding-top: calc(var(--status-bar-height) + 54);
padding: 0 60rpx 0 30rpx;
position: absolute;
top: 0;
left: 0;

View File

@ -72,10 +72,14 @@ export default {
display: flex;
align-items: center;
font-size: 20rpx;
> text {
text-align: center;
line-height: 26rpx;
}
.num{
box-sizing: content-box;
width: 25rpx;
height: 25rpx;
// box-sizing: content-box;
width: 26rpx;
// height: 25rpx;
background-color: #bfbfbf;
margin: 0 10rpx;
padding: 2rpx;

View File

@ -125,6 +125,10 @@ export default {
text: '已取消',
image: '../static/mine/33.png',
},
'10': {
text: '已拒绝',
image: '../static/mine/34.png',
},
},
orderInfo: {},
oid: '',
@ -176,6 +180,9 @@ export default {
case 10:
state = '9';
break;
case 11:
state = '10';
break;
default:
break;
}

View File

@ -69,17 +69,20 @@ export default {
})
},
useCoupon(coupon) {
// console.log(coupon);
if(coupon.type == 1) {
this.$u.route({
type: 'switchTab',
url: 'pages/shop/index',
})
} else if(coupon.type == 2) {
this.$u.route('pageC/merchant/index', {
id: coupon.voucher_store_id,
});
}
console.log(coupon);
// if(coupon.type == 1) {
// this.$u.route({
// type: 'switchTab',
// url: 'pages/shop/index',
// })
// } else if(coupon.type == 2) {
// this.$u.route('pageC/merchant/index', {
// id: coupon.voucher_store_id,
// });
// }
this.$u.route('pageE/useCoupon/index', {
cid: coupon.voucher_id,
});
},
setViewHeight() {
const res = uni.getSystemInfoSync();

193
pageE/useCoupon/index.vue Normal file
View File

@ -0,0 +1,193 @@
<template>
<view class="classify-goods">
<view class="tab-container">
<view class="salenum" :class="{ 'current' : current == 0 }" @click="switchCurrent(0)">销量</view>
<view class="price" :class="{ 'current' : current == 1 }" @click="switchCurrent(1)">
<view class="text">价格</view>
<view class="icon">
<u-icon name="arrow-up-fill" :color="(current == 1 && priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
<u-icon name="arrow-down-fill" :color="(current == 1 && !priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
</view>
</view>
<view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">好评</view>
</view>
<scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-item" @click="toDetailsPage(goods.goods_id)">
<image :src="goods.goods_image"></image>
<view class="right">
<view class="name u-line-1">{{ goods.goods_name }}</view>
<view class="briefing u-line-1">{{ goods.goods_advword }}</view>
<view class="price">{{ goods.goods_price }}</view>
</view>
</view>
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
return {
pageSize: 12,
cid: '',
page: 1,
current: 0,
priceOrderAsc: true, //
goodsList: [],
scrollHeight: '',
loadStatus: 'loadmore',
timer: true, //
}
},
watch: {
current(value) {
this.page = 1;
this.couponGoodsList({ laod: 'reload' });
},
priceOrderAsc(value) {
this.page = 1;
this.couponGoodsList({ laod: 'reload' });
}
},
onLoad(option) {
this.cid = option.cid;
this.couponGoodsList({ load: 'reload' });
this.setViewHeight();
},
methods: {
setOrderSort() {
let sort = '';
if(this.current == 0) {
sort = 'goods_salenum';
} else if (this.current == 1) {
if(this.priceOrderAsc) sort = 'goods_price_asc';
else sort = 'goods_price_desc';
} else if (this.current == 2) {
sort = 'evaluation_count';
}
return sort;
},
// goods_salenum evaluation_count goods_price_asc goods_price_desc
async couponGoodsList({ load = 'reload' } = {}) {
const sort = this.setOrderSort();
const res = await this.$u.api.couponGoodsList({
voucher_id: this.cid,
page: this.page,
order: sort,
})
this.timer = true;
if(res.errCode == 0) {
if(load == 'reload') this.goodsList = res.data.data;
else if(load == 'loadmore') this.goodsList.push(...res.data.data);
}
return res.data.data.length;
},
loadMore() {
if(this.goodsList.length < this.pageSize) return false;
if(!this.timer) return false;
this.loadStatus = "loading";
this.page++;
this.couponGoodsList({ load: 'loadmore' }).then(length => {
if(length == 0) {
this.page--;
this.loadStatus = 'nomore';
} else {
this.loadStatus = 'loading';
}
}).catch(() => {
this.loadStatus = "nomore";
this.page--;
})
},
switchCurrent(current) {
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
this.current = current;
},
setViewHeight() {
const res = uni.getSystemInfoSync();
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
},
toDetailsPage(id) {
this.$u.route('/pageB/sdetails/index', {
id: id,
});
}
}
};
</script>
<style lang="scss" scoped>
.classify-goods {
.tab-container {
box-sizing: border-box;
padding: 30rpx 40rpx;
display: flex;
margin-bottom: 30rpx;
> view {
height: 30rpx;
line-height: 30rpx;
flex: 1;
font-size: 32rpx;
color: rgba(51,51,51,1);
}
.salenum {
text-align: left;
}
.price {
display: flex;
align-items: center;
justify-content: center;
.text {
margin-right: 5rpx;
}
.icon {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
}
.evaluation {
text-align: right;
}
.current {
color: rgba(255,120,15,1);
}
}
.goods-container {
.goods-item {
margin: 0 auto;
width: 690rpx;
display: flex;
background-color: #F5F5F5;
margin-bottom: 30rpx;
align-items: center;
> image {
width: 220rpx;
height: 200rpx;
flex-shrink: 0;
margin-right: 30rpx;
}
.right {
width: 418rpx;
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.name {
font-size: 30rpx;
color: rgba(51,51,51,1);
}
.briefing {
font-size: 28rpx;
color: rgba(102,102,102,1);
}
.price {
font-size: 26rpx;
color: rgba(255,49,49,1);
}
}
}
}
}
</style>

View File

@ -567,6 +567,19 @@
}
}
},
{
"path": "useCoupon/index",
"style": {
"navigationBarTitleText": "优惠券商品",
"app-plus": {
"titleSize": "36px",
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "more/MineHelp",
"style": {

View File

@ -266,9 +266,9 @@ export default {
}
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
box-sizing: border-box;
width: 750rpx;
width: 710rpx;
background: rgba(255,255,255,1);
// border-radius: 10rpx;
border-radius: 10rpx;
margin: 20rpx auto 0;
.title {
display: flex;