From 6e948972e8498a7b4916f5530f8dd889c984120a Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Sat, 25 Jan 2025 21:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/api/shop.js | 15 +- jiuyi2/api/video.js | 68 ++++++++ jiuyi2/common/js/config.js | 2 +- jiuyi2/common/js/order.js | 25 +++ jiuyi2/components/index/commentArea.vue | 10 +- jiuyi2/components/index/indexVideo.vue | 10 +- jiuyi2/components/mine/payPwd.vue | 7 +- jiuyi2/components/shop/order/express.vue | 39 ++++- jiuyi2/pages.json | 12 +- jiuyi2/pages/index/dataCenter/dataCenter.vue | 161 +++++++++++++------ jiuyi2/pages/index/dataCenter/like.vue | 115 ++++++++++++- jiuyi2/pages/index/index.nvue | 18 ++- jiuyi2/pages/index/videoDetail.vue | 4 +- jiuyi2/pages/index/videoHome.vue | 20 ++- jiuyi2/pages/mine/userinfo.vue | 4 +- jiuyi2/pages/shop/order/detail.vue | 94 ++++++++--- jiuyi2/pages/shop/order/index.vue | 71 +++++--- jiuyi2/pages/shop/order/refundStar.vue | 2 +- jiuyi2/readme.md | 16 ++ jiuyi2/store/index.js | 3 +- jiuyi2/vite.config.js | 2 +- 21 files changed, 565 insertions(+), 133 deletions(-) diff --git a/jiuyi2/api/shop.js b/jiuyi2/api/shop.js index 19628e4c..3d554f3f 100644 --- a/jiuyi2/api/shop.js +++ b/jiuyi2/api/shop.js @@ -346,7 +346,7 @@ const shop = { }, /** - * 订单取消 + * 订单发起售后 * @param {Object} param */ orderAfterSales(param) { @@ -370,6 +370,19 @@ const shop = { load: true, }) }, + + /** + * 订单更新收货 + * @param {Object} param + */ + orderupdateRefund(param) { + return util.request({ + url: `/shopify/appRefundOrder/updateRefund`, + data: param.data, + method: 'POST', + load: true, + }) + }, } export default shop \ No newline at end of file diff --git a/jiuyi2/api/video.js b/jiuyi2/api/video.js index 9edeebd0..4e63f28d 100644 --- a/jiuyi2/api/video.js +++ b/jiuyi2/api/video.js @@ -353,6 +353,7 @@ const video = { method: 'GET', }) }, + /** * 关注列表 * @param {Object} param @@ -365,6 +366,7 @@ const video = { method: 'GET', }) }, + /** * 关注列表 * @param {Object} param @@ -377,6 +379,7 @@ const video = { method: 'GET', }) }, + /** * 关注用户 关注状态 0:取关 1:关注 * @param {Object} param @@ -505,6 +508,71 @@ const video = { method: 'GET', }) }, + + /** + * 获取视频流量统计表 + * @param {Object} param + */ + getFlow(param) { + return util.request({ + url: `/video/statistics/getStatisticsData/flowStatistics`, + data: param.data, + method: 'POST', + }) + }, + + /** + * 获取视频统计数据 + * @param {Object} param + */ + getStatistics(param) { + return util.request({ + url: `/video/statistics/getStatisticsData`, + data: param.data, + method: 'POST', + }) + }, + + /** + * 消耗流量果解锁统计 + * @param {Object} param + */ + unlockStatistics(param) { + return util.request({ + url: `/video/statistics/getStatisticsData/unlockStatistics`, + load: true, + data: param.data, + method: 'GET', + }) + }, + + /** + * 公开赞统计 + * @param {Object} param + */ + openLikeData(param) { + return util.request({ + url: `/video/statistics/getStatisticsData/openLikeData`, + load: true, + query: param.query, + data: param.data, + method: 'POST', + }) + }, + + /** + * 私密赞统计 + * @param {Object} param + */ + PrivacyLikeData(param) { + return util.request({ + url: `/video/statistics/getStatisticsData/PrivacyLikeData`, + load: true, + query: param.query, + data: param.data, + method: 'POST', + }) + }, } export default video \ No newline at end of file diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index 01c06e18..82d899b9 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -6,7 +6,7 @@ const config = { // #endif // #ifndef H5 // host: 'http://91f.xyz:8080', - host: 'http://yz78nt.natappfree.cc', + host: 'http://rud57d.natappfree.cc', // #endif // 支付方式配置 payType: { diff --git a/jiuyi2/common/js/order.js b/jiuyi2/common/js/order.js index e62cca1c..8e0a3208 100644 --- a/jiuyi2/common/js/order.js +++ b/jiuyi2/common/js/order.js @@ -91,6 +91,31 @@ const order = { }) }) }, + + /** + * 售后订单更新 + * @param {Object} event 事件对象 + */ + orderupdateRefund: (event) => { + return new Promise((resolve, reject) => { + api.shop.orderupdateRefund({ + data: { + id: event.orderId, + expressName: event.expressName, + trackingNumber: event.trackingNumber, + }, + }).then(res => { + if (res.code == 200) { + resolve(res.data) + return + } + util.alert({ + content: res.msg, + showCancel: false, + }) + }) + }) + }, } export default order \ No newline at end of file diff --git a/jiuyi2/components/index/commentArea.vue b/jiuyi2/components/index/commentArea.vue index da71a8a2..3a8c9bb7 100644 --- a/jiuyi2/components/index/commentArea.vue +++ b/jiuyi2/components/index/commentArea.vue @@ -196,6 +196,10 @@ * @param {Number} index 当前项下标 */ function handleExpansion(item, index) { + // 子评论总数 + let childrenCommentCount = item.childrenCommentCount + // 子评论总长 + let childLength = item.child.length // 如果状态为收起 展开全部 if (item.childShow == false) { item.childShow = true @@ -203,13 +207,13 @@ } // 如果数据全部加载完毕 - if (item.child.length >= item.num && item.childShow) { + if ((childLength >= childrenCommentCount) && item.childShow) { item.childShow = false return } item.pageNum++ - // + // 获取子评论 getLevelCommentList(item, index) } @@ -422,7 +426,7 @@ diff --git a/jiuyi2/components/index/indexVideo.vue b/jiuyi2/components/index/indexVideo.vue index 2016c2e5..8ce3dba5 100644 --- a/jiuyi2/components/index/indexVideo.vue +++ b/jiuyi2/components/index/indexVideo.vue @@ -181,16 +181,16 @@ break; case 2: console.log('公开赞') - return emit('like', { + likeType: 0, index: props.index, isLike: isLike == 0 ? 0 : 1 }) break; case 3: console.log('隐私赞') - return emit('like', { + likeType: 1, index: props.index, isLike: isLike == 0 ? 3 : 1 }) @@ -372,7 +372,7 @@ emit('like', { index, likeType, - isDelFlag, + isLike, }) }).catch(() => { uni.navigateTo({ @@ -547,10 +547,10 @@ diff --git a/jiuyi2/pages.json b/jiuyi2/pages.json index 0f62e8e1..8fe847c6 100644 --- a/jiuyi2/pages.json +++ b/jiuyi2/pages.json @@ -72,18 +72,21 @@ "bounce": "none" } } - }, { + }, + { "path": "pages/news/group-chat-list/index", "style": { "navigationBarTitleText": "群聊列表" } - }, { + }, + { "path": "pages/news/group-chat/index", "style": { "navigationBarTitleText": "创建群聊", "navigationBarBackgroundColor": "#fff" } - }, { + }, + { "path": "pages/news/chat/chat", "style": { "navigationBarTitleText": "问答页" @@ -466,7 +469,8 @@ "style": { "navigationBarTitleText": "点赞统计", "navigationBarBackgroundColor": "#fff", - "navigationStyle": "custom" + "navigationStyle": "custom", + "enablePullDownRefresh": true } }, { diff --git a/jiuyi2/pages/index/dataCenter/dataCenter.vue b/jiuyi2/pages/index/dataCenter/dataCenter.vue index 86e8a797..cf409dbe 100644 --- a/jiuyi2/pages/index/dataCenter/dataCenter.vue +++ b/jiuyi2/pages/index/dataCenter/dataCenter.vue @@ -1,34 +1,29 @@ @@ -54,22 +155,22 @@ {{typeCurrent.name}} - {{typeCurrent.count}} + {{typeCurrent.total}} - + - + - A**** {{typeCurrent.name}}了你 + {{item.formatName}} {{typeCurrent.name}}了你 2024.12.08 20:00 - + 暂无更多~ diff --git a/jiuyi2/pages/index/index.nvue b/jiuyi2/pages/index/index.nvue index adcd877f..d14f0498 100644 --- a/jiuyi2/pages/index/index.nvue +++ b/jiuyi2/pages/index/index.nvue @@ -583,12 +583,24 @@ * 视频点赞 * @param {Object} param 见下 * @param {Number} param.index 操作的视频下标 - * @param {Number|String} param.isDelFlag 0.点赞 1.取消点赞 + * @param {Number|String} param.isLike 0.点赞 1.取消点赞 * @param {Number|String} param.likeType 点赞类型 0.公开赞 1.隐私赞 */ function videoLike(param) { // 当前项 const item = tabCurrent.value.listData()[param.index] + console.log('data', { + // 视频id + videoId: item.id, + // 点赞用户id + likeUserId: userinfo.value.id, + // 被点赞用户id + targetUserId: item.userId, + // 点赞类型 0.公开赞 1.隐私赞 + likeType: param.likeType, + // //点赞 0.点赞 1.取消点赞 + isLike: param.isLike, + }) // api.video.videoLike({ data: { @@ -601,7 +613,7 @@ // 点赞类型 0.公开赞 1.隐私赞 likeType: param.likeType, // //点赞 0.点赞 1.取消点赞 - isDelFlag: param.isDelFlag, + isLike: param.isLike, } }).then(rs => { if (rs.code == 200) { @@ -720,7 +732,7 @@ @showTime="handleShowTime" @showComment="handleShowCommentAlt" @showCollect="handleShowCollectAlt" @showShareFirend="handleShowShareFirend" @onPlay="handleVideoOnPlay" @onPause="handleVideoOnPause" @like="videoLike" - @longtap="$refs.moreMenuRef.open(secItem)"@showFastCollect="handleShowFastCollect" /> + @longtap="$refs.moreMenuRef.open(secItem)" @showFastCollect="handleShowFastCollect" /> diff --git a/jiuyi2/pages/index/videoDetail.vue b/jiuyi2/pages/index/videoDetail.vue index 3fff9de4..feaef2f5 100644 --- a/jiuyi2/pages/index/videoDetail.vue +++ b/jiuyi2/pages/index/videoDetail.vue @@ -33,12 +33,12 @@ // 视频详情 const detail = reactive({}) // 是否是自己 - const isMine = ref(false) + const isMine = ref(0) onLoad((option) => { if (option.videoId) videoId.value = option.videoId // 是否我的作品 - if (option.isMine && option.isMine != 'false') isMine.value = option.isMine + if (option.isMine) isMine.value = option.isMine // 获取视频详情 getVideoDetail() diff --git a/jiuyi2/pages/index/videoHome.vue b/jiuyi2/pages/index/videoHome.vue index d498a28a..4b64ffd2 100644 --- a/jiuyi2/pages/index/videoHome.vue +++ b/jiuyi2/pages/index/videoHome.vue @@ -83,6 +83,7 @@ api.video.getUserInfo({ query: { userId: userId.value, + myId: userinfo.value.id, } }).then(rs => { if (rs.code == 200) { @@ -110,10 +111,8 @@ // 获取用户作品 function getList() { // - api.video.myVideoList({ + api.video.myWorks({ query: { - // 0正常1草稿 不传查全部 - isDraft: 0, // 人员id userId: userId.value, pageSize: listProperty.pageSize, @@ -159,7 +158,7 @@ function handleCopyAccount() { // 复制用户账号 uni.setClipboardData({ - data: detail.userAccount, + data: detail.account, showToast: false, success: rs => { util.alert('复制成功') @@ -170,14 +169,12 @@ // 关注用户 function handleAttention() { api.video.attention({ - path: [detail.isAttention ? 0 : 1], data: { // 当前用户id - userId: userinfo.value.userId, + userId: userinfo.value.id, // 被关注id - attentionId: detail.userId, - // 来源 - attentionSource: 1, + attentionId: detail.id, + isAttention: detail.isAttention ? 1 : 0, } }).then(rs => { if (rs.code == 200) { @@ -333,7 +330,7 @@ {{detail.userNickname}} - 账号:{{detail.userAccount}} + 账号:{{detail.account}} @@ -380,7 +377,8 @@ 不让 Ta 看作品 - + diff --git a/jiuyi2/pages/mine/userinfo.vue b/jiuyi2/pages/mine/userinfo.vue index 3150837b..77950510 100644 --- a/jiuyi2/pages/mine/userinfo.vue +++ b/jiuyi2/pages/mine/userinfo.vue @@ -90,6 +90,7 @@ success: rs => { // 同步值 user[key] = rs.value + console.log('user', user) } }) } @@ -178,7 +179,8 @@ 性别 - + 请选择 {{gender[genderIndex].name}} diff --git a/jiuyi2/pages/shop/order/detail.vue b/jiuyi2/pages/shop/order/detail.vue index 7bca1ad2..733f0c6e 100644 --- a/jiuyi2/pages/shop/order/detail.vue +++ b/jiuyi2/pages/shop/order/detail.vue @@ -79,6 +79,7 @@ if (res.code == 200) { let result = res.data result.status = Number(result.status) + result.refundStatus = Number(result.refundStatus) Object.assign(detail, {}, result) return } @@ -108,6 +109,33 @@ return }) } + + // 确认收货 + function handleReceived() { + order.orderReceived({ + orderId: detail.id, + }).then(res => { + // 重载列表 + refreshList() + }) + } + + /** + * 填写退货物流信息 + * @param {Object} param + */ + function handleExpressConfirm(param) { + let data = { + ...param, + id: detail.id, + } + console.log('orderupdateRefund', data) + + order.orderupdateRefund(data).then(res => { + // 重载列表 + refreshList() + }) + }