Browse Source

优化

master
ltlzx 4 years ago
parent
commit
71098f0464
  1. 16
      src/api/index.js
  2. BIN
      src/assets/img/examine_img1.png
  3. 23
      src/components/page/Hoster/Listing.vue
  4. 42
      src/components/page/Hoster/myAssets.vue
  5. 2
      src/components/page/Purchaser/wkPurchaser.vue
  6. 2
      src/components/page/Purchaser/wkTrusteeship.vue
  7. 2
      src/components/page/StationNotice.vue

16
src/api/index.js

@ -240,3 +240,19 @@ export const index = query => {
params: query
});
};
// 申请下架(摘牌)
export const soldOut = query => {
return request({
url: '/api/user.Asset/soldOut',
method: 'post',
data: query
});
};
// 上传图片
export const uploadimg = query => {
return request({
url: '/api/Index/uploadimg',
method: 'post',
data: query
});
};

BIN
src/assets/img/examine_img1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

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

@ -150,7 +150,7 @@
<script>
import { mavonEditor } from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
import {get_asset_type,getProvince,getCity,getArea,cartellino,getPrice,assetInfo,update_cartellino} from '../../../api/index'
import {get_asset_type,getProvince,getCity,getArea,cartellino,getPrice,assetInfo,update_cartellino,uploadimg } from '../../../api/index'
export default {
data(){
return{
@ -195,7 +195,7 @@ export default {
express_money:'',
start_auction_money:'',
bidding_money:'',
pay_type:1,
pay_type:[1],
},
rules:{
serial_img: [
@ -378,14 +378,21 @@ export default {
var formdata = new FormData();
formdata.append('file', $file);
//
this.$axios({
url: this.action,
method: 'post',
data: formdata,
headers: { 'Content-Type': 'multipart/form-data' },
}).then((url) => {
// let data =
uploadimg(formdata).then(res=>{
if (res.code==1) {
let url=this.host + res.data.img_url;
this.$refs.md.$img2Url(pos, url);
}
})
// this.$axios({
// url: this.action,
// method: 'post',
// data: formdata,
// headers: { 'Content-Type': 'multipart/form-data' },
// }).then((url) => {
// this.$refs.md.$img2Url(pos, url);
// })
},
change(value, render){
// render markdown

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

@ -86,7 +86,16 @@
</template>
<template v-else-if="scope.row.asset_status==2">
<p class="table_p2" @click="goDetails(scope.row.id,0)">查看资产</p>
<p class="table_p2">申请摘牌</p>
<el-upload
class="upload-demo"
:action="action1"
:show-file-list="false"
:on-error="handleAvatarError"
list-type="picture"
:on-success="(res,file,id)=>{handleAvatarSuccess1(res,file,scope.row.id)}"
>
<p class="table_p2" >申请摘牌</p>
</el-upload>
</template>
</template>
</el-table-column>
@ -106,7 +115,7 @@
</template>
<script>
import moment from 'moment'
import {assetList,getTopAssetClass} from '../../../api/index'
import {assetList,getTopAssetClass,soldOut} from '../../../api/index'
export default {
data(){
return{
@ -119,6 +128,8 @@ export default {
asset_type_id:'',
serial_name:''
},
host:'http://wenhua.xingtongworld.com',
action1:'http://wenhua.xingtongworld.com/api/Index/uploadFile',
assetLists:[],
pageTotal:0,
headerList:[
@ -138,6 +149,32 @@ export default {
this.getTopAssetClass()
},
methods:{
soldOut(file,id){
let data={
id:id,
delist:file
}
soldOut(data).then(res => {
console.info(res)
if(res.code==100){
this.$message.success('申请成功,请等待审核~')
}else{
this.$message.error(res.msg)
}
})
},
handleAvatarError(){
this.$message.error('文件上传失败!');
},
handleAvatarSuccess1(res,file,id){
console.info(res)
if(res.code==1){
let contract=this.host+res.data.img_url;
this.soldOut(contract,id)
}else{
this.$message.error(res.msg);
}
},
getTopAssetClass(){
getTopAssetClass(this.query).then(res => {
console.info(res)
@ -149,7 +186,6 @@ export default {
})
},
goDetails(id,type){
console.info(111)
this.$router.push({path:'/AssetListing',query:{id:id,type:type}})
},
tableRowClassName({row, rowIndex}) {

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

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

2
src/components/page/Purchaser/wkTrusteeship.vue

@ -366,6 +366,8 @@ export default {
if(valid){
if(this.ruleForm.account_type==1){
this.ruleForm.establish_time=this.ruleForm.establish_time/1000
}else{
this.ruleForm.establish_time=0
}
openAccount(this.ruleForm).then(res => {
console.info(res)

2
src/components/page/StationNotice.vue

@ -5,7 +5,7 @@
<el-table
:data="tableData"
header-cell-class-name="theader"
:header-cell-style="{background:'#F8E6E6 !important',color:'#C94C4C',height:'60px',fontSize:'14px'}"
:header-cell-style="{background:'#F2F2F2 !important',color:'#333333',height:'60px',fontSize:'14px'}"
style="width: 100%">
<el-table-column
prop="date"

Loading…
Cancel
Save