From 8db8241295bb4f166c52c1b39b56eec7ad98d344 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 7 May 2021 11:35:55 +0800 Subject: [PATCH] fix some error and warning --- src/api/activity.ts | 5 +- src/api/map.ts | 1 + src/api/permissions.ts | 2 +- src/api/shop.ts | 3 +- src/api/types.d.ts | 3 +- src/views/activity/edit.vue | 126 ++++++++++++---------------- src/views/activity/list.vue | 2 +- src/views/game/game_list.vue | 3 - src/views/game/game_setting.vue | 2 - src/views/marketing/coupon.vue | 2 +- src/views/marketing/coupon_edit.vue | 7 +- src/views/question/editor.vue | 20 ++--- src/views/question/list.vue | 6 +- src/views/question/setting.vue | 30 ++++--- src/views/shop/edit.vue | 5 -- src/views/shop/shop_admin.vue | 8 +- src/views/system/admin.vue | 3 +- src/views/system/permission.vue | 85 ++++++++++--------- 18 files changed, 140 insertions(+), 173 deletions(-) diff --git a/src/api/activity.ts b/src/api/activity.ts index 1429cec..6e26fa5 100644 --- a/src/api/activity.ts +++ b/src/api/activity.ts @@ -6,7 +6,7 @@ export interface IRewardData { rank?: number, rankEnd?: number, coupon?: string, - count: number + count?: number } export interface IActivityData { @@ -22,7 +22,7 @@ export interface IActivityData { beginTime: number[] prepareTime: number active: number, - beginDays?: number[], + beginDays: number[], beginDay?: number, endDay?: number, rewardInfo: IRewardData[] @@ -33,6 +33,7 @@ export const defaultRewardData: IRewardData = { } export const defaultActivityData: IActivityData = { + beginDays: [], active: 0, beginTime: [], monthDays: [], diff --git a/src/api/map.ts b/src/api/map.ts index fcd66b5..e14855c 100644 --- a/src/api/map.ts +++ b/src/api/map.ts @@ -18,6 +18,7 @@ export interface IAreaData { adcode: string type: number location: ILocation + showStr?: string } export async function queryArea(str: string, region: string) { diff --git a/src/api/permissions.ts b/src/api/permissions.ts index 156fbb9..3888329 100644 --- a/src/api/permissions.ts +++ b/src/api/permissions.ts @@ -1,6 +1,6 @@ import request from '@/utils/request' -export const getPermissions = (params: any) => +export const getPermissions = (params?: any) => request({ url: '/permissions', method: 'get', diff --git a/src/api/shop.ts b/src/api/shop.ts index eb56655..b911fed 100644 --- a/src/api/shop.ts +++ b/src/api/shop.ts @@ -4,7 +4,8 @@ import { IShopData } from './types' export const defaultShopData: IShopData = { name: '', address: '', - logo: '' + logo: '', + qtypes: [] } export const getShops = (params: any) => diff --git a/src/api/types.d.ts b/src/api/types.d.ts index 4dee6d1..d534fb7 100644 --- a/src/api/types.d.ts +++ b/src/api/types.d.ts @@ -26,5 +26,6 @@ export interface IShopData { lat?: number showName?: string extData?: string - category?: string + category?: string, + qtypes: string[] } diff --git a/src/views/activity/edit.vue b/src/views/activity/edit.vue index 58782a7..231a8af 100644 --- a/src/views/activity/edit.vue +++ b/src/views/activity/edit.vue @@ -1,7 +1,6 @@