Browse Source

接口路径修改

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

11
src/config/api.js

@ -10,7 +10,7 @@ const wiki = `${proxyUrl}/wiki`;
// const page = `${wiki}/page`; // 创新平台相关操作 // const page = `${wiki}/page`; // 创新平台相关操作
const policy = `${proxyUrl}/policy/policy`; // 创新政策相关接口 const policy = `${proxyUrl}/policy/policy`; // 创新政策相关接口
const activity = `${wiki}/activity`; // 创新政策相关接口 const activity = `${wiki}/activity`; // 创新政策相关接口
const Business = `${wiki}/Business`; // 生态企业和合作伙伴查询 const Business = `${wiki}/business`; // 生态企业和合作伙伴查询
const carousel = `${wiki}/carousel`; // 轮播图相关接口 const carousel = `${wiki}/carousel`; // 轮播图相关接口
const page = `${wiki}/page`; // 页面详情相关接口 const page = `${wiki}/page`; // 页面详情相关接口
const achInstr = `${wiki}/achInstr`; // 轮播图相关接口 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 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); 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 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); 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, pageSize: 9,
total: 10, total: 10,
typeNum: '', typeNum: '',
bannerNum: '', bannerNum: [],
titleText: '', titleText: '',
}; };
}, },

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

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

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

