From ba0d2e7e9fe84133bc4953017c1294666242dabe Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Thu, 19 Sep 2024 20:47:20 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 1 +
components/content/contentControls.vue | 34 +++++++++--
config.js | 2 +-
pages/index/index.vue | 7 ++-
pages/publish/actorDetail.vue | 46 ++++++++------
pages/publish/actorList.vue | 9 ++-
pages/publish/actorRelease.vue | 35 +++++++++--
pages/publish/postDetail.vue | 19 ++++--
pages/publish/publishPost.vue | 108 +++++++++++++++++++++++++--------
pages_mine/publish/competition.vue | 23 ++++---
pages_mine/publish/worksDetail.vue | 12 +++-
utils/utils.js | 10 ++-
12 files changed, 232 insertions(+), 74 deletions(-)
diff --git a/App.vue b/App.vue
index 045a58a..a351c3f 100644
--- a/App.vue
+++ b/App.vue
@@ -15,6 +15,7 @@
padding: 0;
margin: 0;
box-sizing: border-box;
+ font-size: 30rpx;
}
/*每个页面公共css */
body{
diff --git a/components/content/contentControls.vue b/components/content/contentControls.vue
index 495c15b..6d5f383 100644
--- a/components/content/contentControls.vue
+++ b/components/content/contentControls.vue
@@ -7,7 +7,11 @@
-
+
+
点赞
-
+
+
踩
@@ -32,6 +43,16 @@
},
detail : {
default : {}
+ },
+ up : {
+ default : false,
+ },
+ down : {
+ default : false,
+ },
+ isWork : {
+ default : false,
+
}
},
data() {
@@ -47,8 +68,9 @@
id : this.detail.id,
}, res => {
if(res.code == 200){
+ this.$emit('loadData')
uni.showToast({
- title: '举报成功'
+ title: res.message
})
}
})
@@ -60,8 +82,9 @@
id : this.detail.id,
}, res => {
if(res.code == 200){
+ this.$emit('loadData')
uni.showToast({
- title: '点赞成功'
+ title: res.message
})
}
})
@@ -77,8 +100,9 @@
id : this.detail.id,
}, res => {
if(res.code == 200){
+ this.$emit('loadData')
uni.showToast({
- title: '踩成功'
+ title: res.message
})
}
diff --git a/config.js b/config.js
index 9a6313c..0c3a700 100644
--- a/config.js
+++ b/config.js
@@ -5,7 +5,7 @@ import utils from './utils/utils.js'
// 当前环境
-const type = 'prod'
+const type = 'dev'
// 环境配置
diff --git a/pages/index/index.vue b/pages/index/index.vue
index dc8d709..b7c3d60 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -47,7 +47,10 @@
-
+
{{ item.userId }}
- {{ item.createTime }}
+ {{ $dayjs(item.createTime).format('YYYY-MM-DD') }}
diff --git a/pages/publish/actorDetail.vue b/pages/publish/actorDetail.vue
index 79279cf..3e553d9 100644
--- a/pages/publish/actorDetail.vue
+++ b/pages/publish/actorDetail.vue
@@ -4,29 +4,29 @@
+ height="auto">
- {{ item.name }}
+ {{ item.details.name }}
- ¥{{ item.money }}
+ ¥{{ item.details.money }}
- 近30天收益
+ 近30天收益:¥{{ item.dayMoney }}
- {{ item.phone }}
+ v-if="item.details.phonePay != 'Y'">
+ {{ item.details.phone }}
@@ -38,10 +38,10 @@
- 发布人:{{ item.userId }}
+ 发布人:{{ item.details.userId }}
- 发布时间:{{ $dayjs(item.createTime).format('YYYY-MM-DD') }}
+ 发布时间:{{ $dayjs(item.details.createTime).format('YYYY-MM-DD') }}
@@ -49,17 +49,20 @@
+ :up="item.isThumbs_up"
+ :down="item.isThumbs_down"
+ @loadData="getData"
+ :detail="item.details"/>
-
+
@@ -79,18 +82,25 @@
},
data() {
return {
- item: {},
+ item: {
+ details : {}
+ },
list : [],
queryParams: {
pageNo: 1,
pageSize: 10
},
total : 0,
+ id : 0,
}
},
onLoad(options) {
// this.$route.query的参数
- this.getData(options.id)
+ console.log(options)
+ this.id = options.id
+ },
+ onShow() {
+ this.getData()
},
//滚动到屏幕底部
onReachBottom() {
@@ -100,12 +110,12 @@
leftClick(){
uni.navigateBack(-1)
},
- getData(id){
+ getData(){
this.$api('indexGetActorDetail', {
- id
+ id : this.id
}, res => {
if(res.code == 200){
- this.item = res.result.details
+ this.item = res.result
}
})
},
diff --git a/pages/publish/actorList.vue b/pages/publish/actorList.vue
index f18c653..06610e3 100644
--- a/pages/publish/actorList.vue
+++ b/pages/publish/actorList.vue
@@ -18,8 +18,10 @@
size="40rpx"
name="search">
-
-
+
+
搜索
@@ -41,7 +43,8 @@
total : 0,
queryParams: {
pageNo: 1,
- pageSize: 10
+ pageSize: 10,
+ title : '',
},
}
},
diff --git a/pages/publish/actorRelease.vue b/pages/publish/actorRelease.vue
index 8078796..d6a2062 100644
--- a/pages/publish/actorRelease.vue
+++ b/pages/publish/actorRelease.vue
@@ -251,6 +251,8 @@
})
},
pay() {
+
+ let self = this
let data = {
...this.form,
@@ -261,11 +263,36 @@
}
this.$api('publishActor', data,
- res => {
- if (res.code == 200) {
- this.$refs.confirmationPopupUpload.open()
+ res => {
+ if (res.code == 200) {
+ // this.$refs.confirmationPopupUpload.open()
+ if(self.form.topId){
+ uni.requestPayment({
+ provider: 'wxpay', // 服务提提供商
+ timeStamp: res.result.timeStamp, // 时间戳
+ nonceStr: res.result.nonceStr, // 随机字符串
+ package: res.result.packageValue,
+ signType: res.result.signType, // 签名算法
+ paySign: res.result.paySign, // 签名
+ success: function (res) {
+ console.log('支付成功',res);
+ self.$refs.confirmationPopupUpload.open()
+ // self.$refs.confirmationPopup.close()
+ },
+ fail: function (err) {
+ console.log('支付失败',err);
+ self.$refs.confirmationPopup.close()
+ uni.showToast({
+ icon:'none',
+ title:"支付失败"
+ })
+ }
+ });
+ }else{
+ self.$refs.confirmationPopupUpload.open()
}
- })
+ }
+ })
},
submit() {
diff --git a/pages/publish/postDetail.vue b/pages/publish/postDetail.vue
index 544b0c6..92fda0e 100644
--- a/pages/publish/postDetail.vue
+++ b/pages/publish/postDetail.vue
@@ -4,7 +4,7 @@
+ item.image.split(',')" indicator height="820rpx">
@@ -26,6 +26,9 @@
@@ -49,20 +52,28 @@
list: [
],
item: {},
+ isThumbs_up: {},//是否点赞
+ isThumbs_down: {},//是否踩
+ id : 0,
}
},
onLoad(options) {
// this.$route.query的参数
console.log(options)
- this.getData(options.id)
+ this.id = options.id
+ },
+ onShow() {
+ this.getData()
},
methods: {
- getData(id) {
+ getData() {
this.$api('indexGetTrendsDetail', {
- id
+ id : this.id
}, res => {
if (res.code == 200) {
this.item = res.result.details
+ this.isThumbs_up = res.result.isThumbs_up//是否点赞
+ this.isThumbs_down = res.result.isThumbs_down//是否踩
}
})
},
diff --git a/pages/publish/publishPost.vue b/pages/publish/publishPost.vue
index 6d1de40..a9dd6c6 100644
--- a/pages/publish/publishPost.vue
+++ b/pages/publish/publishPost.vue
@@ -37,6 +37,20 @@
+
+
+
+ 不需要置顶
+
+
+
+
+
+
+
@@ -70,7 +84,7 @@