|
|
@@ -19,13 +19,13 @@ axios.interceptors.response.use(function (response) {
|
|
|
// export async function reportVisit() {
|
|
|
// const res = await axios({
|
|
|
// method: 'get',
|
|
|
-// url: `${process.env.VUE_APP_API_PREFIX}/api/show/addVisit`,
|
|
|
+// url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/addVisit`,
|
|
|
// })
|
|
|
// }
|
|
|
// export async function fetchVisitInfo() {
|
|
|
// const res = await axios({
|
|
|
// method: 'get',
|
|
|
-// url: `${process.env.VUE_APP_API_PREFIX}/api/show/getVisit`,
|
|
|
+// url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/getVisit`,
|
|
|
// })
|
|
|
// return res.data.data
|
|
|
// }
|
|
|
@@ -33,7 +33,7 @@ export async function login(account, password) {
|
|
|
const pwdEncrypted = encodeStr(Base64.encode(password))
|
|
|
const res = await axios({
|
|
|
method: 'post',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/show/login`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/login`,
|
|
|
data: {
|
|
|
userName: account,
|
|
|
password: pwdEncrypted,
|
|
|
@@ -51,7 +51,7 @@ export async function login(account, password) {
|
|
|
export async function logout() {
|
|
|
const res = await axios({
|
|
|
method: 'get',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/logout`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/logout`,
|
|
|
headers: {
|
|
|
token: store.state.token,
|
|
|
}
|
|
|
@@ -66,7 +66,7 @@ export async function checkLoginStatusAndProcess() {
|
|
|
if (lastToken && lastUserInfoStr) {
|
|
|
const res = await axios({
|
|
|
method: 'get',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/show/checkLogin`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/checkLogin`,
|
|
|
headers: {
|
|
|
token: lastToken,
|
|
|
}
|
|
|
@@ -89,7 +89,7 @@ export async function signUp(account, phone, password) {
|
|
|
const pwdEncrypted = encodeStr(Base64.encode(password))
|
|
|
const res = await axios({
|
|
|
method: 'post',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/show/register`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/register`,
|
|
|
data: {
|
|
|
password: pwdEncrypted,
|
|
|
phone,
|
|
|
@@ -106,7 +106,7 @@ export async function signUp(account, phone, password) {
|
|
|
export async function findPassowrd(account, phone) {
|
|
|
const res = await axios({
|
|
|
method: 'post',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/show/findPass`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/findPass`,
|
|
|
data: {
|
|
|
phone,
|
|
|
userName: account,
|
|
|
@@ -123,7 +123,7 @@ export async function changePassword(newPassword, oldPassword) {
|
|
|
const pwdOldEncrypted = encodeStr(Base64.encode(oldPassword))
|
|
|
const res = await axios({
|
|
|
method: 'post',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/update/pass`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/update/pass`,
|
|
|
data: {
|
|
|
newPassword: pwdNewEncrypted,
|
|
|
oldPassword: pwdOldEncrypted,
|
|
|
@@ -142,7 +142,7 @@ export async function changePassword(newPassword, oldPassword) {
|
|
|
export async function getGameRuleList() {
|
|
|
const res = await axios({
|
|
|
method: 'get',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/show/rule/getList?rnd=${Math.random()}`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/rule/getList?rnd=${Math.random()}`,
|
|
|
params: {
|
|
|
type: 'game',
|
|
|
},
|
|
|
@@ -156,7 +156,7 @@ export async function getGameRuleList() {
|
|
|
export async function getScoreLimit() {
|
|
|
const res = await axios({
|
|
|
method: 'get',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/show/rule/getList?rnd=${Math.random()}`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/rule/getList?rnd=${Math.random()}`,
|
|
|
params: {
|
|
|
type: 'day',
|
|
|
},
|
|
|
@@ -170,7 +170,7 @@ export async function getScoreLimit() {
|
|
|
export async function getScore() {
|
|
|
const res = await axios({
|
|
|
method: 'get',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/getPoint?rnd=${Math.random()}`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/getPoint?rnd=${Math.random()}`,
|
|
|
headers: {
|
|
|
token: store.state.token,
|
|
|
}
|
|
|
@@ -184,7 +184,7 @@ export async function getScore() {
|
|
|
export async function addScore(score) {
|
|
|
const res = await axios({
|
|
|
method: 'post',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/point/add`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/point/add`,
|
|
|
data: {
|
|
|
score,
|
|
|
type: 'game',
|
|
|
@@ -204,7 +204,7 @@ export async function addScore(score) {
|
|
|
export async function getExamQuestionList() {
|
|
|
const res = await axios({
|
|
|
method: 'get',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/show/question/getList`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/show/question/getList`,
|
|
|
})
|
|
|
if (res.data.code !== 0) {
|
|
|
throw (`获取答题列表失败:${res.data.msg}`)
|
|
|
@@ -229,7 +229,7 @@ updateTime: "2024-01-09 09:35:10"
|
|
|
export async function getPrizeList(pageNum, pageSize) {
|
|
|
const res = await axios({
|
|
|
method: 'post',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/prize/pageList`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/prize/pageList`,
|
|
|
data: {
|
|
|
pageNum,
|
|
|
pageSize,
|
|
|
@@ -247,7 +247,7 @@ export async function getPrizeList(pageNum, pageSize) {
|
|
|
export async function getBonusPointRecord() {
|
|
|
const res = await axios({
|
|
|
method: 'get',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/point/getList`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/point/getList`,
|
|
|
headers: {
|
|
|
token: store.state.token,
|
|
|
}
|
|
|
@@ -261,7 +261,7 @@ export async function getBonusPointRecord() {
|
|
|
export async function redeem(description, name, phone, prizeId, score) {
|
|
|
const res = await axios({
|
|
|
method: 'post',
|
|
|
- url: `${process.env.VUE_APP_API_PREFIX}/api/cms/game/prize/redeem`,
|
|
|
+ url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/prize/redeem`,
|
|
|
headers: {
|
|
|
token: store.state.token,
|
|
|
},
|