diff --git a/.env b/.env
index 4919d0e..10605b1 100644
--- a/.env
+++ b/.env
@@ -1,2 +1,2 @@
-VITE_API_URL=http://127.0.0.1:4523
+VITE_API_URL=http://192.168.1.88:4523
VITE_AES_KEY=4e2c3d4e5f6a7b8c9d0e1f2g3h4i5j6k7l8m9n0o1p2q3r4s5t6u7v8w9x0y1z2
diff --git a/src/api/system/index.js b/src/api/system/index.js
index fce3f4d..516bbb6 100644
--- a/src/api/system/index.js
+++ b/src/api/system/index.js
@@ -2,10 +2,11 @@ import request from "../../utils/request.js";
import MethodsENUM from "../../enum/MethodsENUM.js";
const system = {
- getData: async () => {
+ getData: async (data) => {
return request({
method: MethodsENUM.POST,
url: "/m1/5995958-5684445-default/getList",
+ data: data,
});
}
}
diff --git a/src/components/AddCustomerServiceModal.vue b/src/components/AddCustomerServiceModal.vue
new file mode 100644
index 0000000..a792559
--- /dev/null
+++ b/src/components/AddCustomerServiceModal.vue
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+ 微信扫码添加
+
+
+
+ 请发送 [我的] 页面截图给客服
+ 再描述您的问题
+
+
+
+
+
diff --git a/src/components/TaskCard.vue b/src/components/TaskCard.vue
new file mode 100644
index 0000000..bb71301
--- /dev/null
+++ b/src/components/TaskCard.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+ 美白祛斑洗面奶
+
+ 抖音
+ 三连发
+
+
+
+
+ ¥
+ 8.56
+
+ 剩余3个名额
+
+
+
+
+ 截止时间:08月23日 14:00
+
+
+
+
+
+
+
+
diff --git a/src/components/TaskItem.vue b/src/components/TaskItem.vue
new file mode 100644
index 0000000..bb71301
--- /dev/null
+++ b/src/components/TaskItem.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+ 美白祛斑洗面奶
+
+ 抖音
+ 三连发
+
+
+
+
+ ¥
+ 8.56
+
+ 剩余3个名额
+
+
+
+
+ 截止时间:08月23日 14:00
+
+
+
+
+
+
+
+
diff --git a/src/components/WXOfficialAccount.vue b/src/components/WXOfficialAccount.vue
index 5d374b4..4924847 100644
--- a/src/components/WXOfficialAccount.vue
+++ b/src/components/WXOfficialAccount.vue
@@ -12,7 +12,7 @@ onMounted(() => {
+ v-model:show="show">
diff --git a/src/components/XDropdownItem.vue b/src/components/XDropdownItem.vue
new file mode 100644
index 0000000..65f0513
--- /dev/null
+++ b/src/components/XDropdownItem.vue
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/XDropdownList.vue b/src/components/XDropdownList.vue
new file mode 100644
index 0000000..1d9c427
--- /dev/null
+++ b/src/components/XDropdownList.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/XModal.vue b/src/components/XModal.vue
index 99c8c59..02b73b0 100644
--- a/src/components/XModal.vue
+++ b/src/components/XModal.vue
@@ -4,6 +4,7 @@ const show = defineModel('show');
diff --git a/src/components/XNav.vue b/src/components/XNav.vue
index b847904..e798886 100644
--- a/src/components/XNav.vue
+++ b/src/components/XNav.vue
@@ -1,6 +1,6 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/hooks/useTableQuery.js b/src/hooks/useTableQuery.js
new file mode 100644
index 0000000..8ec072b
--- /dev/null
+++ b/src/hooks/useTableQuery.js
@@ -0,0 +1,75 @@
+import {ref, reactive, watch} from 'vue';
+
+/**
+ *
+ * @param parameter
+ * @param api
+ * @param callback
+ * @param immediate
+ * @param watchParameter
+ */
+function useTableQuery({
+ parameter,
+ api,
+ callback,
+ immediate = true,
+ watchParameter = false,
+ }) {
+ const loading = ref(false);
+
+ const pagination = reactive({
+ current: 1,
+ pageSize: 20,
+ total: 0
+ });
+
+ const fetchData = async () => {
+ try {
+ loading.value = true;
+
+ const params = {
+ ...parameter,
+ current: pagination.current,
+ pageSize: pagination.pageSize
+ }
+
+ const {data} = await api(params);
+
+ pagination.pageSize = data.page;
+ pagination.total = data.total;
+
+ callback && callback({
+ ...data,
+ rows: data.rows.map(v => ({...v, key: v.id})),
+ });
+ } finally {
+ loading.value = false;
+ }
+ }
+
+ const initFetchData = async () => {
+ pagination.current = 1;
+ pagination.total = 0;
+ }
+
+ watch(
+ () => [pagination.current, pagination.pageSize],
+ () => fetchData(),
+ {deep: true, immediate: immediate}
+ )
+
+ if (watchParameter) watch(
+ () => parameter,
+ () => fetchData(),
+ {deep: true}
+ );
+
+ return {
+ loading,
+ pagination,
+ fetchData,
+ initFetchData,
+ }
+}
+
+export default useTableQuery;
diff --git a/src/manifest.json b/src/manifest.json
index 8f82d0f..3e2a256 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -57,6 +57,9 @@
"usingComponents": true
},
"h5": {
+ "router": {
+ "mode": "history"
+ }
},
"mp-alipay": {
"usingComponents": true
diff --git a/src/pages.json b/src/pages.json
index f08ea31..7d57142 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -50,6 +50,27 @@
"navigationBarTitleText": "忘记密码",
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "pages/beginnerTutorial/index",
+ "style": {
+ "navigationBarTitleText": "新手教程",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/InviteFriends/index",
+ "style": {
+ "navigationBarTitleText": "邀请好友",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/comingSoon/index",
+ "style": {
+ "navigationBarTitleText": "敬请期待",
+ "navigationStyle": "custom"
+ }
}
],
"globalStyle": {
diff --git a/src/pages/InviteFriends/index.vue b/src/pages/InviteFriends/index.vue
index de97206..27c03fa 100644
--- a/src/pages/InviteFriends/index.vue
+++ b/src/pages/InviteFriends/index.vue
@@ -1,9 +1,15 @@
+
+
+
+
+
diff --git a/src/pages/comingSoon/index.vue b/src/pages/comingSoon/index.vue
new file mode 100644
index 0000000..4249ad8
--- /dev/null
+++ b/src/pages/comingSoon/index.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 敬请期待
+ 精彩内容正在建设中...
+
+
+
+
+
+
diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue
index a344ea9..76d9b93 100644
--- a/src/pages/home/index.vue
+++ b/src/pages/home/index.vue
@@ -5,56 +5,182 @@ import nav2 from '../../static/icons/icon-收益榜单.png';
import nav3 from '../../static/icons/icon-邀请好友.png';
import nav4 from '../../static/icons/icon-添加客服.png';
import nav5 from '../../static/icons/icon-重要消息.png';
+import XDropdownList from "../../components/XDropdownList.vue";
+import XDropdownItem from "../../components/XDropdownItem.vue";
+import TaskItem from "../../components/TaskItem.vue";
+import useTableQuery from "../../hooks/useTableQuery.js";
+import Api from "../../api/index.js";
+import {reactive, ref} from "vue";
+import {toPage} from "../../utils/uils.js";
+import AddCustomerServiceModal from "../../components/AddCustomerServiceModal.vue";
+const showAddCustomer = ref(false);
const nav = [
{
title: '新手教学',
icon: nav1,
+ path: '/pages/beginnerTutorial/index',
},
{
title: '收益榜单',
icon: nav2,
+ path: '/pages/comingSoon/index',
},
{
title: '邀请好友',
icon: nav3,
+ path: '/pages/InviteFriends/index',
},
{
title: '添加客服',
icon: nav4,
+ path: null,
+ onClick: () => {
+ showAddCustomer.value = true;
+ }
},
{
title: '重要消息',
icon: nav5,
+ path: '/pages/messageCenter/index',
},
];
+
+const po = reactive({
+});
+const vo = reactive({
+ page: '',
+ rows: [],
+ total: 0,
+});
+
+const {loading, pagination, initFetchData} = useTableQuery({
+ api: Api.system.getData,
+ parameter: po,
+ callback: (data) => {
+ vo.page = data.page;
+ vo.total = data.total;
+ vo.rows =[...vo.rows, ... data.rows];
+ }
+});
-
-
-
-
-
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
- {{item.title}}
+
+
+
+
+
+
+ {{ item.title }}
+
+
-
+
+
+ 任务列表
+
+
+
+
+
+ 全部任务
+
+
+ 全部任务
+ 宣发任务
+ 评论任务
+ 点赞任务
+ 助力任务
+ 其他任务
+
+
+
+
+ 全部平台
+
+
+ 全部平台
+ 抖音
+ 快手
+ 小红书
+ 今日头条
+ 其他
+
+
+
+
+ 默认排序
+
+
+ 默认排序
+ 价格最高
+ 极速打款
+ 素材安全
+ 简单上手
+ 最新发布
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/myTask/index.vue b/src/pages/myTask/index.vue
index c6804e5..49121a2 100644
--- a/src/pages/myTask/index.vue
+++ b/src/pages/myTask/index.vue
@@ -1,11 +1,142 @@
+
+
+
+
+
+
+
+ 全部任务
+ 全部平台
+ 全部状态
+
+
+
+ 筛选
+
+
+
+
+
+
+
+ | 数据概览
+ 2024.08.07-2024.09.07
+
+
+
+
+ 接受任务数
+ 10
+
+
+ 预估收益(元)
+ 45.00
+
+
+ 完成任务数
+ 4
+
+
+ 到账收益(元)
+ 5.60
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
-
diff --git a/src/scss/index.scss b/src/scss/index.scss
index 083fa2e..912bf46 100644
--- a/src/scss/index.scss
+++ b/src/scss/index.scss
@@ -3,4 +3,5 @@ Page {
}
page {
background-color: #F2F3F5;
+ font-family: PingFang SC;
}
diff --git a/src/static/icons/filer.png b/src/static/icons/filer.png
new file mode 100644
index 0000000..ad8ceae
Binary files /dev/null and b/src/static/icons/filer.png differ
diff --git a/src/static/icons/home-bg.png b/src/static/icons/home-bg.png
new file mode 100644
index 0000000..c46fde5
Binary files /dev/null and b/src/static/icons/home-bg.png differ
diff --git a/src/static/icons/jqqd.jpg b/src/static/icons/jqqd.jpg
new file mode 100644
index 0000000..1ced2a1
Binary files /dev/null and b/src/static/icons/jqqd.jpg differ
diff --git a/src/static/icons/play.png b/src/static/icons/play.png
new file mode 100644
index 0000000..9bd4162
Binary files /dev/null and b/src/static/icons/play.png differ
diff --git a/src/static/icons/qrw.png b/src/static/icons/qrw.png
new file mode 100644
index 0000000..3d6f92c
Binary files /dev/null and b/src/static/icons/qrw.png differ
diff --git a/src/static/icons/yqhy-bg.png b/src/static/icons/yqhy-bg.png
new file mode 100644
index 0000000..e59e262
Binary files /dev/null and b/src/static/icons/yqhy-bg.png differ
diff --git a/src/static/images/fmt.png b/src/static/images/fmt.png
new file mode 100644
index 0000000..7ec1fa9
Binary files /dev/null and b/src/static/images/fmt.png differ
diff --git a/src/static/images/video-mask.png b/src/static/images/video-mask.png
new file mode 100644
index 0000000..1b7a087
Binary files /dev/null and b/src/static/images/video-mask.png differ
diff --git a/src/static/images/抖音.png b/src/static/images/抖音.png
new file mode 100644
index 0000000..f5f3251
Binary files /dev/null and b/src/static/images/抖音.png differ
diff --git a/src/utils/request.js b/src/utils/request.js
index c05f4bc..f06d16d 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -2,10 +2,12 @@ import {showToast} from "./uils.js";
const request = (options) => {
return new Promise((resolve, reject) => {
- const {url, method} = options;
+ const {url, method, data, params} = options;
uni.request({
method: method,
+ data: data,
+ params: params,
url: `${import.meta.env.VITE_API_URL}${url}`,
success: ({data}) => {
if (data.code !== 0) {
diff --git a/src/utils/uils.js b/src/utils/uils.js
index 68fdfa2..d4bd7ca 100644
--- a/src/utils/uils.js
+++ b/src/utils/uils.js
@@ -19,3 +19,7 @@ export const toPage = (url) => {
url: url,
}).then();
}
+
+export const backPage = () => {
+ window.history.back();
+}