Browse Source

更新文档3

master
ltlzx 4 years ago
parent
commit
986e49560b
  1. 16
      src/api/index.js
  2. 155
      src/components/common/Header.vue
  3. 90
      src/components/page/Hoster/Listing.vue
  4. 14
      src/components/page/Hoster/myAssets.vue
  5. 15
      src/components/page/Order/orderPendingPay.vue
  6. 3
      src/components/page/Purchaser/wkPurchaser.vue
  7. 34
      src/utils/request.js

16
src/api/index.js

@ -256,3 +256,19 @@ export const uploadimg = query => {
data: query data: query
}); });
}; };
// 发生短信验证码
export const sendSmsCode = query => {
return request({
url: '/api/user.User/sendSmsCode',
method: 'post',
data: query
});
};
// 登录
export const login = query => {
return request({
url: '/api/user.User/login',
method: 'post',
data: query
});
};

155
src/components/common/Header.vue

@ -1,12 +1,20 @@
<template> <template>
<div class="header"> <div class="header">
<div class="header_title"> <div class="header_login">
<span v-if="login_type==0" @click="showLogin">用户登录</span> <span>
<span v-else @click="UserConsole(0,0)">交易平台首页</span> <template v-if="login_type==1">
<span @click="UserConsole(1,0)">用户控制台</span> 您好{{login_info.username}}
<span>联系客服</span> <span class="header_login_span" @click="loginOut">退出登录</span>
<span>帮助中心</span> </template>
<span>友情链接</span> </span>
<div class="header_title">
<span v-if="login_type==0" @click="showLogin">用户登录</span>
<span v-else @click="UserConsole(0,0)">交易平台首页</span>
<span @click="UserConsole(1,0)" v-if="login_type==1">用户控制台</span>
<span>联系客服</span>
<span>帮助中心</span>
<span>友情链接</span>
</div>
</div> </div>
<div class="header_content"> <div class="header_content">
<img src="../../assets/img/header_logo.png" alt="" class="header_logo"> <img src="../../assets/img/header_logo.png" alt="" class="header_logo">
@ -24,23 +32,26 @@
</div> </div>
<el-dialog title="登录" :visible.sync="isshowLogin" width="30%" center> <el-dialog title="登录" :visible.sync="isshowLogin" width="30%" center>
<el-form :model="param" :rules="rules" ref="login" label-width="0px" class="ms-content"> <el-form :model="param" :rules="rules" ref="login" label-width="0px" class="ms-content">
<el-form-item prop="username"> <el-form-item prop="phone">
<el-input v-model="param.username" placeholder="username"> <el-input v-model="param.phone" placeholder="请输入手机号码">
<el-button slot="prepend" icon="el-icon-user"></el-button> <el-button slot="prepend" icon="el-icon-user"></el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="smscode">
<el-input <el-input
type="password" placeholder="请输入验证码 "
placeholder="password" v-model="param.smscode"
v-model="param.password"
@keyup.enter.native="submitForm()" @keyup.enter.native="submitForm()"
> >
<el-button slot="prepend" icon="el-icon-lock"></el-button> <el-button slot="prepend" icon="el-icon-lock"></el-button>
<el-button slot="suffix" class="code_button" @click="sendSmsCode" :disabled="isVerCode">
<span v-if="!isVerCode">获取验证码</span>
<span v-if="isVerCode">{{codeCount}}s</span>
</el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
<div class="login-btn"> <div class="login-btn">
<el-button type="primary" @click="submitForm()">登录</el-button> <el-button type="primary" @click="submitForm()">登录</el-button>
</div> </div>
</el-form> </el-form>
</el-dialog> </el-dialog>
@ -48,7 +59,7 @@
</template> </template>
<script> <script>
import {isOpenAccount} from '../../api/index' import {isOpenAccount,sendSmsCode,login} from '../../api/index'
export default { export default {
data() { data() {
return { return {
@ -57,6 +68,7 @@ export default {
login_type:0 , login_type:0 ,
examine_type:0, examine_type:0,
examine_data:{}, examine_data:{},
sidebarListType:0,
sidebarList:[ sidebarList:[
{name:'首页',url:'/index'}, {name:'首页',url:'/index'},
// {name:'',url:'/AssetClassification'}, // {name:'',url:'/AssetClassification'},
@ -67,18 +79,78 @@ export default {
], ],
isshowLogin:false, isshowLogin:false,
param:{ param:{
username: 'admin', phone: '',
password: '123123', smscode: '',
}, },
rules: { rules: {
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }], phone: [{ required: true, message: '请输入手机号码', trigger: 'blur' }],
password: [{ required: true, message: '请输入码', trigger: 'blur' }], smscode: [{ required: true, message: '请输入验证码', trigger: 'blur' }],
}, },
isVerCode:false,
codeCount:600,
login_info:''
} }
}, },
methods:{ methods:{
loginOut(){
localStorage.removeItem('login_info')
location.reload()
},
submitForm(){
this.$refs['login'].validate(valid=>{
if (valid) {
login(this.param).then(res=>{
console.info(res);
if (res.code==200) {
localStorage.setItem('login_info',JSON.stringify(res.data))
this.$message.success('登录成功~')
this.isshowLogin=false,
this.login_info=res.data;
this.login_type=1
localStorage.setItem('login_type',this.login_type)
}else{
this.$message.error(res.msg)
}
})
}
})
},
//
sendSmsCode(){
//axios
if (this.param.phone=='') {
this.$message.error('请输入手机号码~')
return false
}
sendSmsCode(this.param).then(res=>{
console.info(res);
if (res.code==101) {
this.$message.error(res.msg)
return false
}else{
this.$message.success(res.msg)
}
})
//
if (!this.timer) {
this.codeCount = 600;
this.isVerCode = true;
this.timer = setInterval(() => {
if (this.codeCount > 0 && this.codeCount <= 600) {
this.codeCount--;
} else {
this.isVerCode = false;
clearInterval(this.timer);
this.timer = null;
}
}, 1000);
}
},
isOpenAccount(){ isOpenAccount(){
let data={user_id:10} if (this.sidebarListType==0) {
return false
}
let data={user_id:this.login_info.id}
// let data={user_id:8} // let data={user_id:8}
isOpenAccount(data).then(res => { isOpenAccount(data).then(res => {
console.info(res) console.info(res)
@ -115,17 +187,15 @@ export default {
this.goPage(this.sidebarList[index].url) this.goPage(this.sidebarList[index].url)
} }
}); });
},
submitForm(){
}, },
// //
showLogin(){ showLogin(){
this.isshowLogin=true this.isshowLogin=true
}, },
UserConsole(type,goType){ UserConsole(type,goType){
this.login_type=type; // this.login_type=type;
localStorage.setItem('login_type',this.login_type) console.info(type)
this.sidebarListType=type
if(type==1){ if(type==1){
this.sidebarList=[ this.sidebarList=[
{name:'摘牌方',url:''}, {name:'摘牌方',url:''},
@ -160,7 +230,7 @@ export default {
{name:'站内通知',url:'/StationNotice'}, {name:'站内通知',url:'/StationNotice'},
] ]
if(goType==0){ if(goType==0){
this.goPage('/') this.goPage('/index')
} }
} }
}, },
@ -174,10 +244,16 @@ export default {
if(this.login_type==1){ if(this.login_type==1){
this.isOpenAccount() this.isOpenAccount()
} }
} },
}, },
created(){ created(){
// console.info(this.$route) this.login_info=JSON.parse(localStorage.getItem('login_info'));
if (this.login_info==null) {
this.login_type=0
localStorage.setItem('login_type',0)
}
console.info(this.login_info)
this.activeClass=this.$route.path this.activeClass=this.$route.path
this.login_type=localStorage.getItem('login_type') this.login_type=localStorage.getItem('login_type')
let type=0; let type=0;
@ -209,13 +285,30 @@ export default {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.header_title{ .header_login{
font-size: 12px;
color: #F6D79D;
display: flex;
align-items: center;
justify-content: space-between;
width: 1200px;
line-height: 45px;
height: 45px; height: 45px;
}
.header_login_span{
display: inline-block;
margin-left: 20px;
cursor: pointer;
text-decoration: underline;
}
.code_button{
border-right: none;
}
.header_title{
text-align: right; text-align: right;
line-height: 45px; line-height: 45px;
color: #999; color: #F6D79D;
font-size: 12px; font-size: 12px;
width: 1200px;
} }
.header_title>span{ .header_title>span{
display: inline-block; display: inline-block;

90
src/components/page/Hoster/Listing.vue

@ -58,8 +58,17 @@
<div class="listing_title1"> <div class="listing_title1">
<p class="listing_tips">请确认或修改资产类型</p> <p class="listing_tips">请确认或修改资产类型</p>
<div class="listing_title1_right"> <div class="listing_title1_right">
<button class="listing_button">下载模板</button> <a class="listing_button" :href="host+'/upload/doc/2021/10/163452699435510739.doc'">下载模板</a>
<button class="listing_button">上传文件</button> <el-upload
class="upload-demo"
:action="action1"
:show-file-list="false"
:on-error="handleAvatarError"
list-type="picture"
:on-success="(res,file,index)=>{handleAvatarSuccess1(res,file,'asset_file')}"
>
<button class="listing_button">上传文件</button>
</el-upload>
</div> </div>
</div> </div>
<mavon-editor <mavon-editor
@ -68,12 +77,36 @@
@imgAdd="$imgAdd" @change="change" @imgAdd="$imgAdd" @change="change"
class="listing_editor"/> class="listing_editor"/>
<div class="upload_file"> <div class="upload_file">
<p class="listing_tips">已上传文件</p> <div class="listing_tips1">
已上传文件
<div class="table_right_item" v-if="ruleForm.asset_file">
<span >{{file_name.asset_file}}</span>
<i class="el-icon-close" @click="deleteUrl(item,index,index1)"></i>
</div>
</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="其他资产材料" :prop="ruleForm.buy_mode==2?'serial_img' :'' " > <el-form-item label="其他资产材料" :prop="ruleForm.buy_mode==2?'serial_img' :'' " >
<p class="listing_tips">请上传与资产相关的证明材料线上交易请在此处上传相关资产</p> <p class="listing_tips">请上传与资产相关的证明材料线上交易请在此处上传相关资产</p>
<button class="listing_button">上传文件</button> <el-upload
class="upload-demo"
:action="action1"
:show-file-list="false"
:on-error="handleAvatarError"
list-type="picture"
:on-success="(res,file,index)=>{handleAvatarSuccess1(res,file,'else_serial_file')}"
>
<button class="listing_button">上传文件</button>
</el-upload>
<div class="upload_file" v-if="ruleForm.else_serial_file!=''">
<div class="listing_tips1">
已上传文件
<div class="table_right_item" >
<span >{{file_name.else_serial_file}}</span>
<i class="el-icon-close" @click="deleteUrl(item,index,index1)"></i>
</div>
</div>
</div>
</el-form-item> </el-form-item>
<el-form-item label="内部决策情况" prop="decision" > <el-form-item label="内部决策情况" prop="decision" >
<el-radio v-model="ruleForm.decision" :label="1">个人同意</el-radio> <el-radio v-model="ruleForm.decision" :label="1">个人同意</el-radio>
@ -156,6 +189,7 @@ export default {
return{ return{
host:'http://wenhua.xingtongworld.com', host:'http://wenhua.xingtongworld.com',
action:'http://wenhua.xingtongworld.com/api/Index/uploadimg', action:'http://wenhua.xingtongworld.com/api/Index/uploadimg',
action1:'http://wenhua.xingtongworld.com/api/Index/uploadFile',
query:{ query:{
id:'', id:'',
type:1 type:1
@ -196,6 +230,11 @@ export default {
start_auction_money:'', start_auction_money:'',
bidding_money:'', bidding_money:'',
pay_type:[1], pay_type:[1],
asset_file:''
},
file_name:{
asset_file:'',
else_serial_file:'',
}, },
rules:{ rules:{
serial_img: [ serial_img: [
@ -271,6 +310,23 @@ export default {
this.getPrice() this.getPrice()
}, },
methods:{ methods:{
handleAvatarSuccess1(res,file,index){
console.info(file)
console.info(res)
if(res.code==1){
let contract=this.host+res.data.img_url;
// this.ruleForm[index]=contract
this.$set(this.ruleForm, index, contract);
this.$set(this.file_name, index, file.name);
console.info(this.ruleForm)
this.$message.success('文件上传成功!');
}else{
this.$message.error(res.msg);
}
},
handleAvatarError(){
this.$message.error('文件上传失败!');
},
// //
getAssetInfo(){ getAssetInfo(){
assetInfo(this.query).then(res=>{ assetInfo(this.query).then(res=>{
@ -476,6 +532,7 @@ export default {
justify-content: space-between; justify-content: space-between;
} }
.listing_button{ .listing_button{
display: inline-block;
width: 70px; width: 70px;
height: 32px; height: 32px;
border-radius: 5px; border-radius: 5px;
@ -483,6 +540,8 @@ export default {
background: #F3D8D8; background: #F3D8D8;
font-size: 14px; font-size: 14px;
color: rgba(201, 76, 76, 0.898039215686275); color: rgba(201, 76, 76, 0.898039215686275);
text-align: center;
cursor: pointer;
} }
.listing_upload{ .listing_upload{
display: flex; display: flex;
@ -498,10 +557,31 @@ export default {
border: 1px solid #F3D8D8; border: 1px solid #F3D8D8;
margin-bottom: 10px; margin-bottom: 10px;
} }
.listing_tips{ .listing_tips1,listing_tips{
font-size: 14px; font-size: 14px;
color: rgba(127, 127, 127, 0.898039215686275); color: rgba(127, 127, 127, 0.898039215686275);
} }
.listing_tips1{
display: flex;
align-items: center;
}
.table_right_item{
width: 250px;
display: flex;
align-items: center;
color: #333333;
font-size: 14px;
justify-content: space-between;
}
.table_right_item>span{
cursor: pointer;
}
.table_right_item:hover{
color: #D85E5E;
}
.table_right_item>i{
cursor: pointer;
}
.listing_tips:hover{ .listing_tips:hover{
color: #D85E5E; color: #D85E5E;
} }

14
src/components/page/Hoster/myAssets.vue

@ -4,7 +4,10 @@
<div class="header_left"> <div class="header_left">
<span v-for="(item,index) in headerList" :key="index" :class="header_active==index ? 'header_active':''" @click="goPage(item.url)">{{item.name}}</span> <span v-for="(item,index) in headerList" :key="index" :class="header_active==index ? 'header_active':''" @click="goPage(item.url)">{{item.name}}</span>
</div> </div>
<button class="hedaer_button" @click="goDetails('',1)">资产挂牌</button> <div class="header_right">
<button class="hedaer_button" @click="goDetails('',1)">资产挂牌</button>
<a class="hedaer_button" :href="host+'/upload/doc/2021/10/163461522339789618.doc'">资产摘牌模板</a>
</div>
</div> </div>
<div class="seach"> <div class="seach">
<div class="seach1"> <div class="seach1">
@ -292,6 +295,10 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.header_right{
display: flex;
align-items: center;
}
.hedaer_button{ .hedaer_button{
width: 100px; width: 100px;
height: 30px; height: 30px;
@ -303,6 +310,11 @@ export default {
background: -o-linear-gradient(top, #F8D89F 0%,#C94C4C 100%); background: -o-linear-gradient(top, #F8D89F 0%,#C94C4C 100%);
background: -ms-linear-gradient(top, #F8D89F 0%,#C94C4C 100%); background: -ms-linear-gradient(top, #F8D89F 0%,#C94C4C 100%);
background: linear-gradient(to bottom, #F8D89F 0%,#C94C4C 100%); background: linear-gradient(to bottom, #F8D89F 0%,#C94C4C 100%);
display: flex;
align-items: center;
justify-content: center;
margin-left: 15px;
cursor: pointer;
} }
.header_active{ .header_active{
color: rgba(201, 76, 76, 0.698039215686274); color: rgba(201, 76, 76, 0.698039215686274);

15
src/components/page/Order/orderPendingPay.vue

@ -145,11 +145,11 @@
</div> </div>
<div class="order_other"> <div class="order_other">
<div class="order_other_item"> <div class="order_other_item">
<div class="order_message"> <div class="order_message" :class="query.type==1?'order_message1':''">
<span>给挂牌方留言</span> <span>给挂牌方留言</span>
<span>{{orderInfos.buy_message}}</span> <span>{{orderInfos.buy_message}}</span>
</div> </div>
<div class="order_other_item_right"> <div class="order_other_item_right" v-if="query.type==0">
<div> <div>
<span>契税 ¥ {{orderInfos.contract_tax}}</span> <span>契税 ¥ {{orderInfos.contract_tax}}</span>
<span class="order_price">¥ {{orderInfos.contract_tax}}</span> <span class="order_price">¥ {{orderInfos.contract_tax}}</span>
@ -161,8 +161,8 @@
</div> </div>
</div> </div>
<div class="order_other_item order_other_item1"> <div class="order_other_item order_other_item1">
<span>金额合计 </span> <span>金额合计 </span>
<span class="all_price"> ¥ 33,000.00{{orderInfos.serial_name}}</span> <span class="all_price"> ¥ {{orderInfos.total_price}}</span>
</div> </div>
</div> </div>
<el-image-viewer <el-image-viewer
@ -180,7 +180,8 @@ export default {
return{ return{
query:{ query:{
batchcode:'', batchcode:'',
record:'' record:'',
type:null
}, },
showViewer:false, showViewer:false,
img_url:[], img_url:[],
@ -235,6 +236,7 @@ export default {
console.info(res) console.info(res)
if(res.code==100){ if(res.code==100){
this.orderInfos=res.data this.orderInfos=res.data
this.query.type=res.data.type
this.$emit('confirm',res.data) this.$emit('confirm',res.data)
}else{ }else{
this.$message.error(res.msg) this.$message.error(res.msg)
@ -475,6 +477,9 @@ export default {
background: #F2F2F2; background: #F2F2F2;
box-sizing: border-box; box-sizing: border-box;
} }
.order_message1{
width: 100%;
}
.order_message .order_message_input{ .order_message .order_message_input{
width: 455px; width: 455px;
margin-left: 10px; margin-left: 10px;

3
src/components/page/Purchaser/wkPurchaser.vue

@ -136,7 +136,8 @@
<p class="title">摘牌方开户信息完善</p> <p class="title">摘牌方开户信息完善</p>
<p class="title_info">用户在购买资产前需先进行开户信息审核待审核通过后方能进行购买目前仅支持机构注册用户进行资产交易</p> <p class="title_info">用户在购买资产前需先进行开户信息审核待审核通过后方能进行购买目前仅支持机构注册用户进行资产交易</p>
<div class="examine_content"> <div class="examine_content">
<img :src="check_status==0? '../../../assets/img/examine_img.png' :'../../../assets/img/examine_img1.png'" alt="" class="examine_img"> <img src="../../../assets/img/examine_img.png" alt="" class="examine_img" v-if="check_status==0">
<img src="../../../assets/img/examine_img1.png" alt="" class="examine_img" v-else-if="check_status==2">
<p class="examine_tips"> <p class="examine_tips">
<template v-if="check_status==0"> <template v-if="check_status==0">
<span >资料已经提交请耐心等待审核</span> <span >资料已经提交请耐心等待审核</span>

34
src/utils/request.js

@ -9,7 +9,15 @@ const service = axios.create({
service.interceptors.request.use( service.interceptors.request.use(
config => { config => {
return config; var login_info=JSON.parse(localStorage.getItem('login_info'))
if(login_info!=null){
var token = login_info.session.session_id
if(token ){
config.headers['token'] = token
}
}
return config;
}, },
error => { error => {
console.log(error); console.log(error);
@ -19,11 +27,25 @@ service.interceptors.request.use(
service.interceptors.response.use( service.interceptors.response.use(
response => { response => {
if (response.status === 200) { if (response.data.code === 303) {
return response.data; this.$message.error('登录已超时,请重新登录')
} else { localStorage.removeItem('login_info')
Promise.reject(); location.reload()
} // MessageBox.confirm('登录已超时,请重新登录', '退出', {
// confirmButtonText: '登录',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// storage.remove('seller_token')
// location.reload()
// })
}
if (response.status === 200) {
return response.data;
} else {
Promise.reject();
}
}, },
error => { error => {
console.log(error); console.log(error);

Loading…
Cancel
Save