This commit is contained in:
liuye
2024-06-25 16:44:23 +08:00
parent 366e575d79
commit 225498b24d
7 changed files with 464 additions and 221 deletions

View File

@@ -13,6 +13,9 @@
<div class="photo">
<img :src="item.url" alt="" v-for="(item,index) in images" :key="index" @click="preview(index)">
</div>
<div class="footer" @click="toAppStore" v-if="showStore">
<div class="btn">我要评选</div>
</div>
</div>
</template>
@@ -27,6 +30,7 @@ export default {
pageShow: false,
detail: {},
images: [],
showStore: false
}
},
onLoad({id}) {
@@ -52,6 +56,9 @@ export default {
this.$hideLoading()
})
},
toAppStore() {
uni.navigateTo({url: '/pages/AppStore/AppStore'})
}
},
}
@@ -106,5 +113,27 @@ export default {
margin-top: 32px;
}
}
.footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 20px 32px 88px 32px;
box-sizing: border-box;
background: #FFF;
z-index: 999;
.btn {
width: 100%;
height: 80px;
background: #2D7DFF;
border-radius: 40px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 34px;
color: #FFF;
text-align: center;
line-height: 80px;
}
}
}
</style>

View File

@@ -1,19 +1,13 @@
<template>
<div class="myStoreList">
<div class="item" @click="toStoreForm">
<div class="item" @click="toStoreForm(item.id)" v-for="(item, index) in list" :key="index">
<div class="top-flex">
<div class="name">小荣超市11111</div>
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
<div class="name">{{ item.shopName }}</div>
<img :src="item.fileUrl" alt="">
</div>
<div class="address">麒麟区南宁街道潇湘社区</div>
</div>
<div class="item">
<div class="top-flex">
<div class="name">小荣超市11111</div>
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
</div>
<div class="address">麒麟区南宁街道潇湘社区</div>
<div class="address">{{ item.address }}</div>
</div>
<AiEmpty v-if="!list.length" />
</div>
</template>
@@ -24,14 +18,39 @@ export default {
appName: '我的门店',
data() {
return {
list: [],
current: 1,
pages: 2
}
},
onLoad() {
this.getShopList()
},
methods: {
toStoreForm() {
uni.navigateTo({url: './storeForm'})
getShopList() {
if(this.current > this.pages) return
this.$loading()
this.$instance.post(`/app/appshoparchives/list`, null, {
params: {
current: this.current,
size: 15,
}
}).then(res => {
if (res?.data) {
this.list = this.current == 1 ? list : [this.list, list].flat()
this.pages = res.data.total
}
}).finally(() => uni.hideLoading())
},
toStoreForm(id) {
uni.navigateTo({url: `./storeForm?shopId=${id}`})
}
},
onReachBottom() {
this.current ++
this.getShopList()
}
}
</script>

View File

@@ -4,15 +4,15 @@
<div class="item">
<div class="top-flex">
<div class="name">门店照</div>
<div class="right">
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
<div class="right" @click="uploadImg">
<img :src="detailInfo.fileUrl" alt="">
<u-icon name="arrow-right" color="#999" size="22"></u-icon>
</div>
</div>
<div class="line-flex">
<div class="label">门店名称</div>
<div class="value">
<u-input trim placeholder="请输入" input-align="right" v-model="form.name"
<u-input trim placeholder="请输入" input-align="right" v-model="detailInfo.shopName"
placeholder-style="color:#999;font-size: 14px;" height="36"></u-input>
</div>
</div>
@@ -21,7 +21,7 @@
<div class="line-flex">
<div class="label">经营类型</div>
<div class="value">
111<u-icon name="arrow-right" color="#999" size="22"></u-icon>
{{ $dict.getLabel('operatorType', detailInfo.operatorType) }}<u-icon name="arrow-right" color="#999" size="22"></u-icon>
</div>
</div>
</div>
@@ -29,29 +29,44 @@
<div class="line-flex solid">
<div class="label">经营者姓名</div>
<div class="value">
<u-input trim placeholder="请输入" input-align="right" v-model="form.name"
<u-input trim placeholder="请输入" input-align="right" v-model="detailInfo.name"
placeholder-style="color:#999;font-size: 14px;" height="36"></u-input>
</div>
</div>
<div class="line-flex solid">
<div class="line-flex">
<div class="label">联系电话</div>
<div class="value">
<u-input trim placeholder="请输入" input-align="right" v-model="form.name"
<u-input trim placeholder="请输入" input-align="right" v-model="detailInfo.phone"
placeholder-style="color:#999;font-size: 14px;" height="36"></u-input>
</div>
</div>
</div>
<div class="item">
<div class="line-flex solid">
<div class="label"></div>
<div class="label">门店住</div>
<div class="value">
<u-input trim placeholder="请输入" input-align="right" v-model="form.name"
<AiAreaPicker class="ai-area" v-model="detailInfo.areaId" :areaId="$areaId" :fullName.sync="detailInfo.areaName">
<div class="ai-area__wrapper">
<span :style="detailInfo.areaName ? '' : 'color: #999'">{{ detailInfo.areaName || '请选择'}}</span>
<u-icon name="arrow-right" color="#999" size="22"></u-icon>
</div>
</AiAreaPicker>
</div>
</div>
<div class="line-flex">
<div class="label">详细地址</div>
<div class="value">
<u-input trim placeholder="请输入" input-align="right" v-model="detailInfo.address"
placeholder-style="color:#999;font-size: 14px;" height="36"></u-input>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="footer" @click="submit">
<div class="btn">提交</div>
</div>
<u-select v-model="showOperatorType" :list="$dict.getDict('operatorType')" value-name="dictValue"
label-name="dictName" @confirm="confirmOperatorType"></u-select>
</div>
</template>
@@ -64,45 +79,53 @@ export default {
return {
form: {
name : ''
}
},
shopId: '',
detailInfo: {},
showOperatorType: false
}
},
onLoad(e) {
this.shopId = e.shopId
this.$dict.load(['operatorType']).then(() => {
// this.getDetail()
})
},
methods: {
upload() {
if (!this.token) {
this.$refs.login.show()
return false
}
this.imgList = []
this.hideStatus = false
uni.chooseImage({
count: this.limit,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
getDetail() {
this.$instance.post(`/app/appshoparchives/queryDetailById?id=${this.shopId}`).then(res => {
if (res?.data) {
this.detailInfo = res.data
}
})
},
confirmOperatorType(e) {
this.detailInfo.operatorType = e[0].value
},
submit() {
this.$instance.post(`/app/appshoparchives/addOrUpdate?id=${this.shopId}`).then(res => {
if (res?.data) {
this.detailInfo = res.data
}
})
},
uploadImg() {
console.log(123)
uni.chooseMedia({
count: 1,
mediaType: ['image'],
success: (res) => {
if (res.tempFilePaths.length > 9) {
this.$toast(`图片不能超过9`)
if (res.tempFilePaths.length > 1) {
this.$toast(`门店头像不能超过1`)
return false
}
this.$loading('上传中')
res.tempFilePaths.forEach((item, index) => {
if (index === res.tempFilePaths.length - 1) {
this.hideStatus = true
}
this.$nextTick(() => {
this.uploadFile(item, res.tempFilePaths.length)
})
})
this.uploadFile(res.tempFilePaths[0])
},
})
},
uploadFile(img, total) {
uploadFile(img) {
uni.uploadFile({
url: this.$instance.defaults.baseURL + '/admin/file/add',
filePath: img,
@@ -112,33 +135,8 @@ export default {
Authorization: uni.getStorageSync('token'),
},
success: (res) => {
const data = JSON.parse(res.data)
if (data.code === 0) {
this.imgList.push(data.data[0].split(';')[0])
} else {
this.$toast(data.msg)
}
},
complete: () => {
this.$nextTick(() => {
if (this.imgList.length === total && this.hideStatus) {
this.$instance.post(`/app/appvillagepicturealbum/addPictures`, {
areaName: uni.getStorageSync('areaName'),
areaId: uni.getStorageSync('areaId'),
type: this.type,
urlList: this.imgList
}).then(res => {
if (res.code == 0) {
this.getList(this.type)
this.getTotalInfo(this.type)
uni.$emit('update')
}
this.$hideLoading()
this.hideStatus = false
})
}
})
this.detailInfo.fileUrl = JSON.parse(res.data).data[0].split(';')[0]
this.$hideLoading()
}
})
},
@@ -225,5 +223,11 @@ export default {
u-icon {
margin-left: 16px;
}
.ai-area__wrapper {
span {
display: inline-block;
font-size: 28px;
}
}
}
</style>

View File

@@ -37,11 +37,11 @@ export default {
},
toEvaluateForm(e) {
console.log(e)
uni.navigateTo({url: './EvaluateForm'})
uni.navigateTo({url: `./EvaluateForm?shopId=${e.shopId}`})
},
toStoreDetail(e) {
console.log(e)
uni.navigateTo({url: './StoreDetail'})
uni.navigateTo({url: `./StoreDetail?shopId=${e.shopId}`})
},
},

View File

@@ -1,23 +1,23 @@
<template>
<div class="EvaluateForm">
<div class="header-info">
<div class="name">小荣超市11111</div>
<div class="name">{{ shopInfo.shopName }}</div>
<div class="time">
<u-icon name="clock" color="#000" size="32"></u-icon> 评价时间2024.06.01
<u-icon name="clock" color="#000" size="32"></u-icon> 评价时间{{ shopInfo.date }}
</div>
<div class="flex-info">
<div class="flex-item item-user">
<p>经营者</p>
<div>张三</div>
<div>{{ shopInfo.name }}</div>
</div>
<div class="flex-item item-phone">
<p>联系电话</p>
<div>15425125362</div>
<div>{{ shopInfo.phone }}</div>
<span></span>
</div>
<div class="flex-item item-type">
<p>经营类型</p>
<div>副食</div>
<div>{{ $dict.getLabel('operatorType', shopInfo.operatorType) }}</div>
<span></span>
</div>
</div>
@@ -29,71 +29,113 @@
<div class="item">
<div class="label">(1)门店整洁美观</div>
<div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" class="img-no">
<div class="radio" @click="positiveRadioClick('isNeat', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="positiveForm.isNeat" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="positiveRadioClick('isNeat', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!positiveForm.isNeat" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
</div>
</div>
<div class="item">
<div class="label">(2)有绿植安放</div>
<div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" class="img-no">
<div class="radio" @click="positiveRadioClick('isGreen', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="positiveForm.isGreen" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="positiveRadioClick('isGreen', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!positiveForm.isGreen" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
<div class="item">
<div class="label">(3)其他</div>
<div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" class="img-no">
<div class="radio" @click="positiveRadioClick('isOther', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="positiveForm.isOther" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="positiveRadioClick('isOther', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!positiveForm.isOther" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
<div class="mini-title">负面清单</div>
<div class="item">
<div class="label">(1)车辆乱停</div>
<div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" class="img-no">
<div class="radio" @click="negativeRadioClick('isCar', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="negativeForm.isCar" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="negativeRadioClick('isCar', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!negativeForm.isCar" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
<div class="item">
<div class="label">(2)门头凌乱</div>
<div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" class="img-no">
<div class="radio" @click="negativeRadioClick('isDoor', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="negativeForm.isDoor" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="negativeRadioClick('isDoor', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!negativeForm.isDoor" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
<div class="item">
<div class="label">(3)垃圾凌乱</div>
<div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" class="img-no">
<div class="radio" @click="negativeRadioClick('isGarbage', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="negativeForm.isGarbage" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="negativeRadioClick('isGarbage', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!negativeForm.isGarbage" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
<div class="item">
<div class="label">(4)其他</div>
<div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" class="img-no">
<div class="radio" @click="negativeRadioClick('isOther', 1)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="negativeForm.isOther" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else>
</div>
<div class="radio" @click="negativeRadioClick('isOther', 0)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" v-if="!negativeForm.isOther" >
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-wxz.png" alt="" v-else >
</div>
</div>
</div>
<div class="line-bg"></div>
<div class="text-area">
<div class="label">请填写评语</div>
<u-input type="textarea" trim v-model="form.content" maxlength="300" height="400"
<u-input type="textarea" trim v-model="form.remark" maxlength="300" height="400"
placeholder-style="color: #999999;font-size: 15px;"/>
<p>0/300</p>
</div>
@@ -101,13 +143,13 @@
<div class="upload">
<div class="label">上传图片</div>
<div class="upload-info">
<AiUploader v-model="form.files" :limit="9"></AiUploader>
<AiUploader v-model="form.file" :limit="9"></AiUploader>
</div>
<p>最多上传9张</p>
</div>
</div>
<div class="line-bg"></div>
<div class="footer">
<div class="footer" @click="add">
<div class="btn">提交</div>
</div>
</div>
@@ -121,12 +163,75 @@ export default {
data() {
return {
form: {
content: ''
}
remark: '',
file: []
},
positiveForm: {
isNeat: 1,
isGreen: 1,
isOther: 1
},
negativeForm: {
isCar: 0,
isDoor: 0,
isGarbage: 0,
isOther: 0
},
shopId: '',
shopInfo: {}
}
},
methods: {},
onLoad(e) {
this.shopId = e.shopId
this.getShopDetail()
},
methods: {
getShopDetail() {
this.$loading()
this.$instance.post(`/app/appshoparchives/queryDetailById?id=${this.shopId}`).then(res => {
if (res?.data) {
this.shopInfo = res.data
this.shopInfo.date = this.getDate()
}
}).finally(() => uni.hideLoading())
},
positiveRadioClick(name, val) {
this.positiveForm[name] = val
},
negativeRadioClick(name, val) {
this.negativeForm[name] = val
},
add() {
if(!this.form.remark) {
return this.$u.toast('请填写评语')
}
this.$loading()
this.$instance.post(`/app/appshopassess/addOrUpdate`, {
...this.form,
...this.positiveForm,
...this.negativeForm,
shopId: this.shopId
}).then(res => {
if (res?.data) {
this.$u.toast('提交成功')
uni.$emit('updateStore')
setTimeout(() => {
uni.navigateBack()
}, 300)
}
}).finally(() => uni.hideLoading())
},
getDate() {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
month = month > 9 ? month : "0" + month;
day = day > 9 ? day : "0" + day;
return `${year}-${month}-${day}`;
},
},
}
</script>
@@ -139,7 +244,7 @@ export default {
box-sizing: border-box;
color: #323233;
background-image: url("https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-headerBg.png");
background-size: cover;
background-size: 100vw;
background-repeat: no-repeat;
.name {
font-family: PingFangSC-SNaNpxibold;
@@ -232,15 +337,19 @@ export default {
font-size: 28px;
color: #323233;
line-height: 40px;
.radio {
display: inline-block;
width: 50%;
}
img {
width: 32px;
height: 32px;
margin-right: 18px;
vertical-align: middle;
}
.img-no {
margin-left: 138px;
}
// .img-no {
// margin-left: 138px;
// }
}
}
.text-area {
@@ -296,6 +405,7 @@ export default {
padding: 20px 32px 88px 32px;
box-sizing: border-box;
background: #FFF;
z-index: 999;
.btn {
width: 100%;
height: 80px;

View File

@@ -3,37 +3,43 @@
<div class="header-info">
<div class="flex-top">
<div class="left">
<div class="name">小荣超市11111</div>
<div class="name">{{ detailInfo.shopName }}</div>
<div class="star-info">
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24"></u-icon>
<span class="star-num">4.8</span>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >1"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >2"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >3"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >4"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >=5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="detailInfo.storeScore <5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="detailInfo.storeScore <4"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="detailInfo.storeScore <3"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="detailInfo.storeScore <2"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="detailInfo.storeScore <1"></u-icon>
<span class="star-num">{{ detailInfo.storeScore }}</span>
<div class="right-btn" @click="toEvaluateForm">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/store-detail-edit-icon.png" alt="">评价
</div>
</div>
</div>
<div class="right">
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
<img :src="detailInfo.fileUrl" alt="">
</div>
</div>
<div class="address"><u-icon name="map" color="#666" size="24"></u-icon>武昌区水果湖街道凯德1818负1层</div>
<div class="address"><u-icon name="map" color="#666" size="24"></u-icon>{{ detailInfo.address }}</div>
<div class="flex-info">
<div class="flex-item">
<p>经营者</p>
<div>张三</div>
<div>{{ detailInfo.name }}</div>
</div>
<div class="flex-item">
<p>联系电话</p>
<div>15425125362</div>
<div>{{ detailInfo.phone }}</div>
<span></span>
</div>
<div class="flex-item">
<p>经营类型</p>
<div>副食</div>
<div>{{ $dict.getLabel('operatorType', detailInfo.operatorType) }}</div>
<span></span>
</div>
</div>
@@ -41,29 +47,32 @@
<div class="line-bg"></div>
<div class="list-content">
<div class="type-list">
<div class="type-item active">全部 6</div>
<div class="type-item">全部 6</div>
<div class="type-item">全部 6</div>
<div class="type-item">全部 6</div>
<div :class="typeIndex == index ? 'type-item active' : 'type-item' " v-for="(item, index) in typeList" :key="index" @click="typeClick(index)">{{ item.dictName }} {{item.num}}</div>
</div>
<div class="item">
<div class="item" v-for="(item, index) in assessList" :key="index">
<div class="user-info">
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="" class="user-img">
<img :src="item.pictureUrl" alt="" class="user-img">
<div class="user-name">
<p>亓朋</p>
<div>2024.06.01</div>
<p>{{ item.evaluator }}</p>
<div>{{ item.evaluationTime.substring(0, 10) }}</div>
</div>
</div>
<div class="star-info">
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24"></u-icon>
<span class="star-num">4.8</span>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >1"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >2"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >3"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >4"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >=5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <4"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <3"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <2"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <1"></u-icon>
<span class="star-num">{{ item.storeScore }}</span>
</div>
<div class="text">东西日期新鲜包装很好下次再来</div>
<div class="text">{{ item.remark }}</div>
</div>
<AiEmpty v-if="!assessList.length" />
</div>
</div>
</template>
@@ -75,14 +84,60 @@ export default {
appName: '门店情况',
data() {
return {
shopId: '',
detailInfo: {},
assessList: [],
typeList: [
{dictName: '全部', dictValue: '', num: '30'},
{dictName: '111', dictValue: '', num: '30'},
{dictName: '222', dictValue: '', num: '30'}
],
typeIndex: 0,
current: 1,
pages: 2
}
},
onLoad(e) {
console.log(e)
this.shopId = e.shopId
this.$dict.load(['operatorType']).then(() => {
this.getDetail()
this.getAssessList()
})
uni.$on('updateStore', () => {
this.getDetail()
this.getAssessList()
})
},
methods: {
getDetail() {
this.$instance.post(`/app/appshoparchives/queryDetailById?id=${this.shopId}`).then(res => {
if (res?.data) {
this.detailInfo = res.data
}
})
},
getAssessList() {
if(this.current > this.pages) return
this.$loading()
this.$instance.post(`/app/appshopassess/list?shopId=${this.shopId}&current=${this.current}`).then(res => {
if (res?.data) {
this.assessList = this.current == 1 ? res.data.records : [this.list, res.data.records].flat()
this.pages = res.data.total
}
}).finally(() => uni.hideLoading())
},
typeClick(e) {
this.typeIndex = e
},
toEvaluateForm() {
uni.navigateTo({url: './EvaluateForm'})
uni.navigateTo({url: `./EvaluateForm?shopId=${this.shopId}`})
}
},
onReachBottom() {
this.current++
this.getAssessList()
}
}
</script>
@@ -96,7 +151,7 @@ export default {
padding: 40px 32px 32px 32px;
box-sizing: border-box;
background-image: url("https://cdn.cunwuyun.cn/wechat/fd-store/store-detail-headerBg.png");
background-size: 100vw;
background-size: cover;
background-repeat: no-repeat;
.flex-top {
display: flex;

View File

@@ -3,61 +3,71 @@
<div class="search">
<div class="search-input">
<u-search v-model="searchVal" :clearabled="true" placeholder="搜索门店名称" :show-action="false"
bg-color="#F4F5FA" search-icon-color="#666" color="#222" height="72" @search="getSearchList" @clear="handerClear">
bg-color="#F4F5FA" search-icon-color="#666" color="#222" height="72" @search="getListInit" @clear="getListInit">
</u-search>
</div>
<div class="search-type">
<div class="item">
按评分排序<u-icon name="arrow-down" color="#999" size="28"></u-icon>
<div class="item" @click="showStoreLevel=true">
{{searchStoreLevel.label ? searchStoreLevel.label : '按评分排序'}}<u-icon name="arrow-down" color="#999" size="28"></u-icon>
</div>
<div class="item">
<AiPagePicker type="gird" @select="handleGridSelect">
<span style="color:#222">{{gridName || '请选择网格'}}</span>
<span style="color:#222">{{girdInfo.gridName || '请选择网格'}}</span>
<u-icon name="arrow-down" color="#999" size="28"></u-icon>
</AiPagePicker>
</div>
<div class="item">
经营类型<u-icon name="arrow-down" color="#999" size="28"></u-icon>
</div>
</div>
<div class="list-content">
<div class="item" @click="toStoreDetail">
<div class="left">
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
</div>
<div class="right">
<div class="right-btn" @click="toEvaluateForm">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/store-detail-edit-icon.png" alt="">评价
</div>
<div class="store-name">小荣超市</div>
<div class="star-info">
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24"></u-icon>
<span class="star-num">4.8</span>
</div>
<div class="flex-info">
<div class="flex-item item-user">
<p>经营者</p>
<div>张三</div>
</div>
<div class="flex-item item-phone">
<p>联系电话</p>
<div>15425125362</div>
<span></span>
</div>
<div class="flex-item item-type">
<p>经营类型</p>
<div>副食</div>
<span></span>
</div>
</div>
</div>
<div class="item" @click="showOperatorType=true">
{{searchOperatorType.label ? searchOperatorType.label : '经营类型'}}<u-icon name="arrow-down" color="#999" size="28"></u-icon>
</div>
</div>
</div>
<div class="list-content">
<div class="item" @click="toStoreDetail(item.id)" v-for="(item, index) in list" :key="index">
<div class="left">
<img :src="item.fileUrl" alt="">
</div>
<div class="right">
<div class="right-btn" @click="toEvaluateForm(item.id)">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/store-detail-edit-icon.png" alt="">评价
</div>
<div class="store-name">{{ item.shopName }}</div>
<div class="star-info">
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >1"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >2"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >3"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >4"></u-icon>
<u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >=5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <5"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <4"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <3"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <2"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24" v-if="item.storeScore <1"></u-icon>
<span class="star-num">{{ item.storeScore }}</span>
</div>
<div class="flex-info">
<div class="flex-item item-user">
<p>经营者</p>
<div>{{ item.name }}</div>
</div>
<div class="flex-item item-phone">
<p>联系电话</p>
<div>{{ item.phone }}</div>
<span></span>
</div>
<div class="flex-item item-type">
<p>经营类型</p>
<div>{{ $dict.getLabel('operatorType', item.operatorType) }}</div>
<span></span>
</div>
</div>
</div>
</div>
<AiEmpty v-if="!list.length" />
</div>
<u-select v-model="showOperatorType" :list="operatorTypeDict" value-name="dictValue"
label-name="dictName" @confirm="confirmOperatorType"></u-select>
<u-select v-model="showStoreLevel" :list="storeLevelDict" value-name="dictValue"
label-name="dictName" @confirm="confirmStoreLevel"></u-select>
</div>
</template>
@@ -72,49 +82,65 @@ export default {
current: 1,
pages: 2,
searchVal: '',
gridName: ''
showOperatorType: false,
showStoreLevel: false,
operatorTypeDict: [],
storeLevelDict: [],
searchStoreLevel: {},
searchOperatorType: {},
girdInfo: {gridName: ''}
}
},
created() {
console.log(44)
this.getList()
},
onLoad() {
console.log(33)
this.getList()
this.$dict.load(['operatorType', 'storeLevel']).then(() => {
var all = [{dictName: '全部', dictValue: ''}]
this.operatorTypeDict = all.concat( this.$dict.getDict('operatorType'))
this.storeLevelDict = this.$dict.getDict('storeLevel')
this.getList()
})
},
methods: {
getList() {
console.log(122)
if(this.current > this.pages) return
this.$loading()
this.$instance.post(`/app/appshopassess/list`, null, {
this.$instance.post(`/app/appshoparchives/list`, null, {
params: {
current: this.current, size: 15
current: this.current,
size: 15,
operatorType: this.searchOperatorType.label ? this.searchOperatorType.value : '',
storeLevel: this.searchStoreLevel.label ? this.searchStoreLevel.value : '',
girdCode: this.girdInfo.girdCode,
shopName: this.searchVal
}
}).then(res => {
if (res?.data) {
this.list = this.current == 1 ? list : [this.list, list].flat()
this.list = this.current == 1 ? res.data.records : [this.list, res.data.records].flat()
this.pages = res.data.total
}
}).finally(() => uni.hideLoading())
},
getSearchList() {
confirmOperatorType(e) {
this.searchOperatorType = e[0]
this.getListInit()
},
handerClear() {
confirmStoreLevel(e) {
this.searchStoreLevel = e[0]
this.getListInit()
},
handleGridSelect(e) {
this.gridName = e?.girdName
// this.search.girdId = e?.id
// this.getDatas()
this.girdInfo = e
this.getListInit()
},
toEvaluateForm() {
this.$emit('toEvaluateForm', {id: '123'})
getListInit() {
this.current = 1
this.pages = 2
this.getList()
},
toStoreDetail() {
this.$emit('toStoreDetail', {id: '123'})
toEvaluateForm(id) {
this.$emit('toEvaluateForm', {shopId: id})
},
toStoreDetail(id) {
this.$emit('toStoreDetail', {shopId: id})
}
},
@@ -152,7 +178,7 @@ export default {
}
}
.list-content {
padding: 32px 32px 0;
padding: 340px 32px 0;
box-sizing: border-box;
.item {
width: 100%;