update
This commit is contained in:
@@ -2,11 +2,14 @@ import request from "../utils/request.js";
|
|||||||
import Method from "./Method.js";
|
import Method from "./Method.js";
|
||||||
|
|
||||||
const merchant = {
|
const merchant = {
|
||||||
sendSms: async (mobile) => {
|
sendSms: async (mobile, type) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/index/login/sendSms',
|
url: '/index/login/sendSms',
|
||||||
method: Method.POST,
|
method: Method.POST,
|
||||||
data: {mobile},
|
data: {
|
||||||
|
mobile,
|
||||||
|
type
|
||||||
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
register: async (data) => {
|
register: async (data) => {
|
||||||
@@ -166,6 +169,48 @@ const merchant = {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
saveNickname: async (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/index/business/saveNickname',
|
||||||
|
method: Method.POST,
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
},
|
||||||
|
saveMobile: async (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/index/business/saveMobile',
|
||||||
|
method: Method.POST,
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
},
|
||||||
|
saveWechat: async (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/index/business/saveWechat',
|
||||||
|
method: Method.POST,
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
},
|
||||||
|
savePassword: async (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/index/business/savePassword',
|
||||||
|
method: Method.POST,
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
},
|
||||||
|
saveAvatar: async (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/index/business/saveAvatar',
|
||||||
|
method: Method.POST,
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getTaskChildrenList: async (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/index/task/getTaskChildrenList',
|
||||||
|
method: Method.POST,
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default merchant;
|
export default merchant;
|
||||||
|
|||||||
BIN
src/assets/images/avatar.png
Normal file
BIN
src/assets/images/avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
@@ -3,7 +3,7 @@ import {useSystemStore} from "../../pinia/SystemStore/index.js";
|
|||||||
import {useUserStore} from "../../pinia/UserStore/index.js";
|
import {useUserStore} from "../../pinia/UserStore/index.js";
|
||||||
|
|
||||||
const SystemStore = useSystemStore();
|
const SystemStore = useSystemStore();
|
||||||
const {logout} = useUserStore();
|
const UserStore = useUserStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -16,11 +16,11 @@ const {logout} = useUserStore();
|
|||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
<a-link
|
<a-link
|
||||||
:hoverable="false">
|
:hoverable="false">
|
||||||
15709267061
|
{{ UserStore.userInfo.nickname || UserStore.userInfo.mobile }}
|
||||||
<icon-down/>
|
<icon-down/>
|
||||||
</a-link>
|
</a-link>
|
||||||
<template #content>
|
<template #content>
|
||||||
<a-doption @click="logout">退出登陆</a-doption>
|
<a-doption @click="UserStore.logout">退出登陆</a-doption>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,11 +4,15 @@ import {Message, Notification} from "@arco-design/web-vue";
|
|||||||
import Api from "../../api/index.js";
|
import Api from "../../api/index.js";
|
||||||
|
|
||||||
const verificationCode = defineModel('verificationCode', {type: String});
|
const verificationCode = defineModel('verificationCode', {type: String});
|
||||||
const {mobile, api} = defineProps({
|
const {mobile, api, type} = defineProps({
|
||||||
mobile: {
|
mobile: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
type: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
api: {
|
api: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: Api.admin.sendSms
|
default: Api.admin.sendSms
|
||||||
@@ -21,7 +25,7 @@ let timer = null;
|
|||||||
const verifyPhone = async () => {
|
const verifyPhone = async () => {
|
||||||
if (/^1[3-9]\d{9}$/.test(mobile)) {
|
if (/^1[3-9]\d{9}$/.test(mobile)) {
|
||||||
if (timer === null) {
|
if (timer === null) {
|
||||||
const {msg, code} = await api(mobile);
|
const {msg, code} = await api(mobile, type);
|
||||||
if (code === 1) Message.success(msg);
|
if (code === 1) Message.success(msg);
|
||||||
time.value = 10;
|
time.value = 10;
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
|
|||||||
31
src/components/upload/UploadSlot.vue
Normal file
31
src/components/upload/UploadSlot.vue
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<script setup>
|
||||||
|
import Api from "../../api/index.js";
|
||||||
|
|
||||||
|
const emits = defineEmits(['success']);
|
||||||
|
|
||||||
|
const upload = (e) => {
|
||||||
|
const file = e.target.files[0];
|
||||||
|
Api.system.uploadFile2(file).then(({data}) => {
|
||||||
|
emits('success', data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const createInput = () => {
|
||||||
|
const input = document.createElement('input');
|
||||||
|
input.type = 'file';
|
||||||
|
input.onchange = upload;
|
||||||
|
input.style.display = 'none';
|
||||||
|
document.body.append(input);
|
||||||
|
input.click();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div @click="createInput">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {ref, reactive} from 'vue';
|
import {reactive} from 'vue';
|
||||||
import VerificationCode from "../../components/VerificationCode/index.vue";
|
import VerificationCode from "../../components/VerificationCode/index.vue";
|
||||||
|
import Api from "../../api/index.js";
|
||||||
|
|
||||||
const from = reactive({
|
const from = reactive({
|
||||||
phone: null,
|
phone: null,
|
||||||
@@ -19,6 +20,8 @@ const from = reactive({
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<VerificationCode
|
<VerificationCode
|
||||||
|
:type="3"
|
||||||
|
:api="Api.merchant.sendSms"
|
||||||
:phone="from.phone"
|
:phone="from.phone"
|
||||||
v-model:verification-code="from.verificationCode">
|
v-model:verification-code="from.verificationCode">
|
||||||
</VerificationCode>
|
</VerificationCode>
|
||||||
@@ -37,6 +40,7 @@ const from = reactive({
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.card {
|
.card {
|
||||||
box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.1);
|
box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
|
||||||
:deep(.arco-form-item-label-col) {
|
:deep(.arco-form-item-label-col) {
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ const mode = ref(MODE.PHONE);
|
|||||||
<div class="mt-[38px] flex flex-col gap-[20px]">
|
<div class="mt-[38px] flex flex-col gap-[20px]">
|
||||||
<a-input v-model:model-value="from.mobile" placeholder="手机号"></a-input>
|
<a-input v-model:model-value="from.mobile" placeholder="手机号"></a-input>
|
||||||
<VerificationCode
|
<VerificationCode
|
||||||
|
:type="2"
|
||||||
v-if="mode === MODE.PHONE"
|
v-if="mode === MODE.PHONE"
|
||||||
:mobile="from.mobile"
|
:mobile="from.mobile"
|
||||||
v-model:verification-code="from.code">
|
v-model:verification-code="from.code">
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ const register = async () => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="验证码">
|
<a-form-item label="验证码">
|
||||||
<VerificationCode
|
<VerificationCode
|
||||||
|
:type="1"
|
||||||
:api="Api.merchant.sendSms"
|
:api="Api.merchant.sendSms"
|
||||||
:mobile="from.mobile"
|
:mobile="from.mobile"
|
||||||
v-model:verification-code="from.captcha">
|
v-model:verification-code="from.captcha">
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ const success = async () => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="验证码">
|
<a-form-item label="验证码">
|
||||||
<VerificationCode
|
<VerificationCode
|
||||||
|
:type="6"
|
||||||
:api="Api.merchant.sendSms"
|
:api="Api.merchant.sendSms"
|
||||||
:mobile="form.mobile"
|
:mobile="form.mobile"
|
||||||
v-model:verification-code="form.captcha">
|
v-model:verification-code="form.captcha">
|
||||||
|
|||||||
@@ -1,10 +1,104 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {reactive, ref} from "vue";
|
import ICON from "../../../../assets/images/avatar.png";
|
||||||
|
import {onMounted, reactive, ref} from "vue";
|
||||||
|
import Api from "../../../../api/index.js";
|
||||||
|
import {baseImage} from "../../../../utils/index.js";
|
||||||
|
import {Message} from "@arco-design/web-vue";
|
||||||
|
import {useUserStore} from "../../../../pinia/UserStore/index.js";
|
||||||
|
import VerificationCode from "../../../../components/VerificationCode/index.vue";
|
||||||
|
import UploadSlot from "../../../../components/upload/UploadSlot.vue";
|
||||||
|
|
||||||
|
const UserStore = useUserStore();
|
||||||
const activeKey = ref('1');
|
const activeKey = ref('1');
|
||||||
const form = reactive({
|
const vo = reactive({
|
||||||
name: null
|
avatar: null,
|
||||||
|
nickname: null,
|
||||||
|
wechat: null,
|
||||||
|
mobile: null,
|
||||||
|
uid: null,
|
||||||
|
invite: null,
|
||||||
|
password: null,
|
||||||
});
|
});
|
||||||
|
const form = reactive({
|
||||||
|
avatar: null,
|
||||||
|
nickname: null,
|
||||||
|
wechat: null,
|
||||||
|
mobile: null,
|
||||||
|
uid: null,
|
||||||
|
invite: null,
|
||||||
|
captcha: null,
|
||||||
|
password: null,
|
||||||
|
old_mobile: null,
|
||||||
|
new_mobile: null,
|
||||||
|
old_captcha: null,
|
||||||
|
new_captcha: null,
|
||||||
|
});
|
||||||
|
|
||||||
|
const getData = async () => {
|
||||||
|
const {data} = await Api.merchant.getBusinessInfo();
|
||||||
|
Object.assign(vo, data);
|
||||||
|
Object.assign(UserStore.userInfo, vo);
|
||||||
|
form.old_mobile = vo.mobile;
|
||||||
|
vo.password = '********';
|
||||||
|
}
|
||||||
|
|
||||||
|
const saveNickname = async () => {
|
||||||
|
const {msg} = await Api.merchant.saveNickname({
|
||||||
|
nickname: form.nickname,
|
||||||
|
});
|
||||||
|
form.nickname = null;
|
||||||
|
Message.success(msg);
|
||||||
|
await getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
const saveMobile = async () => {
|
||||||
|
const {msg} = await Api.merchant.saveMobile({
|
||||||
|
old_mobile: form.old_mobile,
|
||||||
|
new_mobile: form.new_mobile,
|
||||||
|
old_captcha: form.old_captcha,
|
||||||
|
new_captcha: form.new_captcha,
|
||||||
|
});
|
||||||
|
form.old_mobile = null;
|
||||||
|
form.new_mobile = null;
|
||||||
|
form.old_captcha = null;
|
||||||
|
form.new_captcha = null;
|
||||||
|
Message.success(msg);
|
||||||
|
await getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
const savePassword = async () => {
|
||||||
|
const {msg} = await Api.merchant.savePassword({
|
||||||
|
mobile: form.mobile,
|
||||||
|
captcha: form.captcha,
|
||||||
|
password: form.password,
|
||||||
|
});
|
||||||
|
form.mobile = null;
|
||||||
|
form.captcha = null;
|
||||||
|
form.password = null;
|
||||||
|
Message.success(msg);
|
||||||
|
await getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
const saveWechat = async () => {
|
||||||
|
const {msg} = await Api.merchant.saveWechat({
|
||||||
|
wechat: form.wechat
|
||||||
|
});
|
||||||
|
form.wechat = null;
|
||||||
|
Message.success(msg);
|
||||||
|
await getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateAvatar = async (url) => {
|
||||||
|
const {msg} = await Api.merchant.saveAvatar({
|
||||||
|
avatar: url,
|
||||||
|
});
|
||||||
|
Message.success(msg);
|
||||||
|
await getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getData();
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -16,33 +110,38 @@ const form = reactive({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mock-card mb-[20px] py-[30px] flex items-center gap-[60px]">
|
<div class="mock-card mb-[20px] py-[30px] flex items-center gap-[60px]">
|
||||||
<div class="w-[100px] h-[100px] test rounded-[50%]">
|
<div class="w-[100px] h-[100px] rounded-[50%] relative">
|
||||||
<img class="w-full h-full rounded-[50%] object-cover" src="" alt=""/>
|
<div class="!size-full rounded-[50%] overflow-hidden cursor-pointer">
|
||||||
|
<a-image width="100%" height="100%" :src="baseImage(vo.avatar)"></a-image>
|
||||||
|
</div>
|
||||||
|
<UploadSlot @success="updateAvatar">
|
||||||
|
<img class="!size-[30px] absolute right-0 bottom-0 cursor-pointer" :src="ICON" alt=""/>
|
||||||
|
</UploadSlot>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a-descriptions align="right">
|
<a-descriptions align="right" id="descriptions">
|
||||||
<a-descriptions-item label="昵称" :span="2">
|
<a-descriptions-item label="昵称" :span="1">
|
||||||
王力群ABCabc
|
{{ vo.nickname }}
|
||||||
<a-link :hoverable="false" class="ml-[20px]" @click="activeKey='1'">更改</a-link>
|
<a-link :hoverable="false" class="ml-[20px]" @click="activeKey='1'">更改</a-link>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="微信号" :span="2">
|
<a-descriptions-item label="微信号" :span="2">
|
||||||
luoluo347
|
{{ vo.wechat }}
|
||||||
<a-link :hoverable="false" class="ml-[20px]" @click="activeKey='4'">更改</a-link>
|
<a-link :hoverable="false" class="ml-[20px]" @click="activeKey='4'">更改</a-link>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="手机绑定" :span="2">
|
<a-descriptions-item label="手机绑定" :span="1">
|
||||||
15012312300
|
{{ vo.mobile }}
|
||||||
<a-link :hoverable="false" class="ml-[20px]" @click="activeKey='2'">更改</a-link>
|
<a-link :hoverable="false" class="ml-[20px]" @click="activeKey='2'">更改</a-link>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="ID" :span="2">
|
<a-descriptions-item label="ID" :span="2">
|
||||||
S1560
|
{{ vo.uid }}
|
||||||
<a-link :hoverable="false" class="ml-[20px]">复制</a-link>
|
<a-link :hoverable="false" class="ml-[20px]">复制</a-link>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="账号密码" :span="2">
|
<a-descriptions-item label="账号密码" :span="1">
|
||||||
********
|
{{ vo.password }}
|
||||||
<a-link :hoverable="false" class="ml-[20px]" @click="activeKey='3'">更改</a-link>
|
<a-link :hoverable="false" class="ml-[20px]" @click="activeKey='3'">更改</a-link>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="邀请码" :span="2">
|
<a-descriptions-item label="邀请码" :span="2">
|
||||||
734783
|
{{ vo.invite }}
|
||||||
<a-link :hoverable="false" class="ml-[20px]">复制</a-link>
|
<a-link :hoverable="false" class="ml-[20px]">复制</a-link>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
@@ -57,52 +156,67 @@ const form = reactive({
|
|||||||
type="rounded">
|
type="rounded">
|
||||||
<a-tab-pane title="更改昵称" key="1">
|
<a-tab-pane title="更改昵称" key="1">
|
||||||
<a-form-item label="新昵称">
|
<a-form-item label="新昵称">
|
||||||
<a-input v-model:model-value="form.name" placeholder="请输入新昵称"></a-input>
|
<a-input v-model:model-value="form.nickname" placeholder="请输入新昵称"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="mt-[40px]">
|
<a-form-item class="mt-[40px]">
|
||||||
<a-button type="primary">确认更改</a-button>
|
<a-button type="primary" @click="saveNickname">确认更改</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
||||||
<a-tab-pane title="手机绑定" key="2">
|
<a-tab-pane title="手机绑定" key="2">
|
||||||
<a-form-item label="原手机号">
|
<a-form-item label="原手机号">
|
||||||
<a-input v-model:model-value="form.name" placeholder="请输入原手机号"></a-input>
|
<a-input v-model:model-value="form.old_mobile" placeholder="请输入原手机号" disabled></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="验证码">
|
<a-form-item label="验证码">
|
||||||
<a-input v-model:model-value="form.name" placeholder="请输入验证码"></a-input>
|
<VerificationCode
|
||||||
|
:type="4"
|
||||||
|
:api="Api.merchant.sendSms"
|
||||||
|
:mobile="form.old_mobile"
|
||||||
|
v-model:verification-code="form.old_captcha">
|
||||||
|
</VerificationCode>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="新手机号">
|
<a-form-item label="新手机号">
|
||||||
<a-input v-model:model-value="form.name" placeholder="请输入新手机号"></a-input>
|
<a-input v-model:model-value="form.new_mobile" placeholder="请输入新手机号"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="验证码">
|
<a-form-item label="验证码">
|
||||||
<a-input v-model:model-value="form.name" placeholder="请输入验证码"></a-input>
|
<VerificationCode
|
||||||
|
:type="5"
|
||||||
|
:api="Api.merchant.sendSms"
|
||||||
|
:mobile="form.new_mobile"
|
||||||
|
v-model:verification-code="form.new_captcha">
|
||||||
|
</VerificationCode>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="mt-[40px]">
|
<a-form-item class="mt-[40px]">
|
||||||
<a-button type="primary">确认更改</a-button>
|
<a-button type="primary" @click="saveMobile">确认更改</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
||||||
<a-tab-pane title="账号密码" key="3">
|
<a-tab-pane title="账号密码" key="3">
|
||||||
<a-form-item label="手机号">
|
<a-form-item label="手机号">
|
||||||
<a-input v-model:model-value="form.name" placeholder="请输入手机号"></a-input>
|
<a-input v-model:model-value="form.mobile" placeholder="请输入手机号"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="验证码">
|
<a-form-item label="验证码">
|
||||||
<a-input v-model:model-value="form.name" placeholder="请输入验证码"></a-input>
|
<VerificationCode
|
||||||
|
:type="3"
|
||||||
|
:api="Api.merchant.sendSms"
|
||||||
|
:mobile="form.mobile"
|
||||||
|
v-model:verification-code="form.captcha">
|
||||||
|
</VerificationCode>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="新密码">
|
<a-form-item label="新密码">
|
||||||
<a-input v-model:model-value="form.name" placeholder="请输入新密码"></a-input>
|
<a-input v-model:model-value="form.password" placeholder="请输入新密码"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="mt-[40px]">
|
<a-form-item class="mt-[40px]">
|
||||||
<a-button type="primary">确认更改</a-button>
|
<a-button type="primary" @click="savePassword">确认更改</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
||||||
<a-tab-pane title="微信号" key="4">
|
<a-tab-pane title="微信号" key="4">
|
||||||
<a-form-item label="微信号">
|
<a-form-item label="微信号">
|
||||||
<a-input v-model:model-value="form.name" placeholder="请输入微信号"></a-input>
|
<a-input v-model:model-value="form.wechat" placeholder="请输入微信号"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="mt-[40px]">
|
<a-form-item class="mt-[40px]">
|
||||||
<a-button type="primary">确认更改</a-button>
|
<a-button type="primary" @click="saveWechat">确认更改</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
@@ -110,6 +224,12 @@ const form = reactive({
|
|||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
|
#descriptions {
|
||||||
|
:deep(.arco-descriptions-row) {
|
||||||
|
td:nth-child(3) {
|
||||||
|
padding-left: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const po = reactive({
|
|||||||
wd: null,
|
wd: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
const {loading, pagination, initFetchData} = useTableQuery({
|
const {loading, pagination, fetchData} = useTableQuery({
|
||||||
parameter: po,
|
parameter: po,
|
||||||
api: Api.system.getData,
|
api: Api.system.getData,
|
||||||
callback: (data) => {
|
callback: (data) => {
|
||||||
@@ -60,7 +60,7 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a-card>
|
<a-card>
|
||||||
<div class="title">动账明细</div>
|
<div class="title">分值变动记录</div>
|
||||||
|
|
||||||
<a-table
|
<a-table
|
||||||
@page-change="(e) => pagination.current = e"
|
@page-change="(e) => pagination.current = e"
|
||||||
|
|||||||
@@ -6,11 +6,13 @@ import Api from "../../../../api/index.js";
|
|||||||
import RefuseModal from "./components/RefuseModal.vue";
|
import RefuseModal from "./components/RefuseModal.vue";
|
||||||
import openTerminateTask from "../../../../components/TerminateTask/TerminateTask.js";
|
import openTerminateTask from "../../../../components/TerminateTask/TerminateTask.js";
|
||||||
import BlackjackExpertModal from "../../components/BlackjackExpertModal.vue";
|
import BlackjackExpertModal from "../../components/BlackjackExpertModal.vue";
|
||||||
|
import {useRoute} from "vue-router";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '子任务号',
|
title: '子任务号',
|
||||||
dataIndex: 'key',
|
dataIndex: 'uid',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '子任务状态',
|
title: '子任务状态',
|
||||||
@@ -69,12 +71,13 @@ const vo = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const po = reactive({
|
const po = reactive({
|
||||||
|
id: route.query.id,
|
||||||
wd: null,
|
wd: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
const {loading, pagination, initFetchData} = useTableQuery({
|
const {loading, pagination} = useTableQuery({
|
||||||
parameter: po,
|
parameter: po,
|
||||||
api: Api.system.getData,
|
api: Api.merchant.getTaskChildrenList,
|
||||||
callback: (data) => {
|
callback: (data) => {
|
||||||
Object.assign(vo, data);
|
Object.assign(vo, data);
|
||||||
console.log(vo);
|
console.log(vo);
|
||||||
@@ -107,12 +110,14 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
|||||||
:loading="loading"
|
:loading="loading"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
class="w-full mt-[20px]">
|
class="w-full mt-[20px]">
|
||||||
<template v-slot:status>
|
<template v-slot:status="{record}">
|
||||||
<a-tag color="green">已领取</a-tag>
|
<a-tag v-if="record.status === 0" color="red">待上传素材</a-tag>
|
||||||
<a-tag color="red">请重新上传素材</a-tag>
|
<a-tag v-if="record.status === 1" color="orangered">素材审核中</a-tag>
|
||||||
<a-tag color="orangered">素材审核中</a-tag>
|
<a-tag v-if="record.status === 2" color="orangered">重新上传素材</a-tag>
|
||||||
<a-tag color="gray">待领取</a-tag>
|
<a-tag v-if="record.status === 3" color="gray">待领取</a-tag>
|
||||||
<a-tag color="arcoblue">已终止</a-tag>
|
<a-tag v-if="record.status === 4" color="green">已领取</a-tag>
|
||||||
|
<a-tag v-if="record.status === 5" color="green">已结算</a-tag>
|
||||||
|
<a-tag v-if="record.status === 6" color="arcoblue">已终止</a-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:action>
|
<template v-slot:action>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import TooltipTag from "../../../../components/TooltipTag/index.vue";
|
|||||||
import useTableQuery from "../../../../hooks/useTableQuery.js";
|
import useTableQuery from "../../../../hooks/useTableQuery.js";
|
||||||
import Api from "../../../../api/index.js";
|
import Api from "../../../../api/index.js";
|
||||||
import {toPath} from "../../../../utils/index.js";
|
import {toPath} from "../../../../utils/index.js";
|
||||||
|
import {Message} from "@arco-design/web-vue";
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
@@ -162,10 +163,12 @@ const {loading, pagination, initFetchData} = useTableQuery({
|
|||||||
</a-progress>
|
</a-progress>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:action>
|
<template v-slot:action="{record}">
|
||||||
<div class="flex gap-[16px]">
|
<div class="flex gap-[16px]">
|
||||||
<a-link :hoverable="false">编辑</a-link>
|
<a-link :hoverable="false">编辑</a-link>
|
||||||
<a-link :hoverable="false" @click="toPath('/home/task-center/look-min-task')">查看子任务
|
<a-link :hoverable="false"
|
||||||
|
@click="record.status >= 2 ? toPath('/home/task-center/look-min-task', {id: record.id}) : Message.warning('审核未通过')">
|
||||||
|
查看子任务
|
||||||
</a-link>
|
</a-link>
|
||||||
<a-link :hoverable="false" status="danger">终止</a-link>
|
<a-link :hoverable="false" status="danger">终止</a-link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import router from "../router/index.js";
|
import router from "../router/index.js";
|
||||||
|
|
||||||
export const toPath = (path) => {
|
export const toPath = (path, query = {}) => {
|
||||||
router.push(path).then();
|
router.push({
|
||||||
|
path: path,
|
||||||
|
query: query
|
||||||
|
}).then();
|
||||||
}
|
}
|
||||||
|
|
||||||
export const VITE_TINYMCE_KEY = () => {
|
export const VITE_TINYMCE_KEY = () => {
|
||||||
@@ -13,3 +16,8 @@ export const deleteObjectFields = (obj) => {
|
|||||||
delete obj[key];
|
delete obj[key];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const baseImage = (url) => {
|
||||||
|
if (!url) url = '';
|
||||||
|
return url.startsWith('http') ? url : import.meta.env.VITE_API_URL + url;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user