提交
This commit is contained in:
@@ -43,27 +43,100 @@
|
||||
<view class="commodityContent">
|
||||
<view
|
||||
class="commodityPrice"
|
||||
style="padding-top: 4px !important"
|
||||
v-if="productInfo.activityPrice && productInfo.activityPrice > 0"
|
||||
>
|
||||
<span style="font-size: 28rpx">¥</span
|
||||
><em>{{ productInfo.activityPrice }}</em>
|
||||
><span
|
||||
v-if="
|
||||
productInfo.isVipPrice == 1 &&
|
||||
productInfo.vipPrice != 0 &&
|
||||
productInfo.vipPrice != null
|
||||
"
|
||||
style="
|
||||
margin-right: 10px;
|
||||
text-align: center;
|
||||
font-size: 18rpx;
|
||||
background-color: #f94f04;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
border-radius: 4px;
|
||||
width: 120rpx;
|
||||
padding: 2px 4px;
|
||||
box-sizing: border-box;
|
||||
"
|
||||
>VIP优惠图书</span
|
||||
>
|
||||
|
||||
<span style="font-size: 28rpx">¥</span>
|
||||
<em
|
||||
v-if="
|
||||
productInfo.isVipPrice == 1 &&
|
||||
productInfo.vipPrice != 0 &&
|
||||
productInfo.vipPrice != null
|
||||
"
|
||||
>{{ productInfo.vipPrice }}</em
|
||||
>
|
||||
<em v-else>{{ productInfo.activityPrice }}</em>
|
||||
<span class="oldPrice"
|
||||
>原价<span style="font-size: 20rpx; padding-left: 10rpx">¥</span
|
||||
>{{ productInfo.price }}</span
|
||||
>
|
||||
</view>
|
||||
<view class="commodityPrice" v-else>
|
||||
<span style="font-size: 28rpx">¥</span><em>{{ productInfo.price }}</em>
|
||||
|
||||
<view class="commodityPrice" v-else style="padding-top: 4px !important">
|
||||
<span
|
||||
v-if="
|
||||
productInfo.isVipPrice == 1 &&
|
||||
productInfo.vipPrice != 0 &&
|
||||
productInfo.vipPrice != null
|
||||
"
|
||||
style="
|
||||
margin-right: 10px;
|
||||
text-align: center;
|
||||
font-size: 18rpx;
|
||||
background-color: #f94f04;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
border-radius: 4px;
|
||||
width: 120rpx;
|
||||
padding: 2px 4px;
|
||||
box-sizing: border-box;
|
||||
"
|
||||
>VIP优惠图书</span
|
||||
>
|
||||
|
||||
<template
|
||||
v-if="
|
||||
productInfo.isVipPrice == 1 &&
|
||||
productInfo.vipPrice != 0 &&
|
||||
productInfo.vipPrice != null
|
||||
"
|
||||
><span style="font-size: 28rpx">¥</span>
|
||||
<em>{{ productInfo.vipPrice }}</em
|
||||
><span class="oldPrice"
|
||||
>原价<span style="font-size: 20rpx; padding-left: 10rpx">¥</span
|
||||
>{{ productInfo.price }}</span
|
||||
></template
|
||||
>
|
||||
<template v-else>
|
||||
<span style="font-size: 28rpx">¥</span
|
||||
><em>{{ productInfo.price }}</em>
|
||||
</template>
|
||||
</view>
|
||||
<view class="commodityyName">
|
||||
{{ productInfo.productName }}
|
||||
<span
|
||||
v-if="productInfo.productStock == 0"
|
||||
style="color: #aaa; font-size: 26rpx"
|
||||
style="color: #aaa; font-size: 28rpx"
|
||||
>(无货)</span
|
||||
>
|
||||
<view
|
||||
><text class="SoldNumber"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<text class="SoldNumber"
|
||||
>已售<span style="padding-left: 10rpx">{{
|
||||
productInfo.sumSales
|
||||
}}</span
|
||||
@@ -86,7 +159,7 @@
|
||||
itemClass="itemCouponClass"
|
||||
>
|
||||
</common-coupon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -102,6 +175,7 @@
|
||||
<view v-if="linkProducts && linkProducts.length > 0 && linkProducts[0]">
|
||||
<view
|
||||
class="spbh"
|
||||
style="margin-top: 10px"
|
||||
v-for="(item, index) in linkProducts"
|
||||
:key="item.id"
|
||||
>
|
||||
@@ -112,13 +186,91 @@
|
||||
<view class="spbhimg">
|
||||
<image :src="item.productImages" mode="aspectFit"></image>
|
||||
</view>
|
||||
<text class="username nowrap">{{ item.productName }}</text>
|
||||
<text
|
||||
<view>
|
||||
<text class="username">{{ item.productName }} </text>
|
||||
<br />
|
||||
<!-- <text
|
||||
class="price"
|
||||
v-if="item.activityPrice && item.activityPrice > 0"
|
||||
>¥{{ item.activityPrice }}</text
|
||||
>
|
||||
<text class="price" v-else>¥{{ item.price }}</text>
|
||||
<text class="price" v-else>¥{{ item.price }}</text> -->
|
||||
|
||||
<text
|
||||
class="price"
|
||||
v-if="
|
||||
item.isVipPrice == 1 &&
|
||||
item.vipPrice != 0 &&
|
||||
item.vipPrice != null
|
||||
"
|
||||
>
|
||||
<text
|
||||
style="color: #e97512; font-size: 15px; font-weight: bold"
|
||||
>¥{{ item.vipPrice.toFixed(2) }}</text
|
||||
>
|
||||
<!-- <text style="color: #fa2d12; font-size: 10px; margin-left: 4px"
|
||||
>VIP到手价</text
|
||||
> -->
|
||||
<text
|
||||
style="
|
||||
color: #8a8a8a;
|
||||
font-size: 14px;
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
text-decoration: line-through;
|
||||
"
|
||||
>¥{{ Number(item.price).toFixed(2) }}</text
|
||||
>
|
||||
</text>
|
||||
|
||||
<text
|
||||
v-else-if="item.activityPrice && item.activityPrice > 0"
|
||||
class="price"
|
||||
>
|
||||
<text
|
||||
style="color: #e97512; font-size: 15px; font-weight: bold"
|
||||
>¥{{ item.activityPrice.toFixed(2) }}</text
|
||||
>
|
||||
<!-- <text style="color: #613804; font-size: 10px; margin-left: 4px"
|
||||
>活动价</text
|
||||
> -->
|
||||
<text
|
||||
style="
|
||||
color: #8a8a8a;
|
||||
font-size: 14px;
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
text-decoration: line-through;
|
||||
"
|
||||
>¥{{ Number(item.price).toFixed(2) }}</text
|
||||
>
|
||||
</text>
|
||||
|
||||
<text
|
||||
v-else
|
||||
class="price"
|
||||
style="color: #e97512; font-size: 15px"
|
||||
>¥{{ Number(item.price).toFixed(2) }}</text
|
||||
>
|
||||
<text
|
||||
v-if="
|
||||
item.isVipPrice == 1 &&
|
||||
item.vipPrice != 0 &&
|
||||
item.vipPrice != null
|
||||
"
|
||||
style="
|
||||
z-index: 10;
|
||||
|
||||
margin-left: 10rpx;
|
||||
|
||||
font-size: 20rpx;
|
||||
color: #f94f04;
|
||||
|
||||
font-weight: bold;
|
||||
"
|
||||
>VIP优惠</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -396,7 +548,7 @@
|
||||
<u-popup :show="upoShow" :round="10" @close="closeUpo" style="z-index: 2">
|
||||
<view class="tanchu">
|
||||
<view class="list">
|
||||
<view class="imgBox">
|
||||
<view class="imgBox" style="position: relative">
|
||||
<image
|
||||
v-if="linkimg == ''"
|
||||
src="../../static/icon/wufeng.jpg"
|
||||
@@ -430,13 +582,95 @@
|
||||
<view class="spbhimg">
|
||||
<image :src="item.productImages" mode="aspectFit"></image>
|
||||
</view>
|
||||
<text class="username nowrap">{{ item.productName }}</text>
|
||||
<text
|
||||
<view>
|
||||
<text class="username">{{ item.productName }} </text>
|
||||
<br />
|
||||
<!-- <text
|
||||
class="price"
|
||||
v-if="item.activityPrice && item.activityPrice > 0"
|
||||
>¥{{ item.activityPrice }}</text
|
||||
>
|
||||
<text class="price" v-else>¥{{ item.price }}</text>
|
||||
<text class="price" v-else>¥{{ item.price }}</text> -->
|
||||
<text
|
||||
class="price"
|
||||
v-if="
|
||||
item.isVipPrice == 1 &&
|
||||
item.vipPrice != 0 &&
|
||||
item.vipPrice != null
|
||||
"
|
||||
>
|
||||
<text
|
||||
style="color: #e97512; font-size: 15px; font-weight: bold"
|
||||
>¥{{ item.vipPrice.toFixed(2) }}</text
|
||||
>
|
||||
<!-- <text style="color: #fa2d12; font-size: 10px; margin-left: 4px"
|
||||
>VIP到手价</text
|
||||
> -->
|
||||
<text
|
||||
style="
|
||||
color: #8a8a8a;
|
||||
font-size: 14px;
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
text-decoration: line-through;
|
||||
"
|
||||
>¥{{ Number(item.price).toFixed(2) }}</text
|
||||
>
|
||||
</text>
|
||||
|
||||
<text
|
||||
v-else-if="item.activityPrice && item.activityPrice > 0"
|
||||
class="price"
|
||||
>
|
||||
<text
|
||||
style="
|
||||
color: #e97512;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
"
|
||||
>¥{{ item.activityPrice.toFixed(2) }}</text
|
||||
>
|
||||
<!-- <text style="color: #613804; font-size: 10px; margin-left: 4px"
|
||||
>活动价</text
|
||||
> -->
|
||||
<text
|
||||
style="
|
||||
color: #8a8a8a;
|
||||
font-size: 14px;
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
text-decoration: line-through;
|
||||
"
|
||||
>¥{{ Number(item.price).toFixed(2) }}</text
|
||||
>
|
||||
</text>
|
||||
|
||||
<text
|
||||
v-else
|
||||
class="price"
|
||||
style="color: #e97512; font-size: 15px;"
|
||||
>¥{{ Number(item.price).toFixed(2) }}</text
|
||||
>
|
||||
|
||||
<text
|
||||
v-if="
|
||||
item.isVipPrice == 1 &&
|
||||
item.vipPrice != 0 &&
|
||||
item.vipPrice != null
|
||||
"
|
||||
style="
|
||||
z-index: 10;
|
||||
|
||||
margin-left: 10rpx;
|
||||
|
||||
font-size: 20rpx;
|
||||
color: #f94f04;
|
||||
|
||||
font-weight: bold;
|
||||
"
|
||||
>VIP优惠</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -476,7 +710,7 @@ import loginVue from "../user/login.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
canGetCouponList:[],
|
||||
canGetCouponList: [],
|
||||
qunyiList: [
|
||||
{
|
||||
name: "打卡",
|
||||
@@ -583,8 +817,8 @@ export default {
|
||||
musicPlay,
|
||||
},
|
||||
methods: {
|
||||
// 获取购买后可获得优惠券列表
|
||||
async getCanGetCouponList() {
|
||||
// 获取购买后可获得优惠券列表
|
||||
async getCanGetCouponList() {
|
||||
await this.$http
|
||||
.request({
|
||||
url: "common/coupon/couponToProductList",
|
||||
@@ -600,7 +834,7 @@ export default {
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.code != 0) return ;
|
||||
if (res.code != 0) return;
|
||||
console.log("res优惠券", res);
|
||||
this.canGetCouponList = res.couponToShopproductPage.records;
|
||||
})
|
||||
@@ -1262,6 +1496,7 @@ export default {
|
||||
}
|
||||
|
||||
.spbh {
|
||||
margin-top: 10px;
|
||||
border: 2rpx solid #fff;
|
||||
|
||||
.spbhimg {
|
||||
@@ -1382,7 +1617,7 @@ export default {
|
||||
|
||||
.spbh {
|
||||
padding-bottom: 10rpx;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
@@ -1402,7 +1637,8 @@ export default {
|
||||
}
|
||||
|
||||
.username {
|
||||
margin-left: 10rpx;
|
||||
padding-left: 20rpx;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.price {
|
||||
@@ -1432,7 +1668,7 @@ export default {
|
||||
}
|
||||
|
||||
.username {
|
||||
font-size: 24rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
@@ -1474,7 +1710,7 @@ export default {
|
||||
// padding: 20px 10px;
|
||||
// line-height: 30rpx;
|
||||
// background-color: #fff;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
color: #555;
|
||||
// border-radius: 20rpx 20rpx 0 0
|
||||
}
|
||||
@@ -1500,7 +1736,7 @@ export default {
|
||||
background-color: #fff;
|
||||
padding: 30rpx 30rpx 10rpx 30rpx;
|
||||
height: auto;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
.commodityPrice {
|
||||
// background-image: linear-gradient(0deg, #f7fffc 0%, #def0ea 100%);
|
||||
@@ -1633,7 +1869,7 @@ export default {
|
||||
}
|
||||
|
||||
.quanyi_item {
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
width: auto;
|
||||
border-radius: 10rpx;
|
||||
|
||||
|
||||
@@ -33,8 +33,11 @@
|
||||
<text class="orderState orderState5" v-if="orderContet.orderStatus==5">已超时</text>
|
||||
</view>
|
||||
<template v-if="orderContet.orderType == 'order' && orderContet.goodsList.length > 0">
|
||||
<view class="orderContent" v-for="(item,index) in orderContet.goodsList" :key="index"
|
||||
<view style="position: relative;" class="orderContent" v-for="(item,index) in orderContet.goodsList" :key="index"
|
||||
@click="goDetail(item.productId)" >
|
||||
<!-- <span v-if="item.isVipPrice==1&&item.vipPrice!=0&&item.vipPrice!=null"
|
||||
style="position: absolute;z-index: 10;top: 4px;left: 0px;margin-right: 10px;text-align: center;font-size: 18rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 80rpx; padding:2px 4px;box-sizing: border-box;">VIP优惠</span>
|
||||
-->
|
||||
<image :src="item.productImage" mode=""></image>
|
||||
<view class="itemJian">
|
||||
<view class="orderTitle">
|
||||
@@ -94,6 +97,15 @@
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">运费 : </span>
|
||||
<span>¥</span>{{orderContet.shippingPrice}}
|
||||
</view>
|
||||
<view class="orderReal" v-if="orderContet.orderType == 'order'&&orderContet.districtPrice&&orderContet.districtPrice>0">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;"> 活动立减: </span>
|
||||
<span style="color: #fa2d12">- ¥{{orderContet.districtPrice}}</span>
|
||||
</view>
|
||||
<view class="orderReal" v-if="orderContet.orderType == 'order'&&orderContet.vipDiscountAmount&&orderContet.vipDiscountAmount>0">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;"> <span style="color: #f94f04;font-weight: bold;margin-right: 2px;">VIP</span> 专享立减: </span>
|
||||
<span style="color: #fa2d12">- ¥{{orderContet.vipDiscountAmount}}</span>
|
||||
</view>
|
||||
|
||||
<!-- <view class="orderReal">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">优惠券 : </span>
|
||||
<b v-if="orderContet.coupon.couponAmount" style="color: #dd3c0c;"><span>-¥</span>{{orderContet.coupon.couponAmount}}</b>
|
||||
|
||||
@@ -32,7 +32,11 @@
|
||||
<view class="orderstatus" v-show="item.orderStatus == 4">交易失败</view>
|
||||
<view class="orderstatus" v-show="item.orderStatus == 5">过期</view>
|
||||
<template v-if="item.orderType == 'order'">
|
||||
<view v-for="(item1,index1) in item.productList" :key="index1" class="bookinfolist">
|
||||
<view style="position: relative;" v-for="(item1,index1) in item.productList" :key="index1" class="bookinfolist">
|
||||
<!--
|
||||
<span v-if="item1.product.isVipPrice==1&&item1.product.vipPrice!=0&&item1.vipPrice!=null"
|
||||
style="position: absolute;z-index: 10;top: 4px;left: 0px;margin-right: 10px;text-align: center;font-size: 18rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 80rpx; padding:2px 4px;box-sizing: border-box;">VIP优惠</span>
|
||||
-->
|
||||
<image class="feng" v-if="item1.product.productImages" :src="item1.product.productImages" mode="aspectFill"></image>
|
||||
<!-- <view class="description" v-html="item.content">
|
||||
</view> -->
|
||||
@@ -317,6 +321,8 @@ import { data } from 'jquery';
|
||||
"limit": 10,
|
||||
"page": this.newestpage
|
||||
}
|
||||
|
||||
console.log('params at line 324:', params)
|
||||
$http.request({
|
||||
url: "book/buyOrder/getUserOrderList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -265,28 +265,43 @@
|
||||
<!-- 精选 -->
|
||||
<view class="">
|
||||
<view v-if="tjProList.length > 0">
|
||||
<view class="flexbox" style="flex-wrap: wrap">
|
||||
<view class="flexbox" style="flex-wrap: wrap;">
|
||||
<view class="goodsItem" v-for="(item, index) in tjProList" :key="index"
|
||||
@click="goDetail(item.product_id)">
|
||||
style="position: relative;" @click="goDetail(item.product_id)">
|
||||
<image :src="item.product_images" mode="" class="goodsImg"></image>
|
||||
<view class="goodsContent">
|
||||
<view class="goodsName">
|
||||
{{ item.product_name }}
|
||||
</view>
|
||||
<view class="goodsPrice">
|
||||
<view style="display: flex; align-items: center"
|
||||
v-if="item.activity_price && item.activity_price > 0">
|
||||
<span class="price">¥{{ item.activity_price }}</span>
|
||||
<span v-if="item.activity_price != item.price" class="Salesnum" style="
|
||||
margin-left: 10rpx;
|
||||
margin-top: 2rpx;
|
||||
text-decoration: line-through;
|
||||
">¥{{ item.price }}</span>
|
||||
</view>
|
||||
<view class="goodsPrice" style="">
|
||||
|
||||
|
||||
<span class="price" v-else>¥{{ item.price }}</span>
|
||||
<span class="Salesnum">已售:{{ item.sum_sales }} 件</span>
|
||||
<text v-if="item.is_vip_price==1&&item.vip_price!=0">
|
||||
<text style="color: #e97512;font-size: 12px;font-weight: bold;">¥{{(item.vip_price).toFixed(2)}}</text>
|
||||
<!-- <text style="color: #fa2d12;font-size: 10px;margin-left: 4px;">VIP到手价</text> -->
|
||||
<text style="color: #8a8a8a;font-size: 10px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">¥{{(item.price).toFixed(2)}}</text>
|
||||
|
||||
|
||||
|
||||
</text>
|
||||
|
||||
<text
|
||||
v-else-if="item.activity_price && item.activity_price > 0">
|
||||
<text style="color: #e97512;font-size: 12px;font-weight: bold;">¥{{(item.activity_price).toFixed(2)}}</text>
|
||||
<!-- <text style="color: #613804;font-size: 10px;margin-left: 4px;">活动价</text> -->
|
||||
<text style="color: #8a8a8a;font-size: 10px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">¥{{(item.price).toFixed(2)}}</text>
|
||||
|
||||
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<span class="price" style=" color: #e97512;font-size: 12px;" v-else>¥{{ item.price }}</span>
|
||||
<span class="Salesnum" style="font-size: 10px !important;line-height: 24px;">已售:{{ item.sum_sales }} 件</span>
|
||||
</view>
|
||||
<view v-if="item.is_vip_price==1&&item.vip_price!=0&&item.vip_price!=null"
|
||||
style="position: absolute;top: 10rpx;left: 10px;text-align: center;font-size: 22rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 120rpx; padding:4px;box-sizing: border-box;">
|
||||
VIP优惠</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -460,12 +475,12 @@
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
// this.requestIapOrder()
|
||||
this.$nextTick(()=>{
|
||||
this.$nextTick(() => {
|
||||
|
||||
this.getAdvertisement()
|
||||
this.getAdvertisement()
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
onHide() {
|
||||
this.page = 1;
|
||||
@@ -546,27 +561,27 @@ this.getAdvertisement()
|
||||
...mapMutations(["setUserInfo"]),
|
||||
|
||||
async getAdvertisement() {
|
||||
await $http
|
||||
.request({
|
||||
url: "common/mainAd/getMainAd",
|
||||
method: "POST",
|
||||
data: {
|
||||
type: 0,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
console.log("res at line 61511111111111111:", res);
|
||||
if (res.code == 0 && res.list && res.list.length > 0) {
|
||||
this.advertisementList = res.list;
|
||||
await $http
|
||||
.request({
|
||||
url: "common/mainAd/getMainAd",
|
||||
method: "POST",
|
||||
data: {
|
||||
type: 0,
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
console.log("res at line 61511111111111111:", res);
|
||||
if (res.code == 0 && res.list && res.list.length > 0) {
|
||||
this.advertisementList = res.list;
|
||||
|
||||
this.$refs.commonAdvertisement.open();
|
||||
}
|
||||
});
|
||||
},
|
||||
this.$refs.commonAdvertisement.open();
|
||||
}
|
||||
});
|
||||
},
|
||||
requestAll() {
|
||||
this.getUserInfo();
|
||||
this.tjProList = [];
|
||||
@@ -740,6 +755,7 @@ this.getAdvertisement()
|
||||
.then((res) => {
|
||||
if (res.code == 0 && res.result.length > 0) {
|
||||
this.tjProList = res.result;
|
||||
console.log('列表列表this.tjProList at line 745:', this.tjProList)
|
||||
} else {
|
||||
this.tjProList = [];
|
||||
this.status = 3;
|
||||
@@ -1803,7 +1819,7 @@ this.getAdvertisement()
|
||||
display: inline-block;
|
||||
width: 46%;
|
||||
border-radius: 20rpx;
|
||||
padding: 25rpx;
|
||||
padding: 20rpx;
|
||||
padding-bottom: 5rpx;
|
||||
margin: 0 20rpx 20rpx 20rpx;
|
||||
background-color: #fff;
|
||||
@@ -1818,7 +1834,7 @@ this.getAdvertisement()
|
||||
.goodsContent {
|
||||
.goodsName {
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-size: 26rpx;
|
||||
// font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,20 +5,43 @@
|
||||
<scroll-view scroll-y="true">
|
||||
<view class="cartItem" v-for="(item,index) in cartList" :key="index">
|
||||
<view class="select">
|
||||
<checkbox :checked="item.checked" @click="checkboxGroupChange(index,item)"
|
||||
<checkbox style="transform:scale(0.8)" :checked="item.checked" @click="checkboxGroupChange(index,item)"
|
||||
class="round checkedItem" />
|
||||
</view>
|
||||
<view class="cartContent">
|
||||
<view class="cartContent" style="position: relative;">
|
||||
<span v-if="item.isVipPrice==1&&item.vipPrice!=0&&item.vipPrice!=null"
|
||||
style="position: absolute;z-index: 10;top: 4px;left: 0px;margin-right: 10px;text-align: center;font-size: 18rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 80rpx; padding:2px 4px;box-sizing: border-box;">VIP优惠</span>
|
||||
|
||||
<image :src="item.image" mode="" @click="goDetail(item.productId)"></image>
|
||||
<view class="itemCenter">
|
||||
<view class="cartTitle" @click="goDetail(item.productId)">
|
||||
<view class="cartTitle" @click="goDetail(item.productId)" style="display: flex;align-items: center;">
|
||||
<text>{{item.productName}}</text>
|
||||
</view>
|
||||
<view class="itemPrice">
|
||||
<text v-if="item.activityPrice && item.activityPrice > 0">¥{{item.activityPrice*item.productAmount}}</text>
|
||||
<text v-else>¥{{item.price*item.productAmount}}</text>
|
||||
<u-number-box v-model="item.productAmount" @change="valChange($event,item)" :input-width="50"
|
||||
:input-height="20" :min="1" :max="item.productStock" integer @overlimit='overlimit'></u-number-box>
|
||||
<text v-if="item.isVipPrice==1&&item.vipPrice!=0&&item.vipPrice!=null">
|
||||
<text style="color: #e97512;font-size: 16px;font-weight: bold;">¥{{(item.vipPrice).toFixed(2)}}</text>
|
||||
<!-- <text style="color: #fa2d12;font-size: 10px;margin-left: 4px;">VIP到手价</text> -->
|
||||
<text style="color: #8a8a8a;font-size: 14px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">¥{{(item.price).toFixed(2)}}</text>
|
||||
|
||||
|
||||
|
||||
</text>
|
||||
|
||||
<text
|
||||
v-else-if="item.activityPrice && item.activityPrice > 0">
|
||||
<text style="color: #e97512;font-size: 16px;font-weight: bold;">¥{{(item.activityPrice).toFixed(2)}}</text>
|
||||
<!-- <text style="color: #613804;font-size: 10px;margin-left: 4px;">活动价</text> -->
|
||||
<text style="color: #8a8a8a;font-size: 14px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">¥{{(item.price).toFixed(2)}}</text>
|
||||
|
||||
|
||||
|
||||
</text>
|
||||
|
||||
<text v-else style="color: #e97512;font-size: 16px;font-weight: bold;">¥{{item.price}}</text>
|
||||
|
||||
<u-number-box button-size="20" v-model="item.productAmount" @change="valChange($event,item)"
|
||||
:input-width="25" :input-height="10" :min="1" :max="item.productStock" integer
|
||||
@overlimit='overlimit'></u-number-box>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -29,13 +52,20 @@
|
||||
<!-- 底部操作区 -->
|
||||
<view class="shopCarFooter">
|
||||
<view class="selectAll">
|
||||
<checkbox :checked="all" @click="isSelectAll()" class="round checkedItem" />
|
||||
<checkbox :checked="all" style="transform:scale(0.8)" @click="isSelectAll()" class="round checkedItem" />
|
||||
<text class="cartCho">全选</text>
|
||||
<!-- <text class="cartDel" >删除</text> -->
|
||||
<button class="mini-btn" style="border-radius: 40rpx; font-size: 30rpx; height: 56rpx; line-height: 56rpx; margin-left: 6rpx;" v-if="isCartDelShow" @click="delCart()" type="warn" size="mini">删除</button>
|
||||
<button class="mini-btn"
|
||||
style="border-radius: 40rpx; font-size: 30rpx; height: 56rpx; line-height: 56rpx; margin-left: 6rpx;"
|
||||
v-if="isCartDelShow" @click="delCart()" type="warn" size="mini">删除</button>
|
||||
</view>
|
||||
<view class="exhibition">
|
||||
<text class="total">合计: <b>¥{{totalPrice}}</b></text>
|
||||
<view class="total">合计: <b>¥{{totalPrice}}</b>
|
||||
|
||||
<!-- <text style="display: inline-block;width: 80%;color: #8a8a8a;font-size: 10px;">
|
||||
不包含运费
|
||||
</text> -->
|
||||
</view>
|
||||
<view class="settlement" @click="setTment()">
|
||||
结算
|
||||
</view>
|
||||
@@ -59,7 +89,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData:{},
|
||||
playData: {},
|
||||
totalPrice: 0, // 总价
|
||||
all: false, // 是否全选
|
||||
isCartDelShow: false, // 是否展示删除按钮
|
||||
@@ -84,8 +114,8 @@
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
components:{
|
||||
musicPlay
|
||||
components: {
|
||||
musicPlay
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
@@ -135,36 +165,40 @@
|
||||
this.cartList.forEach((item, index) => {
|
||||
let price = 0;
|
||||
if (item.checked) {
|
||||
if(item.activityPrice && item.activityPrice > 0){
|
||||
price = item.productAmount * item.activityPrice;
|
||||
}else{
|
||||
price = item.productAmount * item.price;
|
||||
if (item.isVipPrice == 1 && item.vipPrice != 0) {
|
||||
price = (item.productAmount * item.vipPrice).toFixed(2);
|
||||
} else {
|
||||
if (item.activityPrice && item.activityPrice > 0) {
|
||||
price = (item.productAmount * item.activityPrice).toFixed(2);
|
||||
} else {
|
||||
price = (item.productAmount * item.price).toFixed(2);
|
||||
}
|
||||
}
|
||||
allprice += price
|
||||
}
|
||||
allprice += Number(price)
|
||||
})
|
||||
this.totalPrice = allprice
|
||||
},
|
||||
this.totalPrice = allprice.toFixed(2)
|
||||
},
|
||||
// 超出阈值时
|
||||
overlimit(){
|
||||
overlimit() {
|
||||
uni.showToast({
|
||||
title:'超出商品数量',
|
||||
title: '超出商品数量',
|
||||
icon: 'error',
|
||||
duration: 1000
|
||||
})
|
||||
},
|
||||
valChange(e, item) {
|
||||
console.log(e)
|
||||
let productItem = {}
|
||||
productItem = item
|
||||
let productItem = {}
|
||||
productItem = item
|
||||
productItem.productAmount = e.value
|
||||
this.updateCart(productItem)
|
||||
setTimeout(() => {
|
||||
this.total()
|
||||
}, 300)
|
||||
this.updateCart(productItem)
|
||||
setTimeout(() => {
|
||||
this.total()
|
||||
}, 300)
|
||||
},
|
||||
// 更新购物车
|
||||
updateCart(shagnpin){
|
||||
updateCart(shagnpin) {
|
||||
// 已在购物车中添加
|
||||
$http.request({
|
||||
url: "book/ordercart/update",
|
||||
@@ -211,7 +245,7 @@
|
||||
}).then(res => {
|
||||
this.isCartDelShow = false
|
||||
this.totalPrice = 0
|
||||
this.getCartList()
|
||||
this.getCartList()
|
||||
uni.hideLoading()
|
||||
})
|
||||
} else {
|
||||
@@ -223,27 +257,27 @@
|
||||
|
||||
// 跳转结算页面
|
||||
setTment() {
|
||||
let shangList=[]
|
||||
let shangList = []
|
||||
this.cartList.forEach((item, index) => {
|
||||
if (item.checked) {
|
||||
shangList.push(index)
|
||||
shangList.push({productId:item.productId,num:item.productAmount})
|
||||
}
|
||||
})
|
||||
// 如果没有勾选
|
||||
if(shangList.length == 0){
|
||||
if (shangList.length == 0) {
|
||||
uni.showToast({
|
||||
title: "请先勾选商品",
|
||||
icon: 'error',
|
||||
duration: 1000,
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '../bookShop/settlement?type=1&list='+JSON.stringify(shangList)
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '../bookShop/settlement?type=1&list=' + JSON.stringify(shangList)
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// 商品内容跳转
|
||||
goDetail(id) {
|
||||
uni.navigateTo({
|
||||
@@ -264,7 +298,7 @@
|
||||
padding-top: 20rpx;
|
||||
|
||||
.cartItem {
|
||||
padding: 10rpx 10rpx 10rpx 20rpx;
|
||||
padding: 10rpx 10rpx 10rpx 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -276,8 +310,8 @@
|
||||
display: flex;
|
||||
|
||||
image {
|
||||
width: 150rpx;
|
||||
height: 180rpx;
|
||||
width: 130rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 10rpx;
|
||||
margin-right: 15rpx;
|
||||
@@ -359,4 +393,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user