@uxda/appkit 4.3.21 → 4.3.23
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
|
@@ -557,11 +557,12 @@ function useLogger(options) {
|
|
|
557
557
|
}
|
|
558
558
|
|
|
559
559
|
function useWxAuth() {
|
|
560
|
-
function toWxAuth(source, redirectUri) {
|
|
560
|
+
function toWxAuth(source, redirectUri, authSource = null) {
|
|
561
561
|
const $http = useHttp$2();
|
|
562
562
|
$http.get("/cas/auth/render/", {
|
|
563
563
|
source,
|
|
564
|
-
redirectUri
|
|
564
|
+
redirectUri,
|
|
565
|
+
authSource
|
|
565
566
|
}).then((res) => {
|
|
566
567
|
location.replace(res);
|
|
567
568
|
});
|
|
@@ -1999,7 +2000,7 @@ const request = (config) => {
|
|
|
1999
2000
|
}
|
|
2000
2001
|
if (raw.data !== void 0) {
|
|
2001
2002
|
const response = clientConfig.transforms && clientConfig.transforms[c.url] ? clientConfig.transforms[c.url](raw.data) : raw.data;
|
|
2002
|
-
const paging = config.data && config.data.page ? clientConfig.paging
|
|
2003
|
+
const paging = config.data && config.data.page ? clientConfig.paging?.transform(raw.data) : void 0;
|
|
2003
2004
|
resolve(
|
|
2004
2005
|
paging ? {
|
|
2005
2006
|
paging,
|
|
@@ -3909,13 +3910,10 @@ const _hoisted_6$9 = {
|
|
|
3909
3910
|
key: 1,
|
|
3910
3911
|
class: "amount"
|
|
3911
3912
|
};
|
|
3912
|
-
const _hoisted_7$6 = {
|
|
3913
|
-
key: 0,
|
|
3914
|
-
class: "amount"
|
|
3915
|
-
};
|
|
3913
|
+
const _hoisted_7$6 = { class: "amount" };
|
|
3916
3914
|
const _hoisted_8$5 = ["src"];
|
|
3917
3915
|
const _hoisted_9$4 = {
|
|
3918
|
-
key:
|
|
3916
|
+
key: 0,
|
|
3919
3917
|
class: "balance-warning"
|
|
3920
3918
|
};
|
|
3921
3919
|
const _hoisted_10$3 = {
|
|
@@ -4189,7 +4187,7 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4189
4187
|
-1
|
|
4190
4188
|
/* CACHED */
|
|
4191
4189
|
)),
|
|
4192
|
-
!selectBean.value
|
|
4190
|
+
!selectBean.value ? (openBlock(), createElementBlock(
|
|
4193
4191
|
"div",
|
|
4194
4192
|
_hoisted_5$d,
|
|
4195
4193
|
" \u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value || 0)),
|
|
@@ -4198,28 +4196,27 @@ var script$A = /* @__PURE__ */ defineComponent({
|
|
|
4198
4196
|
)) : (openBlock(), createElementBlock(
|
|
4199
4197
|
"div",
|
|
4200
4198
|
_hoisted_6$9,
|
|
4201
|
-
" \u6263\u51CF\u540E\u4F59\u989D " + toDisplayString(unref(formatAmount)(balance.value - amounts.value[state.selected].paymentAmount)),
|
|
4199
|
+
" \u6263\u51CF\u540E\u4F59\u989D " + toDisplayString(balance.value > amounts.value[state.selected].paymentAmount ? unref(formatAmount)(balance.value - amounts.value[state.selected].paymentAmount) : 0),
|
|
4202
4200
|
1
|
|
4203
4201
|
/* TEXT */
|
|
4204
4202
|
))
|
|
4205
4203
|
]),
|
|
4206
|
-
|
|
4207
|
-
key: 0,
|
|
4204
|
+
createElementVNode("div", {
|
|
4208
4205
|
class: "right",
|
|
4209
4206
|
onClick: _cache[0] || (_cache[0] = ($event) => selectBean.value = !selectBean.value)
|
|
4210
4207
|
}, [
|
|
4211
|
-
|
|
4208
|
+
createElementVNode(
|
|
4212
4209
|
"div",
|
|
4213
4210
|
_hoisted_7$6,
|
|
4214
|
-
" -" + toDisplayString(unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
|
|
4211
|
+
" -" + toDisplayString(selectBean.value && balance.value < amounts.value[state.selected].paymentAmount ? balance.value : unref(formatAmount)(amounts.value[state.selected].paymentAmount || 0)),
|
|
4215
4212
|
1
|
|
4216
4213
|
/* TEXT */
|
|
4217
|
-
)
|
|
4214
|
+
),
|
|
4218
4215
|
createElementVNode("img", {
|
|
4219
4216
|
class: "icon",
|
|
4220
4217
|
src: selectBean.value ? "https://cdn.ddjf.com/static/images/appkit/select.svg" : "https://cdn.ddjf.com/static/images/appkit/not-select.svg"
|
|
4221
4218
|
}, null, 8, _hoisted_8$5)
|
|
4222
|
-
])
|
|
4219
|
+
]),
|
|
4223
4220
|
isCombinedPayment.value ? (openBlock(), createElementBlock(
|
|
4224
4221
|
"div",
|
|
4225
4222
|
_hoisted_9$4,
|
package/package.json
CHANGED
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
<div class="bean-buy" v-if="amounts[state.selected]">
|
|
10
10
|
<div class="left">
|
|
11
11
|
<div class="title">使用云豆支付</div>
|
|
12
|
-
<div class="amount" v-if="!selectBean
|
|
12
|
+
<div class="amount" v-if="!selectBean">
|
|
13
13
|
余额 {{ formatAmount(balance || 0) }}
|
|
14
14
|
</div>
|
|
15
15
|
<div class="amount" v-else>
|
|
16
16
|
扣减后余额
|
|
17
|
-
{{ formatAmount(balance - amounts[state.selected].paymentAmount) }}
|
|
17
|
+
{{ balance > amounts[state.selected].paymentAmount ? formatAmount(balance - amounts[state.selected].paymentAmount) : 0 }}
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
|
-
<div
|
|
21
|
-
<div class="amount"
|
|
22
|
-
-{{ formatAmount(amounts[state.selected].paymentAmount || 0) }}
|
|
20
|
+
<div class="right" @click="selectBean = !selectBean">
|
|
21
|
+
<div class="amount" >
|
|
22
|
+
-{{ selectBean && balance < amounts[state.selected].paymentAmount ? balance : formatAmount(amounts[state.selected].paymentAmount || 0) }}
|
|
23
23
|
</div>
|
|
24
24
|
<img
|
|
25
25
|
class="icon"
|
|
@@ -10,12 +10,13 @@ export function useWxAuth() {
|
|
|
10
10
|
* @param source 设备码
|
|
11
11
|
* @param redirectUri 重定向地址
|
|
12
12
|
*/
|
|
13
|
-
function toWxAuth(source, redirectUri) {
|
|
13
|
+
function toWxAuth(source, redirectUri, authSource = null) {
|
|
14
14
|
const $http = useHttp()
|
|
15
15
|
$http
|
|
16
16
|
.get('/cas/auth/render/', {
|
|
17
17
|
source,
|
|
18
18
|
redirectUri,
|
|
19
|
+
authSource
|
|
19
20
|
})
|
|
20
21
|
.then((res: any) => {
|
|
21
22
|
location.replace(res)
|
package/src/shared/http/Http.ts
CHANGED
|
@@ -74,7 +74,7 @@ const request: HttpInstance['request'] = <T>(config: HttpRequestConfig) => {
|
|
|
74
74
|
// 并拼装回原 raw 数据
|
|
75
75
|
const paging =
|
|
76
76
|
config.data && config.data.page
|
|
77
|
-
? (clientConfig.paging as Paging)
|
|
77
|
+
? (clientConfig.paging as Paging)?.transform(raw.data)
|
|
78
78
|
: void 0
|
|
79
79
|
|
|
80
80
|
resolve(
|