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"> <div class="photo">
<img :src="item.url" alt="" v-for="(item,index) in images" :key="index" @click="preview(index)"> <img :src="item.url" alt="" v-for="(item,index) in images" :key="index" @click="preview(index)">
</div> </div>
<div class="footer" @click="toAppStore" v-if="showStore">
<div class="btn">我要评选</div>
</div>
</div> </div>
</template> </template>
@@ -27,6 +30,7 @@ export default {
pageShow: false, pageShow: false,
detail: {}, detail: {},
images: [], images: [],
showStore: false
} }
}, },
onLoad({id}) { onLoad({id}) {
@@ -52,6 +56,9 @@ export default {
this.$hideLoading() this.$hideLoading()
}) })
},
toAppStore() {
uni.navigateTo({url: '/pages/AppStore/AppStore'})
} }
}, },
} }
@@ -106,5 +113,27 @@ export default {
margin-top: 32px; 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> </style>

View File

@@ -1,19 +1,13 @@
<template> <template>
<div class="myStoreList"> <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="top-flex">
<div class="name">小荣超市11111</div> <div class="name">{{ item.shopName }}</div>
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt=""> <img :src="item.fileUrl" alt="">
</div> </div>
<div class="address">麒麟区南宁街道潇湘社区</div> <div class="address">{{ item.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> </div>
<AiEmpty v-if="!list.length" />
</div> </div>
</template> </template>
@@ -24,14 +18,39 @@ export default {
appName: '我的门店', appName: '我的门店',
data() { data() {
return { return {
list: [],
current: 1,
pages: 2
} }
}, },
onLoad() {
this.getShopList()
},
methods: { methods: {
toStoreForm() { getShopList() {
uni.navigateTo({url: './storeForm'}) 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> </script>

View File

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

View File

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

View File

@@ -1,23 +1,23 @@
<template> <template>
<div class="EvaluateForm"> <div class="EvaluateForm">
<div class="header-info"> <div class="header-info">
<div class="name">小荣超市11111</div> <div class="name">{{ shopInfo.shopName }}</div>
<div class="time"> <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>
<div class="flex-info"> <div class="flex-info">
<div class="flex-item item-user"> <div class="flex-item item-user">
<p>经营者</p> <p>经营者</p>
<div>张三</div> <div>{{ shopInfo.name }}</div>
</div> </div>
<div class="flex-item item-phone"> <div class="flex-item item-phone">
<p>联系电话</p> <p>联系电话</p>
<div>15425125362</div> <div>{{ shopInfo.phone }}</div>
<span></span> <span></span>
</div> </div>
<div class="flex-item item-type"> <div class="flex-item item-type">
<p>经营类型</p> <p>经营类型</p>
<div>副食</div> <div>{{ $dict.getLabel('operatorType', shopInfo.operatorType) }}</div>
<span></span> <span></span>
</div> </div>
</div> </div>
@@ -29,71 +29,113 @@
<div class="item"> <div class="item">
<div class="label">(1)门店整洁美观</div> <div class="label">(1)门店整洁美观</div>
<div class="value"> <div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes"> <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="" class="img-no"> <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> </div>
<div class="item"> <div class="item">
<div class="label">(2)有绿植安放</div> <div class="label">(2)有绿植安放</div>
<div class="value"> <div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes"> <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="" class="img-no"> <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> </div>
<div class="item"> <div class="item">
<div class="label">(3)其他</div> <div class="label">(3)其他</div>
<div class="value"> <div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes"> <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="" class="img-no"> <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> </div>
<div class="mini-title">负面清单</div> <div class="mini-title">负面清单</div>
<div class="item"> <div class="item">
<div class="label">(1)车辆乱停</div> <div class="label">(1)车辆乱停</div>
<div class="value"> <div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes"> <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="" class="img-no"> <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> </div>
<div class="item"> <div class="item">
<div class="label">(2)门头凌乱</div> <div class="label">(2)门头凌乱</div>
<div class="value"> <div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes"> <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="" class="img-no"> <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> </div>
<div class="item"> <div class="item">
<div class="label">(3)垃圾凌乱</div> <div class="label">(3)垃圾凌乱</div>
<div class="value"> <div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes"> <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="" class="img-no"> <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> </div>
<div class="item"> <div class="item">
<div class="label">(4)其他</div> <div class="label">(4)其他</div>
<div class="value"> <div class="value">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-xz.png" alt="" class="img-yes"> <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="" class="img-no"> <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> </div>
<div class="line-bg"></div> <div class="line-bg"></div>
<div class="text-area"> <div class="text-area">
<div class="label">请填写评语</div> <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;"/> placeholder-style="color: #999999;font-size: 15px;"/>
<p>0/300</p> <p>0/300</p>
</div> </div>
@@ -101,13 +143,13 @@
<div class="upload"> <div class="upload">
<div class="label">上传图片</div> <div class="label">上传图片</div>
<div class="upload-info"> <div class="upload-info">
<AiUploader v-model="form.files" :limit="9"></AiUploader> <AiUploader v-model="form.file" :limit="9"></AiUploader>
</div> </div>
<p>最多上传9张</p> <p>最多上传9张</p>
</div> </div>
</div> </div>
<div class="line-bg"></div> <div class="line-bg"></div>
<div class="footer"> <div class="footer" @click="add">
<div class="btn">提交</div> <div class="btn">提交</div>
</div> </div>
</div> </div>
@@ -121,12 +163,75 @@ export default {
data() { data() {
return { return {
form: { 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> </script>
@@ -139,7 +244,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
color: #323233; color: #323233;
background-image: url("https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-headerBg.png"); background-image: url("https://cdn.cunwuyun.cn/wechat/fd-store/evaluate-form-headerBg.png");
background-size: cover; background-size: 100vw;
background-repeat: no-repeat; background-repeat: no-repeat;
.name { .name {
font-family: PingFangSC-SNaNpxibold; font-family: PingFangSC-SNaNpxibold;
@@ -232,15 +337,19 @@ export default {
font-size: 28px; font-size: 28px;
color: #323233; color: #323233;
line-height: 40px; line-height: 40px;
.radio {
display: inline-block;
width: 50%;
}
img { img {
width: 32px; width: 32px;
height: 32px; height: 32px;
margin-right: 18px; margin-right: 18px;
vertical-align: middle; vertical-align: middle;
} }
.img-no { // .img-no {
margin-left: 138px; // margin-left: 138px;
} // }
} }
} }
.text-area { .text-area {
@@ -296,6 +405,7 @@ export default {
padding: 20px 32px 88px 32px; padding: 20px 32px 88px 32px;
box-sizing: border-box; box-sizing: border-box;
background: #FFF; background: #FFF;
z-index: 999;
.btn { .btn {
width: 100%; width: 100%;
height: 80px; height: 80px;

View File

@@ -3,37 +3,43 @@
<div class="header-info"> <div class="header-info">
<div class="flex-top"> <div class="flex-top">
<div class="left"> <div class="left">
<div class="name">小荣超市11111</div> <div class="name">{{ detailInfo.shopName }}</div>
<div class="star-info"> <div class="star-info">
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon> <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"></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"></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"></u-icon> <u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >4"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24"></u-icon> <u-icon name="star-fill" color="#FF8C19" size="24" v-if="detailInfo.storeScore >=5"></u-icon>
<span class="star-num">4.8</span> <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"> <div class="right-btn" @click="toEvaluateForm">
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/store-detail-edit-icon.png" alt="">评价 <img src="https://cdn.cunwuyun.cn/wechat/fd-store/store-detail-edit-icon.png" alt="">评价
</div> </div>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt=""> <img :src="detailInfo.fileUrl" alt="">
</div> </div>
</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-info">
<div class="flex-item"> <div class="flex-item">
<p>经营者</p> <p>经营者</p>
<div>张三</div> <div>{{ detailInfo.name }}</div>
</div> </div>
<div class="flex-item"> <div class="flex-item">
<p>联系电话</p> <p>联系电话</p>
<div>15425125362</div> <div>{{ detailInfo.phone }}</div>
<span></span> <span></span>
</div> </div>
<div class="flex-item"> <div class="flex-item">
<p>经营类型</p> <p>经营类型</p>
<div>副食</div> <div>{{ $dict.getLabel('operatorType', detailInfo.operatorType) }}</div>
<span></span> <span></span>
</div> </div>
</div> </div>
@@ -41,29 +47,32 @@
<div class="line-bg"></div> <div class="line-bg"></div>
<div class="list-content"> <div class="list-content">
<div class="type-list"> <div class="type-list">
<div class="type-item active">全部 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 class="type-item">全部 6</div>
<div class="type-item">全部 6</div>
<div class="type-item">全部 6</div>
</div> </div>
<div class="item"> <div class="item" v-for="(item, index) in assessList" :key="index">
<div class="user-info"> <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"> <div class="user-name">
<p>亓朋</p> <p>{{ item.evaluator }}</p>
<div>2024.06.01</div> <div>{{ item.evaluationTime.substring(0, 10) }}</div>
</div> </div>
</div> </div>
<div class="star-info"> <div class="star-info">
<u-icon name="star-fill" color="#FF8C19" size="24"></u-icon> <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"></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"></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"></u-icon> <u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >4"></u-icon>
<u-icon name="star-fill" color="#F0F0F0" size="24"></u-icon> <u-icon name="star-fill" color="#FF8C19" size="24" v-if="item.storeScore >=5"></u-icon>
<span class="star-num">4.8</span> <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>
<div class="text">东西日期新鲜包装很好下次再来</div> <div class="text">{{ item.remark }}</div>
</div> </div>
<AiEmpty v-if="!assessList.length" />
</div> </div>
</div> </div>
</template> </template>
@@ -75,14 +84,60 @@ export default {
appName: '门店情况', appName: '门店情况',
data() { data() {
return { 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: { 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() { toEvaluateForm() {
uni.navigateTo({url: './EvaluateForm'}) uni.navigateTo({url: `./EvaluateForm?shopId=${this.shopId}`})
} }
}, },
onReachBottom() {
this.current++
this.getAssessList()
}
} }
</script> </script>
@@ -96,7 +151,7 @@ export default {
padding: 40px 32px 32px 32px; padding: 40px 32px 32px 32px;
box-sizing: border-box; box-sizing: border-box;
background-image: url("https://cdn.cunwuyun.cn/wechat/fd-store/store-detail-headerBg.png"); background-image: url("https://cdn.cunwuyun.cn/wechat/fd-store/store-detail-headerBg.png");
background-size: 100vw; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
.flex-top { .flex-top {
display: flex; display: flex;

View File

@@ -3,61 +3,71 @@
<div class="search"> <div class="search">
<div class="search-input"> <div class="search-input">
<u-search v-model="searchVal" :clearabled="true" placeholder="搜索门店名称" :show-action="false" <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> </u-search>
</div> </div>
<div class="search-type"> <div class="search-type">
<div class="item"> <div class="item" @click="showStoreLevel=true">
按评分排序<u-icon name="arrow-down" color="#999" size="28"></u-icon> {{searchStoreLevel.label ? searchStoreLevel.label : '按评分排序'}}<u-icon name="arrow-down" color="#999" size="28"></u-icon>
</div> </div>
<div class="item"> <div class="item">
<AiPagePicker type="gird" @select="handleGridSelect"> <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> <u-icon name="arrow-down" color="#999" size="28"></u-icon>
</AiPagePicker> </AiPagePicker>
</div> </div>
<div class="item"> <div class="item" @click="showOperatorType=true">
经营类型<u-icon name="arrow-down" color="#999" size="28"></u-icon> {{searchOperatorType.label ? searchOperatorType.label : '经营类型'}}<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> </div>
</div> </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> </div>
</template> </template>
@@ -72,49 +82,65 @@ export default {
current: 1, current: 1,
pages: 2, pages: 2,
searchVal: '', searchVal: '',
gridName: '' showOperatorType: false,
showStoreLevel: false,
operatorTypeDict: [],
storeLevelDict: [],
searchStoreLevel: {},
searchOperatorType: {},
girdInfo: {gridName: ''}
} }
}, },
created() { created() {
console.log(44) this.$dict.load(['operatorType', 'storeLevel']).then(() => {
this.getList() var all = [{dictName: '全部', dictValue: ''}]
}, this.operatorTypeDict = all.concat( this.$dict.getDict('operatorType'))
onLoad() { this.storeLevelDict = this.$dict.getDict('storeLevel')
console.log(33) this.getList()
this.getList() })
}, },
methods: { methods: {
getList() { getList() {
console.log(122)
if(this.current > this.pages) return if(this.current > this.pages) return
this.$loading() this.$loading()
this.$instance.post(`/app/appshopassess/list`, null, { this.$instance.post(`/app/appshoparchives/list`, null, {
params: { 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 => { }).then(res => {
if (res?.data) { 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 this.pages = res.data.total
} }
}).finally(() => uni.hideLoading()) }).finally(() => uni.hideLoading())
}, },
getSearchList() { confirmOperatorType(e) {
this.searchOperatorType = e[0]
this.getListInit()
}, },
handerClear() { confirmStoreLevel(e) {
this.searchStoreLevel = e[0]
this.getListInit()
}, },
handleGridSelect(e) { handleGridSelect(e) {
this.gridName = e?.girdName this.girdInfo = e
// this.search.girdId = e?.id this.getListInit()
// this.getDatas()
}, },
toEvaluateForm() { getListInit() {
this.$emit('toEvaluateForm', {id: '123'}) this.current = 1
this.pages = 2
this.getList()
}, },
toStoreDetail() { toEvaluateForm(id) {
this.$emit('toStoreDetail', {id: '123'}) this.$emit('toEvaluateForm', {shopId: id})
},
toStoreDetail(id) {
this.$emit('toStoreDetail', {shopId: id})
} }
}, },
@@ -152,7 +178,7 @@ export default {
} }
} }
.list-content { .list-content {
padding: 32px 32px 0; padding: 340px 32px 0;
box-sizing: border-box; box-sizing: border-box;
.item { .item {
width: 100%; width: 100%;