diff --git a/src/api/shop.ts b/src/api/shop.ts
index 0ddcc72..70c1731 100644
--- a/src/api/shop.ts
+++ b/src/api/shop.ts
@@ -76,3 +76,67 @@ export function myMedium() {
})
}
+//发帖
+export function addPosts(data:any) {
+ return request.http({
+ url: '/api/huiqitong/posts/add',
+ method: 'POST',
+ data
+ })
+}
+
+//帖子列表
+export function postsList(data:any) {
+ return request.http({
+ url: '/api/huiqitong/posts/list',
+ method: 'GET',
+ data
+ })
+}
+
+//评论帖子
+export function commentsPosts(data:any) {
+ return request.http({
+ url: '/api/huiqitong/posts/comments',
+ method: 'POST',
+ data
+ })
+}
+
+//点赞/取消点赞
+export function likesPosts(data:any) {
+ return request.http({
+ url: '/api/huiqitong/posts/likes',
+ method: 'POST',
+ data
+ })
+}
+
+//评论列表
+export function commentsList(data:any) {
+ return request.http({
+ url: '/api/huiqitong/posts/comments/list',
+ method: 'GET',
+ data
+ })
+}
+
+//是否点赞
+export function isLikes(data:any) {
+ return request.http({
+ url: '/api/huiqitong/posts/isLikes',
+ method: 'POST',
+ data
+ })
+}
+
+//帖子详情
+export function postsInfo(id:any) {
+ return request.http({
+ url: '/api/huiqitong/posts/info/'+id,
+ method: 'GET',
+ })
+}
+
+
+
diff --git a/src/pages.json b/src/pages.json
index 9e12c24..83a108e 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -88,6 +88,13 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/index/shoppage/interactiveDetail",
+ "style": {
+ "navigationBarTitleText": "帖子详情",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "pages/index/shoppage/financialAssistance",
"style": {
diff --git a/src/pages/index/active/activelist.vue b/src/pages/index/active/activelist.vue
index c06ac09..336835f 100644
--- a/src/pages/index/active/activelist.vue
+++ b/src/pages/index/active/activelist.vue
@@ -1,7 +1,7 @@
diff --git a/src/pages/index/shoppage/financialAssistance.vue b/src/pages/index/shoppage/financialAssistance.vue
index 3515d0c..1f5a3d0 100644
--- a/src/pages/index/shoppage/financialAssistance.vue
+++ b/src/pages/index/shoppage/financialAssistance.vue
@@ -3,7 +3,7 @@
diff --git a/src/pages/index/shoppage/interactiveDetail.vue b/src/pages/index/shoppage/interactiveDetail.vue
new file mode 100644
index 0000000..1ceceae
--- /dev/null
+++ b/src/pages/index/shoppage/interactiveDetail.vue
@@ -0,0 +1,354 @@
+
+
+
+
+
+
+
+
+
+ {{listdata.member_nickname}}
+ {{listdata.create_time}}
+
+
+ {{listdata.content}}
+
+
+
+
+ {{listdata.like_count}}
+
+
+
+ {{listdata.comment_count}}
+
+
+
+
+
+
+
+ {{item.member_nickname}}
+
+
+ {{item.like_count}}
+
+
+
+
+ {{item.content}}
+
+
+
+
+
+
+ 发布
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/index/shoppage/interactiveZone.vue b/src/pages/index/shoppage/interactiveZone.vue
index 52c24ef..e63670e 100644
--- a/src/pages/index/shoppage/interactiveZone.vue
+++ b/src/pages/index/shoppage/interactiveZone.vue
@@ -2,84 +2,116 @@
-
-
+
+
-
+
- 王铎
- 1月31日
+ {{item.member_nickname}}
+ {{item.create_time}}
- 小店帮好不好好不好小店帮好不好好不好小店帮好不好好不好小店帮好不好好不好
-
+ {{item.content}}
+
-
- 王铎
+ {{item.comments?.member_nickname}}
- 866
-
+ {{item.comments?.like_count}}
+
- 小店帮好不好好不好小店帮好不好好不好小店帮好不好好不好小店帮好不好好不好
+ {{item.comments?.content}}
+ :src="item.is_like?'/static/img/ydz.png':'/static/img/dz.png'" @click="dzClick(item.is_like,item.posts_id)" mode="">
- 866
+ {{item.like_count}}
- 21
+ @click="godetail(item.posts_id)">
+ {{item.comment_count}}
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/src/pages/index/shoppage/makeAssistance.vue b/src/pages/index/shoppage/makeAssistance.vue
index ccb9a1d..423661e 100644
--- a/src/pages/index/shoppage/makeAssistance.vue
+++ b/src/pages/index/shoppage/makeAssistance.vue
@@ -6,14 +6,19 @@
选择专区
-
-
-
+
+
+
+
-
+
-
+
发布
@@ -24,27 +29,58 @@
import {
ref
} from 'vue';
+ import { addPosts } from '@/api/shop'
- const list = ref([
- { name: '小店帮' },
- { name: '金融帮' },
- { name: '媒体帮' },
- { name: '企业帮' }
- ]);
+ const list = ref([{
+ name: '小店帮',
+ id: 1
+ },
+ {
+ name: '金融帮',
+ id: 2
+ },
+ {
+ name: '媒体帮',
+ id: 3
+ },
+ {
+ name: '企业帮',
+ id: 4
+ }
+ ]);
const showxz = ref(false)
const xzvalue = ref('')
+ const xzid = ref(1)
const nrvalue = ref('')
-
- const selectClick = (index) => {
- console.log(index);
- xzvalue.value = index.name
- showxz.value = false
- };
-
+
+ const selectClick = (index) => {
+ xzvalue.value = index.name
+ xzid.value = index.id
+ showxz.value = false
+ };
+
const submit = () => {
- if(nrvalue.value !== '') {
- console.log(nrvalue.value);
+ if (nrvalue.value !== '') {
+ let params = {
+ type_id: xzid.value,
+ content: nrvalue.value
+ }
+ addPosts(params).then((res)=> {
+ if(res.code === 1) {
+ uni.showToast({
+ title: '发布成功',
+ duration: 1500,
+ success() {
+ setTimeout(()=> {
+ uni.navigateTo({
+ url: '/pages/index/shoppage/interactiveZone'
+ })
+ },1500)
+ }
+ })
+ }
+ })
}
}
@@ -83,11 +119,13 @@
align-items: center;
}
}
+
.buts {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
+
.button {
margin-top: 108rpx;
border-radius: 248rpx;
@@ -98,7 +136,8 @@
font-size: 36rpx;
font-weight: 500;
line-height: 32rpx;
- text-align: justify; /* 浏览器可能不支持 */
+ text-align: justify;
+ /* 浏览器可能不支持 */
display: flex;
align-items: center;
letter-spacing: normal;
diff --git a/src/pages/memberCenter/index.vue b/src/pages/memberCenter/index.vue
index 0454bb7..edb363a 100644
--- a/src/pages/memberCenter/index.vue
+++ b/src/pages/memberCenter/index.vue
@@ -4,7 +4,7 @@
leftText="申请入会" @leftClick="leftClick">
-
+
-
- {{userStore.userInfo.name||'无名称'}}
+
+ {{userStore.userInfo.name}}
-
- 请登录
diff --git a/src/static/img/qdl.png b/src/static/img/qdl.png
new file mode 100644
index 0000000..026a3d2
Binary files /dev/null and b/src/static/img/qdl.png differ
diff --git a/src/static/img/search.png b/src/static/img/search.png
index 5edd14d..36813e6 100644
Binary files a/src/static/img/search.png and b/src/static/img/search.png differ
diff --git a/src/store/user.ts b/src/store/user.ts
index d3444f5..8548063 100644
--- a/src/store/user.ts
+++ b/src/store/user.ts
@@ -14,6 +14,7 @@ export default defineStore(
const mobile = ref('')
const showtoast = ref(false)
const userInfo = ref({})
+ const cometype = ref(0)
function getopenid(params : { code : string }) {
return new Promise((resolve, reject) => {
@@ -60,7 +61,7 @@ export default defineStore(
title: '退出成功',
mask: true,
success() {
- setTimeout(() => uni.reLaunch({ url: 'pages/login/login' }), 1000)
+ setTimeout(() => uni.navigateTo({ url: 'pages/login/login' }), 1000)
}
})
}
@@ -73,7 +74,8 @@ export default defineStore(
userInfo,
getopenid,
getUserInfo,
- logOut
+ logOut,
+ cometype
}
},
{