支持购买套餐/续费套餐/用户账户操作等

This commit is contained in:
GoEdgeLab
2021-11-08 20:52:02 +08:00
parent c7f07c66d1
commit 5bcc696e88
6 changed files with 99 additions and 7 deletions

View File

@@ -0,0 +1,33 @@
Vue.component("finance-user-selector", {
mounted: function () {
let that = this
Tea.action("/finance/users/options")
.post()
.success(function (resp) {
that.users = resp.data.users
})
},
props: ["v-user-id"],
data: function () {
let userId = this.vUserId
if (userId == null) {
userId = 0
}
return {
users: [],
userId: userId
}
},
watch: {
userId: function (v) {
this.$emit("change", v)
}
},
template: `<div>
<select class="ui dropdown auto-width" name="userId" v-model="userId">
<option value="0">[选择用户]</option>
<option v-for="user in users" :value="user.id">{{user.fullname}} ({{user.username}})</option>
</select>
</div>`
})