Browse Source

refactor: p-task-title 参数url处理

disable-role
wally 4 years ago
parent
commit
4fb9ec006a
  1. 1
      CHANGELOG.md
  2. 7
      src/plugins/p-task-title/p-task-title.vue

1
CHANGELOG.md

@ -257,6 +257,7 @@
- | merge wrr lucky | 959ae05
- | mock | 51c24a5
node-sass | 替换node-sass为sass(dart-sass) | c33169d
- | npm 包升级 | f47ef8e
package manifest | 去掉了摇树 | f7c1dd4
pwa 小程序 | 移除了pwa,alloyFinger添加平台判断 | 875fab4
- | uview-ui | a9ea34b

7
src/plugins/p-task-title/p-task-title.vue

@ -41,15 +41,18 @@ export default {
methods: {
// PC
postMsg(param) {
console.log('param: ', param);
/* #ifdef H5 */
if (param) {
const data = JSON.parse(param);
if (data && data.url) {
const url = `${data.url}?u=${this.userId}&p=${this.projectId}&t=${this.task.id}`;
const baseUrl = process.env.VUE_APP_BASE_URL;
const url = `${baseUrl}/${data.url}?u=${this.userId}&p=${this.projectId}&t=${this.task.id}`;
console.log('发消息: ', url);
const msg = {
event: 'openDetail',
data: url,
data: data.local ? data.url : url,
local: data.local,
};
top.postMessage(msg, '*');
}

Loading…
Cancel
Save