store article 8.13

This commit is contained in:
ghusermoon 2020-08-13 15:41:03 +08:00
parent 3b01c1acca
commit 2811bf31cd
7 changed files with 78 additions and 31 deletions

View File

@ -24,14 +24,15 @@
</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" @click="toOtherPage('Logistics')">查看物流</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="cancel" v-if="order.view_type == 1" @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>
<!-- <view class="cancel" v-if="order.view_type == 9" @click="cancelOrder">取消订单</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="submit" v-if="order.view_type == 8">提交官方审核</view>
</view>

View File

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

View File

@ -3,7 +3,7 @@
<u-checkbox-group class="cart-main" @change="storeChange">
<view v-for="(store, s_index) in list" :key="s_index" class="cart-item">
<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)">
<image :src="store.store_avatar"></image>
<view>{{ store.store_name }}</view>
@ -12,7 +12,7 @@
<view class="goods">
<u-checkbox-group @change="goodsChange($event, s_index)">
<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>
<view class="info">
<view class="name u-line-2" @click="viewGoodsDetails(goods.goods_id)">{{ goods.goods_name }}</view>
@ -31,7 +31,7 @@
</view>
<view class="balance">
<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-group>

View File

@ -1,6 +1,10 @@
<template>
<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>
</view>
</template>
@ -9,11 +13,30 @@
width: 365rpx;
height: 500rpx;
overflow: hidden;
>image,video{
> image {
width: 100%;
height: 100%;
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>
<script>

View File

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

View File

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

View File

@ -67,16 +67,17 @@
<view>创建时间{{ orderInfo.add_time | date}}</view>
</view>
</view>
<!-- '4', -->
<view class="btn" v-if="['1', '2', '6', '8'].indexOf(orderstate) >= 0">
<!-- '4', '8' -->
<view class="btn" v-if="['1', '2', '6'].indexOf(orderstate) >= 0">
<!-- orderstate == '4' || -->
<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="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</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 == '8'" @click="cancelOrder">取消订单</view>
<view class="payment" v-if="orderstate == '6' || orderstate == '8'" @click="payNow">立即支付</view>
<!-- <view class="cancel" v-if="orderstate == '8'" @click="cancelOrder">取消订单</view> -->
<!-- || orderstate == '8' -->
<view class="payment" v-if="orderstate == '6'" @click="payNow">立即支付</view>
<view class="service" v-if="orderstate == '7'">联系官方客服</view>
<view class="submit" v-if="orderstate == '7'">提交官方审核</view>
</view>