Merge pull request 'store article 8.13' (#174) from zhy into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/174
This commit is contained in:
hansu 2020-08-13 15:41:34 +08:00
commit e3c548c9b0
7 changed files with 78 additions and 31 deletions

View File

@ -24,14 +24,15 @@
</view> </view>
</view> </view>
</view> </view>
<view class="order-btn" v-if="[1, 2, 3, 4, 8, 9].indexOf(order.view_type) >= 0"> <view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
<view class="cancel" v-if="(order.view_type == 3 || order.view_type == 2) && order.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view> <view class="cancel" v-if="(order.view_type == 3 || order.view_type == 2) && order.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
<view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view> <view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view> <view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view> <view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</view> <view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</view>
<view class="cancel" v-if="order.view_type == 9" @click="cancelOrder">取消订单</view> <!-- <view class="cancel" v-if="order.view_type == 9" @click="cancelOrder">取消订单</view> -->
<view class="payment" v-if="order.view_type == 1 || order.view_type == 9" @click="payNow(order.pay_sn, order.order_amount,order.order_id)">立即支付</view> <!-- || order.view_type == 9 -->
<view class="payment" v-if="order.view_type == 1" @click="payNow(order.pay_sn, order.order_amount,order.order_id)">立即支付</view>
<view class="service" v-if="order.view_type == 8">联系官方客服</view> <view class="service" v-if="order.view_type == 8">联系官方客服</view>
<view class="submit" v-if="order.view_type == 8">提交官方审核</view> <view class="submit" v-if="order.view_type == 8">提交官方审核</view>
</view> </view>

View File

@ -546,9 +546,10 @@ export default {
url: '/pageC/cart/ConfirmOrder' url: '/pageC/cart/ConfirmOrder'
}) })
} else { } else {
this.$u.toast(res.message); this.$refs.uToast.show({
title: res.message,
});
this.debounce = true; this.debounce = true;
this.$u.toast(res.message);
} }
}) })
}, },

View File

@ -3,7 +3,7 @@
<u-checkbox-group class="cart-main" @change="storeChange"> <u-checkbox-group class="cart-main" @change="storeChange">
<view v-for="(store, s_index) in list" :key="s_index" class="cart-item"> <view v-for="(store, s_index) in list" :key="s_index" class="cart-item">
<view class="store"> <view class="store">
<u-checkbox v-model="store.checked" shape="circle" active-color="#FF780F" icon-size="35" :name="s_index" @change="storeaAloneChange"></u-checkbox> <u-checkbox v-model="store.checked" shape="circle" active-color="#FF780F" icon-size="26" :name="s_index" @change="storeaAloneChange"></u-checkbox>
<view class="name" @click="viewStoreDetails(store.store_id)"> <view class="name" @click="viewStoreDetails(store.store_id)">
<image :src="store.store_avatar"></image> <image :src="store.store_avatar"></image>
<view>{{ store.store_name }}</view> <view>{{ store.store_name }}</view>
@ -12,7 +12,7 @@
<view class="goods"> <view class="goods">
<u-checkbox-group @change="goodsChange($event, s_index)"> <u-checkbox-group @change="goodsChange($event, s_index)">
<view v-for="(goods, g_index) in store.goods" :key="g_index" class="goods-item"> <view v-for="(goods, g_index) in store.goods" :key="g_index" class="goods-item">
<u-checkbox v-model="goods.checked" shape="circle" active-color="#FF780F" icon-size="35" :name="g_index"></u-checkbox> <u-checkbox v-model="goods.checked" shape="circle" active-color="#FF780F" icon-size="26" :name="g_index"></u-checkbox>
<image :src="goods.goods_image" @click="viewGoodsDetails(goods.goods_id)"></image> <image :src="goods.goods_image" @click="viewGoodsDetails(goods.goods_id)"></image>
<view class="info"> <view class="info">
<view class="name u-line-2" @click="viewGoodsDetails(goods.goods_id)">{{ goods.goods_name }}</view> <view class="name u-line-2" @click="viewGoodsDetails(goods.goods_id)">{{ goods.goods_name }}</view>
@ -31,7 +31,7 @@
</view> </view>
<view class="balance"> <view class="balance">
<u-checkbox-group> <u-checkbox-group>
<u-checkbox v-model="checkedAll" shape="circle" active-color="#FF780F" icon-size="35" label-size="30" @change="totalChange"> <u-checkbox v-model="checkedAll" shape="circle" active-color="#FF780F" icon-size="26" label-size="30" @change="totalChange">
全选 全选
</u-checkbox> </u-checkbox>
</u-checkbox-group> </u-checkbox-group>

View File

@ -1,6 +1,10 @@
<template> <template>
<view class="listItem"> <view class="listItem">
<video v-if="type == '2'" :src="url" :show-fullscreen-btn="true"></video> <!-- <video :src="url" :show-fullscreen-btn="true"></video> -->
<view v-if="type == '2'" class="video-container">
<image :src="url" mode="aspectFill" class="video"></image>
<image src="/static/videoPlay.png" mode="aspectFill" class="play-video"></image>
</view>
<image v-else :src="url" mode="aspectFill"></image> <image v-else :src="url" mode="aspectFill"></image>
</view> </view>
</template> </template>
@ -9,11 +13,30 @@
width: 365rpx; width: 365rpx;
height: 500rpx; height: 500rpx;
overflow: hidden; overflow: hidden;
>image,video{ > image {
width: 100%; width: 100%;
height: 100%; height: 100%;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.video-container {
width: 100%;
height: 100%;
margin-bottom: 20rpx;
position: relative;
.video {
width: 100%;
height: 100%;
}
.play-video {
position: absolute;
width: 100rpx;
height: 100rpx;
z-index: 19;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
} }
</style> </style>
<script> <script>

View File

@ -1,6 +1,7 @@
<template> <template>
<view class="videoTop"> <view class="videoTop" @click="toDetailsPage">
<video :src="url" :show-fullscreen-btn="true"></video> <image :src="url" mode="aspectFill" class="video"></image>
<image src="/static/videoPlay.png" mode="aspectFill" class="play-video"></image>
</view> </view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -8,9 +9,21 @@
width: 100%; width: 100%;
height: 284rpx; height: 284rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
>video{ position: relative;
.video{
position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 9;
}
.play-video {
position: absolute;
width: 100rpx;
height: 100rpx;
z-index: 19;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} }
} }
</style> </style>
@ -21,6 +34,13 @@ export default {
return { return {
} }
}, },
props:['url'] props:['url'],
methods: {
toDetailsPage(id) {
this.$u.route('pageB/video/video', {
id: id
});
},
}
} }
</script> </script>