@ -4,25 +4,17 @@
<div class="d-flex"> <div class="d-flex">
<div class="flex-3 flex-wrap"> <div class="flex-3 flex-wrap">
<span class="ins-title">所属领域</span> <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-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>
</div> </div>
<div class="d-flex flex-wrap"> <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"> <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.title }}</p> <p class="pro-title">{{ item.unit }}</p>
<p class="pro-content">{{ item.content }}</p> <p class="pro-content">挑战成功</p>
<p class="pro-time">时间{{ item.time }}</p> <p class="pro-time">时间{{ item.times }}</p>
<p class="pro-more" @click="showModal(item)">查看详情</p>
</div> </div>
</div> </div>
<div> <div>
@ -37,11 +29,27 @@
v-show="total > 6" v-show="total > 6"
/> />
</div> </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> </div>
</template> </template>
<script> <script>
import { selfulUnveilingList } from 'config/api'; import { selResultPublicity } from 'config/api';
export default { export default {
name: 'Notice', name: 'Notice',
data() { data() {
@ -50,8 +58,8 @@ export default {
title: '结果公告', title: '结果公告',
typeOfPlatform: '创新挑战', typeOfPlatform: '创新挑战',
current: 1, current: 1,
pageSize: 8, pageSize: 6,
total: 10, total: 0,
list: [ list: [
{ {
id: 1, id: 1,
@ -69,45 +77,29 @@ export default {
isActive: false, isActive: false,
}, },
], ],
lists: [ 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',
},
],
servics: '', servics: '',
visible: false,
confirmLoading: false,
proData: null,
formLayout: 'horizontal',
form: this.$form.createForm(this, { name: 'coordinated' }),
}; };
}, },
created() { created() {
// this.getData(); this.getData();
}, },
methods: { methods: {
showModal(obj) {
this.proData = obj;
this.visible = true;
},
handleOk(e) {
this.visible = false;
},
handleCancel(e) {
this.visible = false;
},
choose(index) { choose(index) {
const that = this; const that = this;
// that.achList = []; // that.achList = [];
@ -130,16 +122,17 @@ export default {
pageSize: this.pageSize, pageSize: this.pageSize,
}, },
}; };
const res = await selfulUnveilingList(params); const res = await selResultPublicity(params);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
if (code === 200) { if (code === 200) {
// this.lists = data; this.lists = data;
console.log(data); this.total = parseInt(data.total);
// console.log(data);
} else { } else {
this.$message.error('查询失败'); this.$message.error(msg);
} }
} catch (error) { } catch (error) {
this.$message.error(error); this.$message.error('查询失败');
} }
}, },
// //
@ -192,9 +185,10 @@ export default {
} }
.pro-box { .pro-box {
position: relative;
width: 31.3%; width: 31.3%;
margin-right: 3%; margin-right: 3%;
height: auto; height: 208px;
background: #FFFFFF; background: #FFFFFF;
padding: 24px 20px; padding: 24px 20px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16); box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
@ -203,6 +197,22 @@ export default {
opacity: 1; 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 { .pro-title {
font-size: 24px; font-size: 24px;
font-family: Microsoft YaHei; font-family: Microsoft YaHei;

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

@ -6,10 +6,10 @@
<p class="pro-title">{{ item.title }}</p> <p class="pro-title">{{ item.title }}</p>
<div class="pro-content" v-dompurify-html="item.content"></div> <div class="pro-content" v-dompurify-html="item.content"></div>
<p class="pro-time">时间{{ item.deadline }}</p> <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>
</div> </div>
<a-empty v-else /> <a-empty v-else style="height: 500px" />
<div> <div>
<a-pagination <a-pagination
:current="current" :current="current"
@ -97,9 +97,10 @@ export default {
this.total = parseInt(data.total); this.total = parseInt(data.total);
} else { } else {
console.log(msg); console.log(msg);
this.$message.error(msg);
} }
} catch (error) { } catch (error) {
console.log(error); this.$message.error('查询失败');
} }
}, },
choose(index) { choose(index) {
@ -177,6 +178,21 @@ export default {
opacity: 1; 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 { .pro-title {
font-size: 24px; font-size: 24px;
font-family: Microsoft YaHei; font-family: Microsoft YaHei;

49
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-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-group @change="onChange" class="line-height-30">
<a-checkbox value="1">技术研发关键核心技术</a-checkbox> <a-checkbox v-for="(item, index) in typeList" :key="index" :value="item.id">{{ item.name }}</a-checkbox>
<a-checkbox value="2">产品研发产品升级新产品研发</a-checkbox>
<a-checkbox value="3">技术改造设备研发生产条件</a-checkbox>
<a-checkbox value="4">技术配套技术产品等配套合作</a-checkbox>
</a-checkbox-group> </a-checkbox-group>
</a-form-item> </a-form-item>
<!-- 需求内容 --> <!-- 需求内容 -->
@ -56,14 +53,18 @@
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-modal> </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> </div>
</template> </template>
<script> <script>
import { mapState } from 'vuex';
import { quillEditor } from 'vue-quill-editor'; // import { quillEditor } from 'vue-quill-editor'; //
import 'quill/dist/quill.core.css'; import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css'; import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css'; import 'quill/dist/quill.bubble.css';
import { upload, addTelease } from 'config/api'; import { upload, addTelease, findTypeList } from 'config/api';
const formItemLayout = { const formItemLayout = {
labelCol: { span: 5 }, labelCol: { span: 5 },
@ -97,11 +98,13 @@ export default {
return { return {
form: this.$form.createForm(this, { name: 'submit' }), form: this.$form.createForm(this, { name: 'submit' }),
visible: false, visible: false,
visible1: false,
title: '发榜', title: '发榜',
action: upload, action: upload,
formItemLayout, formItemLayout,
formTailLayout, formTailLayout,
confirmLoading: false, confirmLoading: false,
confirmLoading1: false,
needContent: ``, needContent: ``,
editorOption: { editorOption: {
placeholder: '在这里输入...', placeholder: '在这里输入...',
@ -136,9 +139,13 @@ export default {
buildTime: '', buildTime: '',
}, },
hideMessage: null, hideMessage: null,
typeList: [],
}; };
}, },
computed: mapState('user', ['anyringToken']),
created() {
this.findType();
},
methods: { methods: {
// //
changeNeedTime(date, dateString) { changeNeedTime(date, dateString) {
@ -156,6 +163,7 @@ export default {
// console.log(this.content); // console.log(this.content);
}, },
onChange(e) { onChange(e) {
console.log(e);
this.platform.type = e; this.platform.type = e;
}, },
// //
@ -178,17 +186,27 @@ export default {
// //
showModal() { showModal() {
this.visible = true; if (this.anyringToken) {
this.visible = true;
} else {
this.visible1 = true;
}
}, },
// //
handleCancel(e) { handleCancel(e) {
this.visible = false; this.visible = false;
}, },
// //
handleOk() { handleOk() {
this.subMitAdd(); this.subMitAdd();
}, },
handleCancel1() {
this.visible1 = false;
},
//
handleOk1() {
this.$router.push('/login');
},
// //
async subMitAdd() { async subMitAdd() {
this.confirmLoading = true; this.confirmLoading = true;
@ -221,6 +239,21 @@ export default {
this.confirmLoading = false; 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> </script>

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

@ -37,6 +37,9 @@
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-modal> </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> </div>
</template> </template>
@ -58,7 +61,9 @@ export default {
formLayout: 'horizontal', formLayout: 'horizontal',
form: this.$form.createForm(this, { name: '揭榜' }), form: this.$form.createForm(this, { name: '揭榜' }),
visible: false, visible: false,
visible1: false,
confirmLoading: false, confirmLoading: false,
confirmLoading1: false,
codeNum: '', // codeNum: '', //
setData: { setData: {
accepterName: '', // accepterName: '', //
@ -69,16 +74,26 @@ export default {
}, },
}; };
}, },
computed: mapState('user', ['picCode']), computed: mapState('user', ['picCode', 'anyringToken']),
methods: { methods: {
...mapActions('user', ['sendCode', 'sendPicCode']), ...mapActions('user', ['sendCode', 'sendPicCode']),
showModal() { showModal() {
this.visible = true; if (this.anyringToken) {
this.visible = true;
} else {
this.visible1 = true;
}
}, },
handleCancel(e) { handleCancel(e) {
this.visible = false; this.visible = false;
}, },
handleCancel1() {
this.visible1 = false;
},
//
handleOk1() {
this.$router.push('/login');
},
changePhone(e) { changePhone(e) {
this.setData.phone = e.target.value; this.setData.phone = e.target.value;
}, },

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

@ -46,6 +46,9 @@
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-modal> </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> </div>
</template> </template>
@ -72,11 +75,13 @@ export default {
return { return {
form: this.$form.createForm(this, { name: 'submit' }), form: this.$form.createForm(this, { name: 'submit' }),
visible: false, visible: false,
visible1: false,
title: '项目合作', title: '项目合作',
str: '项目合作', str: '项目合作',
formItemLayout, formItemLayout,
formTailLayout, formTailLayout,
confirmLoading: false, confirmLoading: false,
confirmLoading1: false,
platform: { platform: {
companyName: '', // companyName: '', //
manName: '', // manName: '', //
@ -100,7 +105,7 @@ export default {
], ],
}; };
}, },
computed: mapState('user', ['picCode', 'user']), computed: mapState('user', ['picCode', 'user', 'anyringToken']),
async created() { async created() {
this.sendPicCode(); this.sendPicCode();
await this.getUserSer(); await this.getUserSer();
@ -121,13 +126,24 @@ export default {
...mapActions('home', ['getUserSer']), ...mapActions('home', ['getUserSer']),
// //
showModal() { showModal() {
this.visible = true; console.log(this.anyringToken);
console.log(this.value); if (this.anyringToken) {
this.visible = true;
} else {
this.visible1 = true;
}
}, },
// //
handleCancel(e) { handleCancel(e) {
this.visible = false; this.visible = false;
}, },
handleCancel1() {
this.visible1 = false;
},
//
handleOk1() {
this.$router.push('/login');
},
// //
changePhone(e) { changePhone(e) {
this.platform.tel = e.target.value; this.platform.tel = e.target.value;

Loading…
Cancel
Save