解决合并代码后的报错问题
This commit is contained in:
4
App.uvue
4
App.uvue
@@ -22,7 +22,7 @@
|
|||||||
if (session.user != null) {
|
if (session.user != null) {
|
||||||
console.log('已有有效会话,恢复登录状态')
|
console.log('已有有效会话,恢复登录状态')
|
||||||
setIsLoggedIn(true)
|
setIsLoggedIn(true)
|
||||||
uni.reLaunch({ url: '/pages/mall/consumer/index' })
|
uni.reLaunch({ url: '/pages/mall/admin/homePage/index' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
if (profile != null) {
|
if (profile != null) {
|
||||||
console.log('会话恢复成功')
|
console.log('会话恢复成功')
|
||||||
setIsLoggedIn(true)
|
setIsLoggedIn(true)
|
||||||
uni.reLaunch({ url: '/pages/mall/consumer/index' })
|
uni.reLaunch({ url: '/pages/mall/admin/homePage/index' })
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
console.log('会话恢复失败,需要重新登录')
|
console.log('会话恢复失败,需要重新登录')
|
||||||
|
|||||||
@@ -1,21 +1,5 @@
|
|||||||
[Vue warn]: Unhandled error during execution of component event handler
|
main.uts:30 [Vue warn]: Unhandled error during execution of async component loader
|
||||||
at <Input>
|
at <AsyncComponentWrapper>
|
||||||
at <View>
|
|
||||||
at <View>
|
|
||||||
at <View>
|
|
||||||
at <ScrollView>
|
|
||||||
at <View>
|
|
||||||
at <View>
|
|
||||||
at <DriverAddDrawer>
|
|
||||||
at <Index>
|
|
||||||
at <View>
|
|
||||||
at <View>
|
|
||||||
at <View>
|
|
||||||
at <View>
|
|
||||||
at <AdminLayout>
|
|
||||||
at <View>
|
|
||||||
at <Index>
|
|
||||||
at <AsyncComponentWrapper>
|
|
||||||
at <PageBody>
|
at <PageBody>
|
||||||
at <Page>
|
at <Page>
|
||||||
at <Anonymous>
|
at <Anonymous>
|
||||||
@@ -23,5 +7,93 @@ at <KeepAlive>
|
|||||||
at <RouterView>
|
at <RouterView>
|
||||||
at <Layout>
|
at <Layout>
|
||||||
at <App>
|
at <App>
|
||||||
vue.runtime.esm.js:1443 TypeError: Cannot create property 'value' on string ''
|
warnHandler @ uni-h5.es.js:19975
|
||||||
at _createVNode.onInput._cache.<computed>._cache.<computed> (DriverAddDrawer.uvue?import:96:56)
|
callWithErrorHandling @ vue.runtime.esm.js:1381
|
||||||
|
warn$1 @ vue.runtime.esm.js:1207
|
||||||
|
logError @ vue.runtime.esm.js:1438
|
||||||
|
errorHandler @ uni-h5.es.js:19600
|
||||||
|
callWithErrorHandling @ vue.runtime.esm.js:1381
|
||||||
|
handleError @ vue.runtime.esm.js:1421
|
||||||
|
onError @ vue.runtime.esm.js:3724
|
||||||
|
(anonymous) @ vue.runtime.esm.js:3767
|
||||||
|
Promise.catch
|
||||||
|
setup @ vue.runtime.esm.js:3766
|
||||||
|
callWithErrorHandling @ vue.runtime.esm.js:1381
|
||||||
|
setupStatefulComponent @ vue.runtime.esm.js:8985
|
||||||
|
setupComponent @ vue.runtime.esm.js:8946
|
||||||
|
mountComponent @ vue.runtime.esm.js:7262
|
||||||
|
processComponent @ vue.runtime.esm.js:7228
|
||||||
|
patch @ vue.runtime.esm.js:6694
|
||||||
|
mountChildren @ vue.runtime.esm.js:6942
|
||||||
|
processFragment @ vue.runtime.esm.js:7158
|
||||||
|
patch @ vue.runtime.esm.js:6668
|
||||||
|
mountChildren @ vue.runtime.esm.js:6942
|
||||||
|
processFragment @ vue.runtime.esm.js:7158
|
||||||
|
patch @ vue.runtime.esm.js:6668
|
||||||
|
mountChildren @ vue.runtime.esm.js:6942
|
||||||
|
mountElement @ vue.runtime.esm.js:6849
|
||||||
|
processElement @ vue.runtime.esm.js:6814
|
||||||
|
patch @ vue.runtime.esm.js:6682
|
||||||
|
mountChildren @ vue.runtime.esm.js:6942
|
||||||
|
mountElement @ vue.runtime.esm.js:6849
|
||||||
|
processElement @ vue.runtime.esm.js:6814
|
||||||
|
patch @ vue.runtime.esm.js:6682
|
||||||
|
mountChildren @ vue.runtime.esm.js:6942
|
||||||
|
processFragment @ vue.runtime.esm.js:7158
|
||||||
|
patch @ vue.runtime.esm.js:6668
|
||||||
|
componentUpdateFn @ vue.runtime.esm.js:7372
|
||||||
|
run @ vue.runtime.esm.js:153
|
||||||
|
instance.update @ vue.runtime.esm.js:7497
|
||||||
|
setupRenderEffect @ vue.runtime.esm.js:7507
|
||||||
|
mountComponent @ vue.runtime.esm.js:7274
|
||||||
|
processComponent @ vue.runtime.esm.js:7228
|
||||||
|
patch @ vue.runtime.esm.js:6694
|
||||||
|
mountChildren @ vue.runtime.esm.js:6942
|
||||||
|
mountElement @ vue.runtime.esm.js:6849
|
||||||
|
processElement @ vue.runtime.esm.js:6814
|
||||||
|
patch @ vue.runtime.esm.js:6682
|
||||||
|
componentUpdateFn @ vue.runtime.esm.js:7372
|
||||||
|
run @ vue.runtime.esm.js:153
|
||||||
|
instance.update @ vue.runtime.esm.js:7497
|
||||||
|
setupRenderEffect @ vue.runtime.esm.js:7507
|
||||||
|
mountComponent @ vue.runtime.esm.js:7274
|
||||||
|
processComponent @ vue.runtime.esm.js:7228
|
||||||
|
patch @ vue.runtime.esm.js:6694
|
||||||
|
componentUpdateFn @ vue.runtime.esm.js:7372
|
||||||
|
run @ vue.runtime.esm.js:153
|
||||||
|
instance.update @ vue.runtime.esm.js:7497
|
||||||
|
setupRenderEffect @ vue.runtime.esm.js:7507
|
||||||
|
mountComponent @ vue.runtime.esm.js:7274
|
||||||
|
processComponent @ vue.runtime.esm.js:7228
|
||||||
|
patch @ vue.runtime.esm.js:6694
|
||||||
|
componentUpdateFn @ vue.runtime.esm.js:7453
|
||||||
|
run @ vue.runtime.esm.js:153
|
||||||
|
instance.update @ vue.runtime.esm.js:7497
|
||||||
|
updateComponent @ vue.runtime.esm.js:7305
|
||||||
|
processComponent @ vue.runtime.esm.js:7239
|
||||||
|
patch @ vue.runtime.esm.js:6694
|
||||||
|
componentUpdateFn @ vue.runtime.esm.js:7453
|
||||||
|
run @ vue.runtime.esm.js:153
|
||||||
|
instance.update @ vue.runtime.esm.js:7497
|
||||||
|
callWithErrorHandling @ vue.runtime.esm.js:1381
|
||||||
|
flushJobs @ vue.runtime.esm.js:1585
|
||||||
|
Promise.then
|
||||||
|
queueFlush @ vue.runtime.esm.js:1494
|
||||||
|
queueJob @ vue.runtime.esm.js:1488
|
||||||
|
scheduler @ vue.runtime.esm.js:3179
|
||||||
|
resetScheduling @ vue.runtime.esm.js:236
|
||||||
|
triggerEffects @ vue.runtime.esm.js:280
|
||||||
|
triggerRefValue @ vue.runtime.esm.js:1033
|
||||||
|
set value @ vue.runtime.esm.js:1078
|
||||||
|
finalizeNavigation @ vue-router.mjs?v=ed041164:2474
|
||||||
|
(anonymous) @ vue-router.mjs?v=ed041164:2384
|
||||||
|
Promise.then
|
||||||
|
pushWithRedirect @ vue-router.mjs?v=ed041164:2352
|
||||||
|
push @ vue-router.mjs?v=ed041164:2278
|
||||||
|
install @ vue-router.mjs?v=ed041164:2631
|
||||||
|
use @ vue.runtime.esm.js:5190
|
||||||
|
initRouter @ uni-h5.es.js:19886
|
||||||
|
install @ uni-h5.es.js:19955
|
||||||
|
use @ vue.runtime.esm.js:5190
|
||||||
|
(anonymous) @ main.uts:30
|
||||||
|
main.uts:30 SyntaxError: The requested module '/services/admin/financeService.uts?import' does not provide an export named 'fetchAdminBalanceDistribution' (at index.uvue:150:3)
|
||||||
@@ -164,3 +164,36 @@ export async function fetchFinanceBillSummary(
|
|||||||
p_interval: interval
|
p_interval: interval
|
||||||
} as any)) as any
|
} as any)) as any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取余额汇总指标(当前总余额、累计充值、累计消耗)
|
||||||
|
*/
|
||||||
|
export async function fetchAdminBalanceStats() : Promise<any | null> {
|
||||||
|
return await rpcOrNull('rpc_admin_balance_stats', {} as UTSJSONObject)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取余额趋势(按天,每条记录含 date_group / accumulation / consumption)
|
||||||
|
*/
|
||||||
|
export async function fetchAdminBalanceTrend(
|
||||||
|
startTime : string,
|
||||||
|
endTime : string
|
||||||
|
) : Promise<Array<any>> {
|
||||||
|
return (await rpcOrEmptyArray('rpc_admin_balance_trend', {
|
||||||
|
p_start_time: startTime,
|
||||||
|
p_end_time: endTime
|
||||||
|
} as UTSJSONObject)) as Array<any>
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取余额来源与消耗分布(返回 { income: any[], expense: any[] })
|
||||||
|
*/
|
||||||
|
export async function fetchAdminBalanceDistribution(
|
||||||
|
startTime : string,
|
||||||
|
endTime : string
|
||||||
|
) : Promise<any | null> {
|
||||||
|
return await rpcOrNull('rpc_admin_balance_distribution', {
|
||||||
|
p_start_time: startTime,
|
||||||
|
p_end_time: endTime
|
||||||
|
} as UTSJSONObject)
|
||||||
|
}
|
||||||
|
|||||||
@@ -205,6 +205,61 @@ export async function saveSignInConfig(config : SignInConfig) : Promise<boolean>
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签到配置模型(含模式、提醒、积分、经验)
|
||||||
|
*/
|
||||||
|
export type CheckinConfig = {
|
||||||
|
id ?: string
|
||||||
|
merchant_id ?: string
|
||||||
|
is_open : boolean
|
||||||
|
mode : string // 'none' | 'week' | 'month'
|
||||||
|
notice_enabled : boolean
|
||||||
|
integral_reward : number
|
||||||
|
exp_reward : number
|
||||||
|
updated_at ?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取签到配置(扩展版)
|
||||||
|
*/
|
||||||
|
export async function fetchCheckinConfig() : Promise<CheckinConfig | null> {
|
||||||
|
const { data, error } = await supa
|
||||||
|
.from('ak_signin_configs')
|
||||||
|
.select('*')
|
||||||
|
.eq('id', 'signin_config')
|
||||||
|
.single()
|
||||||
|
.execute()
|
||||||
|
|
||||||
|
if (error != null) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
return data as CheckinConfig | null
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存签到配置(扩展版)
|
||||||
|
*/
|
||||||
|
export async function saveCheckinConfig(config : CheckinConfig) : Promise<boolean> {
|
||||||
|
const uid = getCurrentUid()
|
||||||
|
if (uid == null) return false
|
||||||
|
|
||||||
|
const { error } = await supa
|
||||||
|
.from('ak_signin_configs')
|
||||||
|
.upsert({
|
||||||
|
...config,
|
||||||
|
id: 'signin_config',
|
||||||
|
merchant_id: uid,
|
||||||
|
updated_at: new Date().toISOString()
|
||||||
|
})
|
||||||
|
.execute()
|
||||||
|
|
||||||
|
if (error != null) {
|
||||||
|
console.error('保存签到配置(扩展)失败:', error)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 切换优惠券状态
|
* 切换优惠券状态
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user