Commit 27a54e96 authored by salitedfish's avatar salitedfish

bug修复

parent a4c2e69f
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"vue-content-loading": "^1.6.0", "vue-content-loading": "^1.6.0",
"vue-fragment": "^1.5.2", "vue-fragment": "^1.5.2",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vue-step-progress": "^0.3.6", "vue-step-progress": "^0.3.5",
"vuex": "^3.4.0" "vuex": "^3.4.0"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<script lang="ts"> <script lang="ts">
import Vue from "vue"; import Vue from "vue";
import { Overlay } from "vant"; import { Overlay } from "vant";
import { token } from '@/util/userInfoUtils'
Vue.use(Overlay); Vue.use(Overlay);
export default Vue.extend({ export default Vue.extend({
components: { components: {
...@@ -73,6 +73,11 @@ export default Vue.extend({ ...@@ -73,6 +73,11 @@ export default Vue.extend({
this.$store.commit('app/TOGGLE_OVERLAY') this.$store.commit('app/TOGGLE_OVERLAY')
}, },
goNTF(routes:string){ goNTF(routes:string){
if(!token.getToken()) {
this.closeNFT()
this.$router.push('/auth/Login')
return
}
this.$router.push(`/Nft/${routes}`) this.$router.push(`/Nft/${routes}`)
this.closeNFT() this.closeNFT()
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<div class="flex flex-wrap w-full text-sm mt-3"> <div class="flex flex-wrap w-full text-sm mt-3">
<div class="text-font-dark-blue">题材</div> <div class="text-font-dark-blue">题材</div>
<div class="flex px-3 gap-x-2" v-for='(i,index) in getThemeList' :key="index"> <div class="flex-1 pl-3 flex gap-x-2" v-for='(i,index) in getThemeList' :key="index">
<span>{{i}}</span> <span>{{i}}</span>
</div> </div>
</div> </div>
......
<template> <template>
<div class="steps flex text-font-white justify-center relative"> <div class="steps flex text-font-white justify-center relative">
<div class="step-item flex flex-col content-center relative mr-5 items-center" v-for="(i,index) in data" :key="index" <div class="step-item flex flex-col content-center relative mr-10 items-center" v-for="(i,index) in data" :key="index"
:class="currentStep < index+1?'step-item':' step-item-actived'" :class="currentStep < index+1?'step-item':' step-item-actived'"
> >
<div class="cycle relative items-center rounded-full z-10" :class="currentStep < index+1?'bg-font-gray bg-opacity-20':' bg-font-blue bg-opacity-80'"> <div class="cycle relative items-center rounded-full z-10" :class="currentStep < index+1?'bg-font-gray bg-opacity-20':' bg-font-blue bg-opacity-80'">
...@@ -69,6 +69,9 @@ export default Vue.extend({ ...@@ -69,6 +69,9 @@ export default Vue.extend({
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.steps{ .steps{
.step-item:last-of-type {
margin-right: 0;
}
.step-item:after{ .step-item:after{
content:''; content:'';
width: 24px; width: 24px;
...@@ -77,10 +80,35 @@ export default Vue.extend({ ...@@ -77,10 +80,35 @@ export default Vue.extend({
background-color:#8899B3; background-color:#8899B3;
position: absolute; position: absolute;
top: 34%; top: 34%;
left: 120%; left: 116%;
z-index: 1;
transform: translate(-50%, -50%);
}
.step-item:before{
content:'';
width: 22px;
height:2px;
border-radius: 3px;
background-color:#8899B3;
position: absolute;
top: 34%;
right: 75%;
z-index: 1; z-index: 1;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.step-item-actived::before{
content:'';
width: 22px;
height:2px;
border-radius: 3px;
background-color:#0078FF;
position: absolute;
top: 34%;
right: 75%;
z-index: 1;
transform: translate(-50%, -50%);
}
.step-item-actived::after{ .step-item-actived::after{
content:''; content:'';
width: 24px; width: 24px;
...@@ -89,7 +117,7 @@ export default Vue.extend({ ...@@ -89,7 +117,7 @@ export default Vue.extend({
background-color:#0078FF; background-color:#0078FF;
position: absolute; position: absolute;
top: 34%; top: 34%;
left: 120%; left: 116%;
z-index: 1; z-index: 1;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
...@@ -106,6 +134,18 @@ export default Vue.extend({ ...@@ -106,6 +134,18 @@ export default Vue.extend({
z-index: 1; z-index: 1;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.step-item:first-of-type::before{
content:'';
width: 0px;
height:0px;
border-radius: 3px;
background-color:#8899B3;
position: absolute;
top: 38%;
left: 110%;
z-index: 1;
transform: translate(-50%, -50%);
}
// .steps:last-child{ // .steps:last-child{
// .step-item:after{ // .step-item:after{
// content:''; // content:'';
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
</div> </div>
<div class='center'>{{title}}</div> <div class='center'>{{title}}</div>
<div class='right'> <div class='right'>
<div v-if="saveBtn.show" @click="clickSaveBtn" class="text-sm" :class="saveBtn.enable?' text-font-blue':' text-font-dark-blue'"> <!-- <div v-if="saveBtn.show" @click="clickSaveBtn" class="text-sm" :class="saveBtn.enable?' text-font-blue':' text-font-dark-blue'">
保存 保存
</div> </div> -->
</div> </div>
</div> </div>
</template> </template>
......
...@@ -10,11 +10,11 @@ import service from './service' ...@@ -10,11 +10,11 @@ import service from './service'
import { Plugin } from 'vue-fragment' import { Plugin } from 'vue-fragment'
import { Dialog } from 'vant'; import { Dialog } from 'vant';
import { Toast } from 'vant' import { Toast } from 'vant'
import VConsole from 'vconsole'; // import VConsole from 'vconsole';
const vconsole = process.env.VUE_APP_ENV === 'TEST'?new VConsole():'' // const vconsole = process.env.VUE_APP_ENV === 'TEST'?new VConsole():''
console.log(vconsole,'移动console'); // window.console.log(vconsole,'移动console');
Vue.use(Dialog); Vue.use(Dialog);
......
...@@ -155,6 +155,7 @@ router.beforeEach((to, from, next) => { ...@@ -155,6 +155,7 @@ router.beforeEach((to, from, next) => {
} else { } else {
next() next()
} }
}) })
export default router export default router
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue'; import Vue from 'vue';
import { Badge } from 'vant'; import { Badge } from 'vant';
import { token } from '@/util/userInfoUtils'
Vue.use(Badge) Vue.use(Badge)
...@@ -85,6 +86,7 @@ export default Vue.extend({ ...@@ -85,6 +86,7 @@ export default Vue.extend({
} }
}, },
async mounted() { async mounted() {
if(!token.getToken()) return
this.userData = await this.$service.nftService.getMyList() this.userData = await this.$service.nftService.getMyList()
}, },
...@@ -111,6 +113,10 @@ export default Vue.extend({ ...@@ -111,6 +113,10 @@ export default Vue.extend({
this.$router.push(item) this.$router.push(item)
}, },
goUserSet(){ goUserSet(){
if(!token.getToken()) {
this.$router.push('/auth/Login')
return
}
this.$router.push('/User') this.$router.push('/User')
} }
}, },
......
<template> <template>
<Layout-Child class="page-scroll"> <Layout-Child class="page-scroll">
<div class="w-7/12 mx-auto my-6"> <div class=" mx-auto my-6">
<app-steps <app-steps
v-if="currentStep !== 4" v-if="currentStep !== 4"
:data="mySteps" :data="mySteps"
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
id="nft-des" id="nft-des"
cols="30" cols="30"
maxlength="1000" maxlength="1000"
placeholder="请输入剧本简介" placeholder="请输入剧本简介,限500字"
rows="10" rows="10"
class=" class="
w-full w-full
...@@ -260,7 +260,7 @@ export default Vue.extend({ ...@@ -260,7 +260,7 @@ export default Vue.extend({
text: "NFT发行", text: "NFT发行",
}, },
], ],
currentStep: 4, currentStep: 1,
loading2: false, loading2: false,
loading3: false, loading3: false,
loading4: false, loading4: false,
......
...@@ -95,12 +95,12 @@ ...@@ -95,12 +95,12 @@
<div class="py-3"> <div class="py-3">
<div class="text-font-dark-blue">剧本简介</div> <div class="text-font-dark-blue">剧本简介</div>
<div class=" py-2 tracking-wide leading-6 text-sm">{{nftData.synopsis?nftData.synopsis:'无'}}</div> <div class=" py-2 tracking-wide leading-6 text-sm break-all">{{nftData.synopsis?nftData.synopsis:'无'}}</div>
</div> </div>
<div class="py-3"> <div class="py-3">
<div class="text-font-dark-blue">关于NFT</div> <div class="text-font-dark-blue">关于NFT</div>
<div class=' py-2 tracking-wide leading-6 text-sm'>NFT全称为Non-Fungible Token,也称为非同质化通证。可以通俗化理解为在区块链上的唯一凭证。电影产业中,能够为剧本、电影、花絮、剧照、音乐等作品发行NFT,链上确权、高效流转、不可替代、独一无二。能够保护编剧及电影人的知识产权,挖掘版权交易价值,提高创作收益,丰富影视行业良好生态,创造影视版权数字化经济。</div> <div class=' py-2 tracking-wide leading-6 text-sm break-all'>NFT全称为Non-Fungible Token,也称为非同质化通证。可以通俗化理解为在区块链上的唯一凭证。电影产业中,能够为剧本、电影、花絮、剧照、音乐等作品发行NFT,链上确权、高效流转、不可替代、独一无二。能够保护编剧及电影人的知识产权,挖掘版权交易价值,提高创作收益,丰富影视行业良好生态,创造影视版权数字化经济。</div>
</div> </div>
<div class="py-3"> <div class="py-3">
...@@ -129,6 +129,7 @@ ...@@ -129,6 +129,7 @@
<script lang="ts"> <script lang="ts">
import Vue from "vue"; import Vue from "vue";
import SkeletonNftDetail from "@/components/common/Skeleton/SkeletonNftDetail.vue" import SkeletonNftDetail from "@/components/common/Skeleton/SkeletonNftDetail.vue"
import { token } from '@/util/userInfoUtils'
const apps = [ const apps = [
{ {
text: "版权认证", text: "版权认证",
...@@ -164,6 +165,9 @@ export default Vue.extend({ ...@@ -164,6 +165,9 @@ export default Vue.extend({
async created() { async created() {
this.nftData =await this.$service.nftService.getNFTdetail(parseInt(this.id)) this.nftData =await this.$service.nftService.getNFTdetail(parseInt(this.id))
this.nftData.wallet == this.user.wallet? this.isOwner=true:this.isOwner=false this.nftData.wallet == this.user.wallet? this.isOwner=true:this.isOwner=false
if(!token.getToken()) {
return
}
await this.setMyCollection() await this.setMyCollection()
}, },
...@@ -179,6 +183,9 @@ export default Vue.extend({ ...@@ -179,6 +183,9 @@ export default Vue.extend({
}, },
methods:{ methods:{
async setMyCollection():Promise<void>{ async setMyCollection():Promise<void>{
if(!token.getToken()) {
this.$router.push('/auth/login')
}
let list = await this.$service.nftService.getCollection() let list = await this.$service.nftService.getCollection()
if(list.find(i=> i.id == this.id)){ if(list.find(i=> i.id == this.id)){
this.inMyCollection = true this.inMyCollection = true
...@@ -187,6 +194,9 @@ export default Vue.extend({ ...@@ -187,6 +194,9 @@ export default Vue.extend({
} }
}, },
async editCollection(){ async editCollection(){
if(!token.getToken()) {
this.$router.push('/auth/login')
}
await this.$service.nftService.editCollection(parseInt(this.id)).then(async (res)=>{ await this.$service.nftService.editCollection(parseInt(this.id)).then(async (res)=>{
if(res){ if(res){
await this.setMyCollection() await this.setMyCollection()
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<div class='mt-6 w-11/12 mx-auto text-font-white'> <div class='mt-6 w-11/12 mx-auto text-font-white'>
<div v-if="$route.params.type == 'signature' "> <div v-if="$route.params.type == 'signature' ">
<textarea v-model="inputSet.value" name="description" id="description" cols="30" rows="10" class="bg-font-light-black w-full py-4 px-4 mt-3 rounded-md text-sm" :placeholder="inputSet.placeholder"></textarea> <textarea v-model="inputSet.value" name="description" id="description" cols="30" rows="10" class="bg-font-light-black w-full py-4 px-4 mt-3 rounded-md text-sm" :placeholder="inputSet.placeholder"></textarea>
<div class=" tips py-3 px-2 text-font-red text-xs">{{inputSet.value.length}}/300</div>
</div> </div>
<div class="input flex flex-col " v-else> <div class="input flex flex-col " v-else>
<!-- <div class="input-label text-font-dark-blue pl-3"> <!-- <div class="input-label text-font-dark-blue pl-3">
...@@ -14,9 +15,10 @@ ...@@ -14,9 +15,10 @@
:maxlength="inputSet.maxlength" :maxlength="inputSet.maxlength"
:placeholder="inputSet.placeholder" :placeholder="inputSet.placeholder"
:disabled='inputSet.disabled' :disabled='inputSet.disabled'
@keyup="checkInput"
class=" w-full py-4 px-4 mt-3 bg-font-light-black rounded-md text-sm"> class=" w-full py-4 px-4 mt-3 bg-font-light-black rounded-md text-sm">
</div> </div>
<div class=" tips py-3 px-2 text-font-red text-xs">昵称可以是6-20个字符</div> <div class=" tips py-3 px-2 text-font-red text-xs">{{inputSet.value.length}}/20</div>
</div> </div>
</div> </div>
<div class="fixed bottom-0 w-full left-0 z-30"> <div class="fixed bottom-0 w-full left-0 z-30">
...@@ -70,12 +72,28 @@ export default Vue.extend({ ...@@ -70,12 +72,28 @@ export default Vue.extend({
let data = {} as any let data = {} as any
const value = this.inputSet.value; const value = this.inputSet.value;
data[this.$route.params.type] = value; data[this.$route.params.type] = value;
const reqEdit = await this.$service.userService.editUserInfo(data) const reqEdit = await this.$service.userService.editUserInfo(data)
if(reqEdit){ if(reqEdit){
this.$util.userMsg.updateUserMsg(reqEdit) this.$util.userMsg.updateUserMsg(reqEdit)
this.$toast.success('用户信息更新成功') this.$toast.success('用户信息更新成功')
this.$router.go(-1) this.$router.go(-1)
} }
},
checkInput(e:any){
if(this.$route.path.indexOf('telephone') != -1 && e.key != 'Backspace'){
const isNumber = (value:any)=> {
var patrn = /^\d$/;
if (patrn.exec(value) == null || value == "") {
return false
} else {
return true
}
}
if(!isNumber(e.key) || this.inputSet.value.length > 11){
this.inputSet.value = this.inputSet.value.slice(0,this.inputSet.value.length-1)
}
}
} }
} }
}); });
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<div class=" w-11/12 mx-auto py-6 text-font-white"> <div class=" w-11/12 mx-auto py-6 text-font-white">
<input type="file" accept="image/*" capture="camera" class=" hidden" ref='fileElem' @change="fileUpload"/> <input type="file" accept="image/*" capture="camera" class=" hidden" ref='fileElem' @change="fileUpload"/>
<van-action-sheet v-model="show" :actions="actions" @select="onSelect" /> <van-action-sheet v-model="show" :actions="actions" @select="onSelect" />
<app-cell text='头像' boxType='border' type='image' :value='userInfo.avatar?userInfo.avatar:"/img/mokeImg/avatar.png"' icon='icon-xiayibu' @click.native='uploadImg'></app-cell> <app-cell text='头像' boxType='border' type='image' :value='avatarImgUrl?avatarImgUrl:this.userInfo.avatar?this.userInfo.avatar : "/img/mokeImg/avatar.png"' icon='icon-xiayibu' @click.native='uploadImg'></app-cell>
<app-cell text='昵称' boxType='border' :value='userInfo.nickname?userInfo.nickname:"无昵称"' icon='icon-xiayibu' @click.native="goEdit({type:'nickname',title:'设置昵称'})"></app-cell> <app-cell text='昵称' boxType='border' :value='userInfo.nickname?userInfo.nickname:"无昵称"' icon='icon-xiayibu' @click.native="goEdit({type:'nickname',title:'设置昵称'})"></app-cell>
<app-cell text='手机号' boxType='border' :value='userInfo.telephone?userInfo.telephone:""' icon='icon-xiayibu' @click.native="goEdit({type:'telephone',title:'设置昵称'})"></app-cell> <app-cell text='手机号' boxType='border' :value='userInfo.telephone?userInfo.telephone:""' icon='icon-xiayibu' @click.native="goEdit({type:'telephone',title:'设置手机号'})"></app-cell>
<app-cell text='邮箱绑定' boxType='border' :value='userInfo.email?userInfo.email:""' icon='icon-xiayibu' @click.native="goEdit({type:'email',title:'邮箱绑定'})"></app-cell> <app-cell text='邮箱绑定' boxType='border' :value='userInfo.email?userInfo.email:""' icon='icon-xiayibu' @click.native="goEdit({type:'email',title:'邮箱绑定'})"></app-cell>
<app-cell text='个性签名' boxType='border' icon='icon-xiayibu' @click.native="goEdit({type:'signature',title:'个性签名'})"></app-cell> <app-cell text='个性签名' boxType='border' icon='icon-xiayibu' @click.native="goEdit({type:'signature',title:'个性签名'})"></app-cell>
<app-cell text='安全中心' boxType='border' icon='icon-xiayibu' ></app-cell> <app-cell text='安全中心' boxType='border' icon='icon-xiayibu' ></app-cell>
...@@ -31,7 +31,8 @@ export default Vue.extend({ ...@@ -31,7 +31,8 @@ export default Vue.extend({
{ name: '拍摄头像',router:'/photo' }, { name: '拍摄头像',router:'/photo' },
{ name: '从图片夹上传',router:'/photoEdit' }, { name: '从图片夹上传',router:'/photoEdit' },
], ],
file:{} file:{},
avatarImgUrl:''
} }
}, },
...@@ -62,6 +63,7 @@ export default Vue.extend({ ...@@ -62,6 +63,7 @@ export default Vue.extend({
// this.$store.commit('app/SET_FILEDATA',event.target.files) // this.$store.commit('app/SET_FILEDATA',event.target.files)
const upload = await this.$service.userService.avatarUpload(event.target.files[0]) const upload = await this.$service.userService.avatarUpload(event.target.files[0])
if(upload){ if(upload){
this.avatarImgUrl = (upload as any).avatar
this.$util.userMsg.updateUserMsg(upload) this.$util.userMsg.updateUserMsg(upload)
this.$toast.success('头像更新成功') this.$toast.success('头像更新成功')
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment