From ff17e84aed3b5fdcd646e6c32a727e99ef23351c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9A=E5=95=A6C=E6=A2=A6?= <15709267061@163.com> Date: Tue, 29 Apr 2025 19:43:06 +0800 Subject: [PATCH] update --- src/api/index.ts | 2 + src/api/merchant.js | 157 ++++++++++++++++++ src/api/system.js | 15 +- src/assets/images/yhk.png | Bin 0 -> 1783 bytes src/assets/images/zfb.png | Bin 0 -> 818 bytes src/components/VerificationCode/index.vue | 8 +- src/components/XSelect/index.vue | 17 +- src/components/XTimePicker/XTimePicker.vue | 26 +++ src/components/upload/UploadOne.vue | 8 +- src/pages/login/Register.vue | 32 ++-- .../AddWithdrawalInformationModal.vue | 38 +++-- .../pages/my-wallet/components/Reflect.vue | 49 +++--- .../pages/task-center/components/Backfill.vue | 17 +- .../task-center/components/new-task-1.vue | 34 ++-- .../task-center/components/new-task-2.vue | 56 +++---- .../task-center/components/new-task-3.vue | 15 +- .../task-center/components/new-task-4.vue | 59 ++++--- .../task-center/components/new-task-5.vue | 53 +++--- .../task-center/components/new-task-6.vue | 55 +++--- .../task-center/components/new-task-7.vue | 11 +- .../merchant/pages/task-center/new-task.vue | 31 +++- .../pages/task-center/reward-mission.vue | 81 ++++----- src/pinia/SystemStore/index.js | 11 +- src/pinia/SystemStore/mock.js | 1 - src/pinia/UserStore/index.js | 8 +- src/utils/index.js | 6 + 26 files changed, 530 insertions(+), 260 deletions(-) create mode 100644 src/api/merchant.js create mode 100644 src/assets/images/yhk.png create mode 100644 src/assets/images/zfb.png create mode 100644 src/components/XTimePicker/XTimePicker.vue diff --git a/src/api/index.ts b/src/api/index.ts index 9a31fbb..9dbe7c5 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,7 +1,9 @@ +import merchant from './merchant.js'; import system from './system.js'; import admin from './admin.js'; const Api = { + merchant: {...merchant}, system: {...system}, admin: {...admin}, } diff --git a/src/api/merchant.js b/src/api/merchant.js new file mode 100644 index 0000000..2334119 --- /dev/null +++ b/src/api/merchant.js @@ -0,0 +1,157 @@ +import request from "../utils/request.js"; +import Method from "./Method.js"; + +const merchant = { + sendSms: async (mobile) => { + return request({ + url: '/index/login/sendSms', + method: Method.POST, + data: {mobile}, + }); + }, + register: async (data) => { + return request({ + url: '/index/login/register', + method: Method.POST, + data: data, + }); + }, + login: async (data) => { + return request({ + url: '/index/login/login', + method: Method.POST, + data: data, + }); + }, + getMenu: async (data) => { + return request({ + url: '/index/business/getMenu', + method: Method.POST, + data: data, + }); + }, + getPlatformList: async () => { + return request({ + url: '/index/task/getPlatformList', + method: Method.POST, + }); + }, + getMaterialType: async (data) => { + return request({ + url: '/index/task/getMaterialType', + method: Method.POST, + data: data, + }); + }, + getProvince: async () => { + return request({ + url: '/index/task/getProvince', + method: Method.POST, + }); + }, + getSettlementAfter: async () => { + return request({ + url: '/index/task/getSettlementAfter', + method: Method.POST, + }); + }, + getChooseContent: async (data) => { + return request({ + url: '/index/task/getChooseContent', + method: Method.POST, + data: data + }); + }, + getNumberOfReleases: async () => { + return Promise.resolve({ + data: [ + { + id: 1, + name: '一次' + }, + { + id: 2, + name: '两次' + }, + { + id: 3, + name: '三次' + }, + { + id: 4, + name: '四次' + }, + { + id: 5, + name: '五次' + }, + ] + }) + }, + getPublicationDuration: async () => { + return Promise.resolve({ + data: [ + { + id: 5, + name: '5分钟' + }, + { + id: 10, + name: '10分钟' + }, + { + id: 20, + name: '20分钟' + }, + { + id: 30, + name: '30分钟' + }, + ] + }) + }, + createTask: async (data) => { + return request({ + url: '/index/task/createTask', + method: Method.POST, + data: data, + }); + }, + getTaskPlatformList: async (data) => { + return request({ + url: '/index/task/getPlatformList', + method: Method.POST, + data: data + }); + }, + getTaskStatusList: async (data) => { + return request({ + url: '/index/task/getStatusList', + method: Method.POST, + data: data + }); + }, + getTaskList: async (data) => { + return request({ + url: '/index/task/getTaskList', + method: Method.POST, + data: data + }); + }, + addWithdrawal: async (data) => { + return request({ + url: '/index/business/addWithdrawal', + method: Method.POST, + data: data + }); + }, + getWithdrawalList: async (data) => { + return request({ + url: '/index/business/getWithdrawalList', + method: Method.POST, + data: data + }); + }, +} + +export default merchant; diff --git a/src/api/system.js b/src/api/system.js index edcd52a..23b5a6d 100644 --- a/src/api/system.js +++ b/src/api/system.js @@ -43,7 +43,20 @@ const system = { 'Content-Type': 'multipart/form-data; boundary=--------------------------611824495457697861278283' } }); - } + }, + uploadFile2: async (file) => { + const formData = new FormData(); + formData.append('file', file); + return request({ + UN_AES: true, + url: '/index/upload/upload', + method: Method.POST, + data: formData, + headers: { + 'Content-Type': 'multipart/form-data; boundary=--------------------------611824495457697861278283' + } + }); + }, } export default system; diff --git a/src/assets/images/yhk.png b/src/assets/images/yhk.png new file mode 100644 index 0000000000000000000000000000000000000000..aada49d98a18047721f2f2d2318c137516ff2f6d GIT binary patch literal 1783 zcmVLd?PWTprrL0!3RS$k}U#;R48qM-uH5RICFN-%+BnE z?j66$c4y8x)BT;#{4O(RMvzbavKs)w4w7`{9bc;oFoWbb08WTAxrPego1RuWoNBhh-ZJ96;8wXXKM$2EkcQhzstnCeH)r*o$ajAOMn1B%8dt ztgM!P*^S^?ck@s*`(UrOI#U<><)iM#Y$!QoLU02aio$nq!o%zD&AO^7zz%m)cKApl z?xvwA9CbnP+wXe;hEA=*$VyA{9Q|_9tVm8zIV3xf1S@V>HRUm1r>Dee_NqtbnRk1E zxxf1f_;hSlCRRsDem8f$tB;S|a2z?No zio>fr;pxZV+$H#Mw361BNz1&}1l~&ohkIeqQ)+v0MM2rW8@6wTDDcx|m|cXo_o^|w zwloM7!All`eO`T*ak(F`^mu2#ImUkpukQ3pfSp6fy?SoUsYzeB2A}^7S7#s?P=LO< z2;W|U=>?cyhWQov@>lpiR%!doq87nHDXVQot*NL*ru#+zL-9~iO9!>AjcxG2T9xpH zP@kze)pz4AZ0>-`JB9tPx`eX61=hE!iEnI$jcZj=h}{GP{5hF@Orb!aPN1|m!@6cz zXT#8!1D1d*(=f9Dv8mGiUd=*T8&aP~*4Y3o^(`ex;O}V#q#UX#D6MOtZ4GQ{2caQg ze##BS>>&=L($1oh|J_o5ZLXr3#zo%g31P^B?v8RR2WF?Z%smEyhNbZWo8%4Wl8ZW zIh0V7nrJ9!Ll7XeXV_t*_wO#louyJ+uzHmg%9pwyyD0woww zKr{;z2qqArcBkiIC0UAJE{|3P#S&^IE*K!=5k5eKP>bNVYbba4>7Jo9Ssg8kG$9^Q7%p6CMuB{ovhEL~yIm;7@t|}N1zyplYmq-<#Lxx9#jK?gF z^s4eSK4GON(o7<=QmWhOu>Cl7x zxkSr1z*gd!5Ypu}Wq3q9VPBsV2}Mr~?3`l6xZb{Vd?6i1?r<{Oa><0+6;3hO6ECQW zfr8@s6s4^hb(1I5syk$E05z;)y+q3|*^S3kyH_&xI;M~^J07zf;Z=ZUEZ}3Wo~ySY zk$}!tIDbX8oxcJPwW}9(7FG)R|K92fr_za5D-ur9wKbIv55Kc&hMyl?^H}Yf(UYM< z6Yf_9za1&kf0Rn~s*hK~b@ywf^NF!v2K5*9%BTj@;O{=QTa1Vy;GIH7>wB99)-guJ zoC?Yj@jh^_y7p9E>G?Y^To1@&2;Qx@In~!OJ7NH@t9g}U05$=yqb^<>O-bOr^qv6( Z;6H~EZNR+klYIaH002ovPDHLkV1ldiKj;7e literal 0 HcmV?d00001 diff --git a/src/assets/images/zfb.png b/src/assets/images/zfb.png new file mode 100644 index 0000000000000000000000000000000000000000..675a56b1be3f6e32d44e4235497aeca6ac4a5434 GIT binary patch literal 818 zcmV-21I_%2P)t?j%$`sjl-K|X-2T*}QJ*`s@O=hy z&~drsG6O|0&1Jb~hhpFf1%OcGiha8i2MOGg<;RYTClrZ<>)suSiR3JS#RLJ_uh@-9 zXuhBtUvImCjlTDz6a0co=cGO^xuksq!BYnr_#t?F{17}kM4C(K`fy*R?}bY)vlhNx zpFjN!dgZ|uvQ(8Ju1KJ<&3Z@`^X!UoXZR-iki^`WE~=&G{eM2>;6GTRrzaSsMI|%> z?k>+RMBRx9pJ_A52=hu4JxtuI*a+-r@C;rrp3&3=TSi-rAc6w2Hcp}J8zdL;NkL|A zKL*#0pG44zwU*|`5R4VHy!N0}s>I~6z{_U|3F%RmCpZ$+#*srMF}dGcV%Cn@W^W6} zeU_jHF)MnVFO~kx7?O=PdoV*#Li4v4x3vxQp$4j9NY;q0&P%LH=2445PSPDRIpJEi z&6P&J2vsg)*kali%B)1_nz7(&YsB(tesV^fNAd(X)fg! zYGy*PuT)gWf=Ehe61dHgb66p(i5e6AIE?$`Ll=R*V)<9Ta?q+pO}R>sWIy5R8d1RA zrSXl#gR?rCwGGFDdo4DQeJ0EXBo|+Fbwqp9i+;v_x*EUUf_cZc7Y9T`ob3v_+HZWL zUoU>Z3r5wW7GZ5RuQv>Z^L0ZMF~7Xt2y&BQ$m1Vl@~d!u^PqD;VU#UB|u w7beh^MhR?c^6mv)#pv%7t$Ea!)NNkuKL)3NzLQu66951J07*qoM6N<$f|MM3ZU6uP literal 0 HcmV?d00001 diff --git a/src/components/VerificationCode/index.vue b/src/components/VerificationCode/index.vue index 6aa0b1b..1ccaca4 100644 --- a/src/components/VerificationCode/index.vue +++ b/src/components/VerificationCode/index.vue @@ -4,10 +4,14 @@ import {Message, Notification} from "@arco-design/web-vue"; import Api from "../../api/index.js"; const verificationCode = defineModel('verificationCode', {type: String}); -const {mobile} = defineProps({ +const {mobile, api} = defineProps({ mobile: { type: String, default: null, + }, + api: { + type: Function, + default: Api.admin.sendSms } }); @@ -17,7 +21,7 @@ let timer = null; const verifyPhone = async () => { if (/^1[3-9]\d{9}$/.test(mobile)) { if (timer === null) { - const {msg, code} = await Api.admin.sendSms(mobile); + const {msg, code} = await api(mobile); if (code === 1) Message.success(msg); time.value = 10; timer = setInterval(() => { diff --git a/src/components/XSelect/index.vue b/src/components/XSelect/index.vue index 6983e86..79e61d3 100644 --- a/src/components/XSelect/index.vue +++ b/src/components/XSelect/index.vue @@ -1,5 +1,5 @@ diff --git a/src/components/XTimePicker/XTimePicker.vue b/src/components/XTimePicker/XTimePicker.vue new file mode 100644 index 0000000..b8cd6b7 --- /dev/null +++ b/src/components/XTimePicker/XTimePicker.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/src/components/upload/UploadOne.vue b/src/components/upload/UploadOne.vue index 2f5dc7a..c58f9d8 100644 --- a/src/components/upload/UploadOne.vue +++ b/src/components/upload/UploadOne.vue @@ -1,17 +1,21 @@ @@ -42,6 +53,7 @@ const from = reactive({ diff --git a/src/pages/merchant/pages/task-center/components/new-task-2.vue b/src/pages/merchant/pages/task-center/components/new-task-2.vue index 05e6b3f..9125b69 100644 --- a/src/pages/merchant/pages/task-center/components/new-task-2.vue +++ b/src/pages/merchant/pages/task-center/components/new-task-2.vue @@ -3,10 +3,17 @@ import Api from "../../../../../api/index.js"; import XSelect from "../../../../../components/XSelect/index.vue"; import FormTitle from "../../../../../components/FormTitle/index.vue"; import {reactive} from "vue"; +import UploadOne from "../../../../../components/upload/UploadOne.vue"; -const emits = defineEmits(['success']); +const emits = defineEmits(['success', 'prev']); const po = reactive({ - name: null, + fb_num: null, + is_identical: 1, + duration: null, + special_text: null, + special_images: null, + choose_area: null, + machine: 0, }); const success = () => { @@ -21,62 +28,55 @@ const success = () => { + v-model:model-value="po.fb_num" + :api="Api.merchant.getNumberOfReleases"> - - 相同 - 不同 + + 相同 + 不同 - + + v-model:model-value="po.duration" + placeholder="无要求" + :api="Api.merchant.getPublicationDuration"> - - - - + {{ po.special_images }} + + multiple + :max-tag-count="4" + v-model:model-value="po.choose_area" + :api="Api.merchant.getProvince"> - - + + 上一步 下一步 diff --git a/src/pages/merchant/pages/task-center/components/new-task-3.vue b/src/pages/merchant/pages/task-center/components/new-task-3.vue index 12a22b5..a2123e8 100644 --- a/src/pages/merchant/pages/task-center/components/new-task-3.vue +++ b/src/pages/merchant/pages/task-center/components/new-task-3.vue @@ -1,12 +1,11 @@