@uxda/appkit 1.2.22 → 1.2.26

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/index.js CHANGED
@@ -684,11 +684,19 @@ const _hoisted_3$b = /* @__PURE__ */ createElementVNode(
684
684
  -1
685
685
  /* HOISTED */
686
686
  );
687
- const _hoisted_4$9 = { class: "caption" };
687
+ const _hoisted_4$9 = {
688
+ key: 0,
689
+ class: "caption"
690
+ };
691
+ const _hoisted_5$7 = {
692
+ key: 1,
693
+ class: "caption"
694
+ };
688
695
  var script$f = /* @__PURE__ */ defineComponent({
689
696
  __name: "RechargeResult",
690
697
  props: {
691
- type: { type: String, required: true, default: "recharge" }
698
+ type: { type: String, required: true, default: "recharge" },
699
+ payMethod: { type: String, required: true, default: "" }
692
700
  },
693
701
  emits: ["dismiss"],
694
702
  setup(__props, { emit: __emit }) {
@@ -712,13 +720,13 @@ var script$f = /* @__PURE__ */ defineComponent({
712
720
  1
713
721
  /* TEXT */
714
722
  ),
715
- createElementVNode(
723
+ _ctx.payMethod == "bean" ? (openBlock(), createElementBlock("div", _hoisted_4$9, "\u6743\u76CA\u5DF2\u5230\u8D26")) : (openBlock(), createElementBlock(
716
724
  "div",
717
- _hoisted_4$9,
725
+ _hoisted_5$7,
718
726
  toDisplayString(views[_ctx.type][1]) + "\u5C06\u57281\u5206\u949F\u4E4B\u5185\u5230\u8D26",
719
727
  1
720
728
  /* TEXT */
721
- ),
729
+ )),
722
730
  createVNode(_component_nut_button, {
723
731
  class: "back-button",
724
732
  type: "default",
@@ -903,7 +911,7 @@ var script$d = /* @__PURE__ */ defineComponent({
903
911
  $http.post(`/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response) => {
904
912
  if (response) {
905
913
  showDialog.value = false;
906
- emit("complete", response);
914
+ emit("complete", { result: response, type: "bean" });
907
915
  } else {
908
916
  Taro.showToast({
909
917
  title: response.message,
@@ -938,7 +946,7 @@ var script$d = /* @__PURE__ */ defineComponent({
938
946
  }).then((result) => {
939
947
  state.buttonLoading = false;
940
948
  if (result) {
941
- emit("complete", true);
949
+ emit("complete", { result: true, type: "wePay" });
942
950
  }
943
951
  });
944
952
  }
@@ -967,7 +975,7 @@ var script$d = /* @__PURE__ */ defineComponent({
967
975
  )) : (openBlock(), createElementBlock(
968
976
  "div",
969
977
  _hoisted_7$4,
970
- "\u6263\u51CF\u540E\u4F59\u989D " + toDisplayString(balance.value - amounts.value[state.selected].paymentAmount),
978
+ "\u6263\u51CF\u540E\u4F59\u989D " + toDisplayString((balance.value - amounts.value[state.selected].paymentAmount).toFixed(1)),
971
979
  1
972
980
  /* TEXT */
973
981
  ))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "1.2.22",
3
+ "version": "1.2.26",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -76,7 +76,7 @@ const endpointsList: HttpEndpoints = {
76
76
  }
77
77
  },
78
78
  获取增值权益类目: {
79
- path: "/payment/paymentCaseConfig/getBalanceAndRiskQueryPriceConfig",
79
+ path: '/payment/paymentCaseConfig/getBalanceAndRiskQueryPriceConfig',
80
80
  transform: (data: any) => data
81
81
  },
82
82
  } as const
@@ -3,7 +3,8 @@
3
3
  <div class="content">
4
4
  <div class="figure"></div>
5
5
  <h2>{{views[type][0]}}成功</h2>
6
- <div class="caption">{{views[type][1]}}将在1分钟之内到账</div>
6
+ <div class="caption" v-if="payMethod == 'bean'">权益已到账</div>
7
+ <div class="caption" v-else>{{views[type][1]}}将在1分钟之内到账</div>
7
8
  <nut-button class="back-button" type="default" @click="onBackClick">返回</nut-button>
8
9
  </div>
9
10
  </div>
@@ -14,9 +15,11 @@ const emit = defineEmits(['dismiss'])
14
15
 
15
16
  type viewProps = {
16
17
  type: string;
18
+ payMethod: string // bean: 云豆支付 wePay: 微信支付
17
19
  };
18
20
  const props = withDefaults(defineProps<viewProps>(), {
19
21
  type: "recharge",
22
+ payMethod: ''
20
23
  });
21
24
 
22
25
  const views = {
@@ -8,7 +8,7 @@
8
8
  <div class="left">
9
9
  <div class="title">使用云豆支付</div>
10
10
  <div class="amount" v-if="!selectBean">余额 {{balance}}</div>
11
- <div class="amount" v-else>扣减后余额 {{balance - amounts[state.selected].paymentAmount}}</div>
11
+ <div class="amount" v-else>扣减后余额 {{(balance - amounts[state.selected].paymentAmount).toFixed(1)}}</div>
12
12
  </div>
13
13
  <div class="right" v-if="balance >= amounts[state.selected].paymentAmount" @click="selectBean = !selectBean">
14
14
  <div class="amount">-{{ amounts[state.selected].paymentAmount }}</div>
@@ -44,7 +44,7 @@
44
44
  <template v-if="amounts[state.selected]">
45
45
  <div class="item">云豆扣减:{{ amounts[state.selected].paymentAmount }}</div>
46
46
  <div class="item">权益增加:{{ amounts[state.selected].priceRightNum }}笔</div>
47
- <div class="item">扣减后云豆余额:{{ balance - amounts[state.selected].paymentAmount }}</div>
47
+ <div class="item">扣减后云豆余额:{{ (balance - amounts[state.selected].paymentAmount).toFixed(1) }}</div>
48
48
  </template>
49
49
  </nut-dialog>
50
50
  </view>
@@ -81,7 +81,7 @@ export interface RechargeViewProps {
81
81
  const props = defineProps<RechargeViewProps>()
82
82
 
83
83
  const emit = defineEmits<{
84
- (event: 'complete', value: boolean): void
84
+ (event: 'complete', value: {result: boolean, type: string}): void
85
85
  }>()
86
86
 
87
87
  const state = reactive({
@@ -124,7 +124,7 @@ async function beanPay(){
124
124
  $http.post( `/payment/paymentCaseConfig/purchase/${amounts.value[state.selected].id}`).then((response: any) => {
125
125
  if (response) {
126
126
  showDialog.value = false
127
- emit('complete', response)
127
+ emit('complete', {result: response, type: 'bean'})
128
128
  }else {
129
129
  Taro.showToast({
130
130
  title: response.message,
@@ -162,7 +162,7 @@ const onPayClick = () => {
162
162
  }).then(result => {
163
163
  state.buttonLoading = false
164
164
  if (result) {
165
- emit('complete', true)
165
+ emit('complete', {result: true, type: 'wePay'})
166
166
  }
167
167
  })
168
168
  }