Parcourir la source

change

release
HolyKnightIX il y a 2 ans
Parent
révision
7d32b74456
5 fichiers modifiés avec 39 ajouts et 3 suppressions
  1. +11
    -0
      src/api/myPage.js
  2. BIN
      src/assets/img/BG@2x.png
  3. +1
    -1
      src/views/model/chooseModel.vue
  4. +2
    -1
      src/views/model/generateVideo.vue
  5. +25
    -1
      src/views/myPage/myPage.vue

+ 11
- 0
src/api/myPage.js Voir le fichier

@@ -23,3 +23,14 @@ export function doGetVideoDetialById(id) {
method: 'get', method: 'get',
}) })
} }

/**
* @description 查询用户邀请码状态
* @returns data
*/
export function doFindInviteCode() {
return request({
url: `/api/inviteCode/find`,
method: 'get',
})
}

BIN
src/assets/img/BG@2x.png Voir le fichier

Avant Après
Largeur: 3840  |  Hauteur: 2160  |  Taille: 6.2 MiB Largeur: 1529  |  Hauteur: 1006  |  Taille: 1.6 MiB

+ 1
- 1
src/views/model/chooseModel.vue Voir le fichier

@@ -11,7 +11,7 @@
<div class="title">选择模板</div> <div class="title">选择模板</div>
<div class="typeOutSide"> <div class="typeOutSide">
<div class="type"> <div class="type">
<div :class="type == 0 ? 'active' : ''" @click="chooseType(0)">
<div :class="type == '' ? 'active' : ''" @click="chooseType()">
全部模板 全部模板
</div> </div>
<div :class="type == 2 ? 'active' : ''" @click="chooseType(2)"> <div :class="type == 2 ? 'active' : ''" @click="chooseType(2)">


+ 2
- 1
src/views/model/generateVideo.vue Voir le fichier

@@ -302,7 +302,7 @@ export default {
const res = await doFindInviteCode(); const res = await doFindInviteCode();
console.log(res, "查询用户邀请码数据"); console.log(res, "查询用户邀请码数据");
const status = res.data.status; const status = res.data.status;
// 当没有邀请码时
if (status == 1) { if (status == 1) {
// 组装参数 // 组装参数
const data = { const data = {
@@ -322,6 +322,7 @@ export default {
} }


this.saveOrUpdate(data); this.saveOrUpdate(data);
// 当没有邀请码时
} else if (status == 0) { } else if (status == 0) {
this.isShowMessageCover = true; this.isShowMessageCover = true;
return; return;


+ 25
- 1
src/views/myPage/myPage.vue Voir le fichier

@@ -58,7 +58,11 @@ import {
formatSeconds, formatSeconds,
} from "../../utils"; } from "../../utils";
// 接口 // 接口
import { getVideoList, doGetVideoDetialById } from "../../api/myPage";
import {
getVideoList,
doGetVideoDetialById,
doFindInviteCode,
} from "../../api/myPage";


Vue.use(Toast); Vue.use(Toast);
export default { export default {
@@ -175,6 +179,26 @@ export default {
} }
}, },


/**
* @description:查询用户邀请码状态
*/
async checkInviteCode() {
try {
const res = await doFindInviteCode();
console.log(res, "查询用户邀请码数据");
const status = res.data.status;

if (status == 1) {
this.goCreateNew();
// 当没有邀请码时
} else if (status == 0) {
}
} catch (error) {
console.log(error, "error");
Toast.fail(error.message);
}
},

goCreateNew() { goCreateNew() {
this.$router.push("/chooseModel"); this.$router.push("/chooseModel");
}, },


Chargement…
Annuler
Enregistrer