@qywh/package 0.0.3-beta01 → 0.0.3-beta05
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/common/actions/index.ts +2 -5
- package/common/actions/jumpXcxToQuestion.ts +57 -0
- package/common/actions/link.ts +0 -310
- package/common/compnents/dialog/index.vue +1 -1
- package/common/index.ts +1 -5
- package/lib/cdnUrl.ts +1 -8
- package/lib/httpdns-request.ts +3 -62
- package/lib/methods/actions-fn.ts +69 -519
- package/lib/methods/jump.ts +3 -21
- package/lib/request.ts +1 -6
- package/lib/utils/domain-config.ts +2 -132
- package/lib/utils/format-img.ts +3 -17
- package/lib/utils/index.ts +1 -4
- package/lib/utils/logParamHandle.ts +138 -0
- package/package.json +1 -1
- package/packages/qy-anchor/components/index.vue +4 -4
- package/packages/qy-atmosphere-countdown/settings/index.ts +2 -3
- package/packages/qy-atmosphere-countdownv2/settings/index.ts +2 -2
- package/packages/qy-button/components/index.vue +2 -2
- package/packages/qy-button/components/static/default-btn.png +0 -0
- package/packages/qy-button/settings/applet/v1.ts +2 -3
- package/packages/qy-button/settings/applet/v2.ts +2 -3
- package/packages/qy-container/components/index.vue +4 -4
- package/packages/qy-countdown/settings/index.ts +2 -3
- package/packages/qy-dialog/components/index.vue +30 -30
- package/packages/qy-hotarea/components/index.vue +2 -2
- package/packages/qy-limit-countdown/components/index.vue +1 -1
- package/packages/qy-limit-countdown/settings/index.ts +2 -3
- package/packages/qy-out-form-input/components/index.vue +1 -1
- package/packages/qy-out-form-select/components/index.vue +1 -1
- package/packages/qy-out-form-submit-button/components/index.vue +18 -18
- package/packages/qy-out-form-submit-button/components/static/default-btn.png +0 -0
- package/packages/qy-out-success-wechat-diversion/components/index.vue +120 -745
- package/packages/qy-out-success-wechat-diversion/menu.ts +1 -1
- package/packages/qy-out-success-wechat-diversion/settings/index.ts +5 -424
- package/packages/qy-out-wx-auth-button/components/index.vue +4 -4
- package/packages/qy-out-wx-auth-button/components/static/default-btn.png +0 -0
- package/packages/qy-out-wx-auth-button/settings/applet/v1.ts +2 -2
- package/packages/qy-out-wx-auth-button/settings/index.ts +2 -2
- package/packages/qy-page/components/index.vue +1 -1
- package/packages/qy-page/components/out-weixin-share.ts +49 -81
- package/packages/qy-picture/components/index.vue +1 -1
- package/packages/qy-picture/components/static/single_pic-2.png +0 -0
- package/packages/qy-picture/settings/applet/v1.ts +2 -2
- package/packages/qy-picture/settings/index.ts +2 -2
- package/packages/qy-rect/components/index.vue +2 -2
- package/typings/enum/saleChannelConfig.ts +1 -1
- package/typings/index.d.ts +0 -1
- package/common/actions/jumpXcx.ts +0 -20
- package/common/domain.ts +0 -12
- package/common/service.ts +0 -65
- package/lib/baseUrl.ts +0 -12
- package/lib/checkRepeat.ts +0 -28
- package/lib/utils/environment.ts +0 -39
- package/lib/utils/order-recall.ts +0 -26
- package/lib/utils/weixin.ts +0 -160
- package/lib/utils/wxGroupManage.ts +0 -211
- package/lib/zyb-yike-utils/feWechatMultiterminal.ts +0 -103
- package/lib/zyb-yike-utils/logParamHandle.ts +0 -298
- package/packages/qy-seckill/actions/index.ts +0 -1
- package/packages/qy-seckill/components/index.vue +0 -263
- package/packages/qy-seckill/index.ts +0 -18
- package/packages/qy-seckill/menu.ts +0 -6
- package/packages/qy-seckill/settings/index.ts +0 -101
- package/packages/qy-seckill/static/clock.png +0 -0
- package/typings/enum/coupon.ts +0 -5
- /package/lib/{zyb-yike-utils → utils}/cookieExt.ts +0 -0
- /package/lib/{zyb-yike-utils → utils}/guid.ts +0 -0
- /package/lib/{zyb-yike-utils → utils}/sparkMD5.js +0 -0
- /package/lib/{zyb-yike-utils → utils}/urlExt.ts +0 -0
- /package/lib/{zyb-yike-utils → utils}/utils.ts +0 -0
package/lib/request.ts
CHANGED
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
import Axios from 'axios'
|
|
3
3
|
import Qs from 'qs'
|
|
4
4
|
import { toast } from './methods'
|
|
5
|
-
|
|
6
|
-
import { API_HOSTS } from './utils/domain-config'
|
|
7
|
-
let baseURL = '/'
|
|
8
|
-
if (environment.isZyb()) {
|
|
9
|
-
baseURL = `https://${API_HOSTS.cube.zyb}`
|
|
10
|
-
}
|
|
5
|
+
const baseURL = '/'
|
|
11
6
|
|
|
12
7
|
// 环境判断
|
|
13
8
|
export const service = Axios.create({
|
|
@@ -3,144 +3,14 @@
|
|
|
3
3
|
* 所有域名、环境关键字、CDN 地址集中在这里管理,方便统一切换。
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
// ==================== 环境检测关键字 ====================
|
|
7
|
-
// 用于通过 location.host 判断当前运行环境
|
|
8
|
-
export const ENV_KEYWORDS = {
|
|
9
|
-
docker: 'suanshubang',
|
|
10
|
-
zyb: 'zuoyebang',
|
|
11
|
-
fnjz: 'fengniaojianzhan',
|
|
12
|
-
zybjianzhan: 'zybjianzhan',
|
|
13
|
-
xm: 'xingmangmeixue',
|
|
14
|
-
yayaketang: 'yayaketang',
|
|
15
|
-
} as const
|
|
16
|
-
|
|
17
|
-
// ==================== 主域名 ====================
|
|
18
|
-
export const HOSTS = {
|
|
19
|
-
/** 端外线上主域名(蜂鸟建站) */
|
|
20
|
-
fnjz: 'tf.fengniaojianzhan.com',
|
|
21
|
-
/** 作业帮主站 */
|
|
22
|
-
zyb: 'zuoyebang.com',
|
|
23
|
-
/** 作业帮(zybang.com 变体) */
|
|
24
|
-
zybang: 'zybang.com',
|
|
25
|
-
/** 作业帮 H5 */
|
|
26
|
-
zybH5: 'h5.zuoyebang.com',
|
|
27
|
-
} as const
|
|
28
|
-
|
|
29
|
-
// ==================== API 服务域名 ====================
|
|
30
|
-
// 格式:{ 线上(fnjz), 作业帮线上(zyb) } 测试环境动态拼接 suanshubang
|
|
31
|
-
export const API_HOSTS = {
|
|
32
|
-
/** 端外投放 API 网关 */
|
|
33
|
-
apigo: {
|
|
34
|
-
fnjz: 'apigo-tf.fengniaojianzhan.com',
|
|
35
|
-
zyb: 'apigo-tf.zuoyebang.com',
|
|
36
|
-
},
|
|
37
|
-
/** 登录认证 */
|
|
38
|
-
passport: {
|
|
39
|
-
fnjz: 'passport.fengniaojianzhan.com',
|
|
40
|
-
zyb: 'passport.zuoyebang.com',
|
|
41
|
-
},
|
|
42
|
-
/** 微信生态接口 */
|
|
43
|
-
wxst: {
|
|
44
|
-
fnjz: 'wxst.fengniaojianzhan.com',
|
|
45
|
-
zyb: 'wxst.zuoyebang.com',
|
|
46
|
-
},
|
|
47
|
-
/** Cube 主站 */
|
|
48
|
-
cube: {
|
|
49
|
-
zyb: 'cube.zuoyebang.com',
|
|
50
|
-
},
|
|
51
|
-
/** 端外 Cube Extend */
|
|
52
|
-
cubeExtend: {
|
|
53
|
-
fnjz: 'tf.fengniaojianzhan.com',
|
|
54
|
-
zyb: 'cube.zuoyebang.com',
|
|
55
|
-
},
|
|
56
|
-
/** 售卖服务 */
|
|
57
|
-
sell: {
|
|
58
|
-
zyb: 'sell.zuoyebang.com',
|
|
59
|
-
},
|
|
60
|
-
/** 投放服务 */
|
|
61
|
-
tf: {
|
|
62
|
-
zyb: 'tf.zuoyebang.com',
|
|
63
|
-
},
|
|
64
|
-
/** 通知/打点服务 */
|
|
65
|
-
notice: {
|
|
66
|
-
fnjz: 'notice.fengniaojianzhan.com',
|
|
67
|
-
},
|
|
68
|
-
} as const
|
|
69
6
|
|
|
70
7
|
// ==================== CDN 图片域名 ====================
|
|
71
8
|
/** 普通图片 CDN(非百度云) */
|
|
72
9
|
export const PIC_CDN_HOSTS: string[] = [
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
'syh-cube.cdnjtzy.com',
|
|
76
|
-
'toufang.cdnjtzy.com',
|
|
77
|
-
'syh-cc.cdnjtzy.com',
|
|
78
|
-
'zyb-toufang.cdnjtzy.com',
|
|
10
|
+
'image.qywh.me',
|
|
11
|
+
'image-test.qywh.me'
|
|
79
12
|
]
|
|
80
13
|
|
|
81
14
|
/** 百度云图片 CDN */
|
|
82
15
|
export const BAIDU_CDN_HOSTS: string[] = [
|
|
83
|
-
'img.zuoyebang.cc',
|
|
84
|
-
'syh-imp.cdnjtzy.com',
|
|
85
|
-
'mofang-img.cdnjtzy.com',
|
|
86
16
|
]
|
|
87
|
-
|
|
88
|
-
// ==================== 默认 CDN 资源 URL ====================
|
|
89
|
-
export const CDN_ASSETS = {
|
|
90
|
-
/** 默认按钮背景图 */
|
|
91
|
-
defaultButtonImage: 'https://cube-cdn.fengniaojianzhan.com/uploadFile/zyb_c6b02960e862d984611cc4ed6ca74782.png',
|
|
92
|
-
/** 字体图标基础路径 */
|
|
93
|
-
fontBase: 'https://cube-cdn.fengniaojianzhan.com/com/cube/fonts',
|
|
94
|
-
} as const
|
|
95
|
-
|
|
96
|
-
// ==================== 蜂鸟环境域名替换规则 ====================
|
|
97
|
-
// 在蜂鸟建站环境(isFnjz)下需要将特定域名映射为 CDN 域名
|
|
98
|
-
export const FNJZ_IMAGE_REPLACE_MAP: Record<string, string> = {
|
|
99
|
-
'img.zuoyebang.cc': 'mofang-img.cdnjtzy.com',
|
|
100
|
-
'zyb-toufang.cdnjtzy.com': 'toufang.cdnjtzy.com',
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// ==================== 短链接支付域名替换 ====================
|
|
104
|
-
// 下单链路中根据环境将短链接域名替换为实际的支付域名
|
|
105
|
-
export const SHORT_URL_PAY_HOSTS = {
|
|
106
|
-
/** Docker 环境支付入口 */
|
|
107
|
-
docker: 'https://sell-cubedev-e.suanshubang.cc',
|
|
108
|
-
/** 蜂鸟建站线上 */
|
|
109
|
-
fnjz: 'https://www.fengniaojianzhan.com',
|
|
110
|
-
/** 作业帮建站 */
|
|
111
|
-
zybjianzhan: 'https://zybjianzhan.com',
|
|
112
|
-
/** 作业帮线上 */
|
|
113
|
-
zyb: 'https://tf.zuoyebang.com',
|
|
114
|
-
/** 作业帮主站(zybang.com) */
|
|
115
|
-
zybang: 'www.zybang.com',
|
|
116
|
-
} as const
|
|
117
|
-
|
|
118
|
-
// ==================== Docker 模板字符串 ====================
|
|
119
|
-
/** 测试环境域名模板,{shipName} 和 {suffix} 动态填充 */
|
|
120
|
-
export const DOCKER_TEMPLATES = {
|
|
121
|
-
/** API 网关 */
|
|
122
|
-
apigo: 'apigo-tf-{shipName}-e.suanshubang.{suffix}',
|
|
123
|
-
/** C3 投放服务 */
|
|
124
|
-
c3tf: 'c3-tf-{shipName}-e.suanshubang.{suffix}',
|
|
125
|
-
/** C3 售卖服务 */
|
|
126
|
-
c3sell: 'c3-sell-{shipName}-e.suanshubang.{suffix}',
|
|
127
|
-
/** Passport 服务 */
|
|
128
|
-
passport: 'passport-{shipName}-e.suanshubang.{suffix}',
|
|
129
|
-
/** Cube Extend */
|
|
130
|
-
cubeExtend: 'cube-{shipName}-cc.suanshubang.com',
|
|
131
|
-
/** Web 前端 */
|
|
132
|
-
www: 'www-{shipName}-xmmx.suanshubang{suffix}',
|
|
133
|
-
} as const
|
|
134
|
-
|
|
135
|
-
// ==================== 内部服务 ====================
|
|
136
|
-
export const INTERNAL = {
|
|
137
|
-
/** NPM 私有源 */
|
|
138
|
-
npmRegistry: 'http://ued.zuoyebang.cc/npm/',
|
|
139
|
-
/** UED 文档 */
|
|
140
|
-
uedDocs: 'http://ued.zuoyebang.cc',
|
|
141
|
-
/** Wiki 文档 */
|
|
142
|
-
wiki: 'http://wiki.zuoyebang.cc',
|
|
143
|
-
} as const
|
|
144
|
-
|
|
145
|
-
// ==================== 微信 JS-SDK nonce 常量 ====================
|
|
146
|
-
export const WX_NONCE_STR = 'zuoyebang'
|
package/lib/utils/format-img.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { PIC_CDN_HOSTS, BAIDU_CDN_HOSTS, FNJZ_IMAGE_REPLACE_MAP } from './domain-config'
|
|
1
|
+
import { PIC_CDN_HOSTS, BAIDU_CDN_HOSTS } from './domain-config'
|
|
3
2
|
function canWebp () {
|
|
4
3
|
if ('CAN_WEBP' in window) {
|
|
5
4
|
return (window as any).CAN_WEBP
|
|
@@ -36,21 +35,8 @@ function getSrc (url: string, setting: any) {
|
|
|
36
35
|
return `${url}@${tempstr}`
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
function replaceImageUrl (src: string) {
|
|
40
|
-
if (environment.isFnjz()) {
|
|
41
|
-
for (const [from, to] of Object.entries(FNJZ_IMAGE_REPLACE_MAP)) {
|
|
42
|
-
if (src.indexOf(from) > -1) {
|
|
43
|
-
return src.replace(from, to)
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return src
|
|
47
|
-
} else {
|
|
48
|
-
return src
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
38
|
export function formatImg (src: string, setting = {}, isServer = false) {
|
|
53
|
-
let newImageUrl =
|
|
39
|
+
let newImageUrl = src
|
|
54
40
|
let arr = PIC_CDN_HOSTS.concat(BAIDU_CDN_HOSTS)
|
|
55
41
|
let flag = arr.every((item: string) => {
|
|
56
42
|
return newImageUrl.indexOf(item) === -1
|
|
@@ -112,7 +98,7 @@ export function formatImg (src: string, setting = {}, isServer = false) {
|
|
|
112
98
|
}
|
|
113
99
|
}
|
|
114
100
|
export function compressImgFn (imageUrl: any) {
|
|
115
|
-
let newImageUrl =
|
|
101
|
+
let newImageUrl = imageUrl
|
|
116
102
|
let flag = PIC_CDN_HOSTS.some((item: string) => {
|
|
117
103
|
return newImageUrl.indexOf(item) !== -1
|
|
118
104
|
})
|
package/lib/utils/index.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import Vue from 'vue'
|
|
2
|
-
import urlExt from '../
|
|
2
|
+
import urlExt from '../utils/urlExt'
|
|
3
3
|
export * from './timestampToTime'
|
|
4
4
|
export * from './format-img'
|
|
5
5
|
export * from './platform'
|
|
6
6
|
export * from './dom'
|
|
7
7
|
export * from './requestAnimationFrame'
|
|
8
8
|
export * from './getUserInfo'
|
|
9
|
-
export * from './environment'
|
|
10
|
-
export * from './wxGroupManage'
|
|
11
|
-
export * from './order-recall'
|
|
12
9
|
|
|
13
10
|
export const isServer = Vue.prototype.$isServer
|
|
14
11
|
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/*eslint-disable*/
|
|
3
|
+
import urlExt from './urlExt';
|
|
4
|
+
import isPlainObject from 'lodash/isPlainObject';
|
|
5
|
+
import isEmptyObject from 'lodash/isEmpty';
|
|
6
|
+
import extend from 'lodash/extend';
|
|
7
|
+
|
|
8
|
+
let currentPageURL = location.href // 用于兼容 vue # 号后边的参数getQuery无法获取的问题
|
|
9
|
+
// channelType 处理
|
|
10
|
+
let urlChannelType = urlExt.getQuery('channelType', currentPageURL) || '';
|
|
11
|
+
|
|
12
|
+
let urlTfExtData = urlExt.getQuery('tfExtData', currentPageURL) || '';
|
|
13
|
+
|
|
14
|
+
function getChannelType() {
|
|
15
|
+
return urlChannelType
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function setTfExtData(tfExtData) {
|
|
19
|
+
if (isPlainObject(tfExtData) && !isEmptyObject(tfExtData)) {
|
|
20
|
+
try {
|
|
21
|
+
let tmpTfExtData = JSON.parse(decodeURIComponent(decodeURIComponent(urlTfExtData)));
|
|
22
|
+
urlTfExtData = encodeURIComponent(JSON.stringify(extend(tmpTfExtData, tfExtData)))
|
|
23
|
+
} catch (e) {
|
|
24
|
+
urlTfExtData = encodeURIComponent(JSON.stringify(tfExtData));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function mergeTfExtData(tfExtData) {
|
|
29
|
+
try {
|
|
30
|
+
let targetTfExtData = JSON.parse(decodeURIComponent(decodeURIComponent(tfExtData)));
|
|
31
|
+
let sourceTfExtData = JSON.parse(decodeURIComponent(decodeURIComponent(urlTfExtData)));
|
|
32
|
+
return encodeURIComponent(JSON.stringify(extend(sourceTfExtData, targetTfExtData)));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
return tfExtData;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function getUrlTfExtData() {
|
|
39
|
+
return encodeURIComponent(decodeURIComponent(decodeURIComponent(urlTfExtData)));
|
|
40
|
+
}
|
|
41
|
+
function getTfExtData() {
|
|
42
|
+
try {
|
|
43
|
+
let customTfExtData = (window as any).__PAGE_DATA__.pageInfo.customTfExtData // 自定义追加tfExtData
|
|
44
|
+
let newTfExtData = JSON.parse(decodeURIComponent(urlTfExtData));
|
|
45
|
+
let paramString = '';
|
|
46
|
+
if (customTfExtData && typeof customTfExtData === 'object') {
|
|
47
|
+
newTfExtData = {
|
|
48
|
+
...newTfExtData,
|
|
49
|
+
...customTfExtData
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
for(let key in newTfExtData) {
|
|
53
|
+
if (typeof newTfExtData[key] === 'number') {
|
|
54
|
+
paramString = `${paramString}&${key}=${newTfExtData[key]}`;
|
|
55
|
+
} else {
|
|
56
|
+
paramString = `${paramString}&${key}=${encodeURIComponent(newTfExtData[key])}`;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return encodeURIComponent(paramString.replace(/^&/, ''));
|
|
60
|
+
} catch (e) {
|
|
61
|
+
return urlTfExtData;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function getTfExtDataKey(key) {
|
|
66
|
+
try {
|
|
67
|
+
const urlTfExtDataObj = JSON.parse(decodeURIComponent(decodeURIComponent(urlTfExtData)));
|
|
68
|
+
return urlTfExtDataObj[key] !== undefined ? urlTfExtDataObj[key] : urlTfExtData;
|
|
69
|
+
} catch (e) {
|
|
70
|
+
return urlTfExtData;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function withBaseURL(jumpUrl) {
|
|
75
|
+
const host = window.location.host
|
|
76
|
+
if (/^(http|https):\/\/([^\/]+)/i.test(jumpUrl)) { // 有其他域名,不作处理
|
|
77
|
+
return jumpUrl;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
let baseURL = host;
|
|
81
|
+
return `${baseURL}${jumpUrl}`;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 对传入的url进行参数处理
|
|
86
|
+
* @param url 端内或端外的url
|
|
87
|
+
* @returns {*}
|
|
88
|
+
*/
|
|
89
|
+
function urlHandle(url, isMerge = false) {
|
|
90
|
+
url = url? withBaseURL(url) : currentPageURL
|
|
91
|
+
var urlParts = url ? url.split('?') : []
|
|
92
|
+
var normalUrl = url ? url.split('?')[0] : ''
|
|
93
|
+
var paramsUrl = url ? url.split('?')[1] : ''
|
|
94
|
+
if (urlParts.length > 2) {
|
|
95
|
+
// 说明链接参数中有多余的? 将后半部分组装回去
|
|
96
|
+
var realParamsUrl = ''
|
|
97
|
+
urlParts.forEach((item, index) => {
|
|
98
|
+
if (index !== 0 && index !== (urlParts.length - 1)) {
|
|
99
|
+
realParamsUrl = realParamsUrl + item + '?'
|
|
100
|
+
}
|
|
101
|
+
if (index !== 0 && index === (urlParts.length - 1)) {
|
|
102
|
+
realParamsUrl = realParamsUrl + item
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
paramsUrl = realParamsUrl
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
paramsUrl = paramsUrl || '';
|
|
109
|
+
var tmpChannelType = urlExt.getQuery('channelType', url); // 第二个参数如果为空,则自动从当前url中获取参数一的值
|
|
110
|
+
if (Object.prototype.toString.call(tmpChannelType) === '[object Array]') {
|
|
111
|
+
tmpChannelType = tmpChannelType[0];
|
|
112
|
+
}
|
|
113
|
+
var tmpTfExtData = urlExt.getQuery('tfExtData', url);
|
|
114
|
+
if (Object.prototype.toString.call(tmpTfExtData) === '[object Array]') {
|
|
115
|
+
tmpTfExtData = tmpTfExtData[0];
|
|
116
|
+
}
|
|
117
|
+
if (!tmpChannelType) { // 如果tmpChannelType为空,则将channelType拼在参数中
|
|
118
|
+
paramsUrl = urlExt.setQuery('channelType', urlChannelType, paramsUrl);
|
|
119
|
+
}
|
|
120
|
+
// 用于处理url里面已有tfExtData,同时需要merge当前页面设置的
|
|
121
|
+
if (tmpTfExtData && isMerge) {
|
|
122
|
+
paramsUrl = urlExt.setQuery('tfExtData', mergeTfExtData(tmpTfExtData), paramsUrl);
|
|
123
|
+
}
|
|
124
|
+
if (!tmpTfExtData) {
|
|
125
|
+
paramsUrl = urlExt.setQuery('tfExtData', getUrlTfExtData(), paramsUrl);
|
|
126
|
+
}
|
|
127
|
+
console.log('最后返回的链接:', normalUrl, paramsUrl)
|
|
128
|
+
return normalUrl + '?' + paramsUrl;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export default {
|
|
132
|
+
getChannelType: getChannelType,
|
|
133
|
+
urlHandle: urlHandle,
|
|
134
|
+
setTfExtData: setTfExtData,
|
|
135
|
+
getTfExtData: getTfExtData,
|
|
136
|
+
getTfExtDataKey: getTfExtDataKey,
|
|
137
|
+
getUrlTfExtData: getUrlTfExtData,
|
|
138
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
<template>
|
|
3
|
-
<div class="
|
|
4
|
-
<div v-if="isEdit" class="
|
|
3
|
+
<div class="qy-anchor" :id="uid">
|
|
4
|
+
<div v-if="isEdit" class="qy-anchor__line-container">
|
|
5
5
|
<i class="iconfont icon-position"></i>
|
|
6
|
-
<div class="
|
|
6
|
+
<div class="qy-anchor__line-container__dashed-line">
|
|
7
7
|
<dashed-line :positions="positions" />
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
@@ -34,7 +34,7 @@ export default class QyAnchor extends Vue {
|
|
|
34
34
|
</script>
|
|
35
35
|
|
|
36
36
|
<style lang="less" scoped>
|
|
37
|
-
.
|
|
37
|
+
.qy-anchor {
|
|
38
38
|
position: relative;
|
|
39
39
|
&__line-container {
|
|
40
40
|
position: relative;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentTypeEnum } from '../../../typings/enum/component-type'
|
|
2
|
-
const imgSize =
|
|
2
|
+
const imgSize = 5 // 5M
|
|
3
3
|
const textStyle = { // SetText组件样式
|
|
4
4
|
lineHeight: 1
|
|
5
5
|
}
|
|
@@ -15,8 +15,7 @@ export default {
|
|
|
15
15
|
type: 'SetUploadImage',
|
|
16
16
|
label: '图片',
|
|
17
17
|
name: 'imageList',
|
|
18
|
-
uploadTips: `支持png/jpg/jpeg/gif格式,尺寸限制为:720*120
|
|
19
|
-
1000}KB`,
|
|
18
|
+
uploadTips: `支持png/jpg/jpeg/gif格式,尺寸限制为:720*120,大小不超过5MB`,
|
|
20
19
|
limitObj: {
|
|
21
20
|
// width: 720,
|
|
22
21
|
// height: 120,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentTypeEnum } from '../../../typings/enum/component-type'
|
|
2
|
-
const imgSize =
|
|
2
|
+
const imgSize = 5 // 5M
|
|
3
3
|
const textStyle = { // SetText组件样式
|
|
4
4
|
lineHeight: 1
|
|
5
5
|
}
|
|
@@ -32,7 +32,7 @@ export default {
|
|
|
32
32
|
type: 'SetUploadImage',
|
|
33
33
|
label: '图片',
|
|
34
34
|
name: 'imageList',
|
|
35
|
-
uploadTips: `支持png/jpg/jpeg/gif格式,尺寸限制为:720*120
|
|
35
|
+
uploadTips: `支持png/jpg/jpeg/gif格式,尺寸限制为:720*120,大小不超过5MB`,
|
|
36
36
|
limitObj: {
|
|
37
37
|
// width: 720,
|
|
38
38
|
// height: 120,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<script lang='ts'>
|
|
32
32
|
import { Vue, Component, Prop, Watch, Mixins } from 'vue-property-decorator'
|
|
33
33
|
import StickyMixin from '../../../lib/sticky-mixin'
|
|
34
|
-
|
|
34
|
+
const btnDefaultImage = require('./static/default-btn.png')
|
|
35
35
|
// 环境判断
|
|
36
36
|
const isEdit = process.env.VUE_APP_RUNTIME_PLATFORM === 'editor'
|
|
37
37
|
@Component({
|
|
@@ -110,7 +110,7 @@ export default class QyButton extends Mixins(StickyMixin) {
|
|
|
110
110
|
}
|
|
111
111
|
})
|
|
112
112
|
readonly btnImageBorder!: any
|
|
113
|
-
btnDefaultImage:string =
|
|
113
|
+
btnDefaultImage:string = btnDefaultImage
|
|
114
114
|
animationIndex = 0 // 当前执行动画序号
|
|
115
115
|
startAnimation = false // 是否开始动画
|
|
116
116
|
|
|
Binary file
|
|
@@ -139,10 +139,9 @@ export default {
|
|
|
139
139
|
label: '图片',
|
|
140
140
|
defaultShow: true,
|
|
141
141
|
name: 'btnImage',
|
|
142
|
-
uploadTips: `支持png/jpg/jpeg/gif
|
|
143
|
-
1000}KB`,
|
|
142
|
+
uploadTips: `支持png/jpg/jpeg/gif格式,大小不超过5MB`,
|
|
144
143
|
limitObj: {
|
|
145
|
-
size:
|
|
144
|
+
size: 5,
|
|
146
145
|
type: 'png|jpg|jpeg|gif'
|
|
147
146
|
}
|
|
148
147
|
}
|
|
@@ -139,10 +139,9 @@ export default {
|
|
|
139
139
|
label: '图片',
|
|
140
140
|
defaultShow: true,
|
|
141
141
|
name: 'btnImage',
|
|
142
|
-
uploadTips: `支持png/jpg/jpeg/gif
|
|
143
|
-
1000}KB`,
|
|
142
|
+
uploadTips: `支持png/jpg/jpeg/gif格式,大小不超过5MB`,
|
|
144
143
|
limitObj: {
|
|
145
|
-
size:
|
|
144
|
+
size: 5,
|
|
146
145
|
type: 'png|jpg|jpeg|gif'
|
|
147
146
|
}
|
|
148
147
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
2
|
+
<div class="qy-container" :style="style" ref="qyContainerAutoHeight">
|
|
3
3
|
<!-- 容器滚动的辅助线 -->
|
|
4
4
|
<div class="container-line" v-if="isEdit && isScrollViewContent" :style="{top: isScrollViewContentHeight / 100 + 'rem'}"></div>
|
|
5
5
|
<slot></slot>
|
|
@@ -104,9 +104,9 @@ export default {
|
|
|
104
104
|
// 非编辑区,开启容器滑动
|
|
105
105
|
if (this.isScrollViewContent === true && !this.isEdit) {
|
|
106
106
|
// 如果设置的滑动高度大于容器高度,则滑动高度取容器高度,也就是不滑动
|
|
107
|
-
let containerHeight = this.$refs.
|
|
107
|
+
let containerHeight = this.$refs.qyContainerAutoHeight.style.height.split('rem')[0]
|
|
108
108
|
if (Number(containerHeight) > this.isScrollViewContentHeight / 100) {
|
|
109
|
-
let _parentNode = this.$refs.
|
|
109
|
+
let _parentNode = this.$refs.qyContainerAutoHeight.parentNode
|
|
110
110
|
_parentNode.style.height = this.isScrollViewContentHeight / 100 + 'rem'
|
|
111
111
|
_parentNode.style.overflowY = 'auto'
|
|
112
112
|
if (_parentNode.parentNode) { _parentNode.parentNode.classList.add('container-scroll-style') }
|
|
@@ -117,7 +117,7 @@ export default {
|
|
|
117
117
|
}
|
|
118
118
|
</script>
|
|
119
119
|
<style lang="less">
|
|
120
|
-
.
|
|
120
|
+
.qy-container {
|
|
121
121
|
position: relative;
|
|
122
122
|
width: 100%;
|
|
123
123
|
height: 3.24rem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentTypeEnum } from '../../../typings/enum/component-type'
|
|
2
|
-
const imgSize =
|
|
2
|
+
const imgSize = 5 // 5M
|
|
3
3
|
const textStyle = { // SetText组件样式
|
|
4
4
|
lineHeight: 1
|
|
5
5
|
}
|
|
@@ -96,8 +96,7 @@ export default {
|
|
|
96
96
|
type: 'SetUploadImage',
|
|
97
97
|
label: '图片',
|
|
98
98
|
name: 'imageList',
|
|
99
|
-
uploadTips: `支持png/jpg/jpeg/gif格式,尺寸限制为:720*120
|
|
100
|
-
1000}KB`,
|
|
99
|
+
uploadTips: `支持png/jpg/jpeg/gif格式,尺寸限制为:720*120,大小不超过5MB`,
|
|
101
100
|
limitObj: {
|
|
102
101
|
width: 720,
|
|
103
102
|
height: 120,
|