Browse Source

接口路径修改

master
aBin 4 years ago
parent
commit
91bcd46196
  1. 11
      src/config/api.js
  2. 2
      src/views/Business/Business.vue
  3. 78
      src/views/Business/components/SearchBox.vue
  4. 124
      src/views/Challenge/Children/Notice.vue
  5. 22
      src/views/Challenge/Children/Release.vue
  6. 47
      src/views/Challenge/Children/components/Publish.vue
  7. 19
      src/views/Challenge/Children/components/Unveiling.vue
  8. 20
      src/views/Develop/components/AddModel.vue

11
src/config/api.js

@ -10,7 +10,7 @@ const wiki = `${proxyUrl}/wiki`;
// const page = `${wiki}/page`; // 创新平台相关操作
const policy = `${proxyUrl}/policy/policy`; // 创新政策相关接口
const activity = `${wiki}/activity`; // 创新政策相关接口
const Business = `${wiki}/Business`; // 生态企业和合作伙伴查询
const Business = `${wiki}/business`; // 生态企业和合作伙伴查询
const carousel = `${wiki}/carousel`; // 轮播图相关接口
const page = `${wiki}/page`; // 页面详情相关接口
const achInstr = `${wiki}/achInstr`; // 轮播图相关接口
@ -50,10 +50,10 @@ export const front = params => axios.post(`${activity}/query/front`, params);
export const apply = params => axios.post(`${activity}/apply`, params);
// 查询生态企业
export const frontSearchFriend = params => axios.post(`${Business}/FrontSearchFriend`, params);
export const frontSearchFriend = params => axios.post(`${Business}/frontSearchFriend`, params);
// 查询合作伙伴
export const frontSearchCompany = params => axios.post(`${Business}/FrontSearchCompany`, params);
export const frontSearchCompany = params => axios.post(`${Business}/frontSearchCompany`, params);
// 介绍页面详情查询
export const getPageDetail = params => axios.post(`${page}/detail`, params);
@ -126,7 +126,10 @@ export const selTelease = params => axios.post(`${releaseTheList}/selTelease`, p
export const addUnveiling = params => axios.post(`${releaseTheList}/addUnveiling`, params);
// 创新挑战揭榜成功列表查询
export const selfulUnveilingList = params => axios.post(`${releaseTheList}/selfulUnveilingList`, params);
export const selResultPublicity = params => axios.post(`${releaseTheList}/selResultPublicity`, params);
// 创新挑战发榜类型查询
export const findTypeList = params => axios.post(`${releaseTheList}/findTypeList`, params);
// 创业学院内容查询
export const back = params => axios.post(`${wiki}/academy/query/back`, params);

2
src/views/Business/Business.vue

@ -66,7 +66,7 @@ export default {
pageSize: 9,
total: 10,
typeNum: '',
bannerNum: '',
bannerNum: [],
titleText: '',
};
},

78
src/views/Business/components/SearchBox.vue

