Commit 8728a815 authored by lixy's avatar lixy

公众号-股权申请

parent afb26637
...@@ -2,14 +2,14 @@ import fetch from 'utils/fetch'; ...@@ -2,14 +2,14 @@ import fetch from 'utils/fetch';
export function getObj(id) { export function getObj(id) {
return fetch({ return fetch({
url: '/vehicle/branchCompany/stock/apply/' + id, url: '/vehicle/branchCompany/stock/right/apply/' + id,
method: 'get' method: 'get'
}); });
} }
export function page(param) { export function page(param) {
return fetch({ return fetch({
url: '/vehicle/branchCompany/stock/apply/page', url: '/vehicle/branchCompany/stock/right/apply/page',
method: 'get', method: 'get',
params: param params: param
}); });
...@@ -17,14 +17,14 @@ export function page(param) { ...@@ -17,14 +17,14 @@ export function page(param) {
export function delObj(id) { export function delObj(id) {
return fetch({ return fetch({
url: '/vehicle/branchCompany/stock/apply/' + id, url: '/vehicle/branchCompany/stock/right/apply/' + id,
method: 'delete' method: 'delete'
}); });
} }
export function buyStock(id) { export function buyStock(id) {
return fetch({ return fetch({
url: '/vehicle/branchCompany/stock/apply/buy', url: '/vehicle/branchCompany/stock/right/apply/buy',
method: 'post', method: 'post',
params: { params: {
applyId: id applyId: id
...@@ -34,7 +34,7 @@ export function buyStock(id) { ...@@ -34,7 +34,7 @@ export function buyStock(id) {
export function cancelApply(id) { export function cancelApply(id) {
return fetch({ return fetch({
url: '/vehicle/branchCompany/stock/apply/cancel', url: '/vehicle/branchCompany/stock/right/apply/cancel',
method: 'post', method: 'post',
params: { params: {
applyId: id applyId: id
......
...@@ -59,8 +59,8 @@ ...@@ -59,8 +59,8 @@
} }
}, },
created() { created() {
let id = this.$route.query.id;
this.id = this.$route.query.id; this.id = this.$route.query.id;
this.stockRightId = this.$route.query.stockRightId;
this.detail(); this.detail();
if(this.$route.query.showFixedBox==1){ if(this.$route.query.showFixedBox==1){
this.showFixedBox = true this.showFixedBox = true
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
}, },
methods: { methods: {
apply(){ apply(){
this.$router.push({path: '/stockCrowdDetail?id=' + this.id}) this.$router.push({path: '/stockCrowdDetail?id=' + this.id+"&stockRightId="+this.stockRightId})
}, },
detail(){ detail(){
getDetail(this.id).then(res=>{ getDetail(this.id).then(res=>{
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="all"> <div class="all">
<div class="goods"> <div class="goods">
<div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0"> <div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0">
<div class="order-item" v-for="item in list" :key="item.key" @click="view(item.id, item.companyName)"> <div class="order-item" v-for="item in list" :key="item.key" @click="view(item.companyBaseId, item.id, item.companyName)">
<div class="item-right-p flex-jcc-aic"> <div class="item-right-p flex-jcc-aic">
<div style="width: 95px;height: 75px;"> <div style="width: 95px;height: 75px;">
<img :src="item.cover" style="width: 100%;height:100%;border-radius: 10px;"/> <img :src="item.cover" style="width: 100%;height:100%;border-radius: 10px;"/>
...@@ -272,8 +272,8 @@ ...@@ -272,8 +272,8 @@
}); });
this.busy = false; this.busy = false;
}, },
view(id, name) { view(id, stockRightId, name) {
this.$router.push({path: '/companyDetail?id=' + id+'&showFixedBox=1'}) this.$router.push({path: '/companyDetail?id=' + id+'&showFixedBox=1&stockRightId='+stockRightId})
// this.$router.push({path: '/stockCrowdDetail?id=' + id}) // this.$router.push({path: '/stockCrowdDetail?id=' + id})
}, },
search: function() { search: function() {
......
...@@ -123,7 +123,8 @@ ...@@ -123,7 +123,8 @@
name: undefined, name: undefined,
tel: undefined, tel: undefined,
companyId: undefined, companyId: undefined,
count: undefined count: undefined,
stockRightId: undefined
}, },
img : !0, img : !0,
companyName: "",//公司名称 companyName: "",//公司名称
...@@ -164,7 +165,7 @@ ...@@ -164,7 +165,7 @@
submit(formName){ submit(formName){
let that = this; let that = this;
that.msg = ""; that.msg = "";
if(!that.form.companyId){ if(!that.form.stockRightId){
that.msg = "请选择待申请的入股项目!" that.msg = "请选择待申请的入股项目!"
return false; return false;
}else if(!that.form.name){ }else if(!that.form.name){
...@@ -211,7 +212,7 @@ ...@@ -211,7 +212,7 @@
checkPhone(that.form.tel); checkPhone(that.form.tel);
checkCount(that.form.count); checkCount(that.form.count);
if (isNum && isPhone) { if (isNum && isPhone) {
this.form.companyId = Number(this.form.companyId) this.form.stockRightId = Number(this.form.stockRightId)
stockApply(this.form) stockApply(this.form)
.then(res => { .then(res => {
that.optionName = "crowdResult"; that.optionName = "crowdResult";
...@@ -228,8 +229,7 @@ ...@@ -228,8 +229,7 @@
} }
}, },
mounted() { mounted() {
let id = this.$route.query.id; this.form.stockRightId = this.$route.query.stockRightId;
this.form.companyId = this.$route.query.id;
this.companyName = this.$route.query.name; this.companyName = this.$route.query.name;
}, },
} }
......
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