diff --git a/.env.development b/.env.development index a6cd427..69ee68c 100644 --- a/.env.development +++ b/.env.development @@ -3,4 +3,4 @@ ENV = development # 本地环境接口地址 # VITE_API_URL = 'http://admintestapi.sxczgkj.cn/admin/' -VITE_API_URL = 'http://admintestapi.sxczgkj.cn/admin/' \ No newline at end of file +VITE_API_URL = 'https://openpm.sxczgkj.cn/' \ No newline at end of file diff --git a/.env.production b/.env.production index 97128dd..9a5c0c1 100644 --- a/.env.production +++ b/.env.production @@ -2,4 +2,4 @@ ENV = production # 线上环境接口地址 -VITE_API_URL = 'http://admintestapi.sxczgkj.cn/admin/' \ No newline at end of file +VITE_API_URL = 'https://openpm.sxczgkj.cn/' \ No newline at end of file diff --git a/package.json b/package.json index d82c367..864c915 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vue-admin", "private": true, - "version": "1.3.3", + "version": "1.3.20", "type": "module", "scripts": { "dev": "vite", diff --git a/src/api/home.js b/src/api/home.js index 784cc41..55c2a20 100644 --- a/src/api/home.js +++ b/src/api/home.js @@ -7,32 +7,28 @@ import { dayjs } from 'element-plus'; export function getIndexData() { return request({ method: "POST", - url: "/user/getIndexData" + url: "/agent/index" }); } - +/** /** * 获取首页图表数据 * @returns */ -export function getChartData(type, reqUserId) { - const m = { - 1: '/user/getDayOrder', // 获取近七日收单额 - 2: '/user/getDayProfit', // 获取近七日收益 - 3: '/user/getMonthOrder', // 获取近一年的收单额 - 4: '/user/getMonthProfit' // 获取近一年的收益数据 - } - const params = { - year: dayjs().format('YYYY'), - reqUserId: reqUserId - } +export function getChartData() {//收益 return request({ - method: "GET", - url: m[type], - params + method: "POST", + url: '/agent/profit', + // params + }); +} +export function agentamount() {//流水 + return request({ + method: "POST", + url: '/agent/amount', + // params }); } - /** * 上传OSS * @param {*} params diff --git a/src/api/organization.js b/src/api/organization.js index b5a9ded..e626cab 100644 --- a/src/api/organization.js +++ b/src/api/organization.js @@ -41,11 +41,11 @@ export function modifyFee(params) { * 获取收益信息 * @returns */ -export function queryProfit(params) { +export function queryProfit(data) { return request({ - method: "get", - url: "/agency/queryProfit", - params + method: "post", + url: "/agent/accumulateprofit", + data }); } @@ -76,22 +76,32 @@ export function getUserBalance() { * 提现 * @returns */ -export function withdrawalProfit(params) { +export function withdrawalProfit(data) { return request({ - method: "get", - url: "/user/withdrawalProfit", - params + method: "post", + url: "/agent/withdrowsub", + data + }); +} +/** + * 绑定支付宝 + * @returns + */ +export function agentalipay(data) { + return request({ + method: "post", + url: "/agent/alipay", + data }); } - /** * 获取提现流水 * @returns */ -export function getUserOutFlow(params) { +export function getUserOutFlow(data) { return request({ - method: "get", - url: "/user/getUserOutFlow", - params + method: "post", + url: "/agent/withdrawerlist", + data }); } \ No newline at end of file diff --git a/src/api/password.js b/src/api/password.js new file mode 100644 index 0000000..f3d7aee --- /dev/null +++ b/src/api/password.js @@ -0,0 +1,24 @@ +import request from "@/utils/request.js"; +import { dayjs } from 'element-plus'; +/** + * 获取验证码 + * @returns + */ +export function agentsendsms(data) { + return request({ + method: "post", + url: "/agent/sendsms", + data + }); +} +/** + * 重置密码 + * @returns + */ +export function agentresetpwd(data) { + return request({ + method: "post", + url: "/agent/resetpwd", + data + }); +} \ No newline at end of file diff --git a/src/api/shop.js b/src/api/shop.js index 39ee74a..fe71244 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -4,11 +4,11 @@ import request from "@/utils/request.js"; * 获取商户列表 * @returns */ -export function queryCustormerFlow(params) { +export function queryCustormerFlow(data) { return request({ - method: "get", - url: "/agency/queryCustormerFlow", - params + method: "post", + url: "/agent/storelist", + data }); } diff --git a/src/api/withdraw.js b/src/api/withdraw.js index d7cd577..1b31e5d 100644 --- a/src/api/withdraw.js +++ b/src/api/withdraw.js @@ -4,11 +4,11 @@ import request from "@/utils/request.js"; * 提现申请查询 * @returns */ -export function getOutFlow(params) { +export function getOutFlow(data) { return request({ - method: "get", - url: "/user/getOutFlow", - params + method: "post", + url: "/agent/withdrawerlist", + data }); } @@ -16,10 +16,10 @@ export function getOutFlow(params) { * 提现审核 * @returns */ -export function modifyOutFlow(params) { +export function modifyOutFlow(data) { return request({ - method: "get", - url: "/user/modifyOutFlow", - params + method: "post", + url: "/agent/withdrawalreview", + data }); } \ No newline at end of file diff --git a/src/components/chartCard.vue b/src/components/chartCard.vue index 665eca2..94b2844 100644 --- a/src/components/chartCard.vue +++ b/src/components/chartCard.vue @@ -16,7 +16,7 @@ diff --git a/src/views/password/password.vue b/src/views/password/password.vue new file mode 100644 index 0000000..a6581ea --- /dev/null +++ b/src/views/password/password.vue @@ -0,0 +1,221 @@ + + + + + + \ No newline at end of file diff --git a/src/views/total_earnings/total_earnings_list.vue b/src/views/total_earnings/total_earnings_list.vue index 77befdd..83643e7 100644 --- a/src/views/total_earnings/total_earnings_list.vue +++ b/src/views/total_earnings/total_earnings_list.vue @@ -22,8 +22,8 @@ -
-
+
+
申请提现
@@ -32,6 +32,12 @@ @click="getUserOutFlowHandleResize">提现记录
+
+
+ 绑定支付宝 +
+
@@ -48,29 +54,29 @@
- +
- - + + - - + + @@ -83,6 +89,28 @@ @size-change="paginationChange" @current-change="paginationChange" />
+ + + + + + + + + + + + + + + + + @@ -111,20 +139,20 @@ - +
- + - + @@ -132,15 +160,15 @@ 待审核 提现成功 提现失败 - 审核中 + - +
@@ -163,10 +191,15 @@ import hooks from '@/hooks' import { dayjs } from 'element-plus'; import { typeNames, clearNoNum } from '@/utils/index.js' -import { queryProfit, getUserBalance, withdrawalProfit, getUserOutFlow } from '@/api/organization.js' +import { queryProfit, getUserBalance, withdrawalProfit, getUserOutFlow, agentalipay } from '@/api/organization.js' import { onMounted, reactive, ref } from 'vue'; import { ElMessage } from 'element-plus' +import _hook from "@/hooks/index.js"; +// 本地数据 +const userInfo = reactive( + _hook.useLocalStorage.get("userInfo").is_admin +) // 表格参数 const tableOptions = reactive({ loading: true, @@ -183,18 +216,24 @@ const tableOptions = reactive({ const earnings = reactive({ sumProfit: 0, availableBalance: 0, - fronZenAmt: 0 + fronZenAmt: 0, + is_alipay: 0 }) // 显示提现弹窗 +const formRefzfb = ref() const formRef = ref() const showWithdraw = ref(false) - +const showWithdzfb = ref(false) const form = reactive({ num: '', loading: false }) - +const formzfb = reactive({ + alipay_username: '', + alipay_fullname: '', + loading: false +}) const rules = reactive({ num: [ { @@ -214,7 +253,25 @@ function numInput(e) { form.num = ((earnings.availableBalance / 100) * 100).toFixed(2) } } - +//提交 +async function submitHandlezfb() { + await formRefzfb.value.validate(async (valid) => { + if (valid) { + try { + formzfb.loading = true + await agentalipay({ + alipay_username: formzfb.alipay_username, + alipay_fullname: formzfb.alipay_fullname, + }) + formzfb.loading = false + showWithdzfb.value = false + getTableDate() + } catch (error) { + formzfb.loading = false + } + } + }) +} // 提交提现申请 async function submitHandle() { await formRef.value.validate(async (valid) => { @@ -293,14 +350,14 @@ function getUserOutFlowHandleResize() { // 获取提现流水 async function getUserOutFlowHandle() { try { - const { total, list } = await getUserOutFlow({ + const res = await getUserOutFlow({ status: records.status, - pageNum: records.pageNum, + page: records.pageNum, pageSize: records.pageSize }) records.loading = false - records.list = list - records.total = total + records.list = res.data + records.total = res.count } catch (error) { records.loading = false } @@ -322,15 +379,18 @@ function paginationChange() { async function getTableDate() { try { const res = await queryProfit({ - reqUserId: hooks.useLocalStorage.get('userInfo').userId, orderNumber: tableOptions.orderNumber, merchantCode: tableOptions.merchantCode, - pageNum: tableOptions.pageNum, + page: tableOptions.pageNum, pageSize: tableOptions.pageSize }) tableOptions.loading = false - tableOptions.list = res.list - tableOptions.total = res.total + tableOptions.list = res.data + earnings.sumProfit = res.z_profit + earnings.availableBalance = res.pro_profit + earnings.fronZenAmt = res.l_profit + earnings.is_alipay = res.is_alipay + tableOptions.total = res.count } catch (error) { } } @@ -346,7 +406,7 @@ async function getUserBalanceHandle() { onMounted(() => { getTableDate() - getUserBalanceHandle() + // getUserBalanceHandle() }) diff --git a/src/views/withdraw/withdraw_list.vue b/src/views/withdraw/withdraw_list.vue index 0d28d34..f394e4f 100644 --- a/src/views/withdraw/withdraw_list.vue +++ b/src/views/withdraw/withdraw_list.vue @@ -1,6 +1,6 @@