@tmsfe/tms-core 0.0.134 → 0.0.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmsfe/tms-core",
3
- "version": "0.0.134",
3
+ "version": "0.0.136",
4
4
  "description": "tms运行时框架",
5
5
  "repository": {
6
6
  "type": "git",
package/src/env.js CHANGED
@@ -118,6 +118,10 @@ export const setAppPagePaths = (paths, homePage) => {
118
118
  export const isAppPageExist = (page) => {
119
119
  const route = !page ? '' : String(page).split('?')[0];
120
120
  if (!route || !Array.isArray(appPagePaths)) return false;
121
+ if (appPagePaths.length === 0) {
122
+ console.warn('isAppPageExist已经废弃,此方法会固定返回true');
123
+ return true;
124
+ }
121
125
  const routeWithoutPrefixSlash = route[0] === '/' ? route.substring(1) : route;
122
126
  return appPagePaths.some(path => path === routeWithoutPrefixSlash || path === `/${routeWithoutPrefixSlash}`);
123
127
  };
@@ -1,7 +1,7 @@
1
1
  # 埋点
2
2
 
3
3
  ### 目前支持的数据能力
4
- <img width="700" src="https://tai-static-1251316161.cos.ap-chengdu.myqcloud.com/reportcos/tms-data.png"/>
4
+ <img width="700" src="https://static.img.tai.qq.com/reportcos/tms-data.png"/>
5
5
 
6
6
  ### 埋点展示网站:https://tmsgo.testsite.woa.com/reportManage/list
7
7
 
package/src/request.js CHANGED
@@ -123,14 +123,16 @@ const composeParam = async (param = {}, withAuth = true, baseParam = {}) => {
123
123
  const modifyAuthParam = async (param, withAuth) => {
124
124
  const requestParam = { ...param };
125
125
  if (withAuth) {
126
- const { userId, token } = await getAuthInfo();
126
+ const { userId, token, openId } = await getAuthInfo();
127
127
  requestParam.userId = userId;
128
128
  requestParam.token = token;
129
+ requestParam.openId = openId;
129
130
  return requestParam;
130
131
  }
131
132
  delete requestParam.userId;
132
133
  delete requestParam.userid;
133
134
  delete requestParam.token;
135
+ delete requestParam.openId;
134
136
  return requestParam;
135
137
  };
136
138
 
@@ -169,7 +169,7 @@ const getMycarPubOpenId = () => {
169
169
 
170
170
  const { appEnv } = getApp().tms.getEnvInfo();
171
171
  // 优先用缓存的,正式环境跟测试环境的不一样
172
- const key = `tms.pubOpenId.${appEnv}`;
172
+ const key = `tms.pubOpenId.${appEnv}_v1`;
173
173
  const pubOpenId = wx.getStorageSync(key);
174
174
  if (pubOpenId) {
175
175
  getMycarPubOpenIdProm = Promise.resolve(pubOpenId);