Browse Source

字段修改

dev_des
1054425342@qq.com 1 month ago
parent
commit
7dfdd2b122
  1. 15
      components/DynamicIsland.vue
  2. 4
      static/js/request.js
  3. 1
      subPackages/points/index.vue
  4. 39
      subPackages/techan/order.vue

15
components/DynamicIsland.vue

@ -88,7 +88,7 @@
<text class="time-reward-title">时间奖励</text>
<view class="time-reward-stats">
<text class="time-reward-number">{{
userInfo && userInfo.token ? userInfo.hourValue||0:0
userInfo && userInfo.token ? (userInfo.hourValue||0):0
}}</text>
<text class="time-reward-unit"></text>
</view>
@ -112,7 +112,7 @@
style="display: flex;align-items: center;font-size: 26rpx;font-weight: bold;display: flex;align-items: center;margin-top: 20rpx;">
<view class="" style="width: 200rpx;">
时长:{{
userInfo && userInfo.token ? userInfo.hour: 0
userInfo && userInfo.token ? userInfo.hour||0: 0
}}h
</view>
<view class="">
@ -360,12 +360,13 @@
//
if (this.userInfo && this.userInfo.nickname) {
this.currentTitle = `Hi!${this.userInfo.nickname},欢迎回来~`;
this.Post({}, '/framework/points/getLastBalance', 'DES').then(res => {
if (res.code === 200) {
this.totalPoints = res.data.balance || 0;
}
})
}
this.Post({}, '/framework/points/getLastBalance', 'DES').then(res => {
if (res.code === 200) {
this.totalPoints = res.data.balance || 0;
}
})
} catch (e) {
console.warn("获取用户信息失败:", e);
this.userInfo = {};

4
static/js/request.js

@ -8,11 +8,11 @@ const DEV_API_URL = 'http://1.13.193.49';
// const PROD_API_URL = 'https://epic.js-dyyj.com';
const PROD_API_URL = 'http://1.13.193.49';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL;
const DEV_API_URL_DES = 'http://192.168.124.118:8083/xcx';
const DEV_API_URL_DES = 'https://des.dayunyuanjian.cn/xcx';
// const DEV_API_URL_DES = 'https://des.js-dyyj.com/xcx';
// const DEV_API_URL_DES = 'http://1.13.193.49:8083/xcx';
// const PROD_API_URL_DES = 'https://des.js-dyyj.com/xcx';
const PROD_API_URL_DES = 'http://1.13.193.49:8083/xcx';
const PROD_API_URL_DES = 'https://des.dayunyuanjian.cn/xcx';
const NEWAPIURL_DES = process.env.NODE_ENV === 'development' ? DEV_API_URL_DES : PROD_API_URL_DES;
const getToken = () => {
const userInfoFromStorage = uni.getStorageSync('userInfo');

1
subPackages/points/index.vue

@ -211,6 +211,7 @@ export default {
//
async getTotalPoints() {
try {
if(!uni.getStorageSync("userInfo") )return
this.Post({}, "/framework/points/getLastBalance", "DES").then((res) => {
if (res.code === 200) {
this.pointInfo = res.data;

39
subPackages/techan/order.vue

@ -474,6 +474,7 @@ export default {
//
async getTotalPoints() {
try {
if(!uni.getStorageSync("userInfo") )return
this.Post({}, "/framework/points/getLastBalance", "DES").then((res) => {
if (res.code === 200) {
this.userPoints = res.data.balance || 0;
@ -964,10 +965,11 @@ export default {
onSuccess: (data) => {
this.isOrderLoading = false; //
//
uni.showToast({
title: "订单创建成功",
icon: "success",
});
// uni.showToast({
// title: "",
// icon: "success",
// });
this.orderPay(res.msg)
},
onFailure: (data) => {
this.isOrderLoading = false; //
@ -1002,6 +1004,35 @@ export default {
});
});
},
orderPay(token){
this.Post(
{
method: "POST",
orderNo:token,
fromType:1,
payAmount:this.allprice,
userId:124
},
"/framework/wxPay/submitShopPurOrder",
"DES"
).then(res =>{
uni.requestPayment({
nonceStr: res.data.nonceStr,
package: res.data.package,
paySign: res.data.paySign,
signType: res.data.signType,
timeStamp: res.data.timeStamp,
success: () => {
this.getSubscribeMessage()
},
fail() {
uni.navigateTo({
url: '/subPackages/order/trades'
})
}
});
})
},
// --------------------------------------
changPopShow(e) {

Loading…
Cancel
Save