提交 8a34c656 authored 作者: lidongxu's avatar lidongxu

refactor(mobiles_promotion): 修改促销移动端详情页的部分 内容

同上
上级 a03f6c88
......@@ -8,6 +8,7 @@ VITE_APP_PUBLIC_PATH = '/'
# 基地址
VITE_APP_BASE_API = '/dev-api' # 小卤
# VITE_APP_BASE_API = '/ql_local' # 小卤
# VITE_APP_BASE_API = '/bc_local' # 小卤
VITE_APP_PROMOTION = '/promotion-api' # 促销
# 飞书服务回调地址(本地测试已经通过并上线,后台飞书登录接口重定向地址已经不是 localhost 了所以本地开发无需使用飞书登录,线上已经可用)
......
......@@ -29,3 +29,12 @@ export function addReportGroupAPI(data) {
data
})
}
// 新增/编辑自定义分组
export function editReportGroupAPI(data) {
return request({
url: '/report/customer/core/group/insertOrUpdate',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -67,6 +67,31 @@
</div>
</template>
</van-cell>
<van-cell v-for="item in planList"
:key="item.id"
label-class="image-cell">
<template #title>
<p>{{ item.temporaryName }}</p>
<p>{{ item.province + item.city }}</p>
</template>
<template #label>
<div class="item"
v-for="o in item.photoList">
<template v-if="o.list">
<p>{{ o.title }}</p>
<div class="image-wrap">
<div class="small-item"
v-for="obj, index in o.list">
<van-image :src="obj.photoUrl"
@click="previewImage(o.list, index)" />
<p>{{ obj.title }}</p>
<p>{{ obj.time }}</p>
</div>
</div>
</template>
</div>
</template>
</van-cell>
</van-cell-group>
</van-list>
</van-pull-refresh>
......@@ -173,6 +198,7 @@ const getPlanDetail = async () => {
// allPhotoList.value.push(...o.list)
// }
// })
console.log('photoDialogList', photoDialogList)
return {
id: o.reported.id, // 用的是促销上报的id,不是打卡的 id
province: o.reported.province, // 省份
......@@ -240,6 +266,10 @@ p {
.van-list {
margin-top: 20px;
min-height: 100vh;
::v-deep(.van-cell:nth-child(n+2)){
margin-top: 20px;
}
}
::v-deep(.van-cell__title) {
......@@ -286,9 +316,11 @@ p {
.small-item {
width: 125px;
text-align: center;
display: inline-block;
.van-image {
height: 135px;
}
}
</style>
\ No newline at end of file
......@@ -75,7 +75,7 @@
<el-input v-else
v-model="group.groupName"
ref="groupNameRef"
@blur="group.showEdit = false"></el-input>
@blur="blue"></el-input>
</div>
<div class="card-header-right">
<el-button type="primary"
......@@ -111,7 +111,7 @@
<!-- 新增分组 -->
<div class="add-group">
<el-button type="primary"
@click="groups.push({ groupName: '新分组', showEdit: false, items: [] })">
@click="addGroups">
<el-icon>
<Plus />
</el-icon>
......@@ -125,7 +125,7 @@
</template>
<script setup>
import { getReportListAPI, getReportListBySelfAPI, getReportListByGroupAPI, addReportGroupAPI } from '@/api'
import { getReportListAPI, getReportListBySelfAPI, getReportListByGroupAPI, addReportGroupAPI, editReportGroupAPI } from '@/api'
import draggable from 'vuedraggable'
const { proxy } = getCurrentInstance()
const visible = ref(false)
......@@ -184,6 +184,20 @@ const removeGroupName = (group) => {
groups.value.splice(index, 1)
})
}
// 新增分组
const addGroups = async () => {
// await editReportGroupAPI({
// groupName: '新分组',
// categoryName: '供应链报表',
// items: []
// })
groups.value.push({
groupName: '新分组',
items: []
})
}
</script>
<style scoped
......@@ -263,17 +277,19 @@ const removeGroupName = (group) => {
display: flex;
justify-content: space-between;
align-items: center;
.card-header-right{
.el-button{
.card-header-right {
.el-button {
margin: 0;
padding: 10px;
}
}
}
.add-group{
.add-group {
margin-top: 20px;
.el-button{
.el-button {
width: 100%;
}
}
......
......@@ -32,8 +32,15 @@ export default defineConfig(({ mode, command }) => {
changeOrigin: true,
rewrite: (p) => p.replace(/^\/promotion-api/, '')
},
'ql_local': {
target: 'http://192.168.131.48'
'/ql_local': {
target: 'http://192.168.131.48',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/ql_local/, '')
},
'/bc_local': {
target: 'http://192.168.131.5:8180',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/bc_local/, '')
}
}
},
......@@ -56,7 +63,9 @@ export default defineConfig(({ mode, command }) => {
return file.indexOf('vant') !== -1 ? 37.5 : 37.5;
},
propList: ['*'],
exclude: file => !file.includes('mobile_views') && !file.includes('node_modules/vant')
exclude: file => {
return !file.includes('mobile_views') && !file.includes('node_modules/vant')
}
})
]
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论