소스 검색

fix ua修改

erekook 1 년 전
부모
커밋
59195476c0
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      utils/util.js

+ 7 - 2
utils/util.js

@@ -133,7 +133,7 @@ export const SendEvent = (eventName, eventParam, self) => {
         const app = self || getApp()
         const app = self || getApp()
         let eParam = {...eventParam}
         let eParam = {...eventParam}
 
 
-        const deviceInfo = wx.getDeviceInfo()
+        const { brand, model, system, platform } = wx.getDeviceInfo()
 
 
         let opt = {
         let opt = {
             app_id: apple.appKey,
             app_id: apple.appKey,
@@ -144,7 +144,12 @@ export const SendEvent = (eventName, eventParam, self) => {
             event_value: JSON.stringify(eParam),
             event_value: JSON.stringify(eParam),
             report_time: Date.now(),
             report_time: Date.now(),
             trace_id: uuid(),
             trace_id: uuid(),
-            user_agent: JSON.stringify(deviceInfo)
+            user_agent: JSON.stringify({
+                brand,
+                model,
+                system,
+                platform,
+            })
         }
         }
 
 
         opt.union_id = app.globalData.unionId || ''
         opt.union_id = app.globalData.unionId || ''