Compare commits
251 Commits
feature/ta
...
main
Author | SHA1 | Date |
---|---|---|
王景 | 2c494200c2 | 2 years ago |
王景 | e40200199b | 2 years ago |
ch | ea10aa3d17 | 2 years ago |
ch | 408a4667ce | 2 years ago |
ch | 43c000eae2 | 2 years ago |
ch | 4145f90ac9 | 2 years ago |
ch | 9e6b270987 | 2 years ago |
ch | 24bb9c8c42 | 2 years ago |
ch | cc51bc8709 | 2 years ago |
陈辉 | 425f630b2a | 2 years ago |
ch | 89c0ce7cf5 | 2 years ago |
陈辉 | 29841ba9c4 | 2 years ago |
ch | a10143b26d | 2 years ago |
ch | fde9ef42ef | 2 years ago |
ch | 99c6010bb7 | 2 years ago |
ch | c7199f96db | 2 years ago |
ch | 090fd92d51 | 2 years ago |
ch | 64287e9c3f | 2 years ago |
ch | 8142659b0c | 2 years ago |
ch | 58fdbb7236 | 2 years ago |
ch | 3d5673bbe7 | 2 years ago |
ch | 2117d22715 | 2 years ago |
ch | 2fe0933c25 | 2 years ago |
ch | 35823e2c4a | 2 years ago |
ch | 33f83236a7 | 2 years ago |
ch | b4b38d8a4a | 2 years ago |
ch | 7374cdfdaf | 2 years ago |
ch | ca9c17ba69 | 2 years ago |
ch | 30cb0f66a0 | 2 years ago |
ch | 0c7494a097 | 2 years ago |
ch | 1f398092d2 | 2 years ago |
ch | 9288f0ac43 | 2 years ago |
ch | 9f0a219fa1 | 2 years ago |
ch | cd1032d988 | 2 years ago |
ch | a0bd0ca45c | 2 years ago |
ch | 09ba7e8819 | 2 years ago |
覃昌波 | 56991e2fba | 2 years ago |
覃昌波 | b3b6db82e5 | 2 years ago |
覃昌波 | 4669a69b12 | 2 years ago |
覃昌波 | 20b9748f64 | 2 years ago |
覃昌波 | a8ec9b7c77 | 2 years ago |
覃昌波 | 1ef83e8765 | 2 years ago |
ch | 7af76834f6 | 2 years ago |
ch | e17951e223 | 2 years ago |
ch | 9ec022fc0f | 2 years ago |
ch | 887cea6f90 | 2 years ago |
ch | 430399c54f | 2 years ago |
ch | 10a22e7e52 | 2 years ago |
ch | b067e2130b | 2 years ago |
ch | 302c0b9e40 | 2 years ago |
ch | ebc3039353 | 2 years ago |
ch | 593a3cfcd2 | 2 years ago |
ch | 47deb31894 | 2 years ago |
ch | f04113a6d8 | 2 years ago |
ch | 41c35825fa | 2 years ago |
ch | 9f07b75bea | 2 years ago |
ch | 3a65dd736f | 2 years ago |
ch | 428e3165d1 | 2 years ago |
ch | 510408068d | 2 years ago |
ch | 85fc3fb293 | 2 years ago |
ch | ddc982a35d | 2 years ago |
ch | 2375f95fcb | 2 years ago |
ch | 96176a68cc | 2 years ago |
ch | 1e73cdfbce | 2 years ago |
ch | c8302cf9ef | 2 years ago |
ch | 60b1f0be39 | 2 years ago |
ch | 11878e566f | 2 years ago |
ch | 91812512bc | 2 years ago |
ch | e771928e88 | 2 years ago |
ch | b81c463e9b | 2 years ago |
ch | 8d00cb4242 | 2 years ago |
ch | 845ad5dba8 | 2 years ago |
ch | 264a108a33 | 2 years ago |
ch | e96d372369 | 2 years ago |
ch | a93838e595 | 2 years ago |
ch | e78c41f6c2 | 2 years ago |
ch | 5864830b29 | 2 years ago |
ch | e7540706b9 | 2 years ago |
ch | 3cce4c2c14 | 2 years ago |
ch | 0b70cd4f49 | 2 years ago |
ch | 69e86583ec | 3 years ago |
ch | 00d5bb7c82 | 3 years ago |
ch | 22dab20d79 | 3 years ago |
ch | 150f61315e | 3 years ago |
ch | 69abc97570 | 3 years ago |
ch | 9876af66ad | 3 years ago |
ch | b8a6c1e9f5 | 3 years ago |
ch | adafa9ff2c | 3 years ago |
ch | b96a231952 | 3 years ago |
ch | d04791081c | 3 years ago |
ch | 30cdc50558 | 3 years ago |
ch | af06861fc9 | 3 years ago |
ch | ff49fedd42 | 3 years ago |
ch | 1c5402a7b0 | 3 years ago |
ch | c259a61025 | 3 years ago |
ch | 8b18ca4f73 | 3 years ago |
ch | b07a9f04c2 | 3 years ago |
ch | 0f98983398 | 3 years ago |
ch | 01a05c6916 | 3 years ago |
ch | 666bee10e1 | 3 years ago |
ch | da8bb5704e | 3 years ago |
ch | f81e70891e | 3 years ago |
ch | 536ff98861 | 3 years ago |
ch | 27d2e49aff | 3 years ago |
ch | 72408674a7 | 3 years ago |
ch | 295537b06c | 3 years ago |
ch | 23113a3e7c | 3 years ago |
ch | 4ecf12211a | 3 years ago |
ch | 7bb20db2d8 | 3 years ago |
ch | 4d1a40b5d0 | 3 years ago |
ch | e8fd578806 | 3 years ago |
ch | 8d5f2d6a2c | 3 years ago |
ch | 68619cea53 | 3 years ago |
ch | f0e60a44c7 | 3 years ago |
ch | cb274ee8a4 | 3 years ago |
ch | c9ad86300e | 3 years ago |
ch | 5741b4ecf9 | 3 years ago |
ch | be4082e868 | 3 years ago |
ch | c700fdf8c8 | 3 years ago |
ch | a959ab5036 | 3 years ago |
ch | 78b693c788 | 3 years ago |
ch | 3f9b83e419 | 3 years ago |
ch | df94ad7575 | 3 years ago |
ch | 9eb41b5297 | 3 years ago |
ch | 466ae538a8 | 3 years ago |
ch | c102995fdc | 3 years ago |
ch | 53152aa224 | 3 years ago |
ch | d89bb54566 | 3 years ago |
ch | 802a17906b | 3 years ago |
ch | 21987554f8 | 3 years ago |
ch | fed8881529 | 3 years ago |
ch | 2a63673248 | 3 years ago |
ch | e3341ac65f | 3 years ago |
ch | 697b08c666 | 3 years ago |
ch | dca519590e | 3 years ago |
ch | abdf037373 | 3 years ago |
ch | a0099fddc1 | 3 years ago |
ch | 0f8d21bd2d | 3 years ago |
ch | 6aa4eec34f | 3 years ago |
ch | 469270c769 | 3 years ago |
ch | 487254db76 | 3 years ago |
ch | 66f9530883 | 3 years ago |
ch | 8370bdd5f0 | 3 years ago |
ch | 235d8e0cff | 3 years ago |
ch | 494c288e20 | 3 years ago |
ch | 9bf02bfc56 | 3 years ago |
ch | d11be41163 | 3 years ago |
ch | e0ce483a2b | 3 years ago |
ch | 7d26167a30 | 3 years ago |
ch | 3672052d81 | 3 years ago |
ch | 49e78efda8 | 3 years ago |
ch | efaa39c832 | 3 years ago |
ch | 9df955e8d6 | 3 years ago |
张征 | 581a6385e5 | 3 years ago |
张征 | 3c2ff793ab | 3 years ago |
张征 | e4f8336673 | 3 years ago |
张征 | 3200e2492e | 3 years ago |
张征 | f4a4435c8e | 3 years ago |
ch | 8e339ea56a | 3 years ago |
ch | f3deb67326 | 3 years ago |
ch | dd58b90d97 | 3 years ago |
张征 | b6d530da8f | 3 years ago |
张征 | 44234d4659 | 3 years ago |
张征 | c73b8cc2b2 | 3 years ago |
肖广 | 8336805b1f | 3 years ago |
肖广 | 5fd5690c50 | 3 years ago |
肖广 | ff037a1bca | 3 years ago |
xiaoguang | 641ea8a7fe | 3 years ago |
ch | bc378dc73d | 3 years ago |
ch | 112f3ac1fc | 3 years ago |
ch | ac257746d4 | 3 years ago |
肖广 | e0458dd21e | 3 years ago |
张征 | 950a2d3699 | 3 years ago |
张征 | 2aad2172e3 | 3 years ago |
张征 | c14ce44b14 | 3 years ago |
肖广 | b6ea4af6ed | 3 years ago |
xiaoguang | ed326844ce | 3 years ago |
张征 | 84cb8d281b | 3 years ago |
张征 | ea82937dad | 3 years ago |
张征 | 480fe88330 | 3 years ago |
张征 | 8517931645 | 3 years ago |
肖广 | 827cb7c36b | 3 years ago |
肖广 | 7f06e29597 | 3 years ago |
xiaoguang | 4bdf753c6e | 3 years ago |
张征 | c71a4ea7bb | 3 years ago |
张征 | 15b7867528 | 3 years ago |
张征 | bc24c7511a | 3 years ago |
肖广 | 2d213cf6c6 | 3 years ago |
肖广 | e5bc34804b | 3 years ago |
xiaoguang | 944a2416da | 3 years ago |
张征 | a4c147c2ad | 3 years ago |
张征 | 971784c627 | 3 years ago |
张征 | f40ae45a0d | 3 years ago |
张征 | bd881886cf | 3 years ago |
肖广 | 1b84783101 | 3 years ago |
肖广 | 76d3173ad4 | 3 years ago |
xiaoguang | 3e5325fab9 | 3 years ago |
张征 | ae326e6f6b | 3 years ago |
张征 | dcf0404a30 | 3 years ago |
张征 | c097a9251c | 3 years ago |
肖广 | ca20e3a37a | 3 years ago |
肖广 | 9cb021e001 | 3 years ago |
xiaoguang | 0f9e6aa0e7 | 3 years ago |
xiaoguang | e332e95afa | 3 years ago |
张征 | 67176fa1fb | 3 years ago |
张征 | b944477d8d | 3 years ago |
张征 | 688fd6ea8c | 3 years ago |
张征 | f8d393661f | 3 years ago |
ch | cf8ea99afb | 3 years ago |
ch | d43b2d77da | 3 years ago |
张征 | fd33b79f7e | 3 years ago |
张征 | 37ef0f9d04 | 3 years ago |
张征 | 09199ee816 | 3 years ago |
张征 | 1a0aa89c65 | 3 years ago |
肖广 | a9b35a9672 | 3 years ago |
张征 | 1bc1a46999 | 3 years ago |
张征 | 8f7e940158 | 3 years ago |
张征 | d52997cc07 | 3 years ago |
肖广 | 2f1c3d9ba1 | 3 years ago |
张征 | 442614a67a | 3 years ago |
肖广 | 80a73d11d8 | 3 years ago |
张征 | 8e1fac846f | 3 years ago |
肖广 | 24201b110e | 3 years ago |
张征 | e1cfc41ebb | 3 years ago |
肖广 | 21c967e12a | 3 years ago |
张征 | 597a3c8aae | 3 years ago |
肖广 | 0ed9fc9885 | 3 years ago |
肖广 | de75b1bbaa | 3 years ago |
ch | 73ce946530 | 3 years ago |
肖广 | 17b1346ff1 | 3 years ago |
肖广 | 4c47b8d78b | 3 years ago |
张征 | a8c54f76d2 | 3 years ago |
张征 | e636883bd6 | 3 years ago |
ch | 262d51d993 | 3 years ago |
肖广 | c45d530980 | 3 years ago |
ch | 468179c860 | 3 years ago |
张征 | 01d6e31ae0 | 3 years ago |
肖广 | 750d1ea0f4 | 3 years ago |
肖广 | d230fab63a | 3 years ago |
ch | 55ead5e145 | 3 years ago |
ch | 7d0f236488 | 3 years ago |
肖广 | f4d5383420 | 3 years ago |
ch | f3ce1e00dc | 3 years ago |
ch | 1567936184 | 3 years ago |
肖广 | 10f2033592 | 3 years ago |
肖广 | f71938ace0 | 3 years ago |
肖广 | 62e1b9ac6a | 3 years ago |
肖广 | d16c9e002d | 3 years ago |
肖广 | 30d31c925d | 3 years ago |
肖广 | 16a70bd821 | 3 years ago |
肖广 | d261e30fb8 | 3 years ago |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 756 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 762 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 850 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 613 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 972 B |
After Width: | Height: | Size: 290 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 207 KiB |
After Width: | Height: | Size: 172 KiB |
After Width: | Height: | Size: 219 KiB |
After Width: | Height: | Size: 199 KiB |
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 375 B |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 179 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 215 KiB |
After Width: | Height: | Size: 242 KiB |
Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 358 B |
Before Width: | Height: | Size: 823 B After Width: | Height: | Size: 661 B |
After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 535 B |
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 3.5 KiB |
@ -0,0 +1,58 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-23 10:40:04
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-30 22:11:19
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div class="follow">
|
||||
<b class="follow--title">{{day}}追评:</b>
|
||||
<p class="follow--ctx">{{followComment.commentContent}}</p>
|
||||
<UiImgs v-if="imgs.length" :list="imgs" class="follow--imgs" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UiImgs from './UiImgs.vue';
|
||||
export default {
|
||||
components: { UiImgs },
|
||||
props : {
|
||||
followComment : {
|
||||
type : Object,
|
||||
default : () => ({})
|
||||
},
|
||||
commentTime : {
|
||||
type : String,
|
||||
default : ''
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
day(){
|
||||
const followTime = (new Date(this.followComment.createTime)).getTime();
|
||||
const commentTime = (new Date(this.commentTime)).getTime();
|
||||
const day = Math.floor((followTime - commentTime) / (24 * 60 * 60 * 1000));
|
||||
return day > 0 ? `${day}天后` : `当天`;
|
||||
},
|
||||
imgs (){
|
||||
let urls = this.followComment.pictureUrl || '';
|
||||
return urls ? urls.split(',') : [];
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.follow{
|
||||
margin-top: 30px;
|
||||
&--title{
|
||||
color: #FF6A19;
|
||||
font-weight: normal;
|
||||
}
|
||||
&--ctx{
|
||||
line-height: 24px;
|
||||
word-break: break-all;
|
||||
}
|
||||
&--imgs{
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,205 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-25 15:29:43
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-30 22:53:16
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
|
||||
<div class="submit">
|
||||
<p class="rate-box" v-if="type === COMMENT.TYPE.COMMENT">
|
||||
<b>满意度评分</b>
|
||||
<el-rate v-model="rate"></el-rate>
|
||||
<span>{{reteDesc}}</span>
|
||||
</p>
|
||||
<el-input type="textarea" class="textarea" placeholder="从多个维度评价,可以帮助更多想买的人哦~"
|
||||
v-model="commentContent" show-word-limit :maxlength="500" :rows="6"/>
|
||||
<div class="operation">
|
||||
<el-upload list-type="picture-card"
|
||||
:on-remove="handleRemove" :limit="6"
|
||||
:action="uploadAction" :data="uploadData"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:on-exceed="handleUploadExceed"
|
||||
:on-error="handleUploadError">
|
||||
<i class="el-icon-plus"></i>
|
||||
<p class="upload-txt">我要晒图</p>
|
||||
</el-upload>
|
||||
<UiButton class="upload-btn" :disabled="isDisabled" @click="handleSubmit">发表评论</UiButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {ApiPostComment} from '@/plugins/api/comment';
|
||||
import {ApiPostGetOssConfig} from '@/plugins/api/oss';
|
||||
import {COMMENT} from '@/constants';
|
||||
|
||||
export default {
|
||||
props : {
|
||||
type : {
|
||||
type : String | Number,
|
||||
default : COMMENT.TYPE.COMMENT
|
||||
},
|
||||
commentDetail : {
|
||||
type : Object,
|
||||
default : () => ({})
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
COMMENT,
|
||||
rate: 5,
|
||||
commentContent : '',
|
||||
uploadData : {},
|
||||
uploadAction : '',
|
||||
fileList : []
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
isEdit(){
|
||||
return (this.commentContent || this.fileList.length > 0) ? true : false
|
||||
},
|
||||
reteDesc(){
|
||||
return COMMENT.RATE_LEVEL[this.rate];
|
||||
},
|
||||
isDisabled(){
|
||||
let status = false
|
||||
if(this.type === COMMENT.TYPE.COMMENT){
|
||||
status = !this.rate || !this.commentContent.trim();
|
||||
}
|
||||
if(this.type === COMMENT.TYPE.FOLLOW_COMMENT){
|
||||
status = !this.commentContent.trim();
|
||||
}
|
||||
return status;
|
||||
}
|
||||
},
|
||||
watch : {
|
||||
isEdit(val){
|
||||
this.$emit('editStatusChange', val)
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
async handleSubmit(){
|
||||
let data = {
|
||||
commentContent : this.commentContent,
|
||||
commentType : this.type,
|
||||
orderProductId : this.commentDetail.orderProductId,
|
||||
pictureUrl : this.fileList.map(i => i.url).join(',')
|
||||
}
|
||||
if(this.type === COMMENT.TYPE.COMMENT){
|
||||
data.productId = this.commentDetail.productId;
|
||||
data.commentScore = this.rate;
|
||||
}else if(this.type === COMMENT.TYPE.FOLLOW_COMMENT){
|
||||
data.originId = data.parentId = this.commentDetail.id;
|
||||
}
|
||||
const {error, result} = await ApiPostComment(data);
|
||||
if(error){
|
||||
this.$message.error(error.message);
|
||||
return false;
|
||||
}
|
||||
this.commentContent = '';
|
||||
this.fileList = [];
|
||||
this.$nextTick(()=>{
|
||||
this.$emit('submit',result);
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取OSS鉴权信息
|
||||
* configId 自定义文件夹 图片存储的文件夹名称
|
||||
* serviceName 服务名
|
||||
*/
|
||||
async getOssCon(){
|
||||
const {error, result} = await ApiPostGetOssConfig({
|
||||
configId : 'account-comment/',
|
||||
serviceName : 'comment'
|
||||
});
|
||||
if(error){
|
||||
this.$message.error(error.message);
|
||||
return false
|
||||
}
|
||||
return result
|
||||
|
||||
},
|
||||
|
||||
async handleBeforeUpload(file) {
|
||||
let result = await this.getOssCon();
|
||||
if(result){
|
||||
this.uploadAction = result.host;
|
||||
this.uploadData = {
|
||||
...this.uploadData,
|
||||
policy : result.policy,
|
||||
OSSAccessKeyId: result.accessId,
|
||||
success_action_status: 200,
|
||||
signature: result.signature,
|
||||
}
|
||||
}
|
||||
Object.assign(this.uploadData, {
|
||||
key: `${result.dir}${"${filename}"}`,
|
||||
name: file.name,
|
||||
});
|
||||
this.fileList.push({
|
||||
url : `${result.host}/${result.dir}${file.name}`,
|
||||
uid : file.uid
|
||||
})
|
||||
},
|
||||
|
||||
handleUploadError(error, file) {
|
||||
this.handleRemove(file)
|
||||
},
|
||||
handleRemove(file) {
|
||||
this.fileList = this.fileList.filter(i => i.uid != file.uid );
|
||||
},
|
||||
handleUploadExceed(){
|
||||
this.$message.warning('最多只能上传6张照片哦~')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.rate-box{
|
||||
display: flex;
|
||||
b{
|
||||
font-weight: normal;
|
||||
margin-right: 10px;
|
||||
color: #666;
|
||||
}
|
||||
span{
|
||||
color: #FF6A19;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.textarea{
|
||||
height: 138px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.operation{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
.upload-txt{
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
.upload-btn{
|
||||
height: 40px;
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
/deep/{
|
||||
.el-upload--picture-card,.el-upload-list__item{
|
||||
height: 70px !important;
|
||||
width: 70px !important;
|
||||
line-height: 20px;
|
||||
}
|
||||
.el-upload--picture-card{
|
||||
padding-top: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,137 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-24 19:07:45
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-30 19:40:36
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div class="preview-imgs">
|
||||
<ul>
|
||||
<li v-for="(i, idx) in list" :key="idx" :class="{'active' : curIndex == idx}" >
|
||||
<img :src="i" @click="curIndex = idx"/>
|
||||
</li>
|
||||
</ul>
|
||||
<p v-if="curIndex > -1">
|
||||
<img :src="list[curIndex]" @click="curIndex = -1"/>
|
||||
<span class="prev" @click="prev" v-if="curIndex > 0"></span>
|
||||
<span class="next" @click="next" v-if="curIndex < list.length-1"></span>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props : {
|
||||
list : {
|
||||
type : Array,
|
||||
default : () => ([])
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
curIndex : -1,
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
next(){
|
||||
this.curIndex++;
|
||||
},
|
||||
prev(){
|
||||
this.curIndex--;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.preview-imgs{
|
||||
ul{
|
||||
display: flex;
|
||||
}
|
||||
li{
|
||||
width: 46px;
|
||||
height : 46px;
|
||||
border: 1px solid #eee;
|
||||
margin-right: 10px;
|
||||
padding: 1px;
|
||||
cursor: pointer;
|
||||
img{
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
object-fit: contain;
|
||||
}
|
||||
&.active{
|
||||
border-color: #FF512B;
|
||||
position: relative;
|
||||
&::after{
|
||||
content: '';
|
||||
height: 3px;
|
||||
width: 3px;
|
||||
bottom: -7px;
|
||||
left: 17px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
// transform: rotate(45deg);
|
||||
border: 3px solid #FF512B;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
p{
|
||||
width: 300px;
|
||||
margin-top: 20px;
|
||||
position: relative;
|
||||
border: 1px solid #eee;
|
||||
img{
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
object-fit: contain;
|
||||
cursor: zoom-out;
|
||||
}
|
||||
&:hover span{
|
||||
display: block;
|
||||
}
|
||||
span{
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: rgba(0,0,0, .5);
|
||||
top : 130px;
|
||||
cursor: pointer;
|
||||
&::after,&::before{
|
||||
position: absolute;
|
||||
display: block;
|
||||
content: '';
|
||||
background: #fff;
|
||||
height: 20px;
|
||||
width: 4px;
|
||||
border-radius: 4px;
|
||||
left: 16px;
|
||||
top: 4px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
&::after{
|
||||
transform: rotate(-45deg);
|
||||
top: 16px;
|
||||
}
|
||||
&.prev{
|
||||
left: 10px;
|
||||
|
||||
}
|
||||
&.next{
|
||||
right: 10px;
|
||||
&::after{
|
||||
left: 20px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
&::before{
|
||||
left: 20px;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,60 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-05-04 17:56:39
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-02 17:49:00
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div class="layout">
|
||||
<BsLogin :visible.sync="loginVisible" />
|
||||
<Header :is-sticky="isSticky" />
|
||||
<div class="layout-content">
|
||||
<Nuxt />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import BsLogin from "@/components/BsLogin.vue";
|
||||
import Header from "./module/header/index.vue";
|
||||
import Footer from "./module/footer/index.vue";
|
||||
|
||||
export default {
|
||||
name: "down",
|
||||
components: { Header, Footer, BsLogin },
|
||||
data() {
|
||||
return {
|
||||
isSticky: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
loginVisible: {
|
||||
get() {
|
||||
return this.$store.state.loginVisible;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("setLoginVisible", val);
|
||||
},
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// 监听滚动事件
|
||||
window.addEventListener("scroll", this.scrollEventMethod);
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener("scroll", this.scrollEventMethod);
|
||||
},
|
||||
methods: {
|
||||
scrollEventMethod() {
|
||||
this.isSticky = window.scrollY > 300;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.layout {
|
||||
.layout-content {
|
||||
min-height: calc(100vh - 400px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div class="error-page flex flex-middle flex-center">
|
||||
<img class="error-page-cover" src="~/assets/img/layout/error.png" />
|
||||
<div class="error-page-content">
|
||||
<div>此页面不存在或找不到</div>
|
||||
<div class="error-page-content__tip">
|
||||
<p>检查您的网址是否拼写正确</p>
|
||||
<p>检查您是否使用了错误的网址转接</p>
|
||||
</div>
|
||||
<UiButton :radius="true" type="yellow_gradual" @click="onJumpHomePage"
|
||||
>回到首页</UiButton
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UiButton from "@/components/UiButton";
|
||||
export default {
|
||||
name: "ErrorPage",
|
||||
components: { UiButton },
|
||||
methods: {
|
||||
onJumpHomePage() {
|
||||
this.$router.replace("/");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.error-page {
|
||||
height: calc(100vh - 400px);
|
||||
.error-page-cover {
|
||||
width: 286px;
|
||||
height: 254px;
|
||||
margin-right: 109px;
|
||||
}
|
||||
.error-page-content {
|
||||
font-size: 20px;
|
||||
color: #666666;
|
||||
}
|
||||
.error-page-content__tip {
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #999999;
|
||||
margin: 30px 0;
|
||||
}
|
||||
/deep/.ui-button {
|
||||
width: 121px;
|
||||
height: 30px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,114 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-05-08 01:11:33
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-28 10:39:35
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="main">
|
||||
<img class="icon" src="@/assets/img/order/pay_success.png" />
|
||||
<p>评价成功</p>
|
||||
<div>
|
||||
<UiButton type="grey" @click="$router.back()" :radius="true">返回</UiButton>
|
||||
</div>
|
||||
<div v-if="goodsList.length">
|
||||
<b class="product-title">这些宝贝还在等你得评价哦~</b>
|
||||
<ul class="product">
|
||||
<li v-for="(item, idx) in goodsList" :key="idx">
|
||||
<img :src="item.productPicture"/>
|
||||
<p>{{item.productName}}</p>
|
||||
<UiButton type="grey" @click="$router.replace(`/account/comment?orderId=${item.orderId}`)" >
|
||||
{{item.commentStatus == 1 ? '立即评价' : '立即追评'}}
|
||||
</UiButton>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<BsChosen class="chosen"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UiButton from '@/components/UiButton.vue';
|
||||
import {ApiGetCommentOrderDetailList} from '@/plugins/api/order';
|
||||
export default {
|
||||
components: { UiButton },
|
||||
data(){
|
||||
return {
|
||||
goodsList : []
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.getAwaitGoodsList();
|
||||
},
|
||||
methods:{
|
||||
|
||||
async getAwaitGoodsList (){
|
||||
const {error, result} = await ApiGetCommentOrderDetailList({
|
||||
length:6,
|
||||
pageIndex : 1
|
||||
});
|
||||
if(error){
|
||||
this.$message.warning(error.message)
|
||||
}
|
||||
this.goodsList = result.records.map(item => {
|
||||
return {
|
||||
productPicture : item.productImageUrl,
|
||||
productName : item.productName,
|
||||
commentStatus : item.commentStatus,
|
||||
orderId : item.orderId
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.main{
|
||||
@include layout-box;
|
||||
text-align: center;
|
||||
padding: 100px 0 40px;
|
||||
}
|
||||
.icon{
|
||||
width: 239px;
|
||||
}
|
||||
b{
|
||||
display: block;
|
||||
}
|
||||
p{
|
||||
margin: 10px 0 25px 0;
|
||||
color: #999;
|
||||
}
|
||||
button{
|
||||
margin: 0 10px 30px;
|
||||
}
|
||||
.product-title{
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
background: #F7F7F7;
|
||||
font-weight: normal;
|
||||
color: #666;
|
||||
padding: 0 16px;
|
||||
}
|
||||
.product{
|
||||
display: flex;
|
||||
// justify-content: flex-start;
|
||||
li{
|
||||
margin:40px 0 0 48px;
|
||||
width: 140px;
|
||||
img{
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
object-fit: contain;
|
||||
|
||||
}
|
||||
p{
|
||||
@include ellipses(2);
|
||||
height: 40px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,59 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-05-08 01:11:33
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-27 15:37:53
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="main">
|
||||
<img class="icon" src="@/assets/img/order/pay_success.png" />
|
||||
<!-- <b>交易成功</b> -->
|
||||
<p>交易成功</p>
|
||||
<div>
|
||||
<UiButton type="grey" @click="$router.replace(`/`)" :radius="true">返回首页</UiButton>
|
||||
<UiButton type="yellow_gradual" @click="$router.replace(`./comment?orderId=${orderId}`)" :radius="true">去评价</UiButton>
|
||||
</div>
|
||||
</div>
|
||||
<BsChosen class="chosen"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UiButton from '@/components/UiButton.vue';
|
||||
import {ApiGetOrderPaySatus} from '@/plugins/api/order';
|
||||
export default {
|
||||
components: { UiButton },
|
||||
data(){
|
||||
return {
|
||||
orderId : this.$route.query.orderId
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
|
||||
|
||||
},
|
||||
methods:{
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.main{
|
||||
@include layout-box;
|
||||
text-align: center;
|
||||
padding: 100px 0 40px;
|
||||
}
|
||||
.icon{
|
||||
width: 239px;
|
||||
}
|
||||
b{
|
||||
display: block;
|
||||
}
|
||||
p{
|
||||
margin: 10px 0 25px 0;
|
||||
color: #999;
|
||||
}
|
||||
button{
|
||||
margin: 0 10px 30px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,231 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-05-26 16:08:17
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-02 17:56:04
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div class="main">
|
||||
<h2 class="title">下载马士兵严选APP</h2>
|
||||
<p class="desc"><b>精选好物</b><span></span><b>精致生活</b></p>
|
||||
<ul class="group">
|
||||
<li class="group--item">
|
||||
<div class="qrcode">
|
||||
<img class="qrcode--img" src="@/assets/img/down/app-qrcode.png"/>
|
||||
<img class="qrcode--icon" src="@/assets/img/down/android.png"/>
|
||||
</div>
|
||||
<span class="group--item-title">Android</span>
|
||||
</li>
|
||||
<li class="group--item">
|
||||
<div class="qrcode qrcode__disabled">
|
||||
<img class="qrcode--img" src="@/assets/img/down/app-qrcode.png"/>
|
||||
<img class="qrcode--icon" src="@/assets/img/down/ios.png"/>
|
||||
</div>
|
||||
<span class="group--item-title">iOS</span>
|
||||
<span class="group--item-btn">规划中...</span>
|
||||
</li>
|
||||
<li class="group--item">
|
||||
<div class="qrcode">
|
||||
<img class="qrcode--img" src="@/assets/img/down/wx-qrcode.jpg"/>
|
||||
<img class="qrcode--icon" src="@/assets/img/down/wx.png"/>
|
||||
</div>
|
||||
<span class="group--item-title">微信公众号</span>
|
||||
</li>
|
||||
<li class="group--item">
|
||||
<div class="qrcode">
|
||||
<img class="qrcode--img" src="@/assets/img/down/h5-qrcode.png"/>
|
||||
<img class="qrcode--icon" src="@/assets/img/down/browser.png"/>
|
||||
</div>
|
||||
<span class="group--item-title">H5</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bg">
|
||||
<i class="bg--icon1"></i>
|
||||
<i class="bg--icon2"></i>
|
||||
<i class="bg--icon3"></i>
|
||||
<i class="bg--icon4"></i>
|
||||
<i class="bg--icon5"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
layout : 'down'
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.main{
|
||||
height: calc(100vh - 132px);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.title{
|
||||
text-align: center;
|
||||
font-size: 40px;
|
||||
font-family: 'PingFang SC-粗体, PingFang SC';
|
||||
font-weight: bold;
|
||||
color: #191919;
|
||||
margin-top: 115px;
|
||||
}
|
||||
.desc{
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-family: 'PingFang SC-常规体, PingFang SC';
|
||||
color: #A8A8A8;
|
||||
line-height: 21px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 24px;
|
||||
span{
|
||||
margin: 0 15px;
|
||||
display: inline-block;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: #A8A8A8;
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
.group{
|
||||
width: 930px;
|
||||
margin: 73px auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
&--item{
|
||||
text-align: center;
|
||||
&-title{
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
margin: 25px 0;
|
||||
}
|
||||
&-btn{
|
||||
border: 1px solid #ddd;
|
||||
color: #A7A7A7;
|
||||
font-size: 16px;
|
||||
width: 142px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
// .qrcode--img:hover + .qrcode--icon{
|
||||
// opacity: 0;
|
||||
// }
|
||||
.qrcode{
|
||||
width: 180px;
|
||||
height: 180px;
|
||||
background: url('@/assets/img/down/qrcode.png') no-repeat #F4F3F3 right top;
|
||||
background-size: 52px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
&--icon{
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
width: 57px;
|
||||
height: 96px;
|
||||
left: 62px;
|
||||
top: 42px;
|
||||
transition: opacity .8s;
|
||||
opacity: 1;
|
||||
}
|
||||
&--img{
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
left: 0;
|
||||
top: 0;
|
||||
transition: opacity 1s;
|
||||
opacity: 0;
|
||||
&:hover{
|
||||
opacity: 1;
|
||||
+ .qrcode--icon{
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
&__disabled{
|
||||
cursor: no-drop;
|
||||
.qrcode--img:hover{
|
||||
opacity: 0;
|
||||
+ .qrcode--icon{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bg{
|
||||
width: 1920px;
|
||||
height: 100%;
|
||||
@include adj(transform, translateX(-50%));
|
||||
z-index: 0;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 0;
|
||||
i{
|
||||
position: absolute;
|
||||
display: block;
|
||||
background-size: 100%;
|
||||
}
|
||||
&--icon1{
|
||||
bottom: 45px;
|
||||
width: 152px;
|
||||
height: 257px;
|
||||
background-image: url('@/assets/img/down/bg1.png');
|
||||
}
|
||||
&--icon2{
|
||||
top: 148px;
|
||||
left: 140px;
|
||||
width: 197px;
|
||||
height: 214px;
|
||||
background-image: url('@/assets/img/down/bg2.png');
|
||||
animation: float 4s ease-in-out infinite;
|
||||
}
|
||||
&--icon3{
|
||||
top: 549px;
|
||||
left: 960px;
|
||||
width: 116px;
|
||||
height: 126px;
|
||||
background-image: url('@/assets/img/down/bg3.png');
|
||||
animation: float 5s ease-in-out infinite;
|
||||
}
|
||||
&--icon4{
|
||||
top: 456px;
|
||||
right: 261px;
|
||||
width: 133px;
|
||||
height: 137px;
|
||||
background-image: url('@/assets/img/down/bg4.png');
|
||||
animation: float 4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
&--icon5{
|
||||
top: -72px;
|
||||
right: -20px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
box-shadow: 0 0 50px #ffc9b6;
|
||||
background: #FFF8F2;
|
||||
border-radius: 50%;
|
||||
filter: blur(50px);
|
||||
// background-image: url('@/assets/img/down/bg5.png');
|
||||
// background-size: 246px !important ;
|
||||
// background-repeat: no-repeat;
|
||||
// background-position: center;
|
||||
}
|
||||
}
|
||||
@keyframes float {
|
||||
0% {
|
||||
transform: translateY(0px);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-50px);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,84 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-25 07:24:32
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-29 14:19:36
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<div class="header">
|
||||
<div class="header--layout">
|
||||
<ul>
|
||||
<li @click="handleJump('detail')" :class="{'active': tabKey =='detail'}">商品详情</li>
|
||||
<li @click="handleJump('comment')" :class="{'active': tabKey =='comment'}">商品评价</li>
|
||||
</ul>
|
||||
<UiButton @click="handleAddCart">加入购物车</UiButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UiButton from '@/components/UiButton.vue'
|
||||
export default {
|
||||
components: { UiButton },
|
||||
props:{
|
||||
tabKey : {
|
||||
type : String,
|
||||
default : 'detail'
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {}
|
||||
},
|
||||
methods:{
|
||||
handleJump(val){
|
||||
this.$emit('jump', val)
|
||||
},
|
||||
handleAddCart(){
|
||||
this.$emit('addCart')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.header{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 70px;
|
||||
background: #fff;
|
||||
z-index: 11;
|
||||
&--layout{
|
||||
@include layout-box;
|
||||
padding-left: 256px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
ul{
|
||||
display: flex;
|
||||
font-size: 16px;
|
||||
li{
|
||||
margin-right: 50px;
|
||||
height: 70px;
|
||||
line-height: 70px;
|
||||
&.active{
|
||||
color: #FF6A19;
|
||||
position: relative;
|
||||
&::after{
|
||||
display: block;
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 2px;
|
||||
width: 40px;
|
||||
background: #FF6A19;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-05-31 11:17:38
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-01 15:53:53
|
||||
* @Description: file content
|
||||
*/
|
||||
|
||||
import {ToAsyncAwait} from '@/plugins/utils';
|
||||
import { AD_PLATFORM } from '../dicts/ad';
|
||||
import {axios} from "../axios";
|
||||
import ENV from '../config/env';
|
||||
|
||||
const BASE_URL = `${ENV.base_url}/mall/marketing`;
|
||||
|
||||
// 获取广告列表
|
||||
export const ApiGetAdList = (params) => ToAsyncAwait(axios.get(`${BASE_URL}/app/advertisement`, {
|
||||
params: {
|
||||
platform : AD_PLATFORM.PC,
|
||||
...params
|
||||
}
|
||||
}))
|
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-20 11:38:48
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-30 11:48:53
|
||||
* @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(axiosTk.get(`${BASE_URL}/app/comment`, {
|
||||
params,
|
||||
headers: {
|
||||
notVerifyToken : true
|
||||
}
|
||||
}));
|
||||
|
||||
/**
|
||||
* 根据商品获取评论总数
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetCommentCount = ({productId}) =>
|
||||
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment/getAllCommentCountByProductId/${productId}`,{
|
||||
headers: {
|
||||
notVerifyToken : true
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* 根据商品获取标签评论总数
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetCommentTabCount = ({productId}) =>
|
||||
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment/listCommentLabel/${productId}`,{
|
||||
headers: {
|
||||
notVerifyToken : true
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* 获取订单评论详情
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetOrderCommentDetail = ({orderId}) =>
|
||||
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment/listOrderCommentByOrderId/${orderId}`));
|
||||
/**
|
||||
* 获取商品满意度
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetProductSatisfaction = ({productId}) =>
|
||||
ToAsyncAwait(axios.get(`${BASE_URL}/app/comment/getProductSatisfaction/${productId}`));
|
||||
/**
|
||||
* 获取评论详情
|
||||
* @param {*} param0
|
||||
*/
|
||||
export const ApiGetCommentDetail = ({commentId}) =>
|
||||
ToAsyncAwait(axiosTk.get(`${BASE_URL}/app/comment/getCommentDetail/${commentId}`, {
|
||||
headers: {
|
||||
notVerifyToken : true
|
||||
}
|
||||
}));
|
||||
/**
|
||||
* 新增评论
|
||||
* @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));
|
||||
|
||||
|
||||
|