HolyKnightIX 1 vuosi sitten
vanhempi
commit
f983fb12fe
2 muutettua tiedostoa jossa 10 lisäystä ja 2 poistoa
  1. +6
    -1
      src/App.vue
  2. +4
    -1
      src/pages/index/buyCoin.vue

+ 6
- 1
src/App.vue Näytä tiedosto

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


+ 4
- 1
src/pages/index/buyCoin.vue Näytä tiedosto

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


Ladataan…
Peruuta
Tallenna