View File

@ -42,11 +42,11 @@
<view class="main"> <view class="main">
<scroll-view class="video-image" scroll-y v-if="cur==0 && indextop.length" :style="{ height: scrollHeiht }"> <scroll-view class="video-image" scroll-y v-if="cur==0 && indextop.length" :style="{ height: scrollHeiht }">
<view v-for="item in indextop" :key="item.id" class="container-top"> <view v-for="item in indextop" :key="item.id" class="container-top">
<videoTop :url="item.article_pic" v-if="item.type == 2" @click.native="toDetailsPage(item.article_id)"></videoTop> <videoTop :url="item.article_pic" v-if="item.type == 2" @click.native="toDetailsPage({ id: item.article_id, type: item.type })"></videoTop>
<imageTop v-else :url="item.article_pic" @click.native="toDetailsPage(item.article_id)"></imageTop> <imageTop v-else :url="item.article_pic" @click.native="toDetailsPage({ id: item.article_id, type: item.type })"></imageTop>
</view> </view>
<view v-if="indexlist.length" class="container-bottom"> <view v-if="indexlist.length" class="container-bottom">
<listitem v-for="item in indexlist" :key="item.id" :type="item.type" :url="item.article_pic" class="bottom-item" @click.native="toDetailsPage(item.article_id)"></listitem> <listitem v-for="item in indexlist" :key="item.id" :type="item.type" :url="item.article_pic" class="bottom-item" @click.native="toDetailsPage({ id: item.article_id, type: item.type })"></listitem>
</view> </view>
</scroll-view> </scroll-view>
<view class="item" v-if="cur==1"> <view class="item" v-if="cur==1">
@ -149,11 +149,10 @@ export default {
} }
}, },
toDetailsPage(id) { toDetailsPage({ id, type }) {
// console.log(11); // console.log(11);
this.$u.route('pageB/photo/index', { let src = type == 1 ? 'pageB/photo/index' : 'pageB/video/video';
id: id this.$u.route(src, { id: id });
});
}, },
switchCurrent(current) { switchCurrent(current) {
this.cur = current; this.cur = current;
@ -194,15 +193,17 @@ export default {
}).then(res => { }).then(res => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
if (res.errCode == 0) { if (res.errCode == 0) {
// this.articleList = res.data.list; let articleList = res.data.list;
// articleList.unshift({}, {}, {}, {});
// articleList.push({}, {});
if(JSON.stringify(res.data) != '[]') { if(JSON.stringify(res.data) != '[]') {
if(res.data.list.length > 0) { if(articleList.length > 0) {
this.indextop = [res.data.list[0]] this.indextop = [articleList[0]]
// this.indextop = [res.data.list[0], res.data.list[1]]; // this.indextop = [res.data.list[0], res.data.list[1]];
} }
if(res.data.list.length > 1) { if(articleList.length > 1) {
this.indextop.push(res.data.list[1]); this.indextop.push(articleList[1]);
this.indexlist.push(...res.data.list.slice(2,)); this.indexlist.push(...articleList.slice(2,));
} }
} }
} }

View File

@ -67,16 +67,17 @@
<view>创建时间{{ orderInfo.add_time | date}}</view> <view>创建时间{{ orderInfo.add_time | date}}</view>
</view> </view>
</view> </view>
<!-- '4', --> <!-- '4', '8' -->
<view class="btn" v-if="['1', '2', '6', '8'].indexOf(orderstate) >= 0"> <view class="btn" v-if="['1', '2', '6'].indexOf(orderstate) >= 0">
<!-- orderstate == '4' || --> <!-- orderstate == '4' || -->
<view class="cancel" v-if="(orderstate == '1') && orderInfo.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view> <view class="cancel" v-if="(orderstate == '1') && orderInfo.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
<view class="cancel" v-if="orderstate == '1'" @click="toOtherPage('Logistics')">查看物流</view> <view class="cancel" v-if="orderstate == '1'" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view> <view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view> <view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view> <view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view>
<view class="cancel" v-if="orderstate == '8'" @click="cancelOrder">取消订单</view> <!-- <view class="cancel" v-if="orderstate == '8'" @click="cancelOrder">取消订单</view> -->
<view class="payment" v-if="orderstate == '6' || orderstate == '8'" @click="payNow">立即支付</view> <!-- || orderstate == '8' -->
<view class="payment" v-if="orderstate == '6'" @click="payNow">立即支付</view>
<view class="service" v-if="orderstate == '7'">联系官方客服</view> <view class="service" v-if="orderstate == '7'">联系官方客服</view>
<view class="submit" v-if="orderstate == '7'">提交官方审核</view> <view class="submit" v-if="orderstate == '7'">提交官方审核</view>
</view> </view>