Browse Source

coin

master
HolyKnightIX 1 year ago
parent
commit
f983fb12fe
2 changed files with 10 additions and 2 deletions
  1. +6
    -1
      src/App.vue
  2. +4
    -1
      src/pages/index/buyCoin.vue

+ 6
- 1
src/App.vue View File

@@ -63,7 +63,8 @@ onLaunch(() => {
console.log(userInfoModulesPinia.openId, "获取openid");
// 获取头像和金币
const res3 = await findImageApi();
userInfoModulesPinia.myAvatar = res3.data.image;
userInfoModulesPinia.myAvatar =
res3.data && res3.data.image ? res3.data.image : "";
const res4 = await findGlodApi();
if (!res4.data) {
userInfoModulesPinia.myGlod = 0;
@@ -79,6 +80,7 @@ onLaunch(() => {
uni.redirectTo({
url: "/pages/login/index",
});
console.log("error1");
uni.showToast({
title: "登录失败,请重试",
icon: "none",
@@ -88,6 +90,7 @@ onLaunch(() => {
// uni.redirectTo({
// url: "pages/index/index",
// });
console.log(error, "error2");
uni.showToast({
title: "登录失败,请重试",
icon: "none",
@@ -97,6 +100,7 @@ onLaunch(() => {
// uni.redirectTo({
// url: "pages/index/index",
// });
console.log("error3");
uni.showToast({
title: "登录失败,请重试",
icon: "none",
@@ -107,6 +111,7 @@ onLaunch(() => {
// uni.redirectTo({
// url: "pages/index/index",
// });
console.log("error4");
uni.showToast({
title: "登录失败,请重试",
icon: "none",


+ 4
- 1
src/pages/index/buyCoin.vue View File

@@ -104,7 +104,9 @@ const startPay = (data) => {
...orderInfo,
success: function (res) {
console.log(res, "res");
getStatusOfOrder(orderNumber.value);
getStatusOfOrder(orderNumber.value).then((res) => {
console.log(res, "status");
});
},
fail: function (err) {
uni.showToast({
@@ -120,6 +122,7 @@ const getStatusOfOrder = async (orderNumber) => {
try {
const res = await getOrderStatus(orderNumber);
console.log(res, "getStatusOfOrder");
return res.data.orderStatus;
} catch (error) {
console.log(error, "error");
}


Loading…
Cancel
Save