@uxda/appkit 1.2.78 → 1.2.80
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/package.json
CHANGED
|
@@ -44,60 +44,61 @@
|
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
46
|
<script setup lang="ts">
|
|
47
|
-
import { ref } from
|
|
48
|
-
import { endpoints, useHttp } from
|
|
49
|
-
import { Balance } from
|
|
50
|
-
import { useDidShow } from
|
|
47
|
+
import { ref } from 'vue'
|
|
48
|
+
import { endpoints, useHttp } from '../api'
|
|
49
|
+
import { Balance } from '../types'
|
|
50
|
+
import { useDidShow } from '@tarojs/taro'
|
|
51
51
|
|
|
52
52
|
type BalanceCardProps = {
|
|
53
|
-
app: string
|
|
54
|
-
}
|
|
53
|
+
app: string
|
|
54
|
+
}
|
|
55
55
|
const props = withDefaults(defineProps<BalanceCardProps>(), {
|
|
56
|
-
app:
|
|
57
|
-
})
|
|
56
|
+
app: '',
|
|
57
|
+
})
|
|
58
58
|
|
|
59
59
|
const balance = ref<Balance>({
|
|
60
60
|
total: 0,
|
|
61
61
|
privileges: [],
|
|
62
|
-
})
|
|
62
|
+
})
|
|
63
63
|
|
|
64
64
|
const gotoRecharge = () => {
|
|
65
|
-
emit(
|
|
66
|
-
}
|
|
65
|
+
emit('recharge')
|
|
66
|
+
}
|
|
67
67
|
|
|
68
68
|
async function loadBalance() {
|
|
69
|
-
const $http = useHttp()
|
|
69
|
+
const $http = useHttp()
|
|
70
70
|
$http
|
|
71
71
|
.get<Balance>(endpoints.获取余额明细, {
|
|
72
72
|
app: props.app,
|
|
73
73
|
})
|
|
74
74
|
.then((data) => {
|
|
75
|
-
balance.value = data
|
|
76
|
-
|
|
75
|
+
// balance.value = data
|
|
76
|
+
balance.value.total = data.total || (data.commonAccount as number)
|
|
77
|
+
})
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
const emit = defineEmits([
|
|
80
81
|
/**
|
|
81
82
|
* 跳账户详情
|
|
82
83
|
*/
|
|
83
|
-
|
|
84
|
+
'drill',
|
|
84
85
|
/**
|
|
85
86
|
* 跳充值页
|
|
86
87
|
*/
|
|
87
|
-
|
|
88
|
-
])
|
|
88
|
+
'recharge',
|
|
89
|
+
])
|
|
89
90
|
|
|
90
91
|
function gotoDetail() {
|
|
91
|
-
emit(
|
|
92
|
+
emit('drill')
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
useDidShow(() => {
|
|
95
|
-
loadBalance()
|
|
96
|
-
})
|
|
96
|
+
loadBalance()
|
|
97
|
+
})
|
|
97
98
|
|
|
98
99
|
defineExpose({
|
|
99
100
|
reload: loadBalance,
|
|
100
|
-
})
|
|
101
|
+
})
|
|
101
102
|
</script>
|
|
102
103
|
|
|
103
104
|
<style lang="scss">
|
|
@@ -179,12 +180,7 @@ defineExpose({
|
|
|
179
180
|
height: 28px;
|
|
180
181
|
line-height: 28px;
|
|
181
182
|
border-radius: 14px;
|
|
182
|
-
background: linear-gradient(
|
|
183
|
-
90deg,
|
|
184
|
-
#ffebc1 0%,
|
|
185
|
-
#ffd7a7 52.29%,
|
|
186
|
-
#ffb875 100%
|
|
187
|
-
);
|
|
183
|
+
background: linear-gradient(90deg, #ffebc1 0%, #ffd7a7 52.29%, #ffb875 100%);
|
|
188
184
|
.account-info-name {
|
|
189
185
|
color: #975213;
|
|
190
186
|
font-size: 13px;
|