consumer模块完成度95%,实现数据库多端注册登录,优化安卓端小程序bug
This commit is contained in:
@@ -93,6 +93,7 @@
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { supabaseService } from '@/utils/supabaseService.uts'
|
||||
|
||||
type ShareRecordType = {
|
||||
@@ -151,7 +152,7 @@ const loadShareDetail = async (): Promise<void> => {
|
||||
recordObj = JSON.parse(JSON.stringify(recordRaw)) as UTSJSONObject
|
||||
}
|
||||
|
||||
shareRecord.value = {
|
||||
const record: ShareRecordType = {
|
||||
id: recordObj.getString('id') ?? '',
|
||||
product_name: recordObj.getString('product_name') ?? '',
|
||||
product_image: recordObj.getString('product_image'),
|
||||
@@ -164,6 +165,7 @@ const loadShareDetail = async (): Promise<void> => {
|
||||
created_at: recordObj.getString('created_at') ?? '',
|
||||
completed_at: recordObj.getString('completed_at')
|
||||
}
|
||||
shareRecord.value = record
|
||||
}
|
||||
|
||||
const purchasesRaw = result.get('secondary_purchases')
|
||||
@@ -251,13 +253,11 @@ const formatTime = (timeStr: string | null): string => {
|
||||
return `${y}-${m}-${d} ${hh}:${mm}`
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
const pages = getCurrentPages()
|
||||
if (pages.length > 0) {
|
||||
const currentPage = pages[pages.length - 1]
|
||||
const options = (currentPage as any).options
|
||||
if (options != null && options.id != null) {
|
||||
shareId.value = options.id as string
|
||||
onLoad((options) => {
|
||||
if (options != null) {
|
||||
const idVal = options['id']
|
||||
if (idVal != null) {
|
||||
shareId.value = idVal as string
|
||||
loadShareDetail()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user