This commit is contained in:
2025-03-19 15:05:33 +08:00
parent a2bf3311f9
commit d1b9024fb1
9 changed files with 1721 additions and 1109 deletions

View File

@@ -24,7 +24,7 @@
"type" : "uni-app:app-ios" "type" : "uni-app:app-ios"
}, },
{ {
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]

View File

@@ -7,7 +7,7 @@ if (process.env.NODE_ENV === 'development') {
// baseUrl = "https://twin-ui.com/demo/"; // baseUrl = "https://twin-ui.com/demo/";
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境 // baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
baseUrl = "https://api.nuttyreading.com/"; // 线上正式 baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑 // baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
// baseUrl = "http://59.110.212.44:9200/pb/"; // baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑 // baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
// baseUrl = "http://192.168.110.110:9200/pb/";//磊哥 // baseUrl = "http://192.168.110.110:9200/pb/";//磊哥
@@ -20,7 +20,7 @@ if (process.env.NODE_ENV === 'development') {
// baseUrl = "http://59.110.212.44:9100/pb/"; // baseUrl = "http://59.110.212.44:9100/pb/";
// baseUrl = "https://testapi.nuttyreading.com/"; // baseUrl = "https://testapi.nuttyreading.com/";
baseUrl = "https://api.nuttyreading.com/"; //1 baseUrl = "https://api.nuttyreading.com/"; //1
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑 // baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川
// baseUrl = "ws://twin-ui.com:6001/"; // baseUrl = "ws://twin-ui.com:6001/";
// socketUrl = "ws://twin-ui.com:6001/"; // socketUrl = "ws://twin-ui.com:6001/";
} }

View File

@@ -10,8 +10,8 @@
"sizes": "分辨率192x192", "sizes": "分辨率192x192",
"src": "图片路径" "src": "图片路径"
}], }],
"versionName": "1.2.68", "versionName": "1.2.70",
"versionCode": 1268, "versionCode": 1270,
"app-plus": { "app-plus": {
"compatible": { "compatible": {
"ignoreVersion": true "ignoreVersion": true

View File

@@ -43,27 +43,100 @@
<view class="commodityContent"> <view class="commodityContent">
<view <view
class="commodityPrice" class="commodityPrice"
style="padding-top: 4px !important"
v-if="productInfo.activityPrice && productInfo.activityPrice > 0" v-if="productInfo.activityPrice && productInfo.activityPrice > 0"
> ><span
<span style="font-size: 28rpx"></span v-if="
><em>{{ productInfo.activityPrice }}</em> 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 class="oldPrice"
>原价<span style="font-size: 20rpx; padding-left: 10rpx">¥</span >原价<span style="font-size: 20rpx; padding-left: 10rpx">¥</span
>{{ productInfo.price }}</span >{{ productInfo.price }}</span
> >
</view> </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>
<view class="commodityyName"> <view class="commodityyName">
{{ productInfo.productName }} {{ productInfo.productName }}
<span <span
v-if="productInfo.productStock == 0" v-if="productInfo.productStock == 0"
style="color: #aaa; font-size: 26rpx" style="color: #aaa; font-size: 28rpx"
>(无货)</span >(无货)</span
> >
<view <view
><text class="SoldNumber" style="
display: flex;
align-items: center;
justify-content: space-between;
"
>
<text class="SoldNumber"
>已售<span style="padding-left: 10rpx">{{ >已售<span style="padding-left: 10rpx">{{
productInfo.sumSales productInfo.sumSales
}}</span }}</span
@@ -86,7 +159,7 @@
itemClass="itemCouponClass" itemClass="itemCouponClass"
> >
</common-coupon> </common-coupon>
</view> </view>
</view> </view>
</template> </template>
@@ -102,6 +175,7 @@
<view v-if="linkProducts && linkProducts.length > 0 && linkProducts[0]"> <view v-if="linkProducts && linkProducts.length > 0 && linkProducts[0]">
<view <view
class="spbh" class="spbh"
style="margin-top: 10px"
v-for="(item, index) in linkProducts" v-for="(item, index) in linkProducts"
:key="item.id" :key="item.id"
> >
@@ -112,13 +186,91 @@
<view class="spbhimg"> <view class="spbhimg">
<image :src="item.productImages" mode="aspectFit"></image> <image :src="item.productImages" mode="aspectFit"></image>
</view> </view>
<text class="username nowrap">{{ item.productName }}</text> <view>
<text <text class="username">{{ item.productName }} </text>
<br />
<!-- <text
class="price" class="price"
v-if="item.activityPrice && item.activityPrice > 0" v-if="item.activityPrice && item.activityPrice > 0"
>¥{{ item.activityPrice }}</text >¥{{ 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> </view>
</view> </view>
@@ -396,7 +548,7 @@
<u-popup :show="upoShow" :round="10" @close="closeUpo" style="z-index: 2"> <u-popup :show="upoShow" :round="10" @close="closeUpo" style="z-index: 2">
<view class="tanchu"> <view class="tanchu">
<view class="list"> <view class="list">
<view class="imgBox"> <view class="imgBox" style="position: relative">
<image <image
v-if="linkimg == ''" v-if="linkimg == ''"
src="../../static/icon/wufeng.jpg" src="../../static/icon/wufeng.jpg"
@@ -430,13 +582,95 @@
<view class="spbhimg"> <view class="spbhimg">
<image :src="item.productImages" mode="aspectFit"></image> <image :src="item.productImages" mode="aspectFit"></image>
</view> </view>
<text class="username nowrap">{{ item.productName }}</text> <view>
<text <text class="username">{{ item.productName }} </text>
<br />
<!-- <text
class="price" class="price"
v-if="item.activityPrice && item.activityPrice > 0" v-if="item.activityPrice && item.activityPrice > 0"
>¥{{ item.activityPrice }}</text >¥{{ 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> </view>
</view> </view>
@@ -476,7 +710,7 @@ import loginVue from "../user/login.vue";
export default { export default {
data() { data() {
return { return {
canGetCouponList:[], canGetCouponList: [],
qunyiList: [ qunyiList: [
{ {
name: "打卡", name: "打卡",
@@ -583,8 +817,8 @@ export default {
musicPlay, musicPlay,
}, },
methods: { methods: {
// 获取购买后可获得优惠券列表 // 获取购买后可获得优惠券列表
async getCanGetCouponList() { async getCanGetCouponList() {
await this.$http await this.$http
.request({ .request({
url: "common/coupon/couponToProductList", url: "common/coupon/couponToProductList",
@@ -600,7 +834,7 @@ export default {
}, },
}) })
.then(async (res) => { .then(async (res) => {
if (res.code != 0) return ; if (res.code != 0) return;
console.log("res优惠券", res); console.log("res优惠券", res);
this.canGetCouponList = res.couponToShopproductPage.records; this.canGetCouponList = res.couponToShopproductPage.records;
}) })
@@ -1262,6 +1496,7 @@ export default {
} }
.spbh { .spbh {
margin-top: 10px;
border: 2rpx solid #fff; border: 2rpx solid #fff;
.spbhimg { .spbhimg {
@@ -1382,7 +1617,7 @@ export default {
.spbh { .spbh {
padding-bottom: 10rpx; padding-bottom: 10rpx;
font-size: 26rpx; font-size: 28rpx;
padding: 0 10rpx; padding: 0 10rpx;
} }
@@ -1402,7 +1637,8 @@ export default {
} }
.username { .username {
margin-left: 10rpx; padding-left: 20rpx;
text-align: justify;
} }
.price { .price {
@@ -1432,7 +1668,7 @@ export default {
} }
.username { .username {
font-size: 24rpx; font-size: 26rpx;
color: #999; color: #999;
margin-top: 6rpx; margin-top: 6rpx;
} }
@@ -1474,7 +1710,7 @@ export default {
// padding: 20px 10px; // padding: 20px 10px;
// line-height: 30rpx; // line-height: 30rpx;
// background-color: #fff; // background-color: #fff;
font-size: 26rpx; font-size: 28rpx;
color: #555; color: #555;
// border-radius: 20rpx 20rpx 0 0 // border-radius: 20rpx 20rpx 0 0
} }
@@ -1500,7 +1736,7 @@ export default {
background-color: #fff; background-color: #fff;
padding: 30rpx 30rpx 10rpx 30rpx; padding: 30rpx 30rpx 10rpx 30rpx;
height: auto; height: auto;
font-size: 26rpx; font-size: 28rpx;
.commodityPrice { .commodityPrice {
// background-image: linear-gradient(0deg, #f7fffc 0%, #def0ea 100%); // background-image: linear-gradient(0deg, #f7fffc 0%, #def0ea 100%);
@@ -1633,7 +1869,7 @@ export default {
} }
.quanyi_item { .quanyi_item {
font-size: 26rpx; font-size: 28rpx;
width: auto; width: auto;
border-radius: 10rpx; border-radius: 10rpx;

View File

@@ -33,8 +33,11 @@
<text class="orderState orderState5" v-if="orderContet.orderStatus==5">已超时</text> <text class="orderState orderState5" v-if="orderContet.orderStatus==5">已超时</text>
</view> </view>
<template v-if="orderContet.orderType == 'order' && orderContet.goodsList.length > 0"> <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)" > @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> <image :src="item.productImage" mode=""></image>
<view class="itemJian"> <view class="itemJian">
<view class="orderTitle"> <view class="orderTitle">
@@ -94,6 +97,15 @@
<span style="color: #666;margin-right: 10rpx;float: left;">运费 : </span> <span style="color: #666;margin-right: 10rpx;float: left;">运费 : </span>
<span></span>{{orderContet.shippingPrice}} <span></span>{{orderContet.shippingPrice}}
</view> </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"> <!-- <view class="orderReal">
<span style="color: #666;margin-right: 10rpx;float: left;">优惠券 : </span> <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> <b v-if="orderContet.coupon.couponAmount" style="color: #dd3c0c;"><span>-</span>{{orderContet.coupon.couponAmount}}</b>

View File

@@ -32,7 +32,11 @@
<view class="orderstatus" v-show="item.orderStatus == 4">交易失败</view> <view class="orderstatus" v-show="item.orderStatus == 4">交易失败</view>
<view class="orderstatus" v-show="item.orderStatus == 5">过期</view> <view class="orderstatus" v-show="item.orderStatus == 5">过期</view>
<template v-if="item.orderType == 'order'"> <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> <image class="feng" v-if="item1.product.productImages" :src="item1.product.productImages" mode="aspectFill"></image>
<!-- <view class="description" v-html="item.content"> <!-- <view class="description" v-html="item.content">
</view> --> </view> -->
@@ -317,6 +321,8 @@ import { data } from 'jquery';
"limit": 10, "limit": 10,
"page": this.newestpage "page": this.newestpage
} }
console.log('params at line 324:', params)
$http.request({ $http.request({
url: "book/buyOrder/getUserOrderList", url: "book/buyOrder/getUserOrderList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档 method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档

File diff suppressed because it is too large Load Diff

View File

@@ -265,28 +265,43 @@
<!-- 精选 --> <!-- 精选 -->
<view class=""> <view class="">
<view v-if="tjProList.length > 0"> <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" <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> <image :src="item.product_images" mode="" class="goodsImg"></image>
<view class="goodsContent"> <view class="goodsContent">
<view class="goodsName"> <view class="goodsName">
{{ item.product_name }} {{ item.product_name }}
</view> </view>
<view class="goodsPrice"> <view class="goodsPrice" style="">
<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>
<span class="price" v-else>{{ item.price }}</span> <text v-if="item.is_vip_price==1&&item.vip_price!=0">
<span class="Salesnum">已售:{{ item.sum_sales }} </span> <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>
<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> </view>
</view> </view>
@@ -460,12 +475,12 @@
// 隐藏原生的tabbar // 隐藏原生的tabbar
uni.hideTabBar(); uni.hideTabBar();
// this.requestIapOrder() // this.requestIapOrder()
this.$nextTick(()=>{ this.$nextTick(() => {
this.getAdvertisement() this.getAdvertisement()
})
})
}, },
onHide() { onHide() {
this.page = 1; this.page = 1;
@@ -546,27 +561,27 @@ this.getAdvertisement()
...mapMutations(["setUserInfo"]), ...mapMutations(["setUserInfo"]),
async getAdvertisement() { async getAdvertisement() {
await $http await $http
.request({ .request({
url: "common/mainAd/getMainAd", url: "common/mainAd/getMainAd",
method: "POST", method: "POST",
data: { data: {
type: 0, type: 0,
}, },
header: { header: {
//默认 无 说明:请求头 //默认 无 说明:请求头
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
}) })
.then(async (res) => { .then(async (res) => {
console.log("res at line 61511111111111111:", res); console.log("res at line 61511111111111111:", res);
if (res.code == 0 && res.list && res.list.length > 0) { if (res.code == 0 && res.list && res.list.length > 0) {
this.advertisementList = res.list; this.advertisementList = res.list;
this.$refs.commonAdvertisement.open(); this.$refs.commonAdvertisement.open();
} }
}); });
}, },
requestAll() { requestAll() {
this.getUserInfo(); this.getUserInfo();
this.tjProList = []; this.tjProList = [];
@@ -740,6 +755,7 @@ this.getAdvertisement()
.then((res) => { .then((res) => {
if (res.code == 0 && res.result.length > 0) { if (res.code == 0 && res.result.length > 0) {
this.tjProList = res.result; this.tjProList = res.result;
console.log('列表列表this.tjProList at line 745:', this.tjProList)
} else { } else {
this.tjProList = []; this.tjProList = [];
this.status = 3; this.status = 3;
@@ -1803,7 +1819,7 @@ this.getAdvertisement()
display: inline-block; display: inline-block;
width: 46%; width: 46%;
border-radius: 20rpx; border-radius: 20rpx;
padding: 25rpx; padding: 20rpx;
padding-bottom: 5rpx; padding-bottom: 5rpx;
margin: 0 20rpx 20rpx 20rpx; margin: 0 20rpx 20rpx 20rpx;
background-color: #fff; background-color: #fff;
@@ -1818,7 +1834,7 @@ this.getAdvertisement()
.goodsContent { .goodsContent {
.goodsName { .goodsName {
margin-top: 10rpx; margin-top: 10rpx;
font-size: 28rpx; font-size: 26rpx;
// font-weight: bold; // font-weight: bold;
} }

View File

@@ -5,20 +5,43 @@
<scroll-view scroll-y="true"> <scroll-view scroll-y="true">
<view class="cartItem" v-for="(item,index) in cartList" :key="index"> <view class="cartItem" v-for="(item,index) in cartList" :key="index">
<view class="select"> <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" /> class="round checkedItem" />
</view> </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> <image :src="item.image" mode="" @click="goDetail(item.productId)"></image>
<view class="itemCenter"> <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> <text>{{item.productName}}</text>
</view> </view>
<view class="itemPrice"> <view class="itemPrice">
<text v-if="item.activityPrice && item.activityPrice > 0">{{item.activityPrice*item.productAmount}}</text> <text v-if="item.isVipPrice==1&&item.vipPrice!=0&&item.vipPrice!=null">
<text v-else>{{item.price*item.productAmount}}</text> <text style="color: #e97512;font-size: 16px;font-weight: bold;">{{(item.vipPrice).toFixed(2)}}</text>
<u-number-box v-model="item.productAmount" @change="valChange($event,item)" :input-width="50" <!-- <text style="color: #fa2d12;font-size: 10px;margin-left: 4px;">VIP到手价</text> -->
:input-height="20" :min="1" :max="item.productStock" integer @overlimit='overlimit'></u-number-box> <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> </view>
</view> </view>
@@ -29,13 +52,20 @@
<!-- 底部操作区 --> <!-- 底部操作区 -->
<view class="shopCarFooter"> <view class="shopCarFooter">
<view class="selectAll"> <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="cartCho">全选</text>
<!-- <text class="cartDel" >删除</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>
<view class="exhibition"> <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 class="settlement" @click="setTment()">
结算 结算
</view> </view>
@@ -59,7 +89,7 @@
export default { export default {
data() { data() {
return { return {
playData:{}, playData: {},
totalPrice: 0, // 总价 totalPrice: 0, // 总价
all: false, // 是否全选 all: false, // 是否全选
isCartDelShow: false, // 是否展示删除按钮 isCartDelShow: false, // 是否展示删除按钮
@@ -84,8 +114,8 @@
computed: { computed: {
...mapState(['userInfo']), ...mapState(['userInfo']),
}, },
components:{ components: {
musicPlay musicPlay
}, },
//方法 //方法
methods: { methods: {
@@ -135,36 +165,40 @@
this.cartList.forEach((item, index) => { this.cartList.forEach((item, index) => {
let price = 0; let price = 0;
if (item.checked) { if (item.checked) {
if(item.activityPrice && item.activityPrice > 0){ if (item.isVipPrice == 1 && item.vipPrice != 0) {
price = item.productAmount * item.activityPrice; price = (item.productAmount * item.vipPrice).toFixed(2);
}else{ } else {
price = item.productAmount * item.price; 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({ uni.showToast({
title:'超出商品数量', title: '超出商品数量',
icon: 'error', icon: 'error',
duration: 1000 duration: 1000
}) })
}, },
valChange(e, item) { valChange(e, item) {
console.log(e) console.log(e)
let productItem = {} let productItem = {}
productItem = item productItem = item
productItem.productAmount = e.value productItem.productAmount = e.value
this.updateCart(productItem) this.updateCart(productItem)
setTimeout(() => { setTimeout(() => {
this.total() this.total()
}, 300) }, 300)
}, },
// 更新购物车 // 更新购物车
updateCart(shagnpin){ updateCart(shagnpin) {
// 已在购物车中添加 // 已在购物车中添加
$http.request({ $http.request({
url: "book/ordercart/update", url: "book/ordercart/update",
@@ -211,7 +245,7 @@
}).then(res => { }).then(res => {
this.isCartDelShow = false this.isCartDelShow = false
this.totalPrice = 0 this.totalPrice = 0
this.getCartList() this.getCartList()
uni.hideLoading() uni.hideLoading()
}) })
} else { } else {
@@ -223,27 +257,27 @@
// 跳转结算页面 // 跳转结算页面
setTment() { setTment() {
let shangList=[] let shangList = []
this.cartList.forEach((item, index) => { this.cartList.forEach((item, index) => {
if (item.checked) { if (item.checked) {
shangList.push(index) shangList.push({productId:item.productId,num:item.productAmount})
} }
}) })
// 如果没有勾选 // 如果没有勾选
if(shangList.length == 0){ if (shangList.length == 0) {
uni.showToast({ uni.showToast({
title: "请先勾选商品", title: "请先勾选商品",
icon: 'error', icon: 'error',
duration: 1000, duration: 1000,
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url: '../bookShop/settlement?type=1&list='+JSON.stringify(shangList) url: '../bookShop/settlement?type=1&list=' + JSON.stringify(shangList)
}); });
} }
}, },
// 商品内容跳转 // 商品内容跳转
goDetail(id) { goDetail(id) {
uni.navigateTo({ uni.navigateTo({
@@ -264,7 +298,7 @@
padding-top: 20rpx; padding-top: 20rpx;
.cartItem { .cartItem {
padding: 10rpx 10rpx 10rpx 20rpx; padding: 10rpx 10rpx 10rpx 10rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -276,8 +310,8 @@
display: flex; display: flex;
image { image {
width: 150rpx; width: 130rpx;
height: 180rpx; height: 150rpx;
border-radius: 10rpx; border-radius: 10rpx;
padding: 10rpx; padding: 10rpx;
margin-right: 15rpx; margin-right: 15rpx;
@@ -359,4 +393,4 @@
} }
} }
} }
</style> </style>