diff --git a/assets/img/comment/chat.png b/assets/img/comment/chat.png new file mode 100644 index 0000000..fb0330f Binary files /dev/null and b/assets/img/comment/chat.png differ diff --git a/assets/img/comment/chat_active.png b/assets/img/comment/chat_active.png new file mode 100644 index 0000000..e129852 Binary files /dev/null and b/assets/img/comment/chat_active.png differ diff --git a/assets/img/comment/empty.png b/assets/img/comment/empty.png new file mode 100644 index 0000000..e702e53 Binary files /dev/null and b/assets/img/comment/empty.png differ diff --git a/assets/img/comment/thumb.png b/assets/img/comment/thumb.png new file mode 100644 index 0000000..538f985 Binary files /dev/null and b/assets/img/comment/thumb.png differ diff --git a/assets/img/comment/thumb_active.png b/assets/img/comment/thumb_active.png new file mode 100644 index 0000000..e3e52ef Binary files /dev/null and b/assets/img/comment/thumb_active.png differ diff --git a/components/BsCommentFollowInfo.vue b/components/BsCommentFollowInfo.vue new file mode 100644 index 0000000..a615f91 --- /dev/null +++ b/components/BsCommentFollowInfo.vue @@ -0,0 +1,55 @@ + + + + {{day}}追评: + {{followComment.commentContent}} + + + + + \ No newline at end of file diff --git a/components/BsCommentInfo.vue b/components/BsCommentInfo.vue new file mode 100644 index 0000000..7f5b03d --- /dev/null +++ b/components/BsCommentInfo.vue @@ -0,0 +1,290 @@ + + + + + + {{commentDetail.userName}} + + + + + {{commentDetail.createTime}} + + 已购买:{{commentDetail.skuName}} + {{commentDetail.commentContent}} + + + + + + {{answerCount}}条评论 + + + {{answerVisible ? '收起' : '展开'}} + + + {{usefulCount || '有用'}} + + + 全部评论({{answerCount}}) + + + {{commentDetail.merchantComment.userName}}:{{commentDetail.merchantComment.createTime}} + {{commentDetail.merchantComment.commentContent}} + + + + {{item.userName}} {{item.parentId !== commentDetail.id ? ` 回复 ${item.parentUserName}` : ''}}: + {{item.createTime}} + + {{item.commentContent}} + 回复 + + + + + 发表 + + + + + + + + + \ No newline at end of file diff --git a/components/BsCommentSubmit.vue b/components/BsCommentSubmit.vue new file mode 100644 index 0000000..9f6a2ae --- /dev/null +++ b/components/BsCommentSubmit.vue @@ -0,0 +1,169 @@ + + + + + + 满意度评分 + + 满意 + + + + + + 我要晒图 + + 发表评论 + + + + + + \ No newline at end of file diff --git a/components/UiImgs.vue b/components/UiImgs.vue new file mode 100644 index 0000000..bf0d0e4 --- /dev/null +++ b/components/UiImgs.vue @@ -0,0 +1,113 @@ + + + + {{imgs}} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/constants/index.js b/constants/index.js index b8fd031..39662a5 100644 --- a/constants/index.js +++ b/constants/index.js @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-05-17 18:17:00 * @LastEditors: ch - * @LastEditTime: 2022-06-09 18:50:01 + * @LastEditTime: 2022-06-27 09:45:38 * @Description: file content */ /** @@ -38,5 +38,16 @@ const SECKILL_STATUS = { NOT_START: 1, // 未开始 GOING: 2, // 进行中 }; +const COMMENT = { + TYPE: { + // 评价 + COMMENT: 1, + // 追评 + FOLLOW_COMMENT: 2, + // 回复 + ANSWER: 3, + } + +} -export { TOKEN_KEY, UUID_KEY, ORDER_STATUS, SEX_TYPE, CATEGROY_LEVEL, SECKILL_STATUS }; +export { TOKEN_KEY, UUID_KEY, ORDER_STATUS, SEX_TYPE, CATEGROY_LEVEL, SECKILL_STATUS, COMMENT }; diff --git a/env.config.js b/env.config.js index 7b95a38..7e63773 100644 --- a/env.config.js +++ b/env.config.js @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-05-05 14:40:00 * @LastEditors: ch - * @LastEditTime: 2022-05-27 18:25:28 + * @LastEditTime: 2022-06-24 14:21:20 * @Description: 根据git分支生成对应环境的环境变量 * 开发时如果环境变量换了,可以不用重启服务,直接运行node env.config.js即可 */ diff --git a/layouts/default.vue b/layouts/default.vue index 4716a06..b401685 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-05-04 17:56:39 * @LastEditors: ch - * @LastEditTime: 2022-05-31 16:52:40 + * @LastEditTime: 2022-06-25 10:10:25 * @Description: file content --> diff --git a/layouts/module/header/index.vue b/layouts/module/header/index.vue index 50deff9..714a7dc 100644 --- a/layouts/module/header/index.vue +++ b/layouts/module/header/index.vue @@ -192,7 +192,6 @@ export default { z-index: 10; background: #ffffff; box-shadow: 0px 4px 10px 1px rgba(0, 0, 0, 0.1); - z-index: 9999; &--hide-shadow { box-shadow: none; diff --git a/nuxt.config.js b/nuxt.config.js index b236bb7..20a33ed 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-05-03 22:14:16 * @LastEditors: ch - * @LastEditTime: 2022-06-12 14:31:52 + * @LastEditTime: 2022-06-24 14:17:59 * @Description: file content */ export default { @@ -85,7 +85,7 @@ export default { '/mall/': { // target: 'http://114.55.64.39:3004', // 目标接口域名 target: 'https://you-gateway.mashibing.com/', // 目标接口域名 - target: 'https://k8s-horse-gateway.mashibing.cn/', // 目标接口域名 + // target: 'https://k8s-horse-gateway.mashibing.cn/', // 目标接口域名 pathRewrite: { changeOrigin: true, // 表示是否跨域 }, diff --git a/pages/account/index/userInfo.vue b/pages/account/index/userInfo.vue index 0d9598e..d351386 100644 --- a/pages/account/index/userInfo.vue +++ b/pages/account/index/userInfo.vue @@ -1,3 +1,10 @@ + + + + + 商品评价 + + + {{sortActive.label}} + + {{item.label}} + + + 有内容评价 + + + + + + + + 商品满意度 + {{productRate}} + + + + + {{i.labelName}}({{i.commentCount}}) + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/goods/detail/module/HeaderBar.vue b/pages/goods/detail/module/HeaderBar.vue new file mode 100644 index 0000000..8ffca2d --- /dev/null +++ b/pages/goods/detail/module/HeaderBar.vue @@ -0,0 +1,83 @@ + + + + + + 商品详情 + 商品评价 + + 加入购物车 + + + + + \ No newline at end of file diff --git a/plugins/api/comment.js b/plugins/api/comment.js new file mode 100644 index 0000000..9656e97 --- /dev/null +++ b/plugins/api/comment.js @@ -0,0 +1,68 @@ +/* + * @Author: ch + * @Date: 2022-06-20 11:38:48 + * @LastEditors: ch + * @LastEditTime: 2022-06-25 17:49:58 + * @Description: file content + */ + +import {axiosTk} from "../axiosTk"; +import {axios} from "../axios"; +import { ToAsyncAwait } from "../utils"; +import ENV from '../config/env'; + +const BASE_URL = `${ENV.base_url}/mall/comment`; + +/** + * 根据商品获取评论列表 + * @param {*} param0 + */ +export const ApiGetCommentList = (params) => + ToAsyncAwait(axios.get(`${BASE_URL}/app/comment`, {params})); +/** + * 根据商品获取评论总数 + * @param {*} param0 + */ +export const ApiGetCommentCount = ({productId}) => + ToAsyncAwait(axios.get(`${BASE_URL}/app/comment/getAllCommentCountByProductId/${productId}`)); +/** + * 根据商品获取标签评论总数 + * @param {*} param0 + */ +export const ApiGetCommentTabCount = ({productId}) => + ToAsyncAwait(axios.get(`${BASE_URL}/app/comment/listCommentLabel/${productId}`)); +/** + * 获取订单评论详情 + * @param {*} param0 + */ +export const ApiGetOrderCommentDetail = ({orderId}) => + ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment/listOrderCommentByOrderId/${orderId}`)); +/** + * 获取商品满意度 + * @param {*} param0 + */ +export const ApiGetProductSatisfaction = ({productId}) => + ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment/getProductSatisfaction/${productId}`)); +/** + * 获取评论详情 + * @param {*} param0 + */ +export const ApiGetCommentDetail = ({commentId}) => + ToAsyncAwait(axios.get(`${BASE_URL}/app/comment/getCommentDetail/${commentId}`)); +/** + * 新增评论 + * @param {*} param0 + */ +export const ApiPostComment = (data) => + ToAsyncAwait(axiosTk.post(`${BASE_URL}/app/comment`, data)); + + +/** + * 更新评论有用数 + * @param {*} param0 + */ +export const ApiPutCommentUseful = (data) => + ToAsyncAwait(axiosTk.put(`${BASE_URL}/app/comment/updateUsefulCount`, data)); + + +
{{followComment.commentContent}}
{{commentDetail.userName}}
已购买:{{commentDetail.skuName}}
{{commentDetail.merchantComment.commentContent}}
{{item.commentContent}}
+ 满意度评分 + + 满意 +
我要晒图
+ + + +
{{productRate}}
{{commentDetail.userName}}
+已购买:{{commentDetail.skuName}}
++-
+
{{commentDetail.merchantComment.userName}}:{{commentDetail.merchantComment.createTime}}
+
+ -
+
+ {{item.userName}} {{item.parentId !== commentDetail.id ? ` 回复 ${item.parentUserName}` : ''}}:
+ {{item.createTime}}
+
+
+
+{{commentDetail.merchantComment.commentContent}}
+{{item.commentContent}}
+ 回复 +