解决登录显示、首页显示bug
This commit is contained in:
@@ -181,6 +181,7 @@ type ReviewType = {
|
||||
created_at: string
|
||||
}
|
||||
|
||||
import { requireMerchantAuth } from '@/utils/merchantAuth.uts'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -212,7 +213,11 @@ export default {
|
||||
recentReviews: [] as Array<ReviewType>
|
||||
}
|
||||
},
|
||||
onLoad(options: any) {
|
||||
async onLoad(options: any) {
|
||||
const authResult = await requireMerchantAuth({ redirectOnFail: true, toastOnFail: true })
|
||||
if (!authResult.ok) {
|
||||
return
|
||||
}
|
||||
const productId = options.productId as string
|
||||
if (productId) {
|
||||
this.loadProductDetail(productId)
|
||||
|
||||
Reference in New Issue
Block a user