@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/common/actions/index.ts
CHANGED
|
@@ -2,10 +2,8 @@ import { IActionObjType, IPluginModel, IRegisterStore, ITriggerStore, IAllRegist
|
|
|
2
2
|
|
|
3
3
|
import Link from './link'
|
|
4
4
|
import Anchor from './anchor'
|
|
5
|
-
// 端外跳转LPC获客助手
|
|
6
|
-
import outOpenLpc from './outOpenLpc'
|
|
7
5
|
import goodsBuy from './goodsBuy'
|
|
8
|
-
import
|
|
6
|
+
import jumpXcxToQuestion from './jumpXcxToQuestion'
|
|
9
7
|
// 追加给每个组件的注册描述
|
|
10
8
|
const commonRegisterSettings = [
|
|
11
9
|
{
|
|
@@ -115,7 +113,6 @@ export function normalizeSettings (registers: IRegisterStore[]) {
|
|
|
115
113
|
export default [
|
|
116
114
|
Link,
|
|
117
115
|
Anchor,
|
|
118
|
-
outOpenLpc,
|
|
119
116
|
goodsBuy,
|
|
120
|
-
|
|
117
|
+
jumpXcxToQuestion
|
|
121
118
|
]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
type: 'register',
|
|
3
|
+
actionType: 'jumpXcxToQuestion',
|
|
4
|
+
desc: '跳转小程序表单',
|
|
5
|
+
settings: [
|
|
6
|
+
{
|
|
7
|
+
type: 'SetRemoteSearch',
|
|
8
|
+
name: 'params.qId',
|
|
9
|
+
label: '问卷选择',
|
|
10
|
+
placeholder: '请输入问卷名称搜索',
|
|
11
|
+
remoteUrl: '/site/questionnaire/search',
|
|
12
|
+
initFetchUrl: '/site/questionnaire/detail',
|
|
13
|
+
remoteSearchKey: 'keyword',
|
|
14
|
+
remoteLabelKey: 'questionName',
|
|
15
|
+
remoteValueKey: 'id',
|
|
16
|
+
checkConfig: {
|
|
17
|
+
isNeedCheck: true,
|
|
18
|
+
isCheckDefault: true,
|
|
19
|
+
isCheckResult: false,
|
|
20
|
+
errTips: '请选择问卷'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
type: 'SetRemoteSearch',
|
|
25
|
+
name: 'params.goodsId',
|
|
26
|
+
label: '商品选择',
|
|
27
|
+
placeholder: '请输入商品名称搜索',
|
|
28
|
+
remoteUrl: '/product/api/list',
|
|
29
|
+
remoteParams: { pageNum: 1, pageSize: 10 },
|
|
30
|
+
remoteSearchKey: 'keyword',
|
|
31
|
+
remoteLabelKey: 'skuName',
|
|
32
|
+
remoteValueKey: 'id',
|
|
33
|
+
checkConfig: {
|
|
34
|
+
isNeedCheck: true,
|
|
35
|
+
isCheckDefault: true,
|
|
36
|
+
isCheckResult: false,
|
|
37
|
+
errTips: '请选择商品'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'SetApiSelect',
|
|
42
|
+
name: 'params.xcxId',
|
|
43
|
+
label: '小程序选择',
|
|
44
|
+
placeholder: '请选择小程序',
|
|
45
|
+
apiUrl: '/common/authNode/wx/miniapp/list',
|
|
46
|
+
apiParams: { is_question: 1 },
|
|
47
|
+
labelKey: 'name',
|
|
48
|
+
valueKey: 'id'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'SetPageSelect',
|
|
52
|
+
name: 'params.wxPage',
|
|
53
|
+
label: '加微页',
|
|
54
|
+
placeholder: '请选择页面'
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
package/common/actions/link.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { defaultData } from './common'
|
|
3
|
-
import { saleChannelConfig } from '../../typings/enum/saleChannelConfig'
|
|
4
3
|
export const LinkSetting = [
|
|
5
4
|
{
|
|
6
5
|
type: 'SetRadio',
|
|
@@ -13,38 +12,6 @@ export const LinkSetting = [
|
|
|
13
12
|
{
|
|
14
13
|
label: 'H5链接',
|
|
15
14
|
value: 'jumpLink'
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
label: '魔方活动页',
|
|
19
|
-
value: 'jumpNiffler'
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
label: '魔方活动页(端外)',
|
|
23
|
-
value: 'jumpNifflerOut'
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
label: '三合一支付页(端外)',
|
|
27
|
-
value: 'jumpSpecialPaymentOutApp'
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
label: '三合一支付页(CS)',
|
|
31
|
-
value: 'jumpSpecialPaymentCS'
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
label: '小程序内嵌H5跳转小程序订单页',
|
|
35
|
-
value: 'jumpSpecialMiniProgramOrder'
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
label: '跳转0转正成功页',
|
|
39
|
-
value: 'jumpWxGroupPage'
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
label: '跳转群控页面(小程序外链)',
|
|
43
|
-
value: 'jumpWxGroupPageXcxLink'
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
label: '端外H5跳转微信小程序订单页',
|
|
47
|
-
value: 'jumpWxXcxOder'
|
|
48
15
|
}
|
|
49
16
|
],
|
|
50
17
|
autoSettings: [
|
|
@@ -55,283 +22,6 @@ export const LinkSetting = [
|
|
|
55
22
|
settings: [
|
|
56
23
|
{ type: 'SetTextArea', name: 'params.linkValue', maxLength: 1000 }
|
|
57
24
|
]
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
watch: 'params.linkType',
|
|
61
|
-
value: 'jumpNiffler',
|
|
62
|
-
default: [{ name: 'params.linkValue', value: '' }, ...defaultData],
|
|
63
|
-
settings: [
|
|
64
|
-
{ type: 'SetSelectPage', name: 'params.linkValue', label: '选择页面' }
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
// 端外新增跳转魔方页面事件
|
|
68
|
-
{
|
|
69
|
-
watch: 'params.linkType',
|
|
70
|
-
value: 'jumpNifflerOut',
|
|
71
|
-
default: [{ name: 'params.linkValue', value: '' }, { name: 'params.collectData', value: '' }, { name: 'params.compKey', value: '' }, ...defaultData],
|
|
72
|
-
settings: [
|
|
73
|
-
{ type: 'SetSelectPage', name: 'params.linkValue', label: '选择页面' },
|
|
74
|
-
{
|
|
75
|
-
type: 'SetInput',
|
|
76
|
-
label: '数据收集',
|
|
77
|
-
name: 'params.collectData',
|
|
78
|
-
maxLength: 10,
|
|
79
|
-
placeholder: '请输入想要收集的数据'
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
type: 'SetText',
|
|
83
|
-
label: '组件属性',
|
|
84
|
-
name: 'params.compKey',
|
|
85
|
-
padding: '1px 0px 0px 0',
|
|
86
|
-
randomVal: true // 随机字符串默认值
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
watch: 'params.linkType',
|
|
92
|
-
value: 'jumpSpecialPayment',
|
|
93
|
-
default: [{ name: 'params.linkValue', value: '' }, ...defaultData],
|
|
94
|
-
settings: [
|
|
95
|
-
{
|
|
96
|
-
type: 'SetText',
|
|
97
|
-
placeholder: '在端外,本页面不支持选择、使用优惠券',
|
|
98
|
-
text: '在端外,本页面不支持选择、使用优惠券',
|
|
99
|
-
style: 'color: #5392ff',
|
|
100
|
-
margin: '0px'
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
type: 'SetQueryInput',
|
|
104
|
-
buttonText: '确定',
|
|
105
|
-
api: '/cubemis/port/getskuinfo',
|
|
106
|
-
method: 'get',
|
|
107
|
-
defaultParams: { skuIds: [] },
|
|
108
|
-
paramsOptions: [
|
|
109
|
-
{
|
|
110
|
-
name: 'skuData.0.skuId',
|
|
111
|
-
paramsKey: 'skuIds.0',
|
|
112
|
-
maxLength: 100,
|
|
113
|
-
placeholder: '请输入商品id',
|
|
114
|
-
toast: '当前ID为空',
|
|
115
|
-
limitType: 'number'
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
componentType: 'SetSelect',
|
|
119
|
-
name: 'skuData.0.saleChannel',
|
|
120
|
-
paramsKey: 'saleChannel',
|
|
121
|
-
placeholder: '请输入渠道id',
|
|
122
|
-
toast: '请检查渠道id是否正确',
|
|
123
|
-
options: saleChannelConfig,
|
|
124
|
-
defaultValue: 99
|
|
125
|
-
}
|
|
126
|
-
],
|
|
127
|
-
responseOptions: [
|
|
128
|
-
{
|
|
129
|
-
name: 'extend.text',
|
|
130
|
-
key: 'skuList.0.skuName'
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
name: 'params.linkValue.ncid',
|
|
134
|
-
key: 'skuList.0.ncid'
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
name: 'skuData.0.skuId',
|
|
138
|
-
key: 'skuList.0.skuId'
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
responseErrorChecks: [
|
|
142
|
-
{
|
|
143
|
-
name: 'invalidSkuId.length',
|
|
144
|
-
value: 1,
|
|
145
|
-
toast: '请检查商品ID是否正确且可售卖'
|
|
146
|
-
}
|
|
147
|
-
]
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
type: 'SetText',
|
|
151
|
-
placeholder: '自动获取商品名称',
|
|
152
|
-
name: 'extend.text',
|
|
153
|
-
hasBorder: true,
|
|
154
|
-
margin: '0px 16px 16px 16px'
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
label: '订单类型',
|
|
158
|
-
type: 'SetRadio',
|
|
159
|
-
name: 'params.linkValue.addressPostposition',
|
|
160
|
-
value: 0,
|
|
161
|
-
padding: '24px 16px 8px 16px',
|
|
162
|
-
columnMargin: 18,
|
|
163
|
-
options: [
|
|
164
|
-
{ label: '三合一地址前置', value: 0 },
|
|
165
|
-
{ label: '三合一地址后置', value: 1 }
|
|
166
|
-
],
|
|
167
|
-
column: 2,
|
|
168
|
-
autoSettings: [
|
|
169
|
-
{
|
|
170
|
-
watch: 'params.linkValue.addressPostposition',
|
|
171
|
-
value: 1,
|
|
172
|
-
default: [{ name: 'refund', value: 0 }],
|
|
173
|
-
settings: [
|
|
174
|
-
{
|
|
175
|
-
type: 'SetRadio',
|
|
176
|
-
name: 'params.linkValue.refund',
|
|
177
|
-
label: '是否进行空白地址自动退款',
|
|
178
|
-
options: [
|
|
179
|
-
{ label: '不可退款', value: 0 },
|
|
180
|
-
{ label: '支持退款', value: 1 }
|
|
181
|
-
],
|
|
182
|
-
column: 3
|
|
183
|
-
}
|
|
184
|
-
]
|
|
185
|
-
}
|
|
186
|
-
]
|
|
187
|
-
}
|
|
188
|
-
]
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
watch: 'params.linkType',
|
|
192
|
-
value: 'jumpSpecialPaymentOutApp',
|
|
193
|
-
default: [{ name: 'params.linkValue', value: '' }, { name: 'params.linkValue.addressPostposition', value: 1 }, ...defaultData],
|
|
194
|
-
settings: [
|
|
195
|
-
{
|
|
196
|
-
label: '订单类型',
|
|
197
|
-
type: 'SetRadio',
|
|
198
|
-
name: 'params.linkValue.addressPostposition',
|
|
199
|
-
value: 0,
|
|
200
|
-
padding: '24px 16px 8px 16px',
|
|
201
|
-
columnMargin: 18,
|
|
202
|
-
options: [
|
|
203
|
-
{ label: '三合一地址前置', value: 0 },
|
|
204
|
-
{ label: '三合一地址后置', value: 1 }
|
|
205
|
-
],
|
|
206
|
-
column: 2,
|
|
207
|
-
autoSettings: [
|
|
208
|
-
{
|
|
209
|
-
watch: 'params.linkValue.addressPostposition',
|
|
210
|
-
value: 1,
|
|
211
|
-
default: [{ name: 'params.linkValue.orderPage', value: { pageId: '', groupId: '' } }],
|
|
212
|
-
settings: [
|
|
213
|
-
{
|
|
214
|
-
type: 'SetSelectPageSetting',
|
|
215
|
-
label: '订单页',
|
|
216
|
-
name: 'params.linkValue.orderPage',
|
|
217
|
-
padding: '24px 16px 8px 16px'
|
|
218
|
-
}
|
|
219
|
-
]
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
watch: 'params.linkValue.addressPostposition',
|
|
223
|
-
value: 0,
|
|
224
|
-
default: [{ name: 'params.linkValue.successPage', value: { pageId: '', groupId: '' } }],
|
|
225
|
-
settings: [
|
|
226
|
-
{
|
|
227
|
-
type: 'SetSelectPageSetting',
|
|
228
|
-
label: '成功页',
|
|
229
|
-
name: 'params.linkValue.successPage',
|
|
230
|
-
padding: '24px 16px 8px 16px'
|
|
231
|
-
}
|
|
232
|
-
]
|
|
233
|
-
}
|
|
234
|
-
]
|
|
235
|
-
}
|
|
236
|
-
]
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
watch: 'params.linkType',
|
|
240
|
-
value: 'jumpSpecialPaymentCS',
|
|
241
|
-
default: [{ name: 'params.linkValue.mustAddress', value: 1 }, { name: 'params.linkValue.successPage', value: '' }, ...defaultData],
|
|
242
|
-
settings: [
|
|
243
|
-
{
|
|
244
|
-
label: '地址是否必填',
|
|
245
|
-
type: 'SetRadio',
|
|
246
|
-
name: 'params.linkValue.mustAddress',
|
|
247
|
-
value: 1,
|
|
248
|
-
isRadio: true,
|
|
249
|
-
allCheck: false,
|
|
250
|
-
column: 1,
|
|
251
|
-
columnMargin: 16,
|
|
252
|
-
options: [
|
|
253
|
-
{
|
|
254
|
-
label: '必填',
|
|
255
|
-
value: 1
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
label: '仅实物填写',
|
|
259
|
-
value: 2
|
|
260
|
-
}
|
|
261
|
-
]
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
type: 'SetSelectPageSetting',
|
|
265
|
-
label: '成功页',
|
|
266
|
-
name: 'params.linkValue.successPage',
|
|
267
|
-
padding: '24px 16px 8px 16px',
|
|
268
|
-
checkConfig: {
|
|
269
|
-
isNeedCheck: true,
|
|
270
|
-
isCheckDefault: false,
|
|
271
|
-
isCheckResult: false,
|
|
272
|
-
errTips: '请选择成功页'
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
]
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
watch: 'params.linkType',
|
|
279
|
-
value: 'jumpSpecialMiniProgramOrder',
|
|
280
|
-
default: [...defaultData],
|
|
281
|
-
settings: [
|
|
282
|
-
]
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
watch: 'params.linkType',
|
|
286
|
-
value: 'jumpWxGroupPage',
|
|
287
|
-
default: [{ name: 'params.linkValue', value: { pageId: '', groupId: '' } }, ...defaultData],
|
|
288
|
-
settings: [
|
|
289
|
-
{
|
|
290
|
-
type: 'SetSelectPageSetting',
|
|
291
|
-
label: '成功页',
|
|
292
|
-
name: 'params.linkValue',
|
|
293
|
-
padding: '24px 16px 8px 16px',
|
|
294
|
-
checkConfig: {
|
|
295
|
-
isNeedCheck: true,
|
|
296
|
-
isCheckDefault: true,
|
|
297
|
-
isCheckResult: false,
|
|
298
|
-
errTips: '请选择成功页'
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
]
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
watch: 'params.linkType',
|
|
305
|
-
value: 'jumpWxGroupPageXcxLink',
|
|
306
|
-
default: [...defaultData],
|
|
307
|
-
settings: [
|
|
308
|
-
{
|
|
309
|
-
type: 'SetTextArea',
|
|
310
|
-
label: '群控小程序外链',
|
|
311
|
-
name: 'params.linkValue.url',
|
|
312
|
-
maxLength: 1000,
|
|
313
|
-
placeholder: '请输入小程序外链'
|
|
314
|
-
}
|
|
315
|
-
]
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
watch: 'params.linkType',
|
|
319
|
-
value: 'jumpWxXcxOder',
|
|
320
|
-
default: [{ name: 'params.linkValue.successPage', value: '' }, ...defaultData],
|
|
321
|
-
settings: [
|
|
322
|
-
{
|
|
323
|
-
type: 'SetSelectPageSetting',
|
|
324
|
-
label: '成功页',
|
|
325
|
-
name: 'params.linkValue.successPage',
|
|
326
|
-
padding: '24px 16px 8px 16px',
|
|
327
|
-
checkConfig: {
|
|
328
|
-
isNeedCheck: true,
|
|
329
|
-
isCheckDefault: false,
|
|
330
|
-
isCheckResult: false,
|
|
331
|
-
errTips: '请选择成功页'
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
]
|
|
335
25
|
}
|
|
336
26
|
]
|
|
337
27
|
}
|
package/common/index.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import Service from './service'
|
|
3
2
|
import Registers from './actions'
|
|
4
|
-
import Settings from './settings'
|
|
5
3
|
export * from '../lib/bus'
|
|
6
4
|
export * from './actions'
|
|
7
5
|
|
|
8
6
|
export default {
|
|
9
|
-
|
|
10
|
-
registers: Registers,
|
|
11
|
-
settings: Settings
|
|
7
|
+
registers: Registers
|
|
12
8
|
}
|
package/lib/cdnUrl.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { environment } from './utils/environment'
|
|
3
|
-
import { API_HOSTS } from './utils/domain-config'
|
|
4
|
-
|
|
5
|
-
let cdnUrl = location.origin
|
|
6
|
-
if (environment.isOnline()) {
|
|
7
|
-
cdnUrl = `https://${API_HOSTS.passport.fnjz}`
|
|
8
|
-
}
|
|
1
|
+
const cdnUrl = location.origin
|
|
9
2
|
|
|
10
3
|
export default cdnUrl
|
package/lib/httpdns-request.ts
CHANGED
|
@@ -1,69 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
//
|
|
2
|
+
// 微信分享等C端请求
|
|
3
3
|
import Axios from 'axios'
|
|
4
|
-
import { environment } from './utils'
|
|
5
|
-
import urlExt from './zyb-yike-utils/urlExt'
|
|
6
|
-
import { domain, passportDomain, wxstDomain } from '../common/service'
|
|
7
|
-
import { DOCKER_TEMPLATES } from './utils/domain-config'
|
|
8
4
|
|
|
9
5
|
export const service = Axios.create({
|
|
10
|
-
baseURL: (window as any).TF_DOMAIN,
|
|
11
|
-
withCredentials: true
|
|
6
|
+
baseURL: (window as any).TF_DOMAIN || '',
|
|
7
|
+
withCredentials: true
|
|
12
8
|
})
|
|
13
9
|
|
|
14
|
-
// 添加请求拦截器
|
|
15
|
-
service.interceptors.request.use(
|
|
16
|
-
(config: any) => {
|
|
17
|
-
if (environment.isOnline()) {
|
|
18
|
-
if (config.ignoreBaseURL === true) {
|
|
19
|
-
config.baseURL = ''
|
|
20
|
-
config.withCredentials = false
|
|
21
|
-
} else {
|
|
22
|
-
if (config.url.indexOf('/qudao') === 0) {
|
|
23
|
-
config.baseURL = (window as any).TF_DOMAIN
|
|
24
|
-
config.withCredentials = true
|
|
25
|
-
}
|
|
26
|
-
if (config.url.indexOf('/wxserver') === 0) {
|
|
27
|
-
config.baseURL = window.location.protocol + `//${wxstDomain}`
|
|
28
|
-
config.withCredentials = false
|
|
29
|
-
}
|
|
30
|
-
if (config.url.indexOf('/session') === 0) {
|
|
31
|
-
config.baseURL = window.location.protocol + `//${passportDomain}`
|
|
32
|
-
config.withCredentials = true
|
|
33
|
-
}
|
|
34
|
-
if (config.url.indexOf('/go-toufang') === 0) {
|
|
35
|
-
config.baseURL = domain
|
|
36
|
-
config.withCredentials = true
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return config
|
|
40
|
-
} else {
|
|
41
|
-
var accessPath = ['qudao', 'payui']
|
|
42
|
-
var devName = urlExt.getQuery('devName')
|
|
43
|
-
var shipName = window.location.host.split('.')[0].split('-')[1] || devName || 'lidingkang'
|
|
44
|
-
if (window.location.host.indexOf('localhost') !== -1) {
|
|
45
|
-
shipName = devName || 'lidingkang'
|
|
46
|
-
}
|
|
47
|
-
var p = window.location.hostname.split('.')[2] || 'cc'
|
|
48
|
-
var dockerTestDomain = `https://${DOCKER_TEMPLATES.c3tf.replace('{shipName}', shipName).replace('{suffix}', p)}`
|
|
49
|
-
var dockerTestPayDomain = `https://${DOCKER_TEMPLATES.c3sell.replace('{shipName}', shipName).replace('{suffix}', p)}`
|
|
50
|
-
for (var i = 0, l = accessPath.length; i < l; i++) {
|
|
51
|
-
var serverName = config.url.split('/')[1]
|
|
52
|
-
if (serverName.indexOf(accessPath[i]) === 0) {
|
|
53
|
-
if (accessPath[i] === 'payui') {
|
|
54
|
-
config.baseURL = dockerTestPayDomain
|
|
55
|
-
} else {
|
|
56
|
-
config.baseURL = dockerTestDomain
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
if (config.url.indexOf('/go-toufang') === 0) {
|
|
61
|
-
config.baseURL = domain
|
|
62
|
-
config.withCredentials = true
|
|
63
|
-
}
|
|
64
|
-
return config
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
|
|
69
10
|
export default service
|