@uxda/appkit 4.3.19 → 4.3.21

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/dist/appkit.css CHANGED
@@ -239,8 +239,14 @@
239
239
  flex-grow: 1;
240
240
  }
241
241
  .recharge-view .amount-footer {
242
+ position: fixed;
243
+ bottom: 0;
244
+ left: 0;
245
+ width: 100%;
246
+ background-color: #fff;
242
247
  padding: 10px;
243
248
  padding-bottom: 20px;
249
+ z-index: 10;
244
250
  }
245
251
  .recharge-view .amount-footer .agreement {
246
252
  font-size: 12px;
@@ -424,6 +430,12 @@
424
430
  }
425
431
  .recharge-view2 .amount-footer {
426
432
  padding: 10px 0;
433
+ position: fixed;
434
+ bottom: 0;
435
+ left: 0;
436
+ width: 100%;
437
+ z-index: 10;
438
+ background-color: #fff;
427
439
  }
428
440
  .recharge-view2 .amount-footer .agreement {
429
441
  font-size: 12px;
package/dist/index.js CHANGED
@@ -452,7 +452,8 @@ const defaultLogOptions = {
452
452
  projectName: "ddyk-dev",
453
453
  logStore: "ddjf-internet-web",
454
454
  topic: "appkit",
455
- enable: true
455
+ enable: true,
456
+ enableDebug: false
456
457
  };
457
458
  function generateUniqueId(pre) {
458
459
  return `${pre ? pre + "-" : ""}${Date.now().toString(16)}-${Math.random().toString(36).substr(2)}`;
@@ -481,6 +482,7 @@ function useLogger(options) {
481
482
  const baseUrl = `https://${projectName}.cn-shenzhen.log.aliyuncs.com/logstores/${logStore}/track?APIVersion=${APIVersion}`;
482
483
  const alislsURL = topic ? `${baseUrl}&__topic__=${topic}` : baseUrl;
483
484
  const enable = options.enable === void 0 ? true : options.enable;
485
+ const enableDebug = options.enableDebug === void 0 ? false : options.enableDebug;
484
486
  const { miniProgram } = Taro.getEnv() === "WEAPP" ? Taro.getAccountInfoSync() : { miniProgram: { version: "" } };
485
487
  const systemInfo = JSON.stringify({
486
488
  ...getSystemInfoSync(),
@@ -522,7 +524,9 @@ function useLogger(options) {
522
524
  current: `${currentPage?.route}?${qs.stringify(taroParams)}`,
523
525
  last: lastPage ? `${lastPage?.route}?${qs.stringify(laseTaroParams)}` : ""
524
526
  }).slice(0, 1024);
525
- console.log(params);
527
+ if (enableDebug) {
528
+ console.log(params);
529
+ }
526
530
  const tmpStr = Object.keys(params).map((key) => `${key}=${encodeURIComponent(params[key])}`).join("&");
527
531
  const url2 = `${alislsURL}&${tmpStr}`;
528
532
  request$1({ url: url2 });
@@ -995,7 +999,7 @@ const endpointsList$3 = {
995
999
  path: "/ac-app/account/info/detail/app",
996
1000
  // /app
997
1001
  translate: (data) => ({
998
- appCode: data.app
1002
+ appCode: data.app || ""
999
1003
  }),
1000
1004
  transform(result) {
1001
1005
  return {
@@ -3905,10 +3909,13 @@ const _hoisted_6$9 = {
3905
3909
  key: 1,
3906
3910
  class: "amount"
3907
3911
  };
3908
- const _hoisted_7$6 = { class: "amount" };
3912
+ const _hoisted_7$6 = {
3913
+ key: 0,
3914
+ class: "amount"
3915
+ };
3909
3916
  const _hoisted_8$5 = ["src"];
3910
3917
  const _hoisted_9$4 = {
3911
- key: 0,
3918
+ key: 1,
3912
3919
  class: "balance-warning"
3913
3920
  };
3914
3921
  const _hoisted_10$3 = {
@@ -4105,14 +4112,14 @@ var script$A = /* @__PURE__ */ defineComponent({
4105
4112
  }
4106
4113
  }
4107
4114
  const onPayClick = async () => {
4115
+ if (isCombinedPayment.value || selectBean.value) {
4116
+ const res = await checkBalance();
4117
+ if (!res) return;
4118
+ }
4108
4119
  if (selectBean.value && !isCombinedPayment.value) {
4109
4120
  showDialog.value = true;
4110
4121
  return;
4111
4122
  }
4112
- if (isCombinedPayment.value) {
4113
- const res = await checkBalance();
4114
- if (!res) return;
4115
- }
4116
4123
  proceedWechatPayment();
4117
4124
  };
4118
4125
  async function checkBalance() {
@@ -4196,22 +4203,23 @@ var script$A = /* @__PURE__ */ defineComponent({
4196
4203
  /* TEXT */
4197
4204
  ))
4198
4205
  ]),
4199
- createElementVNode("div", {
4206
+ balance.value > 0 ? (openBlock(), createElementBlock("div", {
4207
+ key: 0,
4200
4208
  class: "right",
4201
4209
  onClick: _cache[0] || (_cache[0] = ($event) => selectBean.value = !selectBean.value)
4202
4210
  }, [
4203
- createElementVNode(
4211
+ !isCombinedPayment.value ? (openBlock(), createElementBlock(
4204
4212
  "div",
4205
4213
  _hoisted_7$6,
4206
4214
  " -" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
4207
4215
  1
4208
4216
  /* TEXT */
4209
- ),
4217
+ )) : createCommentVNode("v-if", true),
4210
4218
  createElementVNode("img", {
4211
4219
  class: "icon",
4212
4220
  src: selectBean.value ? "https://cdn.ddjf.com/static/images/appkit/select.svg" : "https://cdn.ddjf.com/static/images/appkit/not-select.svg"
4213
4221
  }, null, 8, _hoisted_8$5)
4214
- ]),
4222
+ ])) : createCommentVNode("v-if", true),
4215
4223
  isCombinedPayment.value ? (openBlock(), createElementBlock(
4216
4224
  "div",
4217
4225
  _hoisted_9$4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.3.19",
3
+ "version": "4.3.21",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -52,7 +52,7 @@ const endpointsList: HttpEndpoints = {
52
52
  获取余额明细: {
53
53
  path: '/ac-app/account/info/detail/app', // /app
54
54
  translate: (data: OnlyApp) => ({
55
- appCode: data.app,
55
+ appCode: data.app || '',
56
56
  }),
57
57
  transform(result: any) {
58
58
  return {
@@ -191,8 +191,14 @@ defineExpose({
191
191
  }
192
192
 
193
193
  .amount-footer {
194
+ position: fixed;
195
+ bottom: 0;
196
+ left: 0;
197
+ width: 100%;
198
+ background-color: #fff;
194
199
  padding: 10px;
195
200
  padding-bottom: 20px;
201
+ z-index: 10;
196
202
 
197
203
  .agreement {
198
204
  font-size: 12px;
@@ -17,8 +17,8 @@
17
17
  {{ formatAmount(balance - amounts[state.selected].paymentAmount) }}
18
18
  </div>
19
19
  </div>
20
- <div class="right" @click="selectBean = !selectBean">
21
- <div class="amount">
20
+ <div v-if="balance > 0" class="right" @click="selectBean = !selectBean">
21
+ <div class="amount" v-if="!isCombinedPayment">
22
22
  -{{ formatAmount(amounts[state.selected].paymentAmount || 0) }}
23
23
  </div>
24
24
  <img
@@ -360,18 +360,18 @@ function getChannelCode() {
360
360
  }
361
361
 
362
362
  const onPayClick = async () => {
363
+ // 云豆支付与组合支付检验云豆是否已经改变,改变则刷新选择
364
+ if (isCombinedPayment.value || selectBean.value) {
365
+ const res = await checkBalance()
366
+ if (!res) return
367
+ }
368
+
363
369
  // 用云豆支付(纯云豆支付)
364
370
  if (selectBean.value && !isCombinedPayment.value) {
365
371
  showDialog.value = true;
366
372
  return;
367
373
  }
368
374
 
369
- if (isCombinedPayment.value) {
370
- // 检验云豆是否已经改变,改变则刷新选择
371
- const res = await checkBalance()
372
- if (!res) return
373
- }
374
-
375
375
  // 纯微信支付
376
376
  proceedWechatPayment();
377
377
  }
@@ -512,6 +512,12 @@ defineExpose({
512
512
 
513
513
  .amount-footer {
514
514
  padding: 10px 0;
515
+ position: fixed;
516
+ bottom: 0;
517
+ left: 0;
518
+ width: 100%;
519
+ z-index: 10;
520
+ background-color: #fff;
515
521
 
516
522
  .agreement {
517
523
  font-size: 12px;
@@ -15,6 +15,7 @@ interface LogType {
15
15
  alislsURL?: string
16
16
  systemInfo?: string
17
17
  enable?: boolean
18
+ enableDebug?: boolean
18
19
  }
19
20
 
20
21
  const defaultLogOptions: LogType = {
@@ -22,6 +23,7 @@ const defaultLogOptions: LogType = {
22
23
  logStore: 'ddjf-internet-web',
23
24
  topic: 'appkit',
24
25
  enable: true,
26
+ enableDebug: false,
25
27
  }
26
28
 
27
29
  // 使用时间戳生成唯一标识
@@ -56,6 +58,7 @@ export function useLogger(options?: LogType) {
56
58
  const baseUrl = `https://${projectName}.cn-shenzhen.log.aliyuncs.com/logstores/${logStore}/track?APIVersion=${APIVersion}`
57
59
  const alislsURL = topic ? `${baseUrl}&__topic__=${topic}` : baseUrl
58
60
  const enable = options.enable === undefined ? true : options.enable
61
+ const enableDebug = options.enableDebug === undefined ? false : options.enableDebug
59
62
 
60
63
  const { miniProgram } =
61
64
  Taro.getEnv() === 'WEAPP' ? Taro.getAccountInfoSync() : { miniProgram: { version: '' } }
@@ -107,7 +110,9 @@ export function useLogger(options?: LogType) {
107
110
  : '',
108
111
  }).slice(0, 1024)
109
112
 
110
- console.log(params)
113
+ if (enableDebug) {
114
+ console.log(params)
115
+ }
111
116
 
112
117
  const tmpStr = Object.keys(params)
113
118
  .map((key) => `${key}=${encodeURIComponent(params[key])}`)