...
|
...
|
@@ -15,11 +15,13 @@ const _sfc_main = { |
|
|
common_vendor.onShow(() => {
|
|
|
getPackages();
|
|
|
getyues();
|
|
|
getMines();
|
|
|
});
|
|
|
let packageList = common_vendor.ref([]);
|
|
|
let money = common_vendor.ref("");
|
|
|
let cur = common_vendor.ref(0);
|
|
|
let balance = common_vendor.ref(0);
|
|
|
const userInfo = common_vendor.ref({});
|
|
|
const checkPackage = (item, index) => {
|
|
|
cur.value = index;
|
|
|
};
|
...
|
...
|
@@ -59,6 +61,16 @@ const _sfc_main = { |
|
|
console.log("getyue", err);
|
|
|
}
|
|
|
};
|
|
|
const getMines = async () => {
|
|
|
try {
|
|
|
const res = await api_index.getMine();
|
|
|
userInfo.value = res.userInfo;
|
|
|
userInfo.value.avatar = res.avatar;
|
|
|
} catch (err) {
|
|
|
common_vendor.index.showToast({ title: err, icon: "none" });
|
|
|
console.log("getMine", err);
|
|
|
}
|
|
|
};
|
|
|
return (_ctx, _cache) => {
|
|
|
return {
|
|
|
a: common_vendor.p({
|
...
|
...
|
@@ -69,9 +81,11 @@ const _sfc_main = { |
|
|
autoBack: true
|
|
|
}),
|
|
|
b: common_vendor.t(common_vendor.unref(balance)),
|
|
|
c: common_vendor.unref(money),
|
|
|
d: common_vendor.o(($event) => common_vendor.isRef(money) ? money.value = $event.detail.value : money = $event.detail.value),
|
|
|
e: common_vendor.f(common_vendor.unref(packageList), (item, index, i0) => {
|
|
|
c: userInfo.value.avatar,
|
|
|
d: common_vendor.t(userInfo.value.nickname),
|
|
|
e: common_vendor.unref(money),
|
|
|
f: common_vendor.o(($event) => common_vendor.isRef(money) ? money.value = $event.detail.value : money = $event.detail.value),
|
|
|
g: common_vendor.f(common_vendor.unref(packageList), (item, index, i0) => {
|
|
|
return {
|
|
|
a: common_vendor.t(item.money),
|
|
|
b: common_vendor.t(item.discount),
|
...
|
...
|
@@ -80,7 +94,7 @@ const _sfc_main = { |
|
|
e: item.id
|
|
|
};
|
|
|
}),
|
|
|
f: common_vendor.o(rechargeBtn)
|
|
|
h: common_vendor.o(rechargeBtn)
|
|
|
};
|
|
|
};
|
|
|
}
|
...
|
...
|
|