@ -1,40 +1,21 @@
<template>
<div class="search-list">
<span style="height: 28px; line-height: 28px; font-size: 20px; font-weight: bold; color: rgba(0, 0, 0, 0.85)">栏目</span>
<!-- <a-select allow-clear style="width: 120px" @change="handleChange">
<a-select-option v-for="(item, index) in bannerList" :key="index" :value="index + 1"> {{ item }} </a-select-option>
</a-select> -->
<span
class="ban-style"
:class="bannerNum === index + 1 ? 'ban-act' : ''"
@click="onClick(index)"
v-for="(item, index) in bannerList"
:key="index"
>
<a-checkbox-group @change="handleChange">
<a-checkbox v-for="(item, index) in bannerList" :key="index" :value="index + 1">
{{ item }}
</span>
</a-checkbox>
</a-checkbox-group>
<br />
<span style="font-size: 20px; font-weight: bold; color: rgba(0, 0, 0, 0.85)">类型</span>
<span
class="ban-style"
:class="typeNum === index + 1 ? 'ban-act' : ''"
@click="onClick1(index)"
v-for="(item, index) in typeList"
:key="index + 10"
>
{{ item }}
</span>
<a-radio-group @change="handleChange1">
<a-radio v-for="(item, index) in typeList" :key="index" :value="index + 1">{{ item }}</a-radio>
</a-radio-group>
<br />
<span style="font-size: 20px; font-weight: bold; color: rgba(0, 0, 0, 0.85)">时间</span>
<span
class="ban-style"
:class="timeNum === index + 1 ? 'ban-act' : ''"
@click="onClick2(index)"
v-for="(item, index) in timeList"
:key="item"
>
{{ item }}
</span>
<a-radio-group @change="handleChange2">
<a-radio v-for="(item, index) in timeList" :key="index" :value="index + 1">{{ item }}</a-radio>
</a-radio-group>
<a-input placeholder="搜索标题..." class="search-ipt" allow-clear style="width: 30%" v-model="titleText" />
<a-button class="search-btn" type="primary" @click="submit">搜索</a-button>
</div>
@ -45,12 +26,12 @@ export default {
data() {
return {
typeList: ['视频', '音频', '文档', '全部'],
typeNum: 0,
bannerList: ['栏目1', '栏目2', '栏目3', '全部'],
bannerNum: 0,
typeNum: '',
bannerList: ['栏目1', '栏目2', '栏目3'],
bannerNum: [],
titleText: '',
timeList: ['近七天', '近一个月', '近一年', '全部'],
timeNum: 0,
timeNum: '',
};
},
methods: {
@ -64,39 +45,18 @@ export default {
this.$emit('getData', getParam);
},
handleChange(e) {
if (e) {
this.bannerNum = e;
} else {
this.bannerNum = '';
}
},
handleChange1(e) {
if (e) {
this.typeNum = e;
console.log(e.target.value);
if (e.target.value < 4) {
this.typeNum = e.target.value;
} else {
this.typeNum = '';
}
},
onClick1(index) {
if (index + 1 === this.typeNum) {
this.typeNum = 0;
} else {
this.typeNum = index + 1;
}
},
onClick(index) {
if (index + 1 === this.bannerNum) {
this.bannerNum = 0;
} else {
this.bannerNum = index + 1;
}
},
onClick2(index) {
if (index + 1 === this.timeNum) {
this.timeNum = 0;
} else {
this.timeNum = index + 1;
}
handleChange2(e) {
console.log(e.target.value);
},
},
};

124
src/views/Challenge/Children/Notice.vue

@ -4,25 +4,17 @@
<div class="d-flex">
<div class="flex-3 flex-wrap">
<span class="ins-title">所属领域</span>
<!-- <span
:class="item.isActive ? 'act-color' : ''"
:key="index"
@click="choose(index)"
class="ins-name"
v-for="(item, index) in list"
>
{{ item.name }}
</span> -->
<a-input style="width: 30%; margin: auto 0" allow-clear v-model="servics" />
<a-button type="primary" style="margin: auto 0">搜索</a-button>
<a-button type="primary" style="margin: auto 0" @click="getData">搜索</a-button>
</div>
</div>
</div>
<div class="d-flex flex-wrap">
<div :class="(index + 1) % 3 === 0 ? 'margin-0' : ''" :key="index" class="pro-box" v-for="(item, index) in lists">
<p class="pro-title">{{ item.title }}</p>
<p class="pro-content">{{ item.content }}</p>
<p class="pro-time">时间{{ item.time }}</p>
<div class="d-flex flex-wrap" style="min-height: 500px">
<div :class="(index + 1) % 3 === 0 ? 'margin-0' : ''" :key="index" class="pro-box" v-for="(item, index) in lists.list">
<p class="pro-title">{{ item.unit }}</p>
<p class="pro-content">挑战成功</p>
<p class="pro-time">时间{{ item.times }}</p>
<p class="pro-more" @click="showModal(item)">查看详情</p>
</div>
</div>
<div>
@ -37,11 +29,27 @@
v-show="total > 6"
/>
</div>
<a-modal width="50%" title="揭榜详情" :visible="visible" :confirm-loading="confirmLoading" @ok="handleCancel" @cancel="handleCancel">
<a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 12, offset: 5 }" v-if="proData">
<a-form-item label="揭榜人">
{{ proData.accepterName }}
</a-form-item>
<a-form-item label="揭榜人联系方式">
{{ proData.phone }}
</a-form-item>
<a-form-item label="揭榜单位">
{{ proData.unit }}
</a-form-item>
<a-form-item label="揭榜方案简述">
{{ proData.planIntro }}
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import { selfulUnveilingList } from 'config/api';
import { selResultPublicity } from 'config/api';
export default {
name: 'Notice',
data() {
@ -50,8 +58,8 @@ export default {
title: '结果公告',
typeOfPlatform: '创新挑战',
current: 1,
pageSize: 8,
total: 10,
pageSize: 6,
total: 0,
list: [
{
id: 1,
@ -69,45 +77,29 @@ export default {
isActive: false,
},
],
lists: [
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
],
lists: {},
servics: '',
visible: false,
confirmLoading: false,
proData: null,
formLayout: 'horizontal',
form: this.$form.createForm(this, { name: 'coordinated' }),
};
},
created() {
// this.getData();
this.getData();
},
methods: {
showModal(obj) {
this.proData = obj;
this.visible = true;
},
handleOk(e) {
this.visible = false;
},
handleCancel(e) {
this.visible = false;
},
choose(index) {
const that = this;
// that.achList = [];
@ -130,16 +122,17 @@ export default {
pageSize: this.pageSize,
},
};
const res = await selfulUnveilingList(params);
const res = await selResultPublicity(params);
const { code, msg, data } = res.data;
if (code === 200) {
// this.lists = data;
console.log(data);
this.lists = data;
this.total = parseInt(data.total);
// console.log(data);
} else {
this.$message.error('查询失败');
this.$message.error(msg);
}
} catch (error) {
this.$message.error(error);
this.$message.error('查询失败');
}
},
//
@ -192,9 +185,10 @@ export default {
}
.pro-box {
position: relative;
width: 31.3%;
margin-right: 3%;
height: auto;
height: 208px;
background: #FFFFFF;
padding: 24px 20px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
@ -203,6 +197,22 @@ export default {
opacity: 1;
}
@media only screen and (max-width: 1500px) {
.pro-box {
width: 47%;
margin: 20px auto !important;
height: 240px;
}
}
.pro-more {
position: absolute;
right: 20px;
bottom: 0;
cursor: pointer;
color: rgba(0, 0, 0, 0.45);
}
.pro-title {
font-size: 24px;
font-family: Microsoft YaHei;

22
src/views/Challenge/Children/Release.vue

@ -6,10 +6,10 @@
<p class="pro-title">{{ item.title }}</p>
<div class="pro-content" v-dompurify-html="item.content"></div>
<p class="pro-time">时间{{ item.deadline }}</p>
<unveiling :pro-id="item.id" class="pro-btn" type="primary" />
<unveiling :pro-id="item.bid" class="pro-btn" type="primary" />
</div>
</div>
<a-empty v-else />
<a-empty v-else style="height: 500px" />
<div>
<a-pagination
:current="current"
@ -97,9 +97,10 @@ export default {
this.total = parseInt(data.total);
} else {
console.log(msg);
this.$message.error(msg);
}
} catch (error) {
console.log(error);
this.$message.error('查询失败');
}
},
choose(index) {
@ -177,6 +178,21 @@ export default {
opacity: 1;
}
@media only screen and (max-width: 1500px) {
.pro-box {
width: 30%;
margin: 20px auto !important;
height: 240px;
}
}
@media only screen and (max-width: 1200px) {
.pro-box {
width: 47%;
height: 240px;
}
}
.pro-title {
font-size: 24px;
font-family: Microsoft YaHei;

47
src/views/Challenge/Children/components/Publish.vue

@ -18,10 +18,7 @@
<!-- 需求类别 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" class="mb-3" label="需求类别">
<a-checkbox-group @change="onChange" class="line-height-30">
<a-checkbox value="1">技术研发关键核心技术</a-checkbox>
<a-checkbox value="2">产品研发产品升级新产品研发</a-checkbox>
<a-checkbox value="3">技术改造设备研发生产条件</a-checkbox>
<a-checkbox value="4">技术配套技术产品等配套合作</a-checkbox>
<a-checkbox v-for="(item, index) in typeList" :key="index" :value="item.id">{{ item.name }}</a-checkbox>
</a-checkbox-group>
</a-form-item>
<!-- 需求内容 -->
@ -56,14 +53,18 @@
</a-form-item>
</a-form>
</a-modal>
<a-modal :confirm-loading="confirmLoading1" title="需要登录" :visible="visible1" @cancel="handleCancel1" @ok="handleOk1" width="50%">
还没有登录请您先去登录 <span style="color: rgba(0, 0, 0, 0.65)"> 点击确定前往登录</span>
</a-modal>
</div>
</template>
<script>
import { mapState } from 'vuex';
import { quillEditor } from 'vue-quill-editor'; //
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css';
import { upload, addTelease } from 'config/api';
import { upload, addTelease, findTypeList } from 'config/api';
const formItemLayout = {
labelCol: { span: 5 },
@ -97,11 +98,13 @@ export default {
return {
form: this.$form.createForm(this, { name: 'submit' }),
visible: false,
visible1: false,
title: '发榜',
action: upload,
formItemLayout,
formTailLayout,
confirmLoading: false,
confirmLoading1: false,
needContent: ``,
editorOption: {
placeholder: '在这里输入...',
@ -136,9 +139,13 @@ export default {
buildTime: '',
},
hideMessage: null,
typeList: [],
};
},
computed: mapState('user', ['anyringToken']),
created() {
this.findType();
},
methods: {
//
changeNeedTime(date, dateString) {
@ -156,6 +163,7 @@ export default {
// console.log(this.content);
},
onChange(e) {
console.log(e);
this.platform.type = e;
},
//
@ -178,17 +186,27 @@ export default {
//
showModal() {
if (this.anyringToken) {
this.visible = true;
} else {
this.visible1 = true;
}
},
//
handleCancel(e) {
this.visible = false;
},
//
handleOk() {
this.subMitAdd();
},
handleCancel1() {
this.visible1 = false;
},
//
handleOk1() {
this.$router.push('/login');
},
//
async subMitAdd() {
this.confirmLoading = true;
@ -221,6 +239,21 @@ export default {
this.confirmLoading = false;
}
},
//
async findType() {
try {
const res = await findTypeList();
const { code, msg, data } = res.data;
if (code === 200) {
this.typeList = data;
} else {
console.log(msg);
}
} catch (error) {
console.log(error);
}
},
},
};
</script>

19
src/views/Challenge/Children/components/Unveiling.vue

@ -37,6 +37,9 @@
</a-form-item>
</a-form>
</a-modal>
<a-modal :confirm-loading="confirmLoading1" title="需要登录" :visible="visible1" @cancel="handleCancel1" @ok="handleOk1" width="50%">
还没有登录请您先去登录 <span style="color: rgba(0, 0, 0, 0.65)"> 点击确定前往登录</span>
</a-modal>
</div>
</template>
@ -58,7 +61,9 @@ export default {
formLayout: 'horizontal',
form: this.$form.createForm(this, { name: '揭榜' }),
visible: false,
visible1: false,
confirmLoading: false,
confirmLoading1: false,
codeNum: '', //
setData: {
accepterName: '', //
@ -69,16 +74,26 @@ export default {
},
};
},
computed: mapState('user', ['picCode']),
computed: mapState('user', ['picCode', 'anyringToken']),
methods: {
...mapActions('user', ['sendCode', 'sendPicCode']),
showModal() {
if (this.anyringToken) {
this.visible = true;
} else {
this.visible1 = true;
}
},
handleCancel(e) {
this.visible = false;
},
handleCancel1() {
this.visible1 = false;
},
//
handleOk1() {
this.$router.push('/login');
},
changePhone(e) {
this.setData.phone = e.target.value;
},

20
src/views/Develop/components/AddModel.vue

@ -46,6 +46,9 @@
</a-form-item>
</a-form>
</a-modal>
<a-modal :confirm-loading="confirmLoading1" title="需要登录" :visible="visible1" @cancel="handleCancel1" @ok="handleOk1" width="50%">
还没有登录请您先去登录 <span style="color: rgba(0, 0, 0, 0.65)"> 点击确定前往登录</span>
</a-modal>
</div>
</template>
@ -72,11 +75,13 @@ export default {
return {
form: this.$form.createForm(this, { name: 'submit' }),
visible: false,
visible1: false,
title: '项目合作',
str: '项目合作',
formItemLayout,
formTailLayout,
confirmLoading: false,
confirmLoading1: false,
platform: {
companyName: '', //
manName: '', //
@ -100,7 +105,7 @@ export default {
],
};
},
computed: mapState('user', ['picCode', 'user']),
computed: mapState('user', ['picCode', 'user', 'anyringToken']),
async created() {
this.sendPicCode();
await this.getUserSer();
@ -121,13 +126,24 @@ export default {
...mapActions('home', ['getUserSer']),
//
showModal() {
console.log(this.anyringToken);
if (this.anyringToken) {
this.visible = true;
console.log(this.value);
} else {
this.visible1 = true;
}
},
//
handleCancel(e) {
this.visible = false;
},
handleCancel1() {
this.visible1 = false;
},
//
handleOk1() {
this.$router.push('/login');
},
//
changePhone(e) {
this.platform.tel = e.target.value;

Loading…
Cancel
Save