@uxda/appkit 4.1.12 → 4.1.16

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
@@ -1406,6 +1406,7 @@ page {
1406
1406
  align-items: center;
1407
1407
  justify-content: center;
1408
1408
  border-radius: 15px;
1409
+ z-index: 10;
1409
1410
  }
1410
1411
  .notice-banner {
1411
1412
  background: #e6f2ff;
package/dist/index.js CHANGED
@@ -4,8 +4,8 @@ import '@nutui/nutui-taro/dist/packages/checkbox/style/css';
4
4
  import { defineComponent, reactive, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createTextVNode, ref, computed, onUnmounted, createCommentVNode, renderSlot, createVNode, unref, isRef, normalizeStyle, onMounted, createStaticVNode, watch, resolveComponent, withDirectives, vShow, useModel, mergeModels, vModelText, watchPostEffect, withModifiers } from 'vue';
5
5
  import '@nutui/nutui-taro/dist/packages/grid/style/css';
6
6
  import '@nutui/nutui-taro/dist/packages/griditem/style/css';
7
- import '@nutui/nutui-taro/dist/packages/popup/style/css';
8
7
  import Taro, { useDidShow, useRouter } from '@tarojs/taro';
8
+ import '@nutui/nutui-taro/dist/packages/popup/style/css';
9
9
  import { isIdentityCard, isMobilePhone } from 'validator';
10
10
  import { NsForm, NsInput, NsButton, NsIcon, useNutshell } from '@uxda/nutshell/taro';
11
11
  import debounce from 'lodash/debounce';
@@ -1380,7 +1380,7 @@ var script$A = /* @__PURE__ */ defineComponent({
1380
1380
  app: { type: String, required: true },
1381
1381
  tenant: { type: String, required: true }
1382
1382
  },
1383
- emits: ["complete"],
1383
+ emits: ["complete", "agree"],
1384
1384
  setup(__props, { emit: __emit }) {
1385
1385
  const props = __props;
1386
1386
  const emit = __emit;
@@ -1391,8 +1391,10 @@ var script$A = /* @__PURE__ */ defineComponent({
1391
1391
  buttonLoading: false
1392
1392
  });
1393
1393
  const amounts = ref([]);
1394
- const onAgreementLinkClick = ($event) => {
1395
- state.agreementOpen = true;
1394
+ const onAgreementLinkClick = (e) => {
1395
+ e.preventDefault();
1396
+ e.stopImmediatePropagation();
1397
+ emit("agree");
1396
1398
  };
1397
1399
  const onAmountSelect = (selected) => {
1398
1400
  state.selected = selected;
@@ -1452,7 +1454,7 @@ var script$A = /* @__PURE__ */ defineComponent({
1452
1454
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.agreed = $event)
1453
1455
  }, {
1454
1456
  default: withCtx(() => [
1455
- _cache[2] || (_cache[2] = createTextVNode("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")),
1457
+ _cache[1] || (_cache[1] = createTextVNode("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")),
1456
1458
  createElementVNode("a", {
1457
1459
  class: "link inline",
1458
1460
  onClick: onAgreementLinkClick
@@ -1469,18 +1471,13 @@ var script$A = /* @__PURE__ */ defineComponent({
1469
1471
  onClick: onPayClick,
1470
1472
  class: "recharge-button"
1471
1473
  }, {
1472
- default: withCtx(() => _cache[3] || (_cache[3] = [
1474
+ default: withCtx(() => _cache[2] || (_cache[2] = [
1473
1475
  createTextVNode("\u7ACB\u5373\u5145\u503C")
1474
1476
  ])),
1475
1477
  _: 1
1476
1478
  /* STABLE */
1477
1479
  }, 8, ["loading"])
1478
- ]),
1479
- createVNode(unref(script$G), {
1480
- modelValue: state.agreementOpen,
1481
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.agreementOpen = $event),
1482
- title: "\u5145\u503C\u534F\u8BAE"
1483
- }, null, 8, ["modelValue"])
1480
+ ])
1484
1481
  ]);
1485
1482
  };
1486
1483
  }
@@ -1685,21 +1682,23 @@ var script$w = /* @__PURE__ */ defineComponent({
1685
1682
  app: { type: String, required: true },
1686
1683
  tenant: { type: String, required: true }
1687
1684
  },
1688
- emits: ["complete"],
1685
+ emits: ["complete", "agree"],
1689
1686
  setup(__props, { emit: __emit }) {
1690
1687
  const props = __props;
1691
1688
  const emit = __emit;
1692
1689
  const state = reactive({
1693
1690
  agreed: false,
1694
1691
  selected: 0,
1695
- agreementOpen: false,
1692
+ // agreementOpen: false,
1696
1693
  buttonLoading: false
1697
1694
  });
1698
1695
  const balance = ref(0);
1699
1696
  const amounts = ref([]);
1700
1697
  const selectBean = ref(false);
1701
- const onAgreementLinkClick = ($event) => {
1702
- state.agreementOpen = true;
1698
+ const onAgreementLinkClick = (e) => {
1699
+ e.preventDefault();
1700
+ e.stopImmediatePropagation();
1701
+ emit("agree");
1703
1702
  };
1704
1703
  const onAmountSelect = (selected) => {
1705
1704
  state.selected = selected;
@@ -1775,7 +1774,7 @@ var script$w = /* @__PURE__ */ defineComponent({
1775
1774
  }, null, 8, ["items", "selected"]),
1776
1775
  amounts.value[state.selected] ? (openBlock(), createElementBlock("div", _hoisted_3$e, [
1777
1776
  createElementVNode("div", _hoisted_4$b, [
1778
- _cache[5] || (_cache[5] = createElementVNode(
1777
+ _cache[4] || (_cache[4] = createElementVNode(
1779
1778
  "div",
1780
1779
  { class: "title" },
1781
1780
  "\u4F7F\u7528\u4E91\u8C46\u652F\u4ED8",
@@ -1822,7 +1821,7 @@ var script$w = /* @__PURE__ */ defineComponent({
1822
1821
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.agreed = $event)
1823
1822
  }, {
1824
1823
  default: withCtx(() => [
1825
- _cache[6] || (_cache[6] = createTextVNode("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")),
1824
+ _cache[5] || (_cache[5] = createTextVNode("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")),
1826
1825
  createElementVNode("a", {
1827
1826
  class: "link inline",
1828
1827
  onClick: onAgreementLinkClick
@@ -1834,9 +1833,9 @@ var script$w = /* @__PURE__ */ defineComponent({
1834
1833
  ])) : createCommentVNode("v-if", true),
1835
1834
  createElementVNode("div", _hoisted_11$2, [
1836
1835
  createElementVNode("div", _hoisted_12$2, [
1837
- _cache[8] || (_cache[8] = createTextVNode(" \u5F85\u652F\u4ED8\uFF1A ")),
1836
+ _cache[7] || (_cache[7] = createTextVNode(" \u5F85\u652F\u4ED8\uFF1A ")),
1838
1837
  createElementVNode("span", _hoisted_13$2, [
1839
- _cache[7] || (_cache[7] = createElementVNode(
1838
+ _cache[6] || (_cache[6] = createElementVNode(
1840
1839
  "i",
1841
1840
  null,
1842
1841
  "\uFFE5",
@@ -1857,7 +1856,7 @@ var script$w = /* @__PURE__ */ defineComponent({
1857
1856
  onClick: onPayClick,
1858
1857
  class: "recharge-button"
1859
1858
  }, {
1860
- default: withCtx(() => _cache[9] || (_cache[9] = [
1859
+ default: withCtx(() => _cache[8] || (_cache[8] = [
1861
1860
  createTextVNode("\u8D2D\u4E70")
1862
1861
  ])),
1863
1862
  _: 1
@@ -1865,23 +1864,12 @@ var script$w = /* @__PURE__ */ defineComponent({
1865
1864
  }, 8, ["loading"])
1866
1865
  ])
1867
1866
  ]),
1868
- createVNode(unref(script$G), {
1869
- modelValue: state.agreementOpen,
1870
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => state.agreementOpen = $event),
1871
- title: "\u5145\u503C\u534F\u8BAE"
1872
- }, {
1873
- default: withCtx(() => [
1874
- createVNode(script$z)
1875
- ]),
1876
- _: 1
1877
- /* STABLE */
1878
- }, 8, ["modelValue"]),
1879
1867
  createVNode(_component_nut_dialog, {
1880
1868
  title: "\u786E\u8BA4\u8D2D\u4E70",
1881
1869
  "custom-class": "trade-dialog",
1882
1870
  visible: showDialog.value,
1883
- "onUpdate:visible": _cache[3] || (_cache[3] = ($event) => showDialog.value = $event),
1884
- onCancel: _cache[4] || (_cache[4] = ($event) => showDialog.value = !showDialog.value),
1871
+ "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => showDialog.value = $event),
1872
+ onCancel: _cache[3] || (_cache[3] = ($event) => showDialog.value = !showDialog.value),
1885
1873
  onOk: beanPay
1886
1874
  }, {
1887
1875
  default: withCtx(() => [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.1.12",
3
+ "version": "4.1.16",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -155,6 +155,7 @@ const emits = defineEmits(['close', 'view'])
155
155
  align-items: center;
156
156
  justify-content: center;
157
157
  border-radius: 15px;
158
+ z-index: 10;
158
159
  }
159
160
  }
160
161
  }
@@ -15,18 +15,12 @@
15
15
  @click="onPayClick"
16
16
  class="recharge-button">立即充值</nut-button>
17
17
  </view>
18
- <app-drawer
19
- v-model="state.agreementOpen"
20
- title="充值协议">
21
- </app-drawer>
22
18
  </view>
23
19
  </template>
24
20
 
25
21
  <script lang="ts" setup>
26
22
  import { onMounted, reactive, ref } from 'vue'
27
23
  import AmountPicker from './AmountPicker.vue'
28
- import UserAgreement from './UserAgreement.vue'
29
- import { AppDrawer } from '../../shared'
30
24
  import { useHttp, endpoints } from '../api'
31
25
  import { requestPayment } from '../services'
32
26
  import Taro from '@tarojs/taro'
@@ -53,7 +47,8 @@ export interface RechargeViewProps {
53
47
  const props = defineProps<RechargeViewProps>()
54
48
 
55
49
  const emit = defineEmits<{
56
- (event: 'complete', value: boolean): void
50
+ (event: 'complete', value: boolean): void,
51
+ (event: 'agree'): void,
57
52
  }>()
58
53
 
59
54
  const state = reactive({
@@ -65,8 +60,11 @@ const state = reactive({
65
60
 
66
61
  const amounts = ref<any[]>([])
67
62
 
68
- const onAgreementLinkClick = ($event) => {
69
- state.agreementOpen = true
63
+ const onAgreementLinkClick = (e) => {
64
+ e.preventDefault()
65
+ e.stopImmediatePropagation()
66
+ emit('agree')
67
+ // state.agreementOpen = true
70
68
  }
71
69
 
72
70
  const onAmountSelect = (selected: number) => {
@@ -33,13 +33,7 @@
33
33
  @click="onPayClick"
34
34
  class="recharge-button">购买</nut-button>
35
35
  </div>
36
-
37
36
  </view>
38
- <app-drawer
39
- v-model="state.agreementOpen"
40
- title="充值协议">
41
- <user-agreement />
42
- </app-drawer>
43
37
  <nut-dialog title="确认购买" custom-class="trade-dialog" v-model:visible="showDialog" @cancel="showDialog = !showDialog" @ok="beanPay" >
44
38
  <template v-if="amounts[state.selected]">
45
39
  <div class="item">云豆扣减:{{ amounts[state.selected].paymentAmount }}</div>
@@ -53,8 +47,6 @@
53
47
  <script lang="ts" setup>
54
48
  import { computed, onMounted, reactive, ref } from 'vue'
55
49
  import RightsPicker, { Amount } from './RightsPicker.vue'
56
- import UserAgreement from './UserAgreement.vue'
57
- import { AppDrawer } from '../../shared'
58
50
  import { endpoints, useHttp } from '../api'
59
51
  import { requestPaymentByBean } from '../services'
60
52
  import Taro from '@tarojs/taro'
@@ -81,13 +73,14 @@ export interface RechargeViewProps {
81
73
  const props = defineProps<RechargeViewProps>()
82
74
 
83
75
  const emit = defineEmits<{
84
- (event: 'complete', value: {result: boolean, type: string}): void
76
+ (event: 'complete', value: {result: boolean, type: string}): void,
77
+ (event: 'agree'): void,
85
78
  }>()
86
79
 
87
80
  const state = reactive({
88
81
  agreed: false,
89
82
  selected: 0,
90
- agreementOpen: false,
83
+ // agreementOpen: false,
91
84
  buttonLoading: false,
92
85
  })
93
86
 
@@ -96,8 +89,11 @@ const balance = ref<number>(0)
96
89
  const amounts = ref<Amount[]>([])
97
90
  const selectBean = ref<boolean>(false)
98
91
 
99
- const onAgreementLinkClick = ($event) => {
100
- state.agreementOpen = true
92
+ const onAgreementLinkClick = (e) => {
93
+ e.preventDefault()
94
+ e.stopImmediatePropagation()
95
+ emit('agree')
96
+ // state.agreementOpen = true
101
97
  }
102
98
 
103
99
  const onAmountSelect = (selected: number) => {