热更新

This commit is contained in:
2024-06-13 10:04:13 +08:00
parent e595e034dc
commit 7eaaf64a22
1180 changed files with 70026 additions and 731709 deletions

View File

@@ -1,5 +1,8 @@
<template>
<view class="container commonPageBox commonDetailPage">
<view
class="container commonPageBox commonDetailPage"
style="background-color: #f2f2f2"
>
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar
@@ -38,9 +41,11 @@
<view
class="order_box"
:style="`height: calc(100% - ${(80 + statusBarHeight) * 2}rpx);`"
style="background-color: #f2f2f2"
>
<common-list
imgUrl="url"
indexKey="orderSn"
noDataIcon="data"
:isScroll="true"
:isLoadingHide="isLoadingHide"
@@ -52,118 +57,344 @@
:pagination="pagination"
label="title"
>
<template slot="labelSlot" slot-scope="slotProps">
<view slot="labelSlot" slot-scope="slotProps">
<view class="orderInfo color_shandow">
<view class="mainContent">
<view class="btns" style="margin-top: 0rpx">
<view class="flexbox opbtns" style="letter-spacing: 1rpx">
<view
style="
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
line-height: 30rpx;
color: #9b9b9b;
font-size: 26rpx;
font-weight: 400;
"
>{{ slotProps.row.orderSn }}
<u-tag
@click="handleCopy(slotProps.row.orderSn, '订单编号')"
borderColor="#3ab3ae"
color="#3ab3ae"
text="复制"
plain
style="float: right"
size="mini"
type="success"
></u-tag
></view>
</view>
</view>
<view class="item">
<view
class="orderstatus"
v-show="slotProps.row.orderStatus == 0"
>未付款</view
class="item_top"
style="margin-top: 10rpx; margin-bottom: 0"
>
<view
class="orderstatus"
v-show="slotProps.row.orderStatus == 1"
>待发货</view
>
<view
class="orderstatus"
v-show="slotProps.row.orderStatus == 2"
>已发货</view
>
<view
class="orderstatus"
v-show="slotProps.row.orderStatus == 3"
>交易成功</view
>
<view
class="orderstatus"
v-show="slotProps.row.orderStatus == 4"
>交易失败</view
>
<view
class="orderstatus"
v-show="slotProps.row.orderStatus == 5"
>过期</view
>
<view
v-if="slotProps.row.orderType == 'point'"
class="bookinfolist"
style="height: auto"
>
<!-- <image
class="feng"
v-if="item1.product.productImages"
:src="item1.product.productImages"
mode="aspectFill"
></image> -->
<!-- <view class="description" v-html="item.content">
</view> -->
<view class="btns flexbox">
<view class="booknameleft">充值</view>
<view class="source_app"></view>
<view style="text-align: left">
<text
class="orderstatus"
v-show="slotProps.row.orderStatus == 0"
>未付款</text
>
<text
class="orderstatus"
v-show="slotProps.row.orderStatus == 1"
>待发货</text
>
<text
class="orderstatus"
v-show="slotProps.row.orderStatus == 2"
>已发货</text
>
<text
class="orderstatus"
v-show="slotProps.row.orderStatus == 3"
>交易成功</text
>
<text
class="orderstatus"
v-show="slotProps.row.orderStatus == 4"
>交易失败</text
>
<text
class="orderstatus"
v-show="slotProps.row.orderStatus == 5"
>已过期</text
>
</view>
</view>
<view
v-else
v-for="(item1, index1) in slotProps.row.productList"
:key="index1"
v-if="slotProps.row.orderType == 'vip'"
class="bookinfolist"
>
<image
class="feng"
v-if="item1.product && item1.product.productImages"
:src="item1.product.productImages"
class="feng fengPoint"
src="/static/icon/vip.png"
mode="aspectFill"
></image>
<!-- <view class="description" v-html="item.content">
</view> -->
<view class="btns flexbox">
<view class="booknameleft">{{
item1.product.productName
}}</view>
<view class="right flexbox opbtns price">
¥{{ item1.product.price }}
<view class="booknameleft"> {{ slotProps.row.vipBuyConfigEntity.title }} </view>
<view
style="
line-height: 58rpx;
color: #333;
font-size: 26rpx;
font-weight: 700;
"
>
<text style="font-size: 20rpx"></text>
</view>
</view>
<view
class="btns flexbox"
style="margin-top: 10rpx; padding-bottom: 72rpx"
style="color: #9f9f9f; margin-top: 10rpx; font-size: 24rpx"
>
<view class="left" style="color: #c0c4cc"></view>
<view class="right flexbox opbtns" style="color: #c0c4cc">
×{{ item1.quantity }}
下单时间{{ slotProps.row.createTime }}
</view>
</view>
<view
v-if="slotProps.row.orderType == 'point'"
class="bookinfolist"
>
<image
class="feng fengPoint"
src="/static/icon/pay_3.png"
mode="aspectFill"
></image>
<!-- <view class="description" v-html="item.content">
</view> -->
<view class="btns flexbox">
<view class="booknameleft"> 充值 </view>
<view
style="
line-height: 58rpx;
color: #333;
font-size: 26rpx;
font-weight: 700;
"
>
<text style="font-size: 24rpx"
>{{
slotProps.row.bookBuyConfigEntity.money
}}天医币</text
>
</view>
</view>
<view
class="btns flexbox"
style="color: #9f9f9f; margin-top: 10rpx; font-size: 24rpx"
>
下单时间{{ slotProps.row.createTime }}
</view>
</view>
<view v-if="slotProps.row.orderType == 'order'">
<view
v-for="(item2, index2) in slotProps.row.productList"
:key="slotProps.row.orderId"
class="bookinfolist"
>
<view v-if="item2.product">
<view
class="feng"
v-if="item2.product && item2.product.productImages"
>
<image
:key="Date.now()"
style="width: 100%; height: 100%"
mode="aspectFit"
:src="item2.product.productImages"
></image>
</view>
<view
v-else
class="feng"
style="
color: #c0c4cc;
font-size: 22rpx;
line-height: 140rpx;
text-align: center;
"
>暂无封面图</view
>
<!-- <view class="description" v-html="item.content">
</view> -->
<view class="btns flexbox">
<view class="booknameleft">{{
item2.product && item2.product.productName
? item2.product.productName
: ""
}}</view>
<view
style="
line-height: 58rpx;
color: #333;
font-size: 26rpx;
font-weight: 700;
"
>
<text style="font-size: 20rpx"></text>
{{
item2.product.price ? item2.product.price : ""
}}</view
>
</view>
<view class="btns flexbox" style="margin-top: 10rpx">
<view class="left" style="color: #c0c4cc"></view>
<view
class="right flexbox opbtns"
style="color: #c0c4cc"
>
×{{ item2.quantity ? item2.quantity : "" }}
</view>
</view>
</view>
<view v-else>
<view class="feng"></view>
<view class="btns flexbox">
<view class="booknameleft" style="color: #181818"
>未知商品</view
>
<view
style=""
class="right flexbox opbtns product_quantity"
>
×{{ item2.quantity ? item2.quantity : "" }}
</view>
</view>
</view>
</view>
</view>
<view class="btns flexbox" style="margin-top: 10rpx">
<view class="left" style="color: #c0c4cc"></view>
<view class="right flexbox opbtns">
<view style="margin-top: 10rpx; overflow: hidden">
<view
class="btns flexbox"
style="float: right; width: auto !important"
>
<view
style="color: #000; font-size: 30rpx; font-weight: 700"
>实付款</view
>
<view
style="color: #000; font-size: 30rpx; font-weight: 700"
>{{ " ¥" + slotProps.row.realMoney }}</view
class="right flexbox opbtns"
style="
width: auto;
line-height: 44rpx;
letter-spacing: 1rpx;
display: flex;
align-items: center;
"
>
<view
style="
line-height: 46rpx;
color: #000;
font-size: 28rpx;
font-weight: 500;
margin-right: 10rpx;
"
>实付款</view
>
<view
style="
/* margin-top: 8rpx; */
line-height: 46rpx;
color: #333;
font-size: 30rpx;
font-weight: 700;
"
>
<text style="font-size: 20rpx"></text>
{{
slotProps.row.realMoney ||
slotProps.row.realMoney == 0
? slotProps.row.realMoney
: ""
}}</view
>
</view>
</view>
<view
class="btns flexbox"
style="
margin-top: 0rpx;
float: right;
width: auto;
margin-left: 20rpx;
"
v-if="
(slotProps.row.addressId == 0 ||
slotProps.row.addressId == null) &&
slotProps.row.orderType == 'order' &&
slotProps.row.jfDeduction > 0
"
>
<view
class="right flexbox opbtns"
style="
line-height: 44rpx;
letter-spacing: 1rpx;
display: flex;
align-items: center;
"
><text style="color: #9b9b9b"> </text>
<view
style="
line-height: 46rpx;
color: #9b9b9b;
font-size: 24rpx;
font-weight: 500;
margin-right: 10rpx;
"
>积分抵扣</view
>
<view
style="
/* margin-top: 8rpx; */
line-height: 46rpx;
color: #9b9b9b;
font-size: 26rpx;
font-weight: 700;
"
>
<text style="font-size: 20rpx">¥</text>
{{ slotProps.row.jfDeduction }}
</view> </view
><text style="color: #9b9b9b"></text>
</view>
</view>
<view
class="operation_box boxShadow"
v-if="slotProps.row.isShowMore == true"
>
<view
v-if="slotProps.row.orderStatus == 0"
@click.native.stop="canceOrder(slotProps.row)"
>取消订单</view
>
</view>
<view class="btns flexbox" style="margin-top: 10rpx">
<view
class="left"
style="color: #c0c4cc"
@click.native.stop="toDetail(slotProps.row)"
>订单详情</view
@click.native.stop="
openMore(slotProps.row, slotProps.rowIndex)
"
>更多</view
>
<view class="right flexbox opbtns">
<view
class="orderstatusbtn"
v-if="slotProps.row.orderStatus == 0"
@click.native.stop="canceOrder(slotProps.row)"
>取消订单</view
>
<view
class="orderstatusbtn"
class="orderstatusbtn orderstatusbtn_success"
v-if="slotProps.row.orderStatus == 0"
@click.native.stop="goPay(slotProps.row)"
>继续付款</view
@@ -191,24 +422,48 @@
>申请售后</view
>
<!-- <view
class="orderstatusbtn"
v-if="item.orderStatus == 3 && userRecordid == null"
@click.native.stop="pingji(item.productId)"
>评价</view
> -->
class="orderstatusbtn"
v-if="item.orderStatus == 3 && userRecordid == null"
@click.native.stop="pingji(item.productId)"
>评价</view
> -->
<!-- <view class="orderstatusbtn" v-if="item.orderStatus == 3 && userRecordid != null" @click.stop="showZhuiping(item.productId)">追评</view> -->
</view>
</view>
<view
style="border-bottom: 2rpx solid #e9e9e9; height: 50rpx"
v-if="slotProps.rowIndex < slotProps.row.length - 1"
></view>
</view>
<!-- <view class="btns" style="margin-top: 10rpx">
<view class="flexbox opbtns" style="">
<view
style="
width: 100%;
line-height: 28rpx;
color: #9b9b9b;
font-size: 26rpx;
font-weight: 400;
display: flex;
align-items: center;
"
><u-icon
name="clock"
color="#9b9b9b"
style="margin-right: 10rpx"
size="20"
></u-icon
>{{ slotProps.row.createTime }}</view
>
</view>
</view> -->
</view>
</view>
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
</template>
</view>
</common-list>
</view>
<!-- <view v-if="status == 0" style="text-align: center">
@@ -323,6 +578,15 @@
</view>
</u-popup>
<z-navigation></z-navigation>
<u-action-sheet
:closeOnClickAction="true"
:closeOnClickOverlay="true"
:actions="moreList"
:show="isShowMore"
cancelText="关闭"
@close="isShowMore = false"
@select="selectClick"
></u-action-sheet>
<music-play :playData="playData"></music-play>
</view>
</template>
@@ -337,8 +601,16 @@ import { mapState, mapMutations } from "vuex";
export default {
data() {
return {
isShowMore: false,
come: "1",
isShowTab: false,
isLoadingHide: false,
moreList: [
{
name: "取消订单",
key: "false",
},
],
currentCateIndex: 0,
pagination: {
// 请求参数
@@ -390,6 +662,7 @@ export default {
badge: {},
},
],
selectOrderInfo: {},
ordersListTab: 1,
newestpage: 1,
// hotestpage: 1,
@@ -445,27 +718,27 @@ export default {
// // this.getBookList(null, false);
// });
},
onShow() {
async onShow() {
this.newList = [];
this.pagination = {
page: 1, //页码
limit: 20, //每页显示
total: 0, //总条数
};
this.$nextTick(() => {
this.ordersTabCLi(this.ordersTabs[0], 0);
this.$nextTick(async () => {
await this.ordersTabCLi(this.ordersTabs[0], 0);
});
},
onTabItemTap() {
async onTabItemTap() {
this.newList = [];
this.pagination = {
page: 1, //页码
limit: 20, //每页显示
total: 0, //总条数
};
this.$nextTick(() => {
this.ordersTabCLi(this.ordersTabs[0], 0);
});
// this.$nextTick(async () => {
// await this.ordersTabCLi(this.ordersTabs[0], 0);
// });
},
onReady() {},
computed: {
@@ -473,7 +746,24 @@ export default {
},
methods: {
...mapMutations(["setLoadingShow"]),
getImageUrl(url) {
// 通过在URL后面添加时间戳来避免缓存
return `${url}?timestamp=${Date.now()}`;
},
selectClick(index) {
console.log("index at line 609:", index);
if (index.key == "false") {
this.isShowMore = false;
this.canceOrder(this.selectOrderInfo);
}
},
openMore(row, index) {
this.selectOrderInfo = row;
this.isShowMore = true;
},
handleCopy(value, title) {
this.$commonJS.handleCopy(value, title);
},
onReachBottom1() {
// 上拉加载
// 当列表数量不大于或等于总数量,则再次调用接口请求数据
@@ -544,10 +834,11 @@ export default {
// 顶部红点数量
$http
.request({
url: "book/buyOrder/getUserOrderStatusNum",
url: "common/buyOrder/getBuyOrderNumByStatus",
method: "POST",
data: {
userId: that.userInfo.id,
come: this.come,
},
header: {
//默认 无 说明:请求头
@@ -555,13 +846,24 @@ export default {
},
})
.then((res) => {
that.map = res.map;
// 订单状态
// * 0: 待付款
// * 1: 待发货
// * 2: 已发货
// * 3已完成
// * 4: 交易失败
// * 5: 已过期
console.log("res at line 757:", res);
that.map = res.data;
that.ordersTabs.map((e) => {
if (e.value == 0 || e.value == 1 || e.value == 2) {
if (that.map[e.value] > 0) {
var numList = that.map.filter((v) => v.order_status == e.value);
console.log("num at line 771:", numList);
if (numList.length > 0) {
e.badge = {
value: that.map[e.value],
value: numList[0].num,
};
}
} else {
@@ -577,14 +879,15 @@ export default {
var params = {
userId: this.userInfo.id,
orderStatus: flag == -1 ? null : flag, //传null为全部订单状态 0-未付款 1-待发货 2-已发货 3-交易成功 4-交易失败 5-过期
come: this.come,
orderStatus: flag == -1 ? "" : flag, //传null为全部订单状态 0-未付款 1-待发货 2-已发货 3-交易成功 4-交易失败 5-过期
...this.pagination,
// limit: 10,
// page: this.newestpage,
};
$http
this.$http
.request({
url: "book/buyOrder/getUserOrderList",
url: "common/buyOrder/commonBuyOrderList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: params,
header: {
@@ -594,16 +897,16 @@ export default {
})
.then((res) => {
console.log(res, "内容获取成功");
that.pagination.total = res.page.total;
if (res.page.total == 0) {
that.pagination.total = res.data.total;
if (res.data.total == 0) {
this.isLoadingHide = true;
}
if (res.code == 0 && res.page && res.page.records.length > 0) {
that.newList = that.newList.concat(res.page.records);
if (res.code == 0 && res.data && res.data.records.length > 0) {
that.newList = that.newList.concat(res.data.records);
} else {
//
}
if (res.page.records.length != 10) {
if (res.data.records.length != 10) {
that.status = 1;
} else {
that.status = 0;
@@ -709,7 +1012,7 @@ export default {
success: (res) => {
if (res.confirm) {
this.$http
.get("/book/buyOrder/cancelOrder?orderSn=" + item.orderSn)
.get("book/buyOrder/cancelOrder?orderSn=" + item.orderSn)
.then((res) => {
if (res.code == 0) {
uni.showToast({
@@ -959,7 +1262,7 @@ export default {
</script>
<style lang="scss" scoped>
// @import '@/style/mixin.scss';
@import "@/style/mixin.scss";
.ordersTabs {
// margin: 70rpx 0 0 0;
width: 730rpx;
@@ -999,15 +1302,21 @@ export default {
}
}
.orderstatusbtn {
color: #000;
border: 1px solid #999;
border-radius: 10rpx;
padding: 0 10rpx;
margin-left: 20rpx;
width: 140rpx;
width: 160rpx !important;
height: 60rpx;
line-height: 55rpx !important;
color: #1d1d1d;
border: 1px solid #a0a0a0;
border-radius: 30rpx;
// padding: 0 10rpx;
text-align: center;
margin-left: 20rpx;
font-size: 28rpx;
}
.orderstatusbtn_success {
color: #f5342b;
border-color: #f5342b;
}
.flexbox {
display: flex;
}
@@ -1084,17 +1393,29 @@ export default {
padding-top: 20rpx;
}
.orderInfo {
position: relative;
justify-content: space-between;
// margin-bottom: 15px;
background-color: #fff;
padding: 20rpx 30rpx;
padding: 20rpx 20rpx;
border: 1px splid #999;
box-sizing: border-box;
// padding-bottom: 20rpx;
border-radius: 20rpx;
margin-bottom: 20rpx;
.bookinfolist {
height: 180rpx;
width: 100%;
margin-bottom: 20rpx;
overflow: hidden;
// height: 180rpx;
}
.bookinfolist:nth-last-child(1) {
margin-bottom: 0 !important;
}
.operation_box {
position: absolute;
bottom: 20rpx;
left: 40rpx;
}
}
.mainContent {
@@ -1109,18 +1430,43 @@ export default {
// margin-bottom: 20rpx;
}
.feng {
margin: 0rpx 20rpx 0 0;
height: 160rpx;
background-color: #fafafa;
margin: 0rpx 22rpx 0 0;
height: 140rpx;
width: 140rpx;
float: left;
border-radius: 20rpx;
border: 1rpx solid #e9e9e9;
border-radius: 14rpx;
// border: 1rpx solid #e9e9e9;
}
.point_box {
.booknameleft {
line-height: 70rpx !important;
}
}
.fengPoint {
background-color: #fff;
height: 100rpx;
width: 100rpx;
}
.item_top {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 25rpx;
.source_app {
font-size: 26rpx;
font-weight: bold;
line-height: 26rpx;
}
}
.orderstatus {
font-size: 30rpx;
color: red;
line-height: 24rpx;
font-size: 24rpx;
color: #e55f18;
text-align: right;
padding-bottom: 10rpx;
letter-spacing: 2rpx;
}
/deep/.description {
overflow: hidden;
@@ -1145,8 +1491,10 @@ export default {
justify-content: space-between;
align-items: center;
.booknameleft {
width: calc(100% - 100rpx);
color: #333;
font-size: 32rpx;
width: calc(100% - 200rpx);
color: #070707;
letter-spacing: 0.5rpx;
font-weight: 600;
}
.left {
@@ -1160,7 +1508,7 @@ export default {
align-items: center;
}
.price {
width: 80rpx;
width: 120rpx;
}
.gzicon {
margin: 0 0 0 20rpx;
@@ -1203,7 +1551,7 @@ export default {
color: #fff;
}
.item1 {
.item2 {
margin-right: 20rpx;
}
}
@@ -1217,7 +1565,7 @@ export default {
padding: 0 !important;
}
.commonDetailPage {
background-color: #d8f8e4 !important;
background-color: $themeBgColor;
}
.order_box {
padding: 20rpx;
@@ -1228,4 +1576,9 @@ export default {
padding-right: 0 !important;
border: none !important;
}
.product_quantity {
width: auto;
color: #9b9b9b;
font-size: 26rpx;
}
</style>