diff --git a/src/api/table.js b/src/api/table.js index 6a9d9aa..4f39e35 100644 --- a/src/api/table.js +++ b/src/api/table.js @@ -2,7 +2,7 @@ import request from '@/utils/request' export function getList(data) { return request({ - url: '/wagoo/1.1/get/order_details', + url: '/get/order_details', method: 'post', data, }) @@ -10,7 +10,7 @@ export function getList(data) { export function goodsListList(data) { return request({ - url: '/wagoo/1.1/get/membership_instances', + url: '/get/membership_instances', method: 'post', data, }) @@ -18,7 +18,7 @@ export function goodsListList(data) { export function walletList(data) { return request({ - url: '/wagoo/1.1/get/wallet_instances', + url: '/get/wallet_instances', method: 'post', data, }) @@ -26,7 +26,55 @@ export function walletList(data) { export function archiveList(data) { return request({ - url: '/wagoo/1.1/get/pets', + url: '/get/pets', + method: 'post', + data, + }) +} + +export function commentList(data) { + return request({ + url: '/get/comments_info', + method: 'post', + data, + }) +} + +export function messageList(data) { + return request({ + url: '/get/notice', + method: 'post', + data, + }) +} + +export function couponList(data) { + return request({ + url: '/get/coupons', + method: 'post', + data, + }) +} + +export function couponPackage(data) { + return request({ + url: '/coupon/package', + method: 'post', + data, + }) +} + +export function unreadOtice(data) { + return request({ + url: '/unread_notice', + method: 'post', + data, + }) +} + +export function markNotice(data) { + return request({ + url: '/update/notice', method: 'post', data, }) @@ -34,9 +82,11 @@ export function archiveList(data) { + + export function recordList(data) { return request({ - url: '/wagoo/1.1/get/delivery', + url: '/get/delivery', method: 'post', data, }) @@ -44,7 +94,7 @@ export function recordList(data) { export function couponstList(data) { return request({ - url: '/wagoo/1.1/get/coupons', + url: '/get/coupons', method: 'post', data, }) @@ -52,7 +102,7 @@ export function couponstList(data) { export function additional(data) { return request({ - url: '/wagoo/1.1/get/additional_services', + url: '/get/additional_services', method: 'post', data, }) @@ -61,7 +111,7 @@ export function additional(data) { export function distributeEdit(data) { return request({ - url: '/wagoo/1.1/delivery/coupons', + url: '/delivery/coupons', method: 'post', data, }) @@ -69,7 +119,15 @@ export function distributeEdit(data) { export function exportUserOperateAdmin(data, headers) { return request({ - url: '/wagoo/1.1/download/order_details', + url: '/download/order_details', + method: 'get', + data: data, + }) +} + +export function exportUserMembership(data, headers) { + return request({ + url: '/download/membership_instances', method: 'get', data: data, }) @@ -77,7 +135,7 @@ export function exportUserOperateAdmin(data, headers) { export function doEdit(data) { return request({ - url: '/wagoo/1.1/update/order_details', + url: '/update/order_details', method: 'post', data, }) @@ -85,12 +143,38 @@ export function doEdit(data) { export function additionalEdit(data) { return request({ - url: '/wagoo/1.1/update/additional_services', + url: '/update/additional_services', method: 'post', data, }) } +export function addPackage(data) { + return request({ + url: '/add/package', + method: 'post', + data, + }) +} + +export function editPackage(data) { + return request({ + url: '/edit/package', + method: 'post', + data, + }) +} + +export function deletePackage(data) { + return request({ + url: '/delete/package', + method: 'post', + data, + }) +} + + + export function doDelete(data) { return request({ diff --git a/src/api/user.js b/src/api/user.js index 9e56521..e421240 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -8,7 +8,14 @@ export async function login(data) { // } return request({ - url: '/wagoo/1.1/admin/login', + url: '/admin/login', + method: 'post', + data, + }) +} +export function members(data) { + return request({ + url: '/daily/new_membership_number', method: 'post', data, }) @@ -16,7 +23,7 @@ export async function login(data) { export function getUserInfo(accessToken) { return request({ - url: '/wagoo/1.1/get/user_info', + url: '/get/user_info', method: 'post', data: { [tokenName]: accessToken, @@ -26,7 +33,7 @@ export function getUserInfo(accessToken) { export function logout() { return request({ - url: '/wagoo/1.1/admin/logout', + url: '/admin/logout', method: 'post', }) } diff --git a/src/assets/g.png b/src/assets/g.png new file mode 100644 index 0000000..5ee025a Binary files /dev/null and b/src/assets/g.png differ diff --git a/src/config/net.config.js b/src/config/net.config.js index 1e2f1d0..81ee545 100644 --- a/src/config/net.config.js +++ b/src/config/net.config.js @@ -3,7 +3,11 @@ **/ const network = { // 默认的接口地址 如果是开发环境和生产环境走vab-mock-server,当然你也可以选择自己配置成需要的接口地址 - baseURL: process.env.NODE_ENV === 'development' ? 'console2.wagoo.pet/' : 'console2.wagoo.pet/', + // 生产环境 + // baseURL: process.env.NODE_ENV === 'development' ? 'https://console2api.wagoo.pet/' : 'https://console2api.wagoo.pet/', + // 测试环境 + baseURL: process.env.NODE_ENV === 'development' ? 'https://dev.wagoo.pet/wagoo/1.1/' : 'https://dev.wagoo.pet/wagoo/1.1/', + //配后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8 contentType: 'application/json;charset=UTF-8', //消息框消失时间 diff --git a/src/layouts/components/VabTabs/index.vue b/src/layouts/components/VabTabs/index.vue index c296a47..bbd4e6f 100644 --- a/src/layouts/components/VabTabs/index.vue +++ b/src/layouts/components/VabTabs/index.vue @@ -9,13 +9,62 @@ - - - 更多操作 - + +
+ + + 消息 + ({{messageList.length + total }}) +
- +
+

+ 消息通知 +

+ ({{ messageList.length + total }}) +
+ +
+

全部已读

+ +
+ +
+
+
+
+ {{item.created_at}} +
+
+

标记已读

+ +
+
+
+ {{item.content}} +
+
+
+
+
+
+
+ {{item.date}} +
+
+

标记已读

+ +
+
+
+ {{item.content}} +
+
+
+
@@ -39,13 +88,23 @@ + diff --git a/src/views/comment/index.vue b/src/views/comment/index.vue new file mode 100644 index 0000000..6b6b43a --- /dev/null +++ b/src/views/comment/index.vue @@ -0,0 +1,289 @@ + + + diff --git a/src/views/coupon/couponlist/components/TableEdit.vue b/src/views/coupon/couponlist/components/TableEdit.vue new file mode 100644 index 0000000..16f9ce4 --- /dev/null +++ b/src/views/coupon/couponlist/components/TableEdit.vue @@ -0,0 +1,215 @@ + + + + diff --git a/src/views/coupon/couponlist/index.vue b/src/views/coupon/couponlist/index.vue new file mode 100644 index 0000000..d6eb4ed --- /dev/null +++ b/src/views/coupon/couponlist/index.vue @@ -0,0 +1,255 @@ + + + diff --git a/src/views/mall/distribute/components/TableEdit.vue b/src/views/coupon/distribute/components/TableEdit.vue similarity index 100% rename from src/views/mall/distribute/components/TableEdit.vue rename to src/views/coupon/distribute/components/TableEdit.vue diff --git a/src/views/mall/distribute/index.vue b/src/views/coupon/distribute/index.vue similarity index 100% rename from src/views/mall/distribute/index.vue rename to src/views/coupon/distribute/index.vue diff --git a/src/views/mall/record/components/TableEdit.vue b/src/views/coupon/record/components/TableEdit.vue similarity index 100% rename from src/views/mall/record/components/TableEdit.vue rename to src/views/coupon/record/components/TableEdit.vue diff --git a/src/views/mall/record/index.vue b/src/views/coupon/record/index.vue similarity index 100% rename from src/views/mall/record/index.vue rename to src/views/coupon/record/index.vue diff --git a/src/views/index/index.vue b/src/views/index/index.vue index 2c05150..5a5abb3 100644 --- a/src/views/index/index.vue +++ b/src/views/index/index.vue @@ -51,19 +51,19 @@
- 今日访问趋势 + 今日新增会员数量
-
{{ config1.endVal }}
-
总访问量
+
{{ count }}
+
新增会员
-
+ +
@@ -428,6 +428,7 @@ import VabChart from '@/plugins/echarts' import { dependencies, devDependencies } from '../../../package.json' import { getNoticeList } from '@/api/notice' + import { members } from '@/api/user' export default { name: 'Index', @@ -436,6 +437,7 @@ }, data() { return { + count:'', timer: 0, updateTime: process.env.VUE_APP_UPDATE_TIME, nodeEnv: process.env.NODE_ENV, @@ -879,6 +881,7 @@ }, created() { this.fetchData() + this.membersList() }, beforeDestroy() { clearInterval(this.timer) @@ -928,6 +931,11 @@ const res = await getNoticeList() this.noticeList = res.data }, + + async membersList() { + const res = await members() + this.count = res.data.count + }, handleIconClick(item) { if (item.link) { window.open(item.link, '_blank') diff --git a/src/views/mall/member/index.vue b/src/views/mall/member/index.vue index 0df7e78..8155d90 100644 --- a/src/views/mall/member/index.vue +++ b/src/views/mall/member/index.vue @@ -1,5 +1,8 @@ + + + + + + + + + + + + + + diff --git a/src/views/message/index.vue b/src/views/message/index.vue new file mode 100644 index 0000000..c69e0a0 --- /dev/null +++ b/src/views/message/index.vue @@ -0,0 +1,288 @@ + + + diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue deleted file mode 100644 index e69de29..0000000