更新
This commit is contained in:
@ -8,3 +8,24 @@ export function bigDataUpload(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 单个文件上传
|
||||||
|
export function uploadFile(file) {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('file', file)
|
||||||
|
return service({
|
||||||
|
url: '/common/upload',
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
headers: { 'Content-Type': 'multipart/form-data' }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询字典列表
|
||||||
|
export function getDictListByCode(data) {
|
||||||
|
return service({
|
||||||
|
url: api1 + `/sysDict/getSysDictByCode`,
|
||||||
|
method: "GET",
|
||||||
|
params: data
|
||||||
|
});
|
||||||
|
};
|
||||||
@ -5,9 +5,6 @@
|
|||||||
<van-icon name="arrow-left" color="#fff" size="18px" />
|
<van-icon name="arrow-left" color="#fff" size="18px" />
|
||||||
</span>
|
</span>
|
||||||
<span>{{ navTitle }}</span>
|
<span>{{ navTitle }}</span>
|
||||||
<van-popover v-model:show="showThemeSetting" :actions="actions" :theme="defaultThemeQp" :offset="[12, -15]"
|
|
||||||
placement="bottom-end" @select="onSelectSeting" :teleport="isbody">
|
|
||||||
</van-popover>
|
|
||||||
<van-icon :name="rightIcon" color="#fff" size="25px" @click.stop="onClickRight" v-if="showRight" />
|
<van-icon :name="rightIcon" color="#fff" size="25px" @click.stop="onClickRight" v-if="showRight" />
|
||||||
<span class="rightTitle" @click="onClickRight" v-if="rightTitle">{{
|
<span class="rightTitle" @click="onClickRight" v-if="rightTitle">{{
|
||||||
rightTitle
|
rightTitle
|
||||||
@ -17,9 +14,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import watermark from "../utils/watermark.js";
|
|
||||||
import { ref, onMounted, defineEmits } from "vue";
|
import { ref, onMounted, defineEmits } from "vue";
|
||||||
import emitter from "../utils/eventBus.js";
|
|
||||||
import router from "../router";
|
import router from "../router";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
navTitle: String, //标题
|
navTitle: String, //标题
|
||||||
@ -59,13 +54,6 @@ function onCLickFh() {
|
|||||||
router.back();
|
router.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSelectSeting(e) {
|
|
||||||
sessionStorage.clear()
|
|
||||||
localStorage.clear()
|
|
||||||
clearnAllCookie()
|
|
||||||
router.push("/login");
|
|
||||||
watermark.remove();//移除水印
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清除所有cookie
|
// 清除所有cookie
|
||||||
function clearnAllCookie() {
|
function clearnAllCookie() {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="home-page">
|
<div class="home-page">
|
||||||
|
<div class="container-box">
|
||||||
<!-- 顶部导航栏 -->
|
<!-- 顶部导航栏 -->
|
||||||
<div class="header-bg">
|
<div class="header-bg">
|
||||||
<div class="user-section">
|
<div class="user-section">
|
||||||
@ -104,7 +105,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</van-list>
|
</van-list>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- 底部导航栏 -->
|
<!-- 底部导航栏 -->
|
||||||
<BottomTabs :active-tab="'home'" />
|
<BottomTabs :active-tab="'home'" />
|
||||||
</div>
|
</div>
|
||||||
@ -304,9 +305,13 @@ function getStatusText(status) {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.home-page {
|
.home-page {
|
||||||
min-height: 100vh;
|
height: 100vh;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
padding-bottom: 80px;
|
.container-box{
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bg {
|
.header-bg {
|
||||||
|
|||||||
@ -6,9 +6,7 @@
|
|||||||
<van-icon name="arrow-left" />
|
<van-icon name="arrow-left" />
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-title">随手拍</div>
|
<div class="nav-title">随手拍</div>
|
||||||
<div class="nav-right">
|
<div class="nav-right"></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 表单内容 -->
|
<!-- 表单内容 -->
|
||||||
@ -307,9 +305,8 @@ function goBack() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
async function handleSubmit() {
|
function handleSubmit() {
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 字段映射:页面字段 -> API字段
|
// 字段映射:页面字段 -> API字段
|
||||||
const submitData = { ...formData };
|
const submitData = { ...formData };
|
||||||
@ -318,15 +315,10 @@ async function handleSubmit() {
|
|||||||
submitData[`zpstr${index + 1}`] = photo.url;
|
submitData[`zpstr${index + 1}`] = photo.url;
|
||||||
submitData[`zpur1${index + 1}`] = photo.url;
|
submitData[`zpur1${index + 1}`] = photo.url;
|
||||||
});
|
});
|
||||||
const res = await addSsPai(submitData);
|
addSsPai(submitData).then(res => {
|
||||||
console.log("提交数据:", res);
|
|
||||||
if(res){
|
|
||||||
Toast("提交成功");
|
Toast("提交成功");
|
||||||
router.back();
|
router.back();
|
||||||
}else {
|
})
|
||||||
Toast(res.msg || "提交失败");
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("提交失败:", error);
|
console.error("提交失败:", error);
|
||||||
Toast("提交失败,请重试");
|
Toast("提交失败,请重试");
|
||||||
|
|||||||
@ -5,13 +5,7 @@ import { getDictListByCode } from "./../api/common";
|
|||||||
* 分局字典代码获取字典词条列表
|
* 分局字典代码获取字典词条列表
|
||||||
* @param {字典代码} dict
|
* @param {字典代码} dict
|
||||||
*/
|
*/
|
||||||
// export function getDictList(dict) {
|
|
||||||
// return new Promise((ok) => {
|
|
||||||
// getDictListByCode({ dictCode: dict }).then((res) => {
|
|
||||||
// ok(res.itemList);
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
export function getDictList(...dict) {
|
export function getDictList(...dict) {
|
||||||
const res = ref({})
|
const res = ref({})
|
||||||
return (()=>{
|
return (()=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user