参加活动

This commit is contained in:
Vinjor 2024-09-27 21:17:16 +08:00
parent 2e815440de
commit 93c477323b
4 changed files with 18 additions and 13 deletions

View File

@ -1,8 +1,8 @@
// 应用全局配置
module.exports = {
// baseUrl: 'https://www.nuoyunr.com',
// baseUrl: 'http://192.168.1.4:48080',
baseUrl: "http://localhost:48080",
baseUrl: 'http://192.168.1.4:48080',
// baseUrl: "http://localhost:48080",
imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
baseImageUrl: 'https://www.nuoyunr.com/minio/',
wsUrl: 'wss://www.nuoyunr.com',

View File

@ -162,6 +162,10 @@ export default {
data: dataObj
}).then((res) => {
this.getActive()
uni.showToast({
title: '礼包领取成功!',
icon: 'none'
})
this.canClick = true
console.log(res);
})

View File

@ -67,6 +67,7 @@
import request from "@/utils/request";
import {getUserInfoRequest} from "@/utils/common.js";
import {getToken,setUserInfo} from '@/utils/auth.js'
import {getUserInfo} from "../../utils/auth";
export default {
components: {
tabBarVue,
@ -111,8 +112,8 @@
},
//
async getServer() {
console.log("获取用户信息")
this.customInfo = getUserInfoRequest()
await getUserInfoRequest()
this.customInfo = JSON.parse(getUserInfo())
}
}
}

View File

@ -60,17 +60,17 @@ export function tansParams(params) {
* @returns {Promise<void>}
*/
export async function getUserInfoRequest(){
const res = await request({
request({
url: "/userClient/customer/getUserCustomer",
method: 'get',
params:{}
}).then(res=>{
if(!res.data){
uni.reLaunch({
url: '/pages/my/register'
})
}else{
setUserInfo(JSON.stringify(res.data))
}
})
if(!res.data){
uni.reLaunch({
url: '/pages/my/register'
})
}else{
setUserInfo(JSON.stringify(res.data))
return res.data
}
}