Ver Fonte

修改表结构

zhangxike há 1 semana atrás
pai
commit
7583b4be99
3 ficheiros alterados com 8 adições e 2 exclusões
  1. BIN
      static/db/QT800.db
  2. 3 0
      utils/auth.uts
  3. 5 2
      utils/dataProcessor.uts

BIN
static/db/QT800.db


+ 3 - 0
utils/auth.uts

@@ -15,6 +15,9 @@ export function removeToken():void {
   return uni.removeStorageSync(TokenKey)
 }
 
+export function getCurrentUSer():string {
+	return storage.getString(constant.name) as string | '';
+}
 
 export function getTokenFromApi():Promise<string> {
 	console.log(`${globalConfig.host}${globalConfig.tokenURL}${storage.getString(constant.name)}`)

+ 5 - 2
utils/dataProcessor.uts

@@ -1,5 +1,5 @@
-import { getToken, getTokenFromApi } from './auth'
-import { saveMediaInfo, saveMediaRecord, getLatestRecord, removeInfoAndRecord, getList, updateData } from '@/api/work'
+import { getCurrentUSer, getTokenFromApi } from './auth'
+import { saveMediaInfo, saveMediaRecord, getLatestRecord, removeInfoAndRecord, getList, updateData, addLog } from '@/api/work'
 import { globalConfig } from '@/config'
 
 
@@ -280,6 +280,7 @@ export const downloadDataFromAPI = async (productCode : string, callback ?: () =
 																						'token': apiToken
 																					},
 																					success: (res) => {
+																						console.log(`${globalConfig.getImgURL}${example._id}`);
 																						if (res.statusCode === 200) {
 																							// 等待一小段时间确保文件完全下载
 																							setTimeout(() => {
@@ -356,6 +357,8 @@ export const downloadDataFromAPI = async (productCode : string, callback ?: () =
 									}
 								}
 							});
+							
+							addLog({ module: null, dataid: 0, content: '下载声像记录', status: 1, params: productCode, createuser: getCurrentUSer()??'' })
 							resolve(true);
 						} else {
 							uni.hideLoading();