@ -0,0 +1,11 @@ |
|||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ |
|||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 |
|||
"version": "0.0", |
|||
"configurations": [{ |
|||
"type": "uniCloud", |
|||
"default": { |
|||
"launchtype": "local" |
|||
} |
|||
} |
|||
] |
|||
} |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 绑定企业基本信息
|
|||
export const add = params => http.post(`${proxyUrl}/enterprise/add`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 完善企业信息
|
|||
export const additional = params => http.post(`${proxyUrl}/enterprise/additional`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 企业完善信息详情
|
|||
export const additionalDetail = params => http.post(`${proxyUrl}/enterprise/additionalDetail`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 地区查询
|
|||
export const areaquery = params => http.post(`${proxyUrl}/area/query`, params); |
@ -1,5 +1,5 @@ |
|||
// api基础地质
|
|||
export const BASE_URL = 'https://www.tall.wiki/gateway'; |
|||
export const BASE_URL = 'https://www.sxwikionline.com/gateway'; |
|||
|
|||
// 错误码
|
|||
export const ERR_CODE = 200; |
|||
|
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 用户绑定查询
|
|||
export const bindMsg = params => http.post(`${proxyUrl}/my/bindMsg`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 揭榜请求
|
|||
export const candidate = params => http.post(`${proxyUrl}/demand/candidate`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 查询是否揭榜
|
|||
export const candidateQuery = params => http.post(`${proxyUrl}/demand/candidateQuery`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 收藏政策
|
|||
export const collectAdd = params => http.post(`${proxyUrl}/collect/add`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 查询企业基本信息
|
|||
export const detail = params => http.post(`${proxyUrl}/enterprise/detail`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 企业评定
|
|||
export const evaluate = params => http.post(`${proxyUrl}/enterprise/evaluate`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 查询文件路径
|
|||
export const fileLocationQuery = params => http.post(`${proxyUrl}/file/fileLocationQuery`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 往期需求列表
|
|||
export const history = params => http.post(`${proxyUrl}/demand/history`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 孵化器查询
|
|||
export const incubator = params => http.post(`${proxyUrl}/incubator/query`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 发榜详情查询
|
|||
export const listDetails = params => http.post(`${proxyUrl}/demand/query`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 地区查询
|
|||
export const policy = params => http.post(`${proxyUrl}/policy/area/query`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 政策详情
|
|||
export const policyDetails = params => http.post(`${proxyUrl}/policy/detail`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 需求发布
|
|||
export const publish = params => http.post(`${proxyUrl}/demand/publish`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 根据企业名称模糊查询企业信息
|
|||
export const queryByFuzzyName = params => http.post(`${proxyUrl}/enterpriseDetail/queryByFuzzyName`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 需求附件下载查询
|
|||
export const queryFile = params => http.post(`${proxyUrl}/demand/queryFile`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 系统消息查询
|
|||
export const queryMsg = params => http.post(`${proxyUrl}/message/queryMsg`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 系统消息详情查询
|
|||
export const queryMsgDetail = params => http.post(`${proxyUrl}/message/queryMsgDetail`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 收藏查询
|
|||
export const querySelf = params => http.post(`${proxyUrl}/collect/querySelf`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 轮播图
|
|||
export const rotation = params => http.post(`${proxyUrl}/carousel/query`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 地区查询
|
|||
export const search = params => http.post(`${proxyUrl}/policy/search`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 培训报名
|
|||
export const trainApply = params => http.post(`${proxyUrl}/trainApply/add`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 查询培训报名
|
|||
export const trainApplyquery = params => http.post(`${proxyUrl}/trainApply/query`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 培训通知
|
|||
export const trainInform = params => http.post(`${proxyUrl}/trainInform/queryTrainInformById`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 类型选择
|
|||
export const typeSelection = params => http.post(`${proxyUrl}/category/query`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 上传文件
|
|||
export const upLoad = params => http.post(`${proxyUrl}/file/upload`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 修改企业基本信息
|
|||
export const update = params => http.post(`${proxyUrl}/enterprise/update`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 系统消息全部修改
|
|||
export const updateAllSta = params => http.post(`${proxyUrl}/message/updateAllSta`, params); |
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/enterprise'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 系统消息读取状态改变
|
|||
export const updateStatus = params => http.post(`${proxyUrl}/message/updateStatus`, params); |
@ -1,5 +1,5 @@ |
|||
const proxyUrl = '/tall/v1.0'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 请求统一使用如下格式
|
|||
// export const signin = params => http.post('/api/xxx', params);
|
|||
// 登录
|
|||
export const signin = params => http.post(`${proxyUrl}/users/signin`, params); |
|||
|
@ -0,0 +1,5 @@ |
|||
const proxyUrl = '/tall/v1.0'; |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
// 给后台传递微信数据
|
|||
export const userInfo = params => http.post(`${proxyUrl}/users/userInfo`, params); |
@ -0,0 +1,234 @@ |
|||
<template> |
|||
<view> |
|||
<view class="demand-box" v-for="(item,index) in list" :key="index"> |
|||
<view> |
|||
<text>时间:</text> |
|||
<text class="demand-information">{{item.createdAt}}</text> |
|||
</view> |
|||
<view> |
|||
<text>联系人:</text> |
|||
<text class="demand-information">{{item.contacts}}</text> |
|||
</view> |
|||
<view> |
|||
<text>联系电话:</text> |
|||
<text class="demand-information">{{item.contactPhone}}</text> |
|||
</view> |
|||
<view> |
|||
<text>内容:</text> |
|||
<view class="demand-content">{{item.content}}</view> |
|||
</view> |
|||
<view v-if="item.isFile-0 === 1"> |
|||
<text>附件:</text> |
|||
<text class="demand-information down-text" @click="jump(item.id)">点击此处浏览下载</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
import { history } from 'api/history' |
|||
|
|||
export default { |
|||
props: { |
|||
typeList: { |
|||
}, |
|||
num: { |
|||
default:1 |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
pageSize:3, |
|||
list:[], |
|||
}; |
|||
}, |
|||
methods:{ |
|||
jump(id){ |
|||
uni.navigateTo({ |
|||
url:`/pages/DownFile/DownFile?id=${id}` |
|||
}) |
|||
} |
|||
}, |
|||
async created(){ |
|||
const that = this |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
pageNum:that.num, |
|||
pageSize:that.pageSize, |
|||
sortL:that.typeList[1], |
|||
type:that.typeList[0] |
|||
} |
|||
} |
|||
const data = await history(params) |
|||
// console.log(data) |
|||
that.list = data.list |
|||
for(let i=0;i<data.list.length;i++){ |
|||
let a = data.list[i].contacts.split('') |
|||
a.splice(0,1,'*') |
|||
that.list[i].contacts = a.join("") |
|||
} |
|||
for(let i=0;i<data.list.length;i++){ |
|||
let a = data.list[i].contactPhone.split('') |
|||
a.splice(3,4,'*','*','*','*') |
|||
that.list[i].contactPhone = a.join("") |
|||
} |
|||
console.log(that.list) |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
console.log(e) |
|||
} |
|||
}, |
|||
watch:{ |
|||
async typeList(val){ |
|||
console.log(val) |
|||
const that = this |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
pageNum:that.pageNum, |
|||
pageSize:that.pageSize, |
|||
sort:val[1], |
|||
type:val[0] |
|||
} |
|||
} |
|||
const data = await history(params) |
|||
console.log(data.list) |
|||
that.list = data.list |
|||
for(let i=0;i<data.list.length;i++){ |
|||
let a = data.list[i].contacts.split('') |
|||
a.splice(0,1,'*') |
|||
that.list[i].contacts = a.join("") |
|||
} |
|||
for(let i=0;i<data.list.length;i++){ |
|||
let a = data.list[i].contactPhone.split('') |
|||
a.splice(3,4,'*','*','*','*') |
|||
that.list[i].contactPhone = a.join("") |
|||
} |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
console.log(e) |
|||
} |
|||
}, |
|||
async num(val){ |
|||
const that = this |
|||
if(that.num === 1){ |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
pageNum:that.pageNum, |
|||
pageSize:that.pageSize, |
|||
sort:val[1], |
|||
type:val[0] |
|||
} |
|||
} |
|||
const data = await history(params) |
|||
console.log(data.list) |
|||
that.list = data.list |
|||
for(let i=0;i<data.list.length;i++){ |
|||
let a = data.list[i].contacts.split('') |
|||
a.splice(0,1,'*') |
|||
that.list[i].contacts = a.join("") |
|||
} |
|||
for(let i=0;i<data.list.length;i++){ |
|||
let a = data.list[i].contactPhone.split('') |
|||
a.splice(3,4,'*','*','*','*') |
|||
that.list[i].contactPhone = a.join("") |
|||
} |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
console.log(e) |
|||
} |
|||
}else{ |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
pageNum:val, |
|||
pageSize:that.pageSize, |
|||
sortL:that.typeList[1], |
|||
type:that.typeList[0] |
|||
} |
|||
} |
|||
const data = await history(params) |
|||
for(let i=0;i<data.list.length;i++){ |
|||
let a = data.list[i].contacts.split('') |
|||
a.splice(0,1,'*') |
|||
data.list[i].contacts = a.join("") |
|||
} |
|||
for(let i=0;i<data.list.length;i++){ |
|||
let a = data.list[i].contactPhone.split('') |
|||
a.splice(3,4,'*','*','*','*') |
|||
data.list[i].contactPhone = a.join("") |
|||
} |
|||
console.log(data.list) |
|||
that.list = that.list.concat(data.list) |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
console.log(e) |
|||
} |
|||
} |
|||
}, |
|||
async '$store.state.policy.release'(val){ |
|||
const that = this |
|||
try{ |
|||
const params1 = { |
|||
param:{ |
|||
pageNum:that.num, |
|||
pageSize:that.pageSize, |
|||
sortL:that.typeList[1], |
|||
type:that.typeList[0] |
|||
} |
|||
} |
|||
const data1 = await history(params1) |
|||
that.list = data1.list |
|||
for(let i=0;i<data1.list.length;i++){ |
|||
let a = data1.list[i].contacts.split('') |
|||
a.splice(0,1,'*') |
|||
that.list[i].contacts = a.join("") |
|||
} |
|||
for(let i=0;i<data1.list.length;i++){ |
|||
let a = data1.list[i].contactPhone.split('') |
|||
a.splice(3,4,'*','*','*','*') |
|||
that.list[i].contactPhone = a.join("") |
|||
} |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
console.log(e) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.demand-box{ |
|||
padding: 10px; |
|||
margin: 10px; |
|||
background-color: $white; |
|||
border-radius: 5px; |
|||
|
|||
view{ |
|||
padding: 5px 0; |
|||
position: relative; |
|||
display: flex; |
|||
|
|||
.demand-information{ |
|||
position: absolute; |
|||
right: 0; |
|||
} |
|||
.demand-content{ |
|||
padding: 10px; |
|||
margin-left: 30upx; |
|||
|
|||
border: 1px solid $grey; |
|||
border-radius: 10px; |
|||
height: auto; |
|||
min-height: 150upx; |
|||
flex: 1; |
|||
} |
|||
|
|||
} |
|||
} |
|||
.down-text{ |
|||
color: $blue; |
|||
} |
|||
</style> |
@ -0,0 +1,141 @@ |
|||
<template> |
|||
<view class="home-nav"> |
|||
<view class="search-box"> |
|||
<input class="home-ipt" @click="jumpSearch" placeholder="请输入您要搜索的政策" disabled=""/> |
|||
<icon class="iconfont icon-sousuo search" type=""></icon> |
|||
</view> |
|||
<!-- <view class="home-text" @tap="handleTap('picker2')"> |
|||
<text>{{label2[2]}}</text> |
|||
<icon class="iconfont icon-jiantou-xia triangle" type=""></icon> |
|||
</view> --> |
|||
|
|||
<!-- 地址选择 --> |
|||
<lb-picker ref="picker2" |
|||
v-model="value2" |
|||
mode="multiSelector" |
|||
:list="list" |
|||
:level="3" |
|||
@confirm="handleConfirm" |
|||
:props="props" |
|||
> |
|||
</lb-picker> |
|||
<!-- 地址选择结束 --> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapState, mapMutations, mapActions } from 'vuex'; |
|||
import { areaquery } from 'api/area' |
|||
export default { |
|||
data() { |
|||
return { |
|||
value2: [], |
|||
label2: ['山西','太原','小店区'], |
|||
city:[], |
|||
list:[], |
|||
props: {label:'areaName',value:'id',children:'city'} |
|||
} |
|||
}, |
|||
async created(options) { |
|||
uni.showLoading({ |
|||
icon:'none', |
|||
title:'加载中...' |
|||
}) |
|||
try { |
|||
const params ={ |
|||
"param": { |
|||
"areaParentId": 0, |
|||
"areaType": 0, |
|||
"deep": 3 |
|||
}, |
|||
} |
|||
const data = await areaquery(params); |
|||
this.list = data |
|||
uni.hideLoading() |
|||
} catch (err) { |
|||
uni.hideLoading() |
|||
console.log(err) |
|||
} |
|||
}, |
|||
methods: { |
|||
...mapMutations('user', ['setCity','setCityList']), |
|||
jumpSearch(){ |
|||
uni.navigateTo({ |
|||
url:'../HomePages/SearchPage' |
|||
}) |
|||
}, |
|||
jumpLocation(){ |
|||
uni.navigateTo({ |
|||
url:'../HomePages/AddressPage' |
|||
}) |
|||
}, |
|||
handleTap (picker) { |
|||
this.$refs[picker].show() |
|||
// console.log(this.$refs[picker]) |
|||
}, |
|||
handleConfirm (item) { |
|||
this.label2 = [item.item[0].areaName,item.item[1].areaName,item.item[2].areaName] |
|||
this.setCity(item.item[1].id); |
|||
this.setCityList(item.item[1].city) |
|||
console.log(this.$store.state.user.cityId) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.home-nav{ |
|||
position: relative; |
|||
height: 88upx; |
|||
background-color: $red; |
|||
position: fixed; |
|||
width: 100%; |
|||
z-index: 10; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: flex-start; |
|||
} |
|||
.home-ipt{ |
|||
flex: 1; |
|||
background-color: white; |
|||
border-radius: 25px; |
|||
height: 48upx; |
|||
padding-left: 70upx; |
|||
font-size: 24upx; |
|||
} |
|||
.home-text{ |
|||
padding-right: 20upx; |
|||
display: flex; |
|||
justify-content: flex-end; |
|||
color: $white; |
|||
font-size: 24upx; |
|||
vertical-align: middle; |
|||
} |
|||
|
|||
.search-box{ |
|||
position: relative; |
|||
height: 48upx; |
|||
margin-left: 20upx; |
|||
margin-right: 20upx; |
|||
flex: 1; |
|||
|
|||
.search{ |
|||
position: absolute; |
|||
left: 15upx; |
|||
top:50%; |
|||
transform: translate3d(0,-50%,0); |
|||
line-height: 50upx !important; |
|||
font-size: 40upx; |
|||
margin-top: 0 !important; |
|||
padding-top: 0 !important; |
|||
|
|||
} |
|||
} |
|||
.triangle{ |
|||
margin-left: 6upx; |
|||
display: inline-flex; |
|||
align-items: center; |
|||
font-size: 24upx; |
|||
} |
|||
</style> |
@ -0,0 +1,81 @@ |
|||
<template> |
|||
<view class="rotation"> |
|||
<swiper class="swiper-h" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration"> |
|||
<swiper-item v-for="item in list" :key="item.id" @click="jumpDetails(item.jumpType,item)"> |
|||
<image class="h-150" :src="item.url"></image> |
|||
</swiper-item> |
|||
</swiper> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { rotation } from 'api/rotation' |
|||
export default { |
|||
data() { |
|||
return { |
|||
indicatorDots: true, |
|||
autoplay: true, |
|||
interval: 3000, |
|||
duration: 500, |
|||
list:[], |
|||
} |
|||
}, |
|||
async created(options){ |
|||
try{ |
|||
const params = {} |
|||
const data = await rotation(params) |
|||
this.list = data |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
} |
|||
}, |
|||
methods: { |
|||
changeIndicatorDots(e) { |
|||
this.indicatorDots = !this.indicatorDots |
|||
}, |
|||
changeAutoplay(e) { |
|||
this.autoplay = !this.autoplay |
|||
}, |
|||
intervalChange(e) { |
|||
this.interval = e.target.value |
|||
}, |
|||
durationChange(e) { |
|||
this.duration = e.target.value |
|||
}, |
|||
jumpDetails(type,item) { |
|||
if(type == 2){ |
|||
const obj = JSON.parse(item.param) |
|||
uni.navigateTo({ |
|||
url:`../HomePages/ListDetails?id=${obj.id}` |
|||
}) |
|||
}else if(type == 3){ |
|||
const obj1 = JSON.parse(item.param) |
|||
uni.navigateTo({ |
|||
url:`../HomePages/peixun?id=${obj1.id}` |
|||
}) |
|||
}else if(type == 1){ |
|||
const Url = item.jumpUrl |
|||
console.log(Url) |
|||
uni.navigateTo({ |
|||
url:`../outH5/outH5?con=${Url}` |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.rotation{ |
|||
padding-top: 88upx; |
|||
text-align: center; |
|||
background-color: $white; |
|||
} |
|||
.swiper-h{ |
|||
height: 363upx; |
|||
} |
|||
.h-150{ |
|||
height: 363upx; |
|||
width: 100%; |
|||
} |
|||
</style> |
@ -0,0 +1,46 @@ |
|||
<template> |
|||
<view class="option"> |
|||
<view class="option-box"> |
|||
<view :class="num==0 ? 'active' : ''" @click="num = '0'">部委政策</view> |
|||
<view :class="num==1 ? 'active' : ''" @click="num = '1'">省政策</view> |
|||
<view :class="num==2 ? 'active' : ''" @click="num = '2'">市政策</view> |
|||
<view :class="num==3 ? 'active' : ''" @click="num = '3'">区政策</view> |
|||
</view> |
|||
<Policy :num="num"></Policy> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
num:"0", |
|||
}; |
|||
}, |
|||
methods:{ |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.option-box{ |
|||
height: 40px; |
|||
margin-top: 8px; |
|||
background-color: $white; |
|||
} |
|||
.option-box > view{ |
|||
height: 40px; |
|||
line-height: 40px; |
|||
float: left; |
|||
width: 25vw; |
|||
color: $gray; |
|||
text-align: center; |
|||
border-bottom: 1px solid $grey; |
|||
} |
|||
.active{ |
|||
color: $red !important; |
|||
font-weight: 600; |
|||
border-bottom: 2px solid $red !important; |
|||
} |
|||
</style> |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<view> |
|||
<button @tap="handleTap('picker2')">点我弹出3级联动选择器</button> |
|||
<view>{{ value2.join('-') }}</view> |
|||
<lb-picker ref="picker2" |
|||
v-model="value2" |
|||
mode="multiSelector" |
|||
:list="list" |
|||
:level="3" |
|||
@change="handleChange" |
|||
@confirm="handleConfirm" |
|||
@cancel="handleCancel"> |
|||
</lb-picker> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data(){ |
|||
return { |
|||
value2: [], |
|||
label2: [], |
|||
list: [ |
|||
{ |
|||
label: '选项1', |
|||
value: '1', |
|||
children: [ |
|||
{ |
|||
label: '选项11', |
|||
value: '11', |
|||
children: [ |
|||
{ |
|||
label: '选项111', |
|||
value: '111' |
|||
}, |
|||
{ |
|||
label: '选项112', |
|||
value: '112' |
|||
}, |
|||
{ |
|||
label: '选项113', |
|||
value: '113' |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
label: '选项12', |
|||
value: '12', |
|||
children: [ |
|||
{ |
|||
label: '选项121', |
|||
value: '121' |
|||
}, |
|||
{ |
|||
label: '选项122', |
|||
value: '122' |
|||
}, |
|||
{ |
|||
label: '选项123', |
|||
value: '123' |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
label: '选项13', |
|||
value: '13', |
|||
children: [ |
|||
{ |
|||
label: '选项131', |
|||
value: '131' |
|||
}, |
|||
{ |
|||
label: '选项132', |
|||
value: '132' |
|||
}, |
|||
{ |
|||
label: '选项133', |
|||
value: '133' |
|||
} |
|||
] |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
label: '选项2', |
|||
value: '2', |
|||
children: [ |
|||
{ |
|||
label: '选项21', |
|||
value: '21', |
|||
children: [ |
|||
{ |
|||
label: '选项211', |
|||
value: '211' |
|||
}, |
|||
{ |
|||
label: '选项212', |
|||
value: '212' |
|||
}, |
|||
{ |
|||
label: '选项213', |
|||
value: '213' |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
label: '选项22', |
|||
value: '22', |
|||
children: [ |
|||
{ |
|||
label: '选项221', |
|||
value: '221' |
|||
}, |
|||
{ |
|||
label: '选项222', |
|||
value: '222' |
|||
}, |
|||
{ |
|||
label: '选项223', |
|||
value: '223' |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
label: '选项23', |
|||
value: '23', |
|||
children: [ |
|||
{ |
|||
label: '选项231', |
|||
value: '231' |
|||
}, |
|||
{ |
|||
label: '选项232', |
|||
value: '232' |
|||
}, |
|||
{ |
|||
label: '选项233', |
|||
value: '233' |
|||
} |
|||
] |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
label: '选项3', |
|||
value: '3', |
|||
children: [ |
|||
{ |
|||
label: '选项31', |
|||
value: '31', |
|||
children: [ |
|||
{ |
|||
label: '选项311', |
|||
value: '311' |
|||
}, |
|||
{ |
|||
label: '选项312', |
|||
value: '312' |
|||
}, |
|||
{ |
|||
label: '选项313', |
|||
value: '313' |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
label: '选项32', |
|||
value: '32', |
|||
children: [ |
|||
{ |
|||
label: '选项321', |
|||
value: '321' |
|||
}, |
|||
{ |
|||
label: '选项322', |
|||
value: '322' |
|||
}, |
|||
{ |
|||
label: '选项323', |
|||
value: '323' |
|||
} |
|||
] |
|||
}, |
|||
{ |
|||
label: '选项33', |
|||
value: '33', |
|||
children: [ |
|||
{ |
|||
label: '选项331', |
|||
value: '331' |
|||
}, |
|||
{ |
|||
label: '选项332', |
|||
value: '332' |
|||
}, |
|||
{ |
|||
label: '选项333', |
|||
value: '333' |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
methods: { |
|||
handleTap (picker) { |
|||
this.$refs[picker].show() |
|||
}, |
|||
handleChange (item) { |
|||
console.log('change::', item) |
|||
}, |
|||
handleConfirm (item) { |
|||
console.log('confirm::', item) |
|||
}, |
|||
handleCancel (item) { |
|||
console.log('cancel::', item) |
|||
} |
|||
} |
|||
} |
|||
</script> |
@ -0,0 +1,239 @@ |
|||
<template> |
|||
<view> |
|||
<view> |
|||
<view class="policy-box" v-for="item in datalist" :key="item.id" @click="jumpPolicy(item.id)"> |
|||
<image :src="item.imgUrl" mode="aspectFill"></image> |
|||
<text class="policy-title">{{item.title}}</text> |
|||
<text class="policy-time">{{item.publishTime}}</text> |
|||
</view> |
|||
</view> |
|||
<view class="notData" v-if="datalist.length == 0"> |
|||
暂时没有对应政策 |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { policy } from 'api/policy' |
|||
import { search } from 'api/search' |
|||
export default { |
|||
props: { |
|||
num: { |
|||
type: Number |
|||
}, |
|||
showModal: { |
|||
// type: Object, |
|||
default: '' |
|||
}, |
|||
|
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
pagenum: 1, |
|||
datalist: [], |
|||
hasNextPage:true |
|||
} |
|||
}, |
|||
async created(options){ |
|||
const that = this |
|||
if(this.showModal === ''){ |
|||
uni.showLoading({ |
|||
title: '正在获取数据...', |
|||
icon:'loading', |
|||
}) |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"areaType": that.num, |
|||
"cityId": that.$store.state.user.cityId, |
|||
"pageNum": that.pagenum, |
|||
"pageSize": 10 |
|||
}, |
|||
} |
|||
const data = await policy(params) |
|||
that.hasNextPage = data.hasNextPage |
|||
that.datalist = that.datalist.concat(data.list) |
|||
uni.hideLoading() |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
uni.hideLoading() |
|||
} |
|||
}else{ |
|||
uni.showLoading({ |
|||
title: '正在获取数据...', |
|||
icon:'loading', |
|||
}) |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"areaId": that.$store.state.user.cityId, |
|||
"industrialCategories": that.showModal.industrialCategories, //产业类别 |
|||
"name": that.showModal.name, //项目名称 |
|||
"pageNum": that.$store.state.policy.pagenum, //页数 |
|||
"pageSize": 10, |
|||
"projectCategories": that.showModal.projectCategories //项目类别 |
|||
}, |
|||
} |
|||
const data = await search(params) |
|||
that.datalist = that.datalist.concat(data.list) |
|||
uni.hideLoading() |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
uni.hideLoading() |
|||
} |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
jumpPolicy(id){ |
|||
uni.navigateTo({ |
|||
url:`/pages/Policy/PolicyDetails?id=${id}&token=${this.$store.state.user.token}` |
|||
}) |
|||
console.log(id) |
|||
} |
|||
}, |
|||
watch: { |
|||
num(val){ |
|||
var that = this |
|||
that.pagenum = 1 |
|||
that.datalist = [] |
|||
async function main () { |
|||
uni.showLoading({ |
|||
title: '正在获取数据...', |
|||
icon:'loading', |
|||
}) |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"areaType": val, |
|||
"cityId": that.$store.state.user.cityId, |
|||
"pageNum": that.pagenum, |
|||
"pageSize": 10 |
|||
}, |
|||
} |
|||
const data = await policy(params) |
|||
that.datalist = that.datalist.concat(data.list) |
|||
uni.hideLoading() |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
uni.hideLoading() |
|||
} |
|||
} |
|||
main() |
|||
}, |
|||
|
|||
'$store.state.user.cityId'(val){ |
|||
var that = this |
|||
that.pagenum = 1 |
|||
that.datalist = [] |
|||
async function main () { |
|||
uni.showLoading({ |
|||
title: '正在获取数据...', |
|||
icon:'loading', |
|||
}) |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"areaType": that.num, |
|||
"cityId": that.$store.state.user.cityId, |
|||
"pageNum": that.pagenum, |
|||
"pageSize": 10 |
|||
}, |
|||
} |
|||
const data = await policy(params) |
|||
that.datalist = that.datalist.concat(data.list) |
|||
uni.hideLoading() |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
uni.hideLoading() |
|||
} |
|||
} |
|||
main() |
|||
}, |
|||
|
|||
|
|||
'$store.state.policy.pagenum'(val){ |
|||
uni.showLoading({ |
|||
title: '正在获取数据...', |
|||
icon:'loading', |
|||
}) |
|||
var that = this |
|||
if(that.hasNextPage === true){ |
|||
async function main () { |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"areaId": that.showModal.areaId, |
|||
"industrialCategories": that.showModal.industrialCategories, //产业类别 |
|||
"name": that.showModal.name, //项目名称 |
|||
"pageNum": that.$store.state.policy.pagenum, |
|||
"pageSize": 10, |
|||
"projectCategories": that.showModal.projectCategories //项目类别 |
|||
}, |
|||
} |
|||
const data = await policy(params) |
|||
uni.hideLoading() |
|||
that.datalist = that.datalist.concat(data.list) |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
uni.hideLoading() |
|||
} |
|||
} |
|||
main() |
|||
}else{ |
|||
uni.showToast({ |
|||
title:'到底了', |
|||
icon:'none' |
|||
}) |
|||
} |
|||
}, |
|||
|
|||
showModal(obj){ |
|||
const that = this |
|||
that.datalist = [] |
|||
async function main(){ |
|||
uni.showLoading({ |
|||
title: '正在获取数据...', |
|||
icon:'loading', |
|||
}) |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"areaId": obj.areaId, |
|||
"industrialCategories": obj.industrialCategories, //产业类别 |
|||
"name": obj.name, //项目名称 |
|||
"pageNum": that.$store.state.policy.pagenum, |
|||
"pageSize": 10, |
|||
"projectCategories": obj.projectCategories //项目类别 |
|||
}, |
|||
} |
|||
const data = await search(params) |
|||
that.datalist = that.datalist.concat(data.list) |
|||
uni.hideLoading() |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
uni.hideLoading() |
|||
} |
|||
} |
|||
main() |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.notData{ |
|||
height: 300upx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
color: $gray; |
|||
} |
|||
</style> |
@ -0,0 +1,434 @@ |
|||
<p align="center"> |
|||
<a href="https://github.com/liub1934/uni-lb-picker"> |
|||
<img src="https://img.shields.io/github/stars/liub1934/uni-lb-picker"> |
|||
</a> |
|||
<a href="https://github.com/liub1934/uni-lb-picker/fork"> |
|||
<img src="https://img.shields.io/github/forks/liub1934/uni-lb-picker"> |
|||
</a> |
|||
<a href="https://github.com/liub1934/uni-lb-picker/issues"> |
|||
<img src="https://img.shields.io/github/issues/liub1934/uni-lb-picker"> |
|||
</a> |
|||
<a href="https://www.npmjs.com/package/uni-lb-picker"> |
|||
<img src="https://img.shields.io/npm/v/uni-lb-picker"> |
|||
</a> |
|||
<a href="https://npmcharts.com/compare/uni-lb-picker?minimal=true"> |
|||
<img src="https://img.shields.io/npm/dm/uni-lb-picker"> |
|||
</a> |
|||
|
|||
<a href="https://github.com/liub1934/uni-lb-picker/blob/master/LICENSE"> |
|||
<img src="https://img.shields.io/github/license/liub1934/uni-lb-picker"> |
|||
</a> |
|||
</p> |
|||
|
|||
插件市场里面的 picker 选择器不满足自己的需求,所以自己写了一个简单的 picker 选择器,可扩展、可自定义,一般满足日常需要。 |
|||
Github:[uni-lb-picker](https://github.com/liub1934/uni-lb-picker) |
|||
插件市场:[uni-lb-picker](https://ext.dcloud.net.cn/plugin?id=1111) |
|||
|
|||
> 如果问题最好去 github 反馈,插件市场评论区留下五星好评即可,[点我去反馈](https://github.com/liub1934/uni-lb-picker/issues/new) |
|||
|
|||
> **由于之前`cancel`拼写失误,写成了`cancle`,`v1.08`现已修正,如果之前版本有使用`cancel`事件的,更新后请及时修正。** |
|||
|
|||
## 兼容性 |
|||
|
|||
App + H5 + 各平台小程序(快应用及 360 未测试,nvue 待支持) |
|||
|
|||
## 功能 |
|||
|
|||
1、单选 |
|||
2、多级联动,非多级联动,理论支持任意级数 |
|||
3、省市区选择,基于多级联动 |
|||
4、自定义选择器头部确定取消按钮颜色及插槽支持 |
|||
5、选择器可视区自定义滚动个数 |
|||
6、自定义数据字段,满足不同人的需求 |
|||
7、自定义选择器样式 |
|||
8、单选及非联动选择支持扁平化的简单数据,如下形式: |
|||
|
|||
```javascript |
|||
// 单选列表 |
|||
list1: ['选项1', '选项2', '选项2'], |
|||
// 非联动选择列表 |
|||
list2: [ |
|||
['选项1', '选项2', '选项3'], |
|||
['选项11', '选项22', '选项33'], |
|||
['选项111', '选项222', '选项333'] |
|||
] |
|||
``` |
|||
|
|||
## 引入插件 |
|||
|
|||
单独引入,在需要使用的页面上 import 引入即可 |
|||
|
|||
```html |
|||
<template> |
|||
<view> |
|||
<lb-picker></lb-picker> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import LbPicker from '@/components/lb-picker' |
|||
export default { |
|||
components: { |
|||
LbPicker |
|||
} |
|||
} |
|||
</script> |
|||
``` |
|||
|
|||
全局引入,`main.js`中 import 引入并注册即可全局使用 |
|||
|
|||
```jsvascript |
|||
import LbPicker from '@/components/lb-picker' |
|||
Vue.component("lb-picker", LbPicker) |
|||
``` |
|||
|
|||
easycom 引入 |
|||
|
|||
`pages.json`加上如下配置: |
|||
|
|||
```json |
|||
"easycom": { |
|||
"autoscan": true, |
|||
"custom": { |
|||
"lb-picker": "@/components/lb-picker/index.vue" |
|||
} |
|||
} |
|||
``` |
|||
|
|||
npm 安装引入: |
|||
|
|||
```shell |
|||
npm install uni-lb-picker |
|||
``` |
|||
|
|||
```jsvascript |
|||
import LbPicker from 'uni-lb-picker' |
|||
``` |
|||
|
|||
## 选择器数据格式 |
|||
|
|||
### 单选 |
|||
|
|||
常规数据 |
|||
|
|||
```javascript |
|||
list: [ |
|||
{ |
|||
label: '选项1', |
|||
value: '1' |
|||
}, |
|||
{ |
|||
label: '选项2', |
|||
value: '2' |
|||
} |
|||
] |
|||
``` |
|||
|
|||
扁平化简单数据 |
|||
|
|||
```javascript |
|||
list: ['选项1', '选项2'] |
|||
``` |
|||
|
|||
### 多级联动 |
|||
|
|||
```javascript |
|||
list: [ |
|||
{ |
|||
label: '选项1', |
|||
value: '1', |
|||
children: [ |
|||
{ |
|||
label: '选项1-1', |
|||
value: '1-1', |
|||
children: [ |
|||
{ |
|||
label: '选项1-1-1', |
|||
value: '1-1-1' |
|||
} |
|||
] |
|||
} |
|||
] |
|||
} |
|||
] |
|||
``` |
|||
|
|||
### 非联动选择 |
|||
|
|||
常规数据 |
|||
|
|||
```javascript |
|||
list: [ |
|||
[ |
|||
{ label: '选项1', value: '1' }, |
|||
{ label: '选项2', value: '2' }, |
|||
{ label: '选项3', value: '3' } |
|||
], |
|||
[ |
|||
{ label: '选项11', value: '11' }, |
|||
{ label: '选项22', value: '22' }, |
|||
{ label: '选项33', value: '33' } |
|||
], |
|||
[ |
|||
{ label: '选项111', value: '111' }, |
|||
{ label: '选项222', value: '222' }, |
|||
{ label: '选项333', value: '333' } |
|||
] |
|||
] |
|||
``` |
|||
|
|||
扁平化简单数据 |
|||
|
|||
```javascript |
|||
list: [ |
|||
['选项1', '选项2', '选项3'], |
|||
['选项11', '选项22', '选项33'], |
|||
['选项111', '选项222', '选项333'] |
|||
] |
|||
``` |
|||
|
|||
## 调用显示选择器 |
|||
|
|||
通过`ref`形式手动调用`show`方法显示,隐藏同理调用`hide` |
|||
|
|||
```text |
|||
<lb-picker ref="picker"></lb-picker> |
|||
|
|||
this.$refs.picker.show() // 显示 |
|||
this.$refs.picker.hide() // 隐藏 |
|||
``` |
|||
|
|||
## 绑定值及设置默认值 |
|||
|
|||
支持 vue 中`v-model`写法绑定值,无需自己维护选中值的索引。 |
|||
|
|||
```javascript |
|||
<lb-picker v-model="value1"></lb-picker> |
|||
<lb-picker v-model="value2"></lb-picker> |
|||
|
|||
data () { |
|||
return { |
|||
value1: '' // 单选 |
|||
value2: [] // 多列联动选择 |
|||
} |
|||
} |
|||
``` |
|||
|
|||
## 多个选择器 |
|||
|
|||
通过设置不同的`ref`,然后调用即可 |
|||
|
|||
```javascript |
|||
<lb-picker ref="picker1"></lb-picker> |
|||
<lb-picker ref="picker2"></lb-picker> |
|||
|
|||
this.$refs.picker1.show() // picker1显示 |
|||
this.$refs.picker2.show() // picker2显示 |
|||
``` |
|||
|
|||
## 省市区选择 |
|||
|
|||
省市区选择是基于多列联动选择,数据来源:[https://github.com/modood/Administrative-divisions-of-China](https://github.com/modood/Administrative-divisions-of-China), |
|||
省市区文件位于`/pages/demos/area-data-min.js`,自行引入即可,可参考`demo3省市区选择`, |
|||
也可使用自己已有的省市区数据,如果数据字段不一样,也可以自定义,参考下方自定义数据字段。 |
|||
|
|||
## 自定义数据字段 |
|||
|
|||
为了满足不同人的需求,插件支持自定义数据字段名称, 插件默认的数据字段如下形式: |
|||
|
|||
```javascript |
|||
list: [ |
|||
{ |
|||
label: '选择1', |
|||
value: 1, |
|||
children: [] |
|||
}, |
|||
{ |
|||
label: '选择1', |
|||
value: 1, |
|||
children: [] |
|||
} |
|||
] |
|||
``` |
|||
|
|||
如果你的数据字段和上面不一样,如下形式: |
|||
|
|||
```javascript |
|||
list: [ |
|||
{ |
|||
text: '选择1', |
|||
id: 1, |
|||
child: [] |
|||
}, |
|||
{ |
|||
text: '选择1', |
|||
id: 1, |
|||
child: [] |
|||
} |
|||
] |
|||
``` |
|||
|
|||
通过设置参数中的`props`即可,如下所示: |
|||
|
|||
```javascript |
|||
<lb-picker :props="myProps"></lb-picker> |
|||
|
|||
data () { |
|||
return { |
|||
myProps: { |
|||
label: 'text', |
|||
value: 'id', |
|||
children: 'child' |
|||
} |
|||
} |
|||
} |
|||
``` |
|||
|
|||
## 插槽使用 |
|||
|
|||
选择器支持一些可自定义化的插槽,如选择器的取消和确定文字按钮,如果需要对其自定义处理的话,比如加个 icon 图标之类的,可使用插槽,使用方法如下: |
|||
|
|||
```html |
|||
<lb-picker> |
|||
<view slot="cancel-text">我是自定义取消</view> |
|||
<view slot="confirm-text">我是自定义确定</view> |
|||
</lb-picker> |
|||
``` |
|||
|
|||
其他插槽见下。 |
|||
|
|||
## 参数及事件 |
|||
|
|||
### Props |
|||
|
|||
| 参数 | 说明 | 类型 | 可选值 | 默认值 | |
|||
| :---------------------- | :--------------------------------------------------------------------------------------------------------------------------------- | :------------------ | :--------------------------------------------------------------- | :------------------------------------------------ | |
|||
| value/v-model | 绑定值,联动选择为 Array 类型 | String/Number/Array | - | - | |
|||
| mode | 选择器类型,支持单列,多列联动 | String | selector 单选/multiSelector 多级联动/unlinkedSelector 多级非联动 | selector | |
|||
| list | 选择器数据(v1.0.7 单选及非联动多选支持扁平数据:['选项 1', '选项 2']) | Array | - | - | |
|||
| level | 多列联动层级,仅 mode 为 multiSelector 有效 | Number | - | 2 | |
|||
| props | 自定义数据字段 | Object | - | {label:'label',value:'value',children:'children'} | |
|||
| cancel-text | 取消文字 | String | - | 取消 | |
|||
| cancel-color | 取消文字颜色 | String | - | #999 | |
|||
| confirm-text | 确定文字 | String | - | 确定 | |
|||
| confirm-color | 确定文字颜色 | String | - | #007aff | |
|||
| empty-text | (v1.0.7 新增)选择器列表为空的时候显示的文字 | String | - | 暂无数据 | |
|||
| empty-color | (v1.0.7 新增)暂无数据文字颜色 | String | - | #999 | |
|||
| column-num | 可视滚动区域内滚动个数,最好设置奇数值 | Number | - | 5 | |
|||
| radius | 选择器顶部圆角,支持 rpx,如 radius="10rpx" | String | - | - | |
|||
| ~~column-style~~ | ~~选择器默认样式(已弃用,见下方自定义样式说明)~~ | Object | - | - | |
|||
| ~~active-column-style~~ | ~~选择器选中样式(已弃用,见下方自定义样式说明)~~ | Object | - | - | |
|||
| loading | 选择器是否显示加载中,可使用 loading 插槽自定义加载效果 | Boolean | - | - | |
|||
| mask-color | 遮罩层颜色 | String | - | rgba(0, 0, 0, 0.4) | |
|||
| close-on-click-mask | 点击遮罩层是否关闭选择器 | Boolean | true/false | true | |
|||
| ~~change-on-init~~ | ~~(v1.0.7 已弃用)初始化时是否触发 change 事件~~ | Boolean | true/false | - | |
|||
| dataset | (v1.0.7 新增)可以向组件中传递任意的自定义的数据(对象形式数据),如`:dataset="{name:'test'}"`,在`confirm`或`change`事件中可以取到 | Object | - | - | |
|||
| show-header | (v1.0.8 新增)是否显示选择器头部 | Boolean | - | true | |
|||
| inline | (v1.0.8 新增)inline 模式,开启后默认显示选择器,无需点击弹出,可以配合`show-header`一起使用 | Boolean | - | - | |
|||
| z-index | (v1.0.9 新增)选择器层级,遮罩层默认-1 | Number | - | 999 | |
|||
|
|||
### 方法 |
|||
|
|||
| 方法名 | 说明 | 参数 | 返回值 | |
|||
| :------------- | :------------------------------------- | :-------------- | :----------------------------------------------------------------------------------------------------------- | |
|||
| show | 打开选择器 | - | | |
|||
| hide | 关闭选择器 | - | | |
|||
| getColumnsInfo | (v1.1.0 新增)根据 value 获取选择器信息 | 绑定值的`value` | 同`change` `confirm`回调参数,如果传入的`value`获取不到信息则只返回一个含有`dataset`的对象,具体自行打印查看 | |
|||
|
|||
### Events |
|||
|
|||
| 事件名称 | 说明 | 回调参数 | |
|||
| :------- | :--------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
|||
| show | 选择器打开时触发 | - | |
|||
| hide | 选择器隐藏时触发 | - | |
|||
| change | 选择器滚动时触发,此时不会改变绑定的值 | `{ index, item, value, change }` `index`触发滚动后新的索引,单选时是具体的索引值,多列联动选择时为数组。`item`触发滚动后新的的完整内容,包括`label`、`value`等,单选时为对象,多列选择时为数组对象。`value`触发滚动后新的 value 值,单列选择时为具体值,多列联动选择时为数组。`change`触发事件的类型,详情参考下面的 change 事件备注 | |
|||
| confirm | 点击选择器确定时触发,此时会改变绑定的值 | 同上`change`事件说明 | |
|||
| cancel | 点击选择器取消时触发 | 同上`change`事件说明 | |
|||
|
|||
### `change` 事件备注 |
|||
|
|||
如果绑定的值是空的,`change`触发后里面的内容都是列表的第一项。 |
|||
`change`事件会在以下情况触发: |
|||
|
|||
- 初始化 |
|||
- 绑定值 value 变化 |
|||
- 选择器 list 列表变化 |
|||
- 滚动选择器 |
|||
|
|||
以上情况会在回调函数中都可以取到`change`变化的类型,对应上面的情况包括以下: |
|||
|
|||
- `init` |
|||
- `value` |
|||
- `list` |
|||
- `scroll` |
|||
|
|||
根据这些类型大家可以在`change`的时候按需处理自己的业务逻辑,`init`现在指挥在调用选择器弹出的时候触发。 |
|||
下面的说明情况已失效,如需要在页面显示的时候根据`value`的值显示相应的中文,调用`v1.10`新增的方法`getColumnsInfo`,传入绑定的值即可获取到你想要的所有信息。 |
|||
~~比如一种常见的情况,有默认值的时候需要显示默认值的文字,此时可以`change`事件中判断`change`的类型是否是`init`,如果是的话可以取事件回调中的`item`进行显示绑定值对应的文字信息。~~ |
|||
|
|||
```javascript |
|||
handleChange (e) { |
|||
if (e.change === 'init') { |
|||
console.log(e.item.label) // 单选 选项1 |
|||
console.log(e.item.map(item => item.label).join('-')) // 多选 选项1-选项11 |
|||
} |
|||
} |
|||
``` |
|||
|
|||
### 插槽 |
|||
|
|||
| 插槽名 | 说明 | |
|||
| :------------ | :------------------ | |
|||
| cancel-text | 选择器取消文字插槽 | |
|||
| action-center | 选择器顶部中间插槽 | |
|||
| confirm-text | 选择器确定文字插槽 | |
|||
| loading | 选择器 loading 插槽 | |
|||
| empty | 选择器 空数据 插槽 | |
|||
|
|||
### 选择器自定义样式 |
|||
|
|||
原先的`column-style`和`active-column-style`已弃用,如需修改默认样式及选中样式参考`demo9` |
|||
|
|||
```css |
|||
<style lang="scss" scoped> |
|||
/deep/ .lb-picker { |
|||
.lb-picker-column-label { |
|||
color: #f0ad4e; |
|||
} |
|||
.lb-picker-column-active { |
|||
.lb-picker-column-label { |
|||
color: #007aff; |
|||
font-weight: 700; |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
``` |
|||
|
|||
### 获取选中值的文字 |
|||
|
|||
`@confirm`事件中可以拿到: |
|||
|
|||
单选: |
|||
|
|||
```javascript |
|||
handleConfirm (e) { |
|||
console.log(e.item.label) // 选项1 |
|||
} |
|||
``` |
|||
|
|||
联动选择: |
|||
|
|||
```javascript |
|||
handleConfirm (e) { |
|||
console.log(e.item.map(item => item.label).join('-')) // 选项1-选项11 |
|||
} |
|||
``` |
|||
|
|||
## Tips |
|||
|
|||
微信小程序端,滚动时在 iOS 自带振动反馈,可在系统设置 -> 声音与触感 -> 系统触感反馈中关闭 |
|||
|
|||
## 其他 |
|||
|
|||
其他功能参考示例 Demo 代码。 |
@ -0,0 +1,45 @@ |
|||
import { getColumns } from '../utils' |
|||
export const commonMixin = { |
|||
data () { |
|||
return { |
|||
indicatorStyle: `height: 34px` |
|||
} |
|||
}, |
|||
created () { |
|||
this.init('init') |
|||
}, |
|||
methods: { |
|||
init (changeType) { |
|||
if (this.list && this.list.length) { |
|||
const column = getColumns({ |
|||
value: this.value, |
|||
list: this.list, |
|||
mode: this.mode, |
|||
props: this.props, |
|||
level: this.level |
|||
}) |
|||
const { columns, value, item, index } = column |
|||
this.selectValue = value |
|||
this.selectItem = item |
|||
this.pickerColumns = columns |
|||
this.pickerValue = index |
|||
this.$emit('change', { |
|||
value: this.selectValue, |
|||
item: this.selectItem, |
|||
index: this.pickerValue, |
|||
change: changeType |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
watch: { |
|||
value () { |
|||
if (!this.isConfirmChange) { |
|||
this.init('value') |
|||
} |
|||
}, |
|||
list () { |
|||
this.init('list') |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,93 @@ |
|||
<template> |
|||
<view class="lb-multi-selector lb-picker-item" |
|||
:style="{ height: height }"> |
|||
<picker-view :value="pickerValue" |
|||
:indicator-style="indicatorStyle" |
|||
:style="{ height: height }" |
|||
@change="handleChange"> |
|||
<picker-view-column v-for="(column, index) in pickerColumns" |
|||
:key="index"> |
|||
<view v-for="(item, i) in column || []" |
|||
:class="[ |
|||
'lb-picker-column', |
|||
item[props.value] === selectValue[index] |
|||
? 'lb-picker-column-active' |
|||
: '' |
|||
]" |
|||
:key="i"> |
|||
<text class="lb-picker-column-label"> |
|||
{{ item[props.label] || item }} |
|||
</text> |
|||
</view> |
|||
</picker-view-column> |
|||
</picker-view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { commonMixin } from '../mixins' |
|||
export default { |
|||
props: { |
|||
value: Array, |
|||
list: Array, |
|||
mode: String, |
|||
props: Object, |
|||
level: Number, |
|||
visible: Boolean, |
|||
height: String, |
|||
isConfirmChange: Boolean |
|||
}, |
|||
mixins: [commonMixin], |
|||
data () { |
|||
return { |
|||
pickerValue: [], |
|||
pickerColumns: [], |
|||
selectValue: [], |
|||
selectItem: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
handleChange (item) { |
|||
const pickerValue = item.detail.value |
|||
const columnIndex = pickerValue.findIndex((item, i) => item !== this.pickerValue[i]) |
|||
const valueIndex = pickerValue[columnIndex] |
|||
this.setPickerChange(pickerValue, valueIndex, columnIndex) |
|||
}, |
|||
setPickerChange (pickerValue, valueIndex, columnIndex) { |
|||
for (let i = 0; i < this.level; i++) { |
|||
if (i > columnIndex) { |
|||
pickerValue[i] = 0 |
|||
const column = |
|||
this.pickerColumns[i - 1][valueIndex] || |
|||
this.pickerColumns[i - 1][0] |
|||
this.$set(this.pickerColumns, i, column[this.props.children] || []) |
|||
valueIndex = 0 |
|||
} |
|||
this.$set(this.pickerValue, i, pickerValue[i]) |
|||
const selectItem = this.pickerColumns[i][pickerValue[i]] |
|||
if (selectItem) { |
|||
this.selectItem[i] = selectItem |
|||
this.selectValue[i] = selectItem[this.props.value] |
|||
} else { |
|||
const spliceNum = this.level - i |
|||
this.pickerValue.splice(i, spliceNum) |
|||
this.selectValue.splice(i, spliceNum) |
|||
this.selectItem.splice(i, spliceNum) |
|||
this.pickerColumns.splice(i, spliceNum) |
|||
break |
|||
} |
|||
} |
|||
this.$emit('change', { |
|||
value: this.selectValue, |
|||
item: this.selectItem, |
|||
index: this.pickerValue, |
|||
change: 'scroll' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "../style/picker-item.scss"; |
|||
</style> |
@ -0,0 +1,68 @@ |
|||
<template> |
|||
<view class="lb-selector-picker lb-picker-item" |
|||
:style="{ height: height }"> |
|||
<picker-view :value="pickerValue" |
|||
:style="{ height: height }" |
|||
:indicator-style="indicatorStyle" |
|||
@change="handleChange"> |
|||
<picker-view-column> |
|||
<view v-for="(item, i) in list" |
|||
:class="[ |
|||
'lb-picker-column', |
|||
(item[props.value] || item) === selectValue |
|||
? 'lb-picker-column-active' |
|||
: '' |
|||
]" |
|||
:key="i"> |
|||
<text class="lb-picker-column-label"> |
|||
{{ item[props.label] || item }} |
|||
</text> |
|||
</view> |
|||
</picker-view-column> |
|||
</picker-view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { isObject } from '../utils' |
|||
import { commonMixin } from '../mixins' |
|||
export default { |
|||
props: { |
|||
value: [String, Number], |
|||
list: Array, |
|||
mode: String, |
|||
props: Object, |
|||
visible: Boolean, |
|||
height: String, |
|||
isConfirmChange: Boolean |
|||
}, |
|||
mixins: [commonMixin], |
|||
data () { |
|||
return { |
|||
pickerValue: [], |
|||
selectValue: '', |
|||
selectItem: null |
|||
} |
|||
}, |
|||
methods: { |
|||
handleChange (item) { |
|||
const index = item.detail.value[0] || 0 |
|||
this.selectItem = this.list[index] |
|||
this.selectValue = isObject(this.selectItem) |
|||
? this.selectItem[this.props.value] |
|||
: this.selectItem |
|||
this.pickerValue = item.detail.value |
|||
this.$emit('change', { |
|||
value: this.selectValue, |
|||
item: this.selectItem, |
|||
index: index, |
|||
change: 'scroll' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "../style/picker-item.scss"; |
|||
</style> |
@ -0,0 +1,76 @@ |
|||
<template> |
|||
<view class="lb-selector-picker lb-picker-item" |
|||
:style="{ height: height }"> |
|||
<picker-view :value="pickerValue" |
|||
:indicator-style="indicatorStyle" |
|||
:style="{ height: height }" |
|||
@change="handleChange"> |
|||
<picker-view-column v-for="(column, index) in pickerColumns" |
|||
:key="index"> |
|||
<view v-for="(item, i) in column || []" |
|||
:class="[ |
|||
'lb-picker-column', |
|||
(item[props.value] || item) === selectValue[index] |
|||
? 'lb-picker-column-active' |
|||
: '' |
|||
]" |
|||
:key="i"> |
|||
<text class="lb-picker-column-label"> |
|||
{{ item[props.label] || item }} |
|||
</text> |
|||
</view> |
|||
</picker-view-column> |
|||
</picker-view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { isObject } from '../utils' |
|||
import { commonMixin } from '../mixins' |
|||
export default { |
|||
props: { |
|||
value: Array, |
|||
list: Array, |
|||
mode: String, |
|||
props: Object, |
|||
visible: Boolean, |
|||
height: String, |
|||
isConfirmChange: Boolean |
|||
}, |
|||
mixins: [commonMixin], |
|||
data () { |
|||
return { |
|||
pickerValue: [], |
|||
pickerColumns: [], |
|||
selectValue: [], |
|||
selectItem: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
handleChange (item) { |
|||
const pickerValue = item.detail.value |
|||
const columnIndex = pickerValue.findIndex((item, i) => item !== this.pickerValue[i]) |
|||
if (columnIndex > -1) { |
|||
const valueIndex = pickerValue[columnIndex] |
|||
const columnItem = this.list[columnIndex][valueIndex] |
|||
const valueItem = isObject(columnItem) |
|||
? columnItem[this.props.value] |
|||
: columnItem |
|||
this.pickerValue = pickerValue |
|||
this.$set(this.selectValue, columnIndex, valueItem) |
|||
this.$set(this.selectItem, columnIndex, columnItem) |
|||
this.$emit('change', { |
|||
value: this.selectValue, |
|||
item: this.selectItem, |
|||
index: this.pickerValue, |
|||
change: 'scroll' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "../style/picker-item.scss"; |
|||
</style> |
@ -0,0 +1,23 @@ |
|||
.lb-picker-column { |
|||
height: 34px; |
|||
/* #ifndef APP-NVUE */ |
|||
display: flex; |
|||
box-sizing: border-box; |
|||
white-space: nowrap; |
|||
overflow: hidden; |
|||
/* #endif */ |
|||
flex-direction: row; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.lb-picker-column-label { |
|||
font-size: 16px; |
|||
text-align: center; |
|||
text-overflow: ellipsis; |
|||
transition-property: color; |
|||
transition-duration: 0.3s; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
} |
@ -0,0 +1,151 @@ |
|||
.lb-picker { |
|||
position: relative; |
|||
} |
|||
|
|||
.lb-picker-mask { |
|||
background-color: rgba(0, 0, 0, 0.0); |
|||
position: fixed; |
|||
top: 0; |
|||
right: 0; |
|||
left: 0; |
|||
bottom: 0; |
|||
} |
|||
|
|||
.lb-picker-mask-animation { |
|||
transition-property: background-color; |
|||
transition-duration: 0.3s; |
|||
} |
|||
|
|||
.lb-picker-container { |
|||
position: relative; |
|||
} |
|||
|
|||
.lb-picker-container-fixed { |
|||
position: fixed; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
transform: translateY(100%); |
|||
/* #ifndef APP-PLUS */ |
|||
overflow: hidden; |
|||
/* #endif */ |
|||
} |
|||
|
|||
.lb-picker-container-animation { |
|||
transition-property: transform; |
|||
transition-duration: 0.3s; |
|||
} |
|||
|
|||
.lb-picker-container-show { |
|||
transform: translateY(0); |
|||
} |
|||
|
|||
.lb-picker-header { |
|||
position: relative; |
|||
height: 45px; |
|||
background-color: #fff; |
|||
/* #ifdef APP-NVUE */ |
|||
border-width: 1px; |
|||
border-style: solid; |
|||
border-color: #e5e5e5; |
|||
/* #endif */ |
|||
/* #ifndef APP-NVUE */ |
|||
box-sizing: border-box; |
|||
display: flex; |
|||
/* #endif */ |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
flex-wrap: nowrap; |
|||
} |
|||
|
|||
/* #ifndef APP-PLUS */ |
|||
.lb-picker-header::after { |
|||
content: ""; |
|||
position: absolute; |
|||
left: 0; |
|||
bottom: 0; |
|||
right: 0; |
|||
height: 1px; |
|||
clear: both; |
|||
border-bottom: 1px solid #e5e5e5; |
|||
color: #e5e5e5; |
|||
transform-origin: 0 100%; |
|||
-webkit-transform: scaleY(0.5); |
|||
transform: scaleY(0.5); |
|||
} |
|||
|
|||
/* #endif */ |
|||
|
|||
.lb-picker-action { |
|||
padding-left: 14px; |
|||
padding-right: 14px; |
|||
/* #ifndef APP-NVUE */ |
|||
display: flex; |
|||
/* #endif */ |
|||
flex-direction: row; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.lb-picker-action-cancel { |
|||
text-align: center; |
|||
} |
|||
|
|||
.lb-picker-action-cancel-text { |
|||
font-size: 16px; |
|||
color: #999; |
|||
} |
|||
|
|||
.lb-picker-action-confirm { |
|||
text-align: center; |
|||
} |
|||
|
|||
.lb-picker-action-confirm-text { |
|||
font-size: 16px; |
|||
color: #007aff; |
|||
} |
|||
|
|||
.lb-picker-content { |
|||
position: relative; |
|||
background-color: #fff; |
|||
/* #ifndef APP-NVUE */ |
|||
display: flex; |
|||
/* #endif */ |
|||
justify-content: center; |
|||
flex-direction: column; |
|||
} |
|||
|
|||
.lb-picker-loading, |
|||
.lb-picker-empty { |
|||
/* #ifndef APP-NVUE */ |
|||
display: flex; |
|||
/* #endif */ |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.lb-picker-empty-text { |
|||
color: #999; |
|||
font-size: 16px; |
|||
} |
|||
|
|||
.lb-picker-loading-img { |
|||
width: 25px; |
|||
height: 25px; |
|||
/* #ifndef APP-NVUE */ |
|||
animation: rotating 2s linear infinite; |
|||
/* #endif */ |
|||
} |
|||
|
|||
/* #ifndef APP-NVUE */ |
|||
@keyframes rotating { |
|||
0% { |
|||
transform: rotate(0deg) |
|||
} |
|||
|
|||
to { |
|||
transform: rotate(1turn) |
|||
} |
|||
} |
|||
|
|||
/* #endif */ |
@ -0,0 +1,110 @@ |
|||
/** |
|||
* 判断是否是对象 |
|||
* |
|||
* @export |
|||
* @param {*} val |
|||
* @returns true/false |
|||
*/ |
|||
export function isObject (val) { |
|||
return Object.prototype.toString.call(val) === '[object Object]' |
|||
} |
|||
|
|||
/** |
|||
* 根据value获取columns信息 |
|||
* |
|||
* @export |
|||
* @param {*} { value, list, mode, props, level } |
|||
* @param {number} [type=2] 查询不到value数据返回数据类型 1空值null 2默认第一个选项 |
|||
* @returns |
|||
*/ |
|||
export function getColumns ({ value, list, mode, props, level }, type = 2) { |
|||
let pickerValue = [] |
|||
let pickerColumns = [] |
|||
let selectValue = [] |
|||
let selectItem = [] |
|||
let columnsInfo = null |
|||
switch (mode) { |
|||
case 'selector': |
|||
let index = list.findIndex(item => { |
|||
return isObject(item) ? item[props.value] === value : item === value |
|||
}) |
|||
if (index === -1 && type === 1) { |
|||
columnsInfo = null |
|||
} else { |
|||
index = index > -1 ? index : 0 |
|||
selectItem = list[index] |
|||
selectValue = isObject(selectItem) |
|||
? selectItem[props.value] |
|||
: selectItem |
|||
pickerColumns = list |
|||
pickerValue = [index] |
|||
columnsInfo = { |
|||
index: pickerValue, |
|||
value: selectValue, |
|||
item: selectItem, |
|||
columns: pickerColumns |
|||
} |
|||
} |
|||
break |
|||
case 'multiSelector': |
|||
const setPickerItems = (data = [], index = 0) => { |
|||
if (!data.length) return |
|||
const defaultValue = value || [] |
|||
if (index < level) { |
|||
const value = defaultValue[index] || '' |
|||
let i = data.findIndex(item => item[props.value] === value) |
|||
if (i === -1 && type === 1) return |
|||
i = i > -1 ? i : 0 |
|||
pickerValue[index] = i |
|||
pickerColumns[index] = data |
|||
if (data[i]) { |
|||
selectValue[index] = data[i][props.value] |
|||
selectItem[index] = data[i] |
|||
setPickerItems(data[i][props.children] || [], index + 1) |
|||
} |
|||
} |
|||
} |
|||
setPickerItems(list) |
|||
if (!selectValue.length && type === 1) { |
|||
columnsInfo = null |
|||
} else { |
|||
columnsInfo = { |
|||
index: pickerValue, |
|||
value: selectValue, |
|||
item: selectItem, |
|||
columns: pickerColumns |
|||
} |
|||
} |
|||
break |
|||
case 'unlinkedSelector': |
|||
list.forEach((item, i) => { |
|||
let index = item.findIndex(item => { |
|||
return isObject(item) |
|||
? item[props.value] === value[i] |
|||
: item === value[i] |
|||
}) |
|||
if (index === -1 && type === 1) return |
|||
index = index > -1 ? index : 0 |
|||
const columnItem = list[i][index] |
|||
const valueItem = isObject(columnItem) |
|||
? columnItem[props.value] |
|||
: columnItem |
|||
pickerValue[i] = index |
|||
selectValue[i] = valueItem |
|||
selectItem[i] = columnItem |
|||
}) |
|||
pickerColumns = list |
|||
if (!selectValue.length && type === 1) { |
|||
columnsInfo = null |
|||
} else { |
|||
columnsInfo = { |
|||
index: pickerValue, |
|||
value: selectValue, |
|||
item: selectItem, |
|||
columns: pickerColumns |
|||
} |
|||
} |
|||
break |
|||
} |
|||
return columnsInfo |
|||
} |
@ -1,19 +0,0 @@ |
|||
<template> |
|||
<view> |
|||
test组件 |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
|
|||
</style> |
@ -0,0 +1,217 @@ |
|||
<template> |
|||
<view :class="{ 'uni-collapse-cell--disabled': disabled,'uni-collapse-cell--notdisabled': !disabled, 'uni-collapse-cell--open': isOpen,'uni-collapse-cell--hide':!isOpen }" class="uni-collapse-cell"> |
|||
<view class="uni-collapse-cell__title" @click="onClick"> |
|||
<image v-if="thumb" :src="thumb" class="uni-collapse-cell__title-img" /> |
|||
<text class="uni-collapse-cell__title-text">{{ title }}</text> |
|||
<!-- #ifdef MP-ALIPAY --> |
|||
<view :class="{ 'uni-collapse-cell__title-arrow-active': isOpen, 'uni-collapse-cell--animation': showAnimation === true }" class="uni-collapse-cell__title-arrow"> |
|||
<uni-icons color="#bbb" size="20" type="arrowdown" /> |
|||
</view> |
|||
<!-- #endif --> |
|||
<!-- #ifndef MP-ALIPAY --> |
|||
<uni-icons :class="{ 'uni-collapse-cell__title-arrow-active': isOpen, 'uni-collapse-cell--animation': showAnimation === true }" class="uni-collapse-cell__title-arrow" color="#bbb" size="20" type="arrowdown" /> |
|||
<!-- #endif --> |
|||
</view> |
|||
<view :class="{'uni-collapse-cell__content--hide':!isOpen}" class="uni-collapse-cell__content"> |
|||
<view :class="{ 'uni-collapse-cell--animation': showAnimation === true }" class="uni-collapse-cell__wrapper" :style="{'transform':isOpen?'translateY(0)':'translateY(-50%)','-webkit-transform':isOpen?'translateY(0)':'translateY(-50%)'}"> |
|||
<slot /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import uniIcons from '../uni-icons/uni-icons.vue' |
|||
/** |
|||
* CollapseItem 折叠面板子组件 |
|||
* @description 折叠面板子组件 |
|||
* @property {String} title 标题文字 |
|||
* @property {String} thumb 标题左侧缩略图 |
|||
* @property {Boolean} disabled = [true|false] 是否展开面板 |
|||
* @property {Boolean} showAnimation = [true|false] 开启动画 |
|||
*/ |
|||
export default { |
|||
name: 'UniCollapseItem', |
|||
components: { |
|||
uniIcons |
|||
}, |
|||
props: { |
|||
title: { |
|||
// 列表标题 |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
name: { |
|||
// 唯一标识符 |
|||
type: [Number, String], |
|||
default: 0 |
|||
}, |
|||
disabled: { |
|||
// 是否禁用 |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
showAnimation: { |
|||
// 是否显示动画 |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
open: { |
|||
// 是否展开 |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
thumb: { |
|||
// 缩略图 |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
isOpen: false |
|||
} |
|||
}, |
|||
watch: { |
|||
open(val) { |
|||
this.isOpen = val |
|||
} |
|||
}, |
|||
inject: ['collapse'], |
|||
created() { |
|||
this.isOpen = this.open |
|||
this.nameSync = this.name ? this.name : this.collapse.childrens.length |
|||
this.collapse.childrens.push(this) |
|||
if (String(this.collapse.accordion) === 'true') { |
|||
if (this.isOpen) { |
|||
let lastEl = this.collapse.childrens[this.collapse.childrens.length - 2] |
|||
if (lastEl) { |
|||
this.collapse.childrens[this.collapse.childrens.length - 2].isOpen = false |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
onClick() { |
|||
if (this.disabled) { |
|||
return |
|||
} |
|||
if (String(this.collapse.accordion) === 'true') { |
|||
this.collapse.childrens.forEach(vm => { |
|||
if (vm === this) { |
|||
return |
|||
} |
|||
vm.isOpen = false |
|||
}) |
|||
} |
|||
this.isOpen = !this.isOpen |
|||
this.collapse.onChange && this.collapse.onChange() |
|||
this.$forceUpdate() |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.uni-collapse-cell { |
|||
flex-direction: column; |
|||
border-color: #e5e5e5; |
|||
border-bottom-width: 1px; |
|||
border-bottom-style: solid; |
|||
} |
|||
|
|||
|
|||
.uni-collapse-cell--hover { |
|||
background-color: #f1f1f1; |
|||
} |
|||
|
|||
.uni-collapse-cell--open { |
|||
background-color: #f1f1f1; |
|||
} |
|||
|
|||
.uni-collapse-cell--disabled { |
|||
background-color: #f1f1f1; |
|||
/* opacity: 0.3; |
|||
*/ |
|||
} |
|||
|
|||
|
|||
.uni-collapse-cell--hide { |
|||
height: 48px; |
|||
} |
|||
|
|||
.uni-collapse-cell--animation { |
|||
/* transition: transform 0.3s ease; |
|||
*/ |
|||
transition-property: transform; |
|||
transition-duration: 0.3s; |
|||
transition-timing-function: ease; |
|||
} |
|||
|
|||
.uni-collapse-cell__title { |
|||
padding: 12px 12px; |
|||
position: relative; |
|||
/* #ifndef APP-NVUE */ |
|||
display: flex; |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
/* #endif */ |
|||
height: 48px; |
|||
line-height: 24px; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.uni-collapse-cell__title:active { |
|||
background-color: #f1f1f1; |
|||
} |
|||
|
|||
.uni-collapse-cell__title-img { |
|||
height: 26px; |
|||
width: 26px; |
|||
margin-right: 10px; |
|||
} |
|||
|
|||
.uni-collapse-cell__title-arrow { |
|||
width: 20px; |
|||
height: 20px; |
|||
transform: rotate(0deg); |
|||
transform-origin: center center; |
|||
|
|||
} |
|||
|
|||
.uni-collapse-cell__title-arrow-active { |
|||
transform: rotate(180deg); |
|||
} |
|||
|
|||
.uni-collapse-cell__title-text { |
|||
flex: 1; |
|||
font-size: 14px; |
|||
/* #ifndef APP-NVUE */ |
|||
white-space: nowrap; |
|||
color: inherit; |
|||
/* #endif */ |
|||
/* #ifdef APP-NVUE */ |
|||
lines: 1; |
|||
/* #endif */ |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
} |
|||
|
|||
.uni-collapse-cell__content { |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.uni-collapse-cell__wrapper { |
|||
/* #ifndef APP-NVUE */ |
|||
display: flex; |
|||
/* #endif */ |
|||
flex-direction: column; |
|||
} |
|||
|
|||
.uni-collapse-cell__content--hide { |
|||
height: 0px; |
|||
line-height: 0px; |
|||
} |
|||
</style> |
@ -0,0 +1,54 @@ |
|||
<template> |
|||
<view class="uni-collapse"> |
|||
<slot /> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
export default { |
|||
name: 'UniCollapse', |
|||
props: { |
|||
accordion: { |
|||
// 是否开启手风琴效果 |
|||
type: [Boolean, String], |
|||
default: false |
|||
} |
|||
}, |
|||
data() { |
|||
return {} |
|||
}, |
|||
provide() { |
|||
return { |
|||
collapse: this |
|||
} |
|||
}, |
|||
created() { |
|||
this.childrens = [] |
|||
}, |
|||
methods: { |
|||
onChange() { |
|||
let activeItem = [] |
|||
this.childrens.forEach((vm, index) => { |
|||
if (vm.isOpen) { |
|||
activeItem.push(vm.nameSync) |
|||
} |
|||
}) |
|||
this.$emit('change', activeItem) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import '@/uni.scss'; |
|||
|
|||
.uni-collapse { |
|||
/* #ifndef APP-NVUE */ |
|||
width: 100%; |
|||
display: flex; |
|||
/* #endif */ |
|||
/* #ifdef APP-NVUE */ |
|||
flex: 1; |
|||
/* #endif */ |
|||
flex-direction: column; |
|||
background-color: $uni-bg-color; |
|||
} |
|||
</style> |
@ -0,0 +1,96 @@ |
|||
export default { |
|||
'contact': '\ue100', |
|||
'person': '\ue101', |
|||
'personadd': '\ue102', |
|||
'contact-filled': '\ue130', |
|||
'person-filled': '\ue131', |
|||
'personadd-filled': '\ue132', |
|||
'phone': '\ue200', |
|||
'email': '\ue201', |
|||
'chatbubble': '\ue202', |
|||
'chatboxes': '\ue203', |
|||
'phone-filled': '\ue230', |
|||
'email-filled': '\ue231', |
|||
'chatbubble-filled': '\ue232', |
|||
'chatboxes-filled': '\ue233', |
|||
'weibo': '\ue260', |
|||
'weixin': '\ue261', |
|||
'pengyouquan': '\ue262', |
|||
'chat': '\ue263', |
|||
'qq': '\ue264', |
|||
'videocam': '\ue300', |
|||
'camera': '\ue301', |
|||
'mic': '\ue302', |
|||
'location': '\ue303', |
|||
'mic-filled': '\ue332', |
|||
'speech': '\ue332', |
|||
'location-filled': '\ue333', |
|||
'micoff': '\ue360', |
|||
'image': '\ue363', |
|||
'map': '\ue364', |
|||
'compose': '\ue400', |
|||
'trash': '\ue401', |
|||
'upload': '\ue402', |
|||
'download': '\ue403', |
|||
'close': '\ue404', |
|||
'redo': '\ue405', |
|||
'undo': '\ue406', |
|||
'refresh': '\ue407', |
|||
'star': '\ue408', |
|||
'plus': '\ue409', |
|||
'minus': '\ue410', |
|||
'circle': '\ue411', |
|||
'checkbox': '\ue411', |
|||
'close-filled': '\ue434', |
|||
'clear': '\ue434', |
|||
'refresh-filled': '\ue437', |
|||
'star-filled': '\ue438', |
|||
'plus-filled': '\ue439', |
|||
'minus-filled': '\ue440', |
|||
'circle-filled': '\ue441', |
|||
'checkbox-filled': '\ue442', |
|||
'closeempty': '\ue460', |
|||
'refreshempty': '\ue461', |
|||
'reload': '\ue462', |
|||
'starhalf': '\ue463', |
|||
'spinner': '\ue464', |
|||
'spinner-cycle': '\ue465', |
|||
'search': '\ue466', |
|||
'plusempty': '\ue468', |
|||
'forward': '\ue470', |
|||
'back': '\ue471', |
|||
'left-nav': '\ue471', |
|||
'checkmarkempty': '\ue472', |
|||
'home': '\ue500', |
|||
'navigate': '\ue501', |
|||
'gear': '\ue502', |
|||
'paperplane': '\ue503', |
|||
'info': '\ue504', |
|||
'help': '\ue505', |
|||
'locked': '\ue506', |
|||
'more': '\ue507', |
|||
'flag': '\ue508', |
|||
'home-filled': '\ue530', |
|||
'gear-filled': '\ue532', |
|||
'info-filled': '\ue534', |
|||
'help-filled': '\ue535', |
|||
'more-filled': '\ue537', |
|||
'settings': '\ue560', |
|||
'list': '\ue562', |
|||
'bars': '\ue563', |
|||
'loop': '\ue565', |
|||
'paperclip': '\ue567', |
|||
'eye': '\ue568', |
|||
'arrowup': '\ue580', |
|||
'arrowdown': '\ue581', |
|||
'arrowleft': '\ue582', |
|||
'arrowright': '\ue583', |
|||
'arrowthinup': '\ue584', |
|||
'arrowthindown': '\ue585', |
|||
'arrowthinleft': '\ue586', |
|||
'arrowthinright': '\ue587', |
|||
'pulldown': '\ue588', |
|||
'closefill': '\ue589', |
|||
'sound': '\ue590', |
|||
'scan': '\ue612' |
|||
} |
@ -1,13 +1,48 @@ |
|||
{ |
|||
"name": "healthycode", |
|||
"name": "uniTemplete", |
|||
"version": "1.0.0", |
|||
"lockfileVersion": 1, |
|||
"requires": true, |
|||
"dependencies": { |
|||
"axios": { |
|||
"version": "0.19.2", |
|||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", |
|||
"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", |
|||
"requires": { |
|||
"follow-redirects": "1.5.10" |
|||
} |
|||
}, |
|||
"debug": { |
|||
"version": "3.1.0", |
|||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", |
|||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", |
|||
"requires": { |
|||
"ms": "2.0.0" |
|||
} |
|||
}, |
|||
"follow-redirects": { |
|||
"version": "1.5.10", |
|||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", |
|||
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", |
|||
"requires": { |
|||
"debug": "=3.1.0" |
|||
} |
|||
}, |
|||
"jquery": { |
|||
"version": "3.5.1", |
|||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", |
|||
"integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", |
|||
"dev": true |
|||
}, |
|||
"moment": { |
|||
"version": "2.24.0", |
|||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", |
|||
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" |
|||
"version": "2.27.0", |
|||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", |
|||
"integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==" |
|||
}, |
|||
"ms": { |
|||
"version": "2.0.0", |
|||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", |
|||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" |
|||
} |
|||
} |
|||
} |
|||
|
@ -1,19 +1,139 @@ |
|||
{ |
|||
"pages": [ |
|||
{ |
|||
"path": "pages/index/index", |
|||
"style": { |
|||
"navigationBarTitleText": "模板" |
|||
} |
|||
} |
|||
], |
|||
"globalStyle": { |
|||
"navigationBarTextStyle": "black", |
|||
"navigationBarTitleText": "模板项目", |
|||
"navigationBarBackgroundColor": "#F8F8F8", |
|||
"backgroundColor": "#F8F8F8" |
|||
}, |
|||
"easycom": { |
|||
"autoscan": true |
|||
} |
|||
} |
|||
"pages": [{ |
|||
"path": "pages/tabBar/HomePage", |
|||
"style": { |
|||
"navigationBarTitleText": "首页" |
|||
} |
|||
}, { |
|||
"path": "pages/tabBar/Recommend", |
|||
"style": { |
|||
"navigationBarTitleText": "推荐政策" |
|||
} |
|||
}, { |
|||
"path": "pages/tabBar/Enterprise", |
|||
"style": { |
|||
"navigationBarTitleText": "企业服务" |
|||
} |
|||
}, { |
|||
"path": "pages/tabBar/My", |
|||
"style": { |
|||
"navigationBarTitleText": "我的" |
|||
} |
|||
}, { |
|||
"path": "pages/HomePages/ListDetails", |
|||
"style": { |
|||
"navigationBarTitleText": "发榜详情" |
|||
} |
|||
}, { |
|||
"path": "pages/HomePages/SearchPage", |
|||
"style": { |
|||
"navigationBarTitleText": "搜索" |
|||
} |
|||
}, { |
|||
"path": "pages/Policy/PolicyDetails", |
|||
"style": { |
|||
"navigationBarTitleText": "政策详情" |
|||
} |
|||
}, { |
|||
"path": "pages/Binding/Binding", |
|||
"style": { |
|||
"navigationBarTitleText": "完善企业信息" |
|||
} |
|||
}, { |
|||
"path": "pages/TestScore/TestScore", |
|||
"style": { |
|||
"navigationBarTitleText": "评分" |
|||
} |
|||
}, { |
|||
"path": "pages/RequirementRelease/RequirementRelease", |
|||
"style": { |
|||
"navigationBarTitleText": "需求发布" |
|||
} |
|||
}, { |
|||
"path": "pages/MyPages/CollectionPage", |
|||
"style": { |
|||
"navigationBarTitleText": "我的收藏" |
|||
} |
|||
}, { |
|||
"path": "pages/MyPages/MessagePage", |
|||
"style": { |
|||
"navigationBarTitleText": "系统消息" |
|||
} |
|||
}, { |
|||
"path": "pages/About/About", |
|||
"style": { |
|||
"navigationBarTitleText": "关于" |
|||
} |
|||
}, { |
|||
"path": "pages/Edit/Edit", |
|||
"style": { |
|||
"navigationBarTitleText": "企业基本信息" |
|||
} |
|||
}, { |
|||
"path": "pages/MessagePage/MessagePage", |
|||
"style": { |
|||
"navigationBarTitleText": "消息详情" |
|||
} |
|||
}, |
|||
{ |
|||
"path": "pages/HomePages/peixun", |
|||
"style": { |
|||
"navigationBarTitleText": "双创活动" |
|||
} |
|||
} |
|||
,{ |
|||
"path" : "pages/RequirementRelease/upload", |
|||
"style": { |
|||
"navigationBarTitleText": "上传文件" |
|||
} |
|||
} |
|||
,{ |
|||
"path" : "pages/DownFile/DownFile", |
|||
"style" : { |
|||
"navigationBarTitleText": "下载文件" |
|||
} |
|||
} |
|||
,{ |
|||
"path" : "pages/outH5/outH5", |
|||
"style" : { |
|||
"navigationBarTitleText": "中小企业智慧服务云平台" |
|||
} |
|||
} |
|||
], |
|||
"globalStyle": { |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarTitleText": "智慧服务平台", |
|||
"navigationBarBackgroundColor": "#e54d42", |
|||
"backgroundColor": "#e54d42" |
|||
}, |
|||
"easycom": { |
|||
"autoscan": true |
|||
}, |
|||
"tabBar": { |
|||
"color": "#7A7E83", |
|||
"selectedColor": "#e54d42", |
|||
"borderStyle": "black", |
|||
"backgroundColor": "#F8F8F8", |
|||
"list": [{ |
|||
"pagePath": "pages/tabBar/HomePage", |
|||
"text": "首页", |
|||
"iconPath": "static/shouye.png", |
|||
"selectedIconPath": "static/shouye-copy.png" |
|||
}, { |
|||
"pagePath": "pages/tabBar/Recommend", |
|||
"text": "推荐政策", |
|||
"iconPath": "static/bookmark-3-line.png", |
|||
"selectedIconPath": "static/bookmark-3-line-copy.png" |
|||
}, { |
|||
"pagePath": "pages/tabBar/Enterprise", |
|||
"text": "企业服务", |
|||
"iconPath": "static/icon_danwei.png", |
|||
"selectedIconPath": "static/icon_danwei-copy.png" |
|||
}, { |
|||
"pagePath": "pages/tabBar/My", |
|||
"text": "我的", |
|||
"iconPath": "static/wode.png", |
|||
"selectedIconPath": "static/wode-copy.png" |
|||
}] |
|||
} |
|||
} |
|||
|
@ -0,0 +1,53 @@ |
|||
<template> |
|||
<view> |
|||
<view class="about"> |
|||
<view class="about-us">关于我们</view> |
|||
<view class="about-content"> |
|||
<view>“创时代新一代信息技术孵化器”由山西创时代企业孵化器有限公司于2019年初开始建设运营,2019年5月在综改区备案,位于山西转型综改示范区太原学府院区中心北街以南山西环保科技园中绿大厦2-5层,总面积4000平方米,规划开放式办公空间1685平米,独立办公室22间1001平米,共享会议室6个333平米,自用办公场地132平米以及休闲配套设施,购置电脑、打印机、复印机、档案柜、整理桌、办公桌椅办公用设备80多台(套),并组建经验丰富的管理服务团队14人,聘请10名导师组建孵化导师团队,与9家第三方专业机构达成长期合作协议,共同开展孵化器的运营建设。已引进入驻企业31家,创业团队(创客)5个。</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/About/About' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.about{ |
|||
margin: 20px; |
|||
border-radius: 10px; |
|||
padding: 20px 20px; |
|||
background-color: $white; |
|||
} |
|||
.about-us{ |
|||
display: flex; |
|||
font-size: 16px; |
|||
font-weight: 500; |
|||
color: $gray; |
|||
justify-content: center; |
|||
} |
|||
.about-content view{ |
|||
margin-top: 15px; |
|||
text-indent:2em; |
|||
letter-spacing:1px |
|||
} |
|||
</style> |
@ -0,0 +1,496 @@ |
|||
<template> |
|||
<view> |
|||
<view class="perfect-title">完善企业信息</view> |
|||
<!-- Ⅰ类知识产权数 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[0]}}:</view> |
|||
<input name="input" type="digit" v-model="intellectualPropertyRightI"></input> |
|||
</view> |
|||
<!-- Ⅱ类知识产权数 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[1]}}:</view> |
|||
<input name="input" type="digit" v-model="intellectualPropertyRightIi"></input> |
|||
</view> |
|||
<!-- 对企业主要产品(服务)发挥核心支持作用的技术 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[2]}}:</view> |
|||
<input name="input" type="digit" v-model="mainProductTechnologyText" disabled @click="changeIncubatorShow"></input> |
|||
<view class="incubator-box" :class="incubatorShow ? 'show' : ''" > |
|||
<view class="incubator-content" v-for="(item,index) in incubatorList" :key="index" @click="changeIncubator(item,index)"> |
|||
{{item}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- 职工总数 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[3]}}:</view> |
|||
<input name="input" type="digit" v-model="workforce"></input> |
|||
</view> |
|||
<!-- 科技人员总数 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[4]}}:</view> |
|||
<input name="input" type="digit" v-model="technicians"></input> |
|||
</view> |
|||
<!-- 资产总额 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[5]}}:</view> |
|||
<input name="input" type="digit" v-model="totalAssets"></input> |
|||
</view> |
|||
<!-- 今年销售收入总额 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[6]}}:</view> |
|||
<input name="input" type="digit" v-model="grossSalesOne"></input> |
|||
</view> |
|||
<!-- 去年销售收入总额 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[7]}}:</view> |
|||
<input name="input" type="digit" v-model="grossSalesTwo"></input> |
|||
</view> |
|||
<!-- 前年销售收入总额 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[8]}}:</view> |
|||
<input name="input" type="digit" v-model="grossSalesThree"></input> |
|||
</view> |
|||
<!-- 今年研发费用总额 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[9]}}:</view> |
|||
<input name="input" type="digit" v-model="rdexpensesOne"></input> |
|||
</view> |
|||
<!-- 去年研发费用总额 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[10]}}:</view> |
|||
<input name="input" type="digit" v-model="rdexpensesTwo"></input> |
|||
</view> |
|||
<!-- 前年研发费用总额 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[11]}}:</view> |
|||
<input name="input" type="digit" v-model="rdexpensesThree"></input> |
|||
</view> |
|||
<!-- 今年成本费用支出总额 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[12]}}:</view> |
|||
<input name="input" type="digit" v-model="totalCostExpensesOne"></input> |
|||
</view> |
|||
<!-- 去年成本费用支出总额 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[13]}}:</view> |
|||
<input name="input" type="digit" v-model="totalCostExpensesTwo"></input> |
|||
</view> |
|||
<!-- 前年成本费用支出总额 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[14]}}:</view> |
|||
<input name="input" type="digit" v-model="totalCostExpensesThree"></input> |
|||
</view> |
|||
<!-- 高新技术产品(服务)费用 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[15]}}:</view> |
|||
<input name="input" type="digit" v-model="highNewTechnologyFee"></input> |
|||
</view> |
|||
<!-- 前一年及当年内有无发生重大安全、重大质量事故和严重环境违法、科研严重失信行为 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[16]}}:</view> |
|||
<radio-group class="radio-box" name="one" @change="changeOne"> |
|||
<label> |
|||
<view> |
|||
<radio value="0" :checked="illegalAct-0 === 0" /><text> 否</text> |
|||
</view> |
|||
<view> |
|||
<radio value="1" :checked="illegalAct-0 === 1" /><text> 是</text> |
|||
</view> |
|||
</label> |
|||
</radio-group> |
|||
</view> |
|||
<!-- 企业是否被列入经营异常名录和严重违法失信企业名单 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[17]}}:</view> |
|||
<radio-group class="radio-box" name="two" @change="changeTwo"> |
|||
<label> |
|||
<view> |
|||
<radio value="0" :checked="dishonestEnterprise-0 === 0" /><text> 否</text> |
|||
</view> |
|||
<view> |
|||
<radio value="1" :checked="dishonestEnterprise-0 === 1" /><text> 是</text> |
|||
</view> |
|||
</label> |
|||
</radio-group> |
|||
</view> |
|||
<!-- 产品和服务是否属于国家规定的禁止、限制和淘汰类 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[18]}}:</view> |
|||
<radio-group class="radio-box" name="three" @change="changeThree"> |
|||
<label> |
|||
<view> |
|||
<radio value="0" :checked="forbidProduct-0 === 0" /><text> 否</text> |
|||
</view> |
|||
<view> |
|||
<radio value="1" :checked="forbidProduct-0 === 1" /><text> 是</text> |
|||
</view> |
|||
</label> |
|||
</radio-group> |
|||
</view> |
|||
<!-- 是否拥有有效期内高新技术企业资格证书 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[19]}}:</view> |
|||
<radio-group class="radio-box" name="four" @change="changeFour"> |
|||
<label> |
|||
<view> |
|||
<radio value="0" :checked="highNewTechnologyEnterprise-0 === 0" /><text> 否</text> |
|||
</view> |
|||
<view> |
|||
<radio value="1" :checked="highNewTechnologyEnterprise-0 === 1" /><text> 是</text> |
|||
</view> |
|||
</label> |
|||
</radio-group> |
|||
</view> |
|||
<!-- 企业近五年内是否获得过国家级科技奖励,并在获奖单位中排在前三名 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[20]}}:</view> |
|||
<radio-group class="radio-box" name="five" @change="changeFive"> |
|||
<label> |
|||
<view> |
|||
<radio value="0" :checked="technologyAwards-0 === 0" /><text> 否</text> |
|||
</view> |
|||
<view> |
|||
<radio value="1" :checked="technologyAwards-0 === 1" /><text> 是</text> |
|||
</view> |
|||
</label> |
|||
</radio-group> |
|||
</view> |
|||
<!-- 企业是否拥有经认定的省部级以上研发机构 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[21]}}:</view> |
|||
<radio-group class="radio-box" name="six" @change="changeSix"> |
|||
<label> |
|||
<view> |
|||
<radio value="0" :checked="organization-0 === 0"/><text> 否</text> |
|||
</view> |
|||
<view> |
|||
<radio value="1" :checked="organization-0 === 1" /><text> 是</text> |
|||
</view> |
|||
</label> |
|||
</radio-group> |
|||
</view> |
|||
<!-- 企业近五年内是否主导制定过国际标准、国家标准或行业标准 --> |
|||
<view class="cu-form"> |
|||
<view class="title">{{list[22]}}:</view> |
|||
<radio-group class="radio-box" name="seven" @change="changeSeven"> |
|||
<label> |
|||
<view> |
|||
<radio value="0" :checked="standard-0 === 0"/><text> 否</text> |
|||
</view> |
|||
<view> |
|||
<radio value="1" :checked="standard-0 === 1" /><text> 是</text> |
|||
</view> |
|||
</label> |
|||
</radio-group> |
|||
</view> |
|||
<view class="padding flex flex-direction"> |
|||
<button class="cu-btn bg-red margin-tb-sm lg" @click="commit">提交</button> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { additional } from 'api/additional' |
|||
import { additionalDetail } from 'api/additionalDetail' |
|||
|
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/Binding/Binding' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
list:['Ⅰ类知识产权数','Ⅱ类知识产权','对企业主要产品(服务)发挥核心支持作用的技术','职工总数','科技人员总数','资产总额,单位:万(例如:100)','今年销售收入总额,单位:万', |
|||
'去年销售收入总额,单位:万','前年销售收入总额,单位:万','今年研发费用总额,单位:万','去年研发费用总额,单位:万','前年研发费用总额,单位:万','今年成本费用支出总额,单位:万', |
|||
'去年成本费用支出总额,单位:万','前年成本费用支出总额,单位:万','高新技术产品(服务)费用,单位:万','前一年及当年内有无发生重大安全、重大质量事故和严重环境违法、科研严重失信行为', |
|||
'企业是否被列入经营异常名录和严重违法失信企业名单','产品和服务是否属于国家规定的禁止、限制和淘汰类','是否拥有有效期内高新技术企业资格证书', |
|||
'企业近五年内是否获得过国家级科技奖励,并在获奖单位中排在前三名 ','企业是否拥有经认定的省部级以上研发机构','企业近五年内是否主导制定过国际标准、国家标准或行业标准',], |
|||
incubatorList:['其他','电子信息技术','生物与医药技术','航空航天技术','新材料技术','高新技术服务技术','新能源及节能技术','资源与环境技术','高新技术改造传统产业'], |
|||
incubatorShow:false, |
|||
intellectualPropertyRightI:'', // I类知识产权数 |
|||
intellectualPropertyRightIi :'', // Ⅱ类知识产权 |
|||
mainProductTechnology:'', // 核心支持作用的技术 |
|||
mainProductTechnologyText:'', |
|||
workforce:'', // 职工总数 |
|||
technicians:'', // 科技人员总数 |
|||
totalAssets:'', // 资产总额 |
|||
grossSalesOne:'', // 今年销售收入总额 |
|||
grossSalesThree:'', // 前年销售收入总额 |
|||
grossSalesTwo:'', // 去年销售收入总额 |
|||
rdexpensesOne:'', // 今年研发费用总额 |
|||
rdexpensesThree :'', // 前年研发费用总额 |
|||
rdexpensesTwo:'', // 去年研发费用总额 |
|||
totalCostExpensesOne:'', // 今年成本费用支出总额 |
|||
totalCostExpensesThree:'', // 前年成本费用支出总额 |
|||
totalCostExpensesTwo:'', // 去年成本费用支出总额 |
|||
highNewTechnologyFee:'', // 高新技术产品(服务)费用 |
|||
|
|||
illegalAct:0, // 前一年及当年内有无发生重大安全、重大质量事故和严重环境违法、科研严重失信行为 |
|||
checkedOne:'', |
|||
dishonestEnterprise:0, // 企业是否被列入经营异常名录和严重违法失信企业名单 |
|||
checkedTwo:'', |
|||
forbidProduct:0, // 产品和服务是否属于国家规定的禁止、限制和淘汰类 |
|||
checkedThree:'', |
|||
highNewTechnologyEnterprise:2, // 是否拥有有效期内高新技术企业资格证书 |
|||
checkedFour:'', |
|||
technologyAwards:2, // 企业近五年内是否获得过国家级科技奖励 |
|||
checkedFive:'', |
|||
organization:2, // 企业是否拥有经认定的省部级以上研发机构 |
|||
checkedSix:'', |
|||
standard:2, //企业近五年内是否主导制定过国际标准、国家标准或行业标准 |
|||
checkedSeven:'', |
|||
} |
|||
}, |
|||
async onLoad(){ |
|||
const that = this |
|||
if(this.$store.state.user.bindMsg.perfectStatus === 1){ |
|||
const params = { |
|||
param:{ |
|||
|
|||
} |
|||
} |
|||
const data = await additionalDetail(params) |
|||
if(data !== null){ |
|||
that.intellectualPropertyRightI = data.intellectualPropertyRightI |
|||
that.intellectualPropertyRightIi = data.intellectualPropertyRightIi |
|||
that.mainProductTechnology = data.mainProductTechnology |
|||
that.mainProductTechnologyText = that.incubatorList[data.mainProductTechnology] |
|||
that.workforce = data.workforce |
|||
that.technicians = data.technicians |
|||
that.totalAssets = data.totalAssets |
|||
that.grossSalesOne = data.grossSalesOne |
|||
that.grossSalesThree = data.grossSalesThree |
|||
that.grossSalesTwo = data.grossSalesTwo |
|||
that.rdexpensesOne = data.rdexpensesOne |
|||
that.rdexpensesThree = data.rdexpensesThree |
|||
that.rdexpensesTwo = data.rdexpensesTwo |
|||
that.totalCostExpensesOne = data.totalCostExpensesOne |
|||
that.totalCostExpensesThree = data.totalCostExpensesThree |
|||
that.totalCostExpensesTwo = data.totalCostExpensesTwo |
|||
that.highNewTechnologyFee = data.highNewTechnologyFee |
|||
|
|||
that.illegalAct = data.illegalAct |
|||
that.dishonestEnterprise = data.dishonestEnterprise |
|||
that.forbidProduct = data.forbidProduct |
|||
that.highNewTechnologyEnterprise = data.highNewTechnologyEnterprise |
|||
that.technologyAwards = data.technologyAwards |
|||
that.organization = data.organization |
|||
that.standard = data.standard |
|||
console.log(that.illegalAct,that.dishonestEnterprise,that.forbidProduct) |
|||
}else{ |
|||
console.log('没有数据') |
|||
} |
|||
} |
|||
}, |
|||
methods:{ |
|||
changeOne(e){ |
|||
console.log(e.detail.value) |
|||
this.illegalAct = e.detail.value |
|||
}, |
|||
changeTwo(e){ |
|||
console.log(e.detail.value) |
|||
this.dishonestEnterprise = e.detail.value |
|||
}, |
|||
changeThree(e){ |
|||
console.log(e.detail.value) |
|||
this.forbidProduct = e.detail.value |
|||
}, |
|||
changeFour(e){ |
|||
console.log(e.detail.value) |
|||
this.highNewTechnologyEnterprise = e.detail.value |
|||
}, |
|||
changeFive(e){ |
|||
console.log(e.detail.value) |
|||
this.technologyAwards = e.detail.value |
|||
}, |
|||
changeSix(e){ |
|||
console.log(e.detail.value) |
|||
this.organization = e.detail.value |
|||
}, |
|||
changeSeven(e){ |
|||
console.log(e.detail.value) |
|||
this.standard = e.detail.value |
|||
}, |
|||
async commit(){ |
|||
const that = this |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
dishonestEnterprise:that.dishonestEnterprise, |
|||
forbidProduct:that.forbidProduct, |
|||
grossSalesOne:that.grossSalesOne, |
|||
grossSalesThree:that.grossSalesThree, |
|||
grossSalesTwo:that.grossSalesTwo, |
|||
highNewTechnologyEnterprise:that.highNewTechnologyEnterprise, |
|||
highNewTechnologyFee:that.highNewTechnologyFee, |
|||
illegalAct:that.illegalAct, |
|||
intellectualPropertyRightI:that.intellectualPropertyRightI, |
|||
intellectualPropertyRightIi:that.intellectualPropertyRightIi, |
|||
mainProductTechnology:that.mainProductTechnology, |
|||
organization:that.organization, |
|||
rdexpensesOne:that.rdexpensesOne, |
|||
rdexpensesThree:that.rdexpensesThree, |
|||
rdexpensesTwo:that.rdexpensesTwo, |
|||
standard:that.standard, |
|||
technicians:that.technicians, |
|||
technologyAwards:that.technologyAwards, |
|||
totalAssets:that.totalAssets, |
|||
totalCostExpensesOne:that.totalCostExpensesOne, |
|||
totalCostExpensesThree:that.totalCostExpensesThree, |
|||
totalCostExpensesTwo:that.totalCostExpensesTwo, |
|||
workforce:that.workforce |
|||
} |
|||
} |
|||
const data = await additional(params) |
|||
if(that.$store.state.user.bindMsg.perfectStatus === 0){ |
|||
that.$store.state.user.bindMsg.perfectStatus = 1 |
|||
} |
|||
uni.showToast({ |
|||
title:'即将跳转...', |
|||
duration:2000, |
|||
icon:'success' |
|||
}) |
|||
setTimeout(function(){ |
|||
uni.switchTab({ |
|||
url:'/pages/tabBar/Enterprise' |
|||
}) |
|||
},2000) |
|||
}catch(e){ |
|||
uni.showToast({ |
|||
title:'提交失败,非法字符', |
|||
icon:'none' |
|||
}) |
|||
console.log(e) |
|||
} |
|||
}, |
|||
changeIncubatorShow(){ |
|||
const that = this |
|||
if(that.incubatorShow === true){ |
|||
that.incubatorShow = false |
|||
}else{ |
|||
that.incubatorShow = true |
|||
} |
|||
console.log(that.incubatorShow) |
|||
}, |
|||
changeIncubator(item,index){ |
|||
const that = this |
|||
console.log(item,index) |
|||
that.mainProductTechnologyText = item |
|||
that.mainProductTechnology = index |
|||
that.incubatorShow = false |
|||
} |
|||
}, |
|||
watch:{ |
|||
async '$store.state.user.bindMsg.perfectStatus'(val){ |
|||
const that = this |
|||
const params = { |
|||
param:{ |
|||
} |
|||
} |
|||
const data = await additionalDetail(params) |
|||
if(data !== null){ |
|||
that.intellectualPropertyRightI = data.intellectualPropertyRightI |
|||
that.intellectualPropertyRightIi = data.intellectualPropertyRightIi |
|||
that.mainProductTechnology = data.mainProductTechnology |
|||
that.mainProductTechnologyText = that.incubatorList[data.mainProductTechnology] |
|||
that.workforce = data.workforce |
|||
that.technicians = data.technicians |
|||
that.totalAssets = data.totalAssets |
|||
that.grossSalesOne = data.grossSalesOne |
|||
that.grossSalesThree = data.grossSalesThree |
|||
that.grossSalesTwo = data.grossSalesTwo |
|||
that.rdexpensesOne = data.rdexpensesOne |
|||
that.rdexpensesThree = data.rdexpensesThree |
|||
that.rdexpensesTwo = data.rdexpensesTwo |
|||
that.totalCostExpensesOne = data.totalCostExpensesOne |
|||
that.totalCostExpensesThree = data.totalCostExpensesThree |
|||
that.totalCostExpensesTwo = data.totalCostExpensesTwo |
|||
that.highNewTechnologyFee = data.highNewTechnologyFee |
|||
|
|||
that.illegalAct = data.illegalAct |
|||
that.dishonestEnterprise = data.dishonestEnterprise |
|||
that.forbidProduct = data.forbidProduct |
|||
that.highNewTechnologyEnterprise = data.highNewTechnologyEnterprise |
|||
that.technologyAwards = data.technologyAwards |
|||
that.organization = data.organization |
|||
that.standard = data.standard |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.perfect-title{ |
|||
display: flex; |
|||
background-color: $white; |
|||
padding: 1upx 30upx; |
|||
font-size: 20px; |
|||
font-weight: 600; |
|||
align-items: center; |
|||
min-height: 100upx; |
|||
} |
|||
.cu-form{ |
|||
background-color: $white; |
|||
padding: 10upx 30upx; |
|||
align-items: center; |
|||
min-height: 100upx; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.title { |
|||
text-align: justify; |
|||
padding-right: 30upx; |
|||
font-size: 14px; |
|||
position: relative; |
|||
// height: 60upx; |
|||
line-height: 50upx; |
|||
// padding-bottom: 20upx; |
|||
} |
|||
|
|||
.cu-form input { |
|||
flex: 1; |
|||
font-size: 14px; |
|||
color: #555; |
|||
padding-right: 20upx; |
|||
border: 1px solid #eee; |
|||
border-radius: 5px; |
|||
margin-bottom: 20upx; |
|||
height: 30px; |
|||
padding-left: 10px; |
|||
} |
|||
.radio-box>label{ |
|||
width: 600upx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
.show{ |
|||
display: block !important; |
|||
} |
|||
.incubator-box{ |
|||
display: none; |
|||
background-color: $white; |
|||
padding-left: 20upx; |
|||
padding-right: 20upx; |
|||
border-radius: 0 0 5px 5px; |
|||
position: absolute; |
|||
z-index: 10; |
|||
width: 690upx; |
|||
border: 1px solid $grey; |
|||
border-top: none !important; |
|||
} |
|||
.incubator-content{ |
|||
line-height: 30px; |
|||
margin-bottom: 4px; |
|||
height: 30px; |
|||
border-bottom: 1px solid #eee; |
|||
} |
|||
</style> |
@ -0,0 +1,163 @@ |
|||
<template> |
|||
<view> |
|||
<view class="file-title"> |
|||
附件列表: |
|||
</view> |
|||
<view class="file-box" v-for="(item,index) in list" :key="index"> |
|||
<view class="file-left"> |
|||
<text>{{item.fileName}}</text> |
|||
</view> |
|||
<view class="file-right"> |
|||
<button class="file-btn" @click="downFile(item.fileName,item.visitLocation)">预览</button> |
|||
</view> |
|||
</view> |
|||
<view v-if="imgSrc != ''" class="img-box-box" @click="changeShow"> |
|||
<view class="img-box"> |
|||
<image class="img-img" :src="imgSrc"></image> |
|||
<button class="img-btn" @click="changeShow">确定</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { queryFile } from 'api/queryFile' |
|||
|
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/DownFile/DownFile' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
list:[], |
|||
imgSrc:'' |
|||
} |
|||
}, |
|||
async onLoad(options) { |
|||
const that = this |
|||
try{ |
|||
const params={ |
|||
param:{ |
|||
"demandId":options.id |
|||
} |
|||
} |
|||
const data = await queryFile(params) |
|||
that.list = data |
|||
console.log(that.list) |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
console.log(e) |
|||
} |
|||
}, |
|||
methods: { |
|||
downFile(Name,Path){ |
|||
const that = this |
|||
// console.log(Name.split('.')[Name.split('.').length-1]) |
|||
var arr = [] |
|||
arr = Name.split('.') |
|||
var lastName = arr[arr.length-1] |
|||
console.log(lastName) |
|||
if(lastName == 'jpg'|| lastName == 'png'|| lastName == 'jpeg'|| lastName == 'gif'|| lastName == 'svg'){ |
|||
console.log(Name) |
|||
that.imgSrc = Path |
|||
}else{ |
|||
uni.downloadFile({ |
|||
url: Path, //服务器文件路径 + 文件名 |
|||
success(res) { |
|||
const lastPath = res.tempFilePath //请求路径成功返回后的暂时缓存路径 |
|||
uni.openDocument({ |
|||
filePath: lastPath, //暂时缓存地址 |
|||
fileType: lastName, //文件后缀名 |
|||
success: function (res) { |
|||
console.log('打开文档成功') |
|||
console.log(res) |
|||
}, |
|||
fail:function(err){ |
|||
console.log(err) |
|||
} |
|||
}); |
|||
}, |
|||
fail(err){ |
|||
console.log(err) |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
changeShow(){ |
|||
const that = this |
|||
that.imgSrc = '' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
.file-title{ |
|||
text-align: center; |
|||
margin: 20px 0; |
|||
font-size: 24px; |
|||
} |
|||
.file-box{ |
|||
border: 1px solid #ccc; |
|||
width: 700upx; |
|||
margin: 0 25upx; |
|||
position: relative; |
|||
} |
|||
.file-left{ |
|||
text-align: left; |
|||
width: 86%; |
|||
padding: 10px 0 10px 10px; |
|||
border-right: 1px solid #ccc; |
|||
} |
|||
.file-right{ |
|||
text-align: center; |
|||
position: absolute; |
|||
right: 0; |
|||
top: 50%; |
|||
margin-top: -13px; |
|||
width: 14%; |
|||
height: 26px; |
|||
line-height: 26px; |
|||
} |
|||
.file-btn{ |
|||
height: 26px; |
|||
font-size: 14px; |
|||
line-height: 26px; |
|||
padding: 0 !important; |
|||
color: $blue; |
|||
} |
|||
.img-box-box{ |
|||
position: fixed; |
|||
bottom: 0; |
|||
height: 100%; |
|||
width: 750upx; |
|||
background-color: rgba($color: #000000, $alpha: 0.5); |
|||
} |
|||
.img-box{ |
|||
position: absolute; |
|||
left: 75upx; |
|||
width: 600upx; |
|||
height: 700upx; |
|||
padding: 40upx; |
|||
background-color: $white; |
|||
top: 150upx; |
|||
text-align: center; |
|||
} |
|||
.img-img{ |
|||
max-width: 520upx; |
|||
max-height: 560upx; |
|||
} |
|||
.img-btn{ |
|||
position: absolute; |
|||
bottom: 40upx; |
|||
height: 60upx; |
|||
line-height: 60upx; |
|||
width: 520upx; |
|||
} |
|||
</style> |
@ -0,0 +1,596 @@ |
|||
<template> |
|||
<view> |
|||
<view class="perfect-title">编辑企业信息</view> |
|||
<view class="cu-form"> |
|||
<!-- 企业名称 --> |
|||
<view class="title">{{information[0]}}:</view> |
|||
<view class="iptIcon"> |
|||
<input name="input" v-model="name" /> |
|||
<view class="triangle1" :class="perfectShow ? 'show' : ''" @click="noShow"> |
|||
<icon class="iconfont icon-tongguo bingo triangle"></icon> |
|||
</view> |
|||
</view> |
|||
<view class="perfect-box" :class="perfectShow ? 'show' : ''"> |
|||
<view class="perfect-con" v-for="(item,index) in perfect" :key="index" @click="changePerfect(item)">{{item.name}}</view> |
|||
</view> |
|||
<!-- 企业联系人 --> |
|||
<view class="title">{{information[1]}}:</view> |
|||
<input name="input" v-model="contacts"></input> |
|||
<!-- 企业联系电话 --> |
|||
<view class="title">{{information[2]}}:</view> |
|||
<input name="input" type="number" v-model="contactPhone"></input> |
|||
<!-- 孵化器类型 --> |
|||
<view class="title">{{information[3]}}:</view> |
|||
<radio-group class="radio-box" name="Incubator" @change="change"> |
|||
<label> |
|||
<view> |
|||
<radio value="0" :checked="incubatorType-0 === 0"/><text> 虚拟孵化器</text> |
|||
</view> |
|||
<view> |
|||
<radio value="1" :checked="incubatorType-0 === 1"/><text> 实体孵化器</text> |
|||
</view> |
|||
</label> |
|||
</radio-group> |
|||
<!-- 孵化器名称 --> |
|||
<view class="title">{{information[4]}}:</view> |
|||
<input name="input" v-model="incubator" disabled @click="changeIncubatorShow"></input> |
|||
<view class="incubator-box" :class="incubatorShow ? 'show' : ''" > |
|||
<view class="incubator-content" v-for="(item,index) in incubatorList" :key="index" @click="changeIncubator(item)"> |
|||
{{item.name}} |
|||
</view> |
|||
</view> |
|||
<!-- 税务号 --> |
|||
<view class="title">{{information[5]}}:</view> |
|||
<input name="input" v-model="theTaxNo"></input> |
|||
<!-- 注册地址 --> |
|||
<view class="title">{{information[6]}}:</view> |
|||
<view> |
|||
<input @tap="handleTap" type="text" v-model="label2" disabled=""/> |
|||
<lb-picker ref="picker2" |
|||
v-model="value2" |
|||
mode="multiSelector" |
|||
:list="list" |
|||
:level="3" |
|||
@confirm="handleConfirm" |
|||
:props="props" |
|||
> |
|||
</lb-picker> |
|||
</view> |
|||
<!-- 详细地址 --> |
|||
<view class="title">{{information[7]}}:</view> |
|||
<input name="input" v-model="registrationPlace"></input> |
|||
<!-- 注册时间 --> |
|||
<view class="title">{{information[8]}}:</view> |
|||
<picker mode="date" :value="date" start="1800-01-01" end="2100-01-01" @change="bindDateChange"> |
|||
<input name="input" v-model="registrationDate" disabled></input> |
|||
</picker> |
|||
<!-- 企业类型 --> |
|||
<view class="title">{{information[9]}}:</view> |
|||
<view name="input" @click="changeType" class="type-box"> |
|||
<view v-if="typeList[0] !== 'undefined'">{{typeList[0]}}</view> |
|||
<view v-if="typeList[1] !== 'undefined'">{{typeList[1]}}</view> |
|||
<view v-if="typeList[2] !== 'undefined'">{{typeList[2]}}</view> |
|||
<view v-if="typeList[3] !== 'undefined'">{{typeList[3]}}</view> |
|||
<view v-if="typeList[4] !== 'undefined'">{{typeList[4]}}</view> |
|||
</view> |
|||
|
|||
</view> |
|||
|
|||
<view class="eject-box" :class="isShow ? 'show' : ''"> |
|||
<view class="eject"> |
|||
<view class="eject-content" v-for="(item,index) in enterpriseType" :key="index"> |
|||
<label> |
|||
<checkbox :checked="item.checked" @click="choice(item,index)"/><view class="size">{{item}}</view> |
|||
</label> |
|||
</view> |
|||
<button class="btnsure" type="default" @click="changeShow">确定</button> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="padding flex flex-direction"> |
|||
<button class="cu-btn bg-red margin-tb-sm lg" @click="commit">提交</button> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { add } from 'api/add' |
|||
import { areaquery } from 'api/area' |
|||
import { typeSelection } from 'api/type' |
|||
import { detail } from 'api/detail' |
|||
import { incubator } from 'api/incubator' |
|||
import { update } from 'api/update' |
|||
import { bindMsg } from 'api/bindMsg' |
|||
import { queryByFuzzyName } from 'api/queryByFuzzyName' |
|||
|
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/Edit/Edit' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
value2: [], |
|||
label2: '', |
|||
name:'', // 企业名称 |
|||
name1:'', // 多一个企业名称,用于比较是否更改了名字 |
|||
contacts:'', // 企业联系人 |
|||
contactPhone:'', // 企业联系电话 |
|||
theTaxNo:'', // 统一社会信用代码 |
|||
incubatorType:100, // 孵化器类型 |
|||
incubatorId:'', // 孵化器id |
|||
incubator:'', // 孵化器名字 |
|||
registrationPlace:'', // 注册地 |
|||
registrationDate:'', // 注册时间 |
|||
province:'', // 注册省份 |
|||
city:'', // 注册城市 |
|||
county:'', // 注册区县 |
|||
category:[], // 企业类型 |
|||
information:['企业名称','联系人','联系电话','孵化器类型','孵化器名称','统一社会信用代码(税务号)','注册地','详细地址','注册时间','企业类型(最多5类,多出无效)'], |
|||
list: [], |
|||
props: {label:'areaName',value:'id',children:'city'}, |
|||
enterpriseType:[], |
|||
isShow:false, |
|||
typeList:[], |
|||
incubatorList:[] ,//孵化器列表 |
|||
incubatorShow:false, |
|||
choose:0, |
|||
perfect: [], |
|||
perfectShow: false |
|||
} |
|||
}, |
|||
async onLoad(options) { |
|||
const that = this |
|||
uni.showLoading({ |
|||
icon:'none', |
|||
title:'加载中...' |
|||
}) |
|||
try { |
|||
const params ={ |
|||
"param": { |
|||
"areaParentId": 0, |
|||
"areaType": 0, |
|||
"deep": 3 |
|||
}, |
|||
} |
|||
const data = await areaquery(params) |
|||
that.list = data |
|||
uni.hideLoading() |
|||
} catch (err) { |
|||
uni.hideLoading() |
|||
console.log(err) |
|||
} |
|||
if(that.$store.state.user.bindMsg.bindStatus-0 === 1){ |
|||
const params = { |
|||
param:{ |
|||
} |
|||
} |
|||
const data1 = await detail(params) |
|||
const params2 = { |
|||
param: { |
|||
type:data1.incubatorType |
|||
} |
|||
} |
|||
const data2 = await incubator(params2) |
|||
that.incubatorList = data2.list |
|||
that.name = data1.name // 企业名称 |
|||
that.name1 = data1.name // 企业名称 |
|||
that.contacts = data1.contacts, // 企业联系人 |
|||
that.contactPhone = data1.contactPhone, // 企业联系电话 |
|||
that.theTaxNo = data1.theTaxNo, // 统一社会信用代码 |
|||
that.incubatorType = data1.incubatorType, // 孵化器类型 |
|||
that.incubator = data1.incubator, // 孵化器名称 |
|||
that.incubatorId = data1.incubatorId, // 孵化器Id |
|||
that.registrationPlace = data1.registrationPlace, // 注册地 |
|||
that.registrationDate = data1.registrationDate, // 注册时间 |
|||
that.province = data1.province, // 注册省份 |
|||
that.city = data1.city, // 注册城市 |
|||
that.county = data1.county, // 注册区县 |
|||
that.typeList = data1.category // 企业类型 |
|||
|
|||
if(data1.cities[0] !== undefined){ |
|||
that.label2 = data1.cities[0] + '-' + data1.cities[1] + '-' + data1.cities[2] |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
handleTap () { |
|||
this.$refs.picker2.show() |
|||
}, |
|||
handleConfirm (item) { |
|||
var address = [item.item[0].areaName,item.item[1].areaName,item.item[2].areaName] |
|||
this.province = item.item[0].id |
|||
this.city = item.item[1].id |
|||
this.county = item.item[2].id |
|||
this.label2 = address.join('-') |
|||
console.log(this.province,this.city,this.county) |
|||
}, |
|||
async commit(){ |
|||
let arr = [] |
|||
const that = this |
|||
for(let i=0;i<5;i++){ |
|||
arr.push(this.typeList[i]) |
|||
} |
|||
for(let j=0;j<arr.length;j++){ |
|||
if(arr[j] === undefined){ |
|||
arr.splice(j,1) |
|||
j -= 1 |
|||
} |
|||
} |
|||
console.log(arr) |
|||
if(this.$store.state.user.bindMsg.bindStatus-0 === 1){ |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"category": arr, |
|||
"city": that.city, |
|||
"contactPhone": that.contactPhone, |
|||
"contacts": that.contacts, |
|||
"county": that.county, |
|||
"incubatorId": that.incubatorId, |
|||
"incubatorType": that.incubatorType - 0, |
|||
"name": that.name, |
|||
"province": that.province, |
|||
"registrationDate": that.registrationDate, |
|||
"registrationPlace": that.registrationPlace, |
|||
"theTaxNo": that.theTaxNo |
|||
}, |
|||
} |
|||
const data = await update(params) |
|||
that.$store.state.user.ischange++ |
|||
uni.showModal({ |
|||
title:'提交成功', |
|||
content:"是否继续完善企业信息", |
|||
success: function(res) { |
|||
if(res.confirm){ |
|||
uni.navigateTo({ |
|||
url:`../Binding/Binding` |
|||
}) |
|||
}else { |
|||
uni.switchTab({ |
|||
url:`../tabBar/My` |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}catch(err){ |
|||
uni.showToast({ |
|||
title:'提交失败 :' + err, |
|||
icon:'none' |
|||
}) |
|||
console.log(err) |
|||
//TODO handle the exception |
|||
} |
|||
}else{ |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"category": arr, |
|||
"city": that.city, |
|||
"contactPhone": that.contactPhone, |
|||
"contacts": that.contacts, |
|||
"county": that.county, |
|||
"incubatorId": that.incubatorId, |
|||
"incubatorType": that.incubatorType - 0, |
|||
"name": that.name, |
|||
"province": that.province, |
|||
"registrationDate": that.registrationDate, |
|||
"registrationPlace": that.registrationPlace, |
|||
"theTaxNo": that.theTaxNo |
|||
}, |
|||
} |
|||
const data = await add(params) |
|||
that.$store.state.user.ischange++ |
|||
const params1 = {} |
|||
const data1 = await bindMsg(params1) |
|||
that.$store.state.user.bindMsg = data1 |
|||
uni.showModal({ |
|||
title:'提交成功', |
|||
content:"是否继续完善企业信息", |
|||
success: function(res) { |
|||
if(res.confirm){ |
|||
uni.navigateTo({ |
|||
url:`../Binding/Binding` |
|||
}) |
|||
}else { |
|||
uni.switchTab({ |
|||
url:`../tabBar/My` |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}catch(err){ |
|||
uni.showToast({ |
|||
title:'提交失败 :' + err, |
|||
icon:'none' |
|||
}) |
|||
//TODO handle the exception |
|||
} |
|||
} |
|||
}, |
|||
async change(e){ |
|||
const that = this |
|||
that.incubatorType = e.detail.value |
|||
const params = { |
|||
param:{ |
|||
pageNum:1, |
|||
pageSize:100, |
|||
type:e.detail.value |
|||
} |
|||
} |
|||
const data = await incubator(params) |
|||
that.incubatorList = data.list |
|||
that.incubator = that.incubatorList[0].name |
|||
that.incubatorId = that.incubatorList[0].id |
|||
}, |
|||
bindDateChange: function(e) { |
|||
this.registrationDate = e.detail.value.split('-').join('/') |
|||
}, |
|||
async changeType(){ |
|||
const that = this |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"type":1 |
|||
} |
|||
} |
|||
const data = await typeSelection(params) |
|||
that.enterpriseType = data |
|||
}catch(err){ |
|||
console.log(err) |
|||
} |
|||
that.isShow = true |
|||
}, |
|||
changeShow(){ |
|||
this.isShow = false |
|||
}, |
|||
choice(item,index){ |
|||
const that = this |
|||
if(that.typeList.length == 0){ |
|||
that.typeList.push(item) |
|||
console.log(that.typeList) |
|||
}else{ |
|||
for(let i=0;i<that.typeList.length;i++){ |
|||
if(that.typeList[i] == item){ |
|||
that.typeList.splice(i,1) |
|||
break |
|||
}else if(i == that.typeList.length-1){ |
|||
that.typeList.push(item) |
|||
break |
|||
} |
|||
} |
|||
} |
|||
if(that.typeList.length > 5){ |
|||
uni.showModal({ |
|||
title:'最多只能选择5项,多出无效' |
|||
}) |
|||
} |
|||
}, |
|||
changeIncubatorShow(){ |
|||
const that = this |
|||
if(that.incubatorShow === true){ |
|||
that.incubatorShow = false |
|||
}else{ |
|||
that.incubatorShow = true |
|||
} |
|||
console.log(that.incubatorShow) |
|||
}, |
|||
changeIncubator(item){ |
|||
const that = this |
|||
that.incubator = item.name |
|||
that.incubatorId = item.id |
|||
that.incubatorShow = false |
|||
}, |
|||
changePerfect(index){ |
|||
const that = this |
|||
that.name = index.name |
|||
that.name1 = index.name |
|||
that.theTaxNo = index.unifiedSocialCreditCode |
|||
that.perfectShow = false |
|||
}, |
|||
noShow(){ |
|||
const that = this |
|||
that.perfectShow = false |
|||
} |
|||
}, |
|||
watch:{ |
|||
isShow(val){ |
|||
const that = this |
|||
if(that.choose === 0){ |
|||
that.typeList = [] |
|||
that.choose++ |
|||
} |
|||
}, |
|||
async name(val){ |
|||
const that = this |
|||
if(val !== that.name1){ |
|||
try{ |
|||
const params = { |
|||
param: { |
|||
name: val |
|||
} |
|||
} |
|||
const data = await queryByFuzzyName(params) |
|||
if(data[0]){ |
|||
that.perfect = data |
|||
that.perfectShow = true |
|||
} |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
} |
|||
} |
|||
if(that.name == ''){ |
|||
that.name1 == '' |
|||
that.theTaxNo = '' |
|||
that.perfectShow = false |
|||
} |
|||
for(var i=0;i<that.perfect.length;i++){ |
|||
if(that.name === that.perfect[i].name){ |
|||
that.name1 = that.perfect[i].name |
|||
that.theTaxNo = that.perfect[i].unifiedSocialCreditCode |
|||
that.perfectShow = false |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.iptIcon{ |
|||
position: relative; |
|||
} |
|||
.triangle{ |
|||
color: $green; |
|||
height: 30px; |
|||
font-size: 30px; |
|||
width: 30px; |
|||
} |
|||
.triangle1{ |
|||
z-index: 100; |
|||
height: 30px; |
|||
width: 30px; |
|||
position: absolute; |
|||
top: 0; |
|||
right: 5px; |
|||
display: none; |
|||
} |
|||
.perfect-box{ |
|||
display: none; |
|||
z-index: 10; |
|||
position: absolute; |
|||
max-height: 300px; |
|||
background-color: $white; |
|||
overflow-y: auto; |
|||
width: 92%; |
|||
border: 1px solid $grey; |
|||
} |
|||
.perfect-con{ |
|||
padding-left: 20upx; |
|||
height: 26px; |
|||
line-height: 26px; |
|||
font-size: 12px; |
|||
} |
|||
.perfect-title{ |
|||
display: flex; |
|||
background-color: $white; |
|||
padding: 1upx 30upx; |
|||
font-size: 20px; |
|||
font-weight: 600; |
|||
align-items: center; |
|||
min-height: 100upx; |
|||
} |
|||
.cu-form { |
|||
background-color: $white; |
|||
padding: 1upx 30upx; |
|||
align-items: center; |
|||
min-height: 100upx; |
|||
justify-content: space-between; |
|||
} |
|||
.title { |
|||
text-align: justify; |
|||
padding-right: 30upx; |
|||
font-size: 16px; |
|||
position: relative; |
|||
line-height: 50upx; |
|||
padding-bottom: 10upx; |
|||
margin-top: 20px; |
|||
} |
|||
.cu-form input { |
|||
flex: 1; |
|||
font-size: 14px; |
|||
color: #555; |
|||
padding-right: 20upx; |
|||
border: 1px solid #eee; |
|||
border-radius: 5px; |
|||
margin-top: 10upx; |
|||
height: 30px; |
|||
padding-left: 10px; |
|||
} |
|||
.radio-box>label{ |
|||
width: 600upx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
.eject-box{ |
|||
display: none; |
|||
width: 750upx; |
|||
height: 100vh; |
|||
position: fixed; |
|||
bottom: 0; |
|||
z-index: 10; |
|||
padding:3vh 25upx; |
|||
background-color: rgba($color: #000000, $alpha: 0.5); |
|||
} |
|||
.eject{ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
border-radius: 10px; |
|||
height: 93vh; |
|||
width: 700upx; |
|||
padding: 20upx; |
|||
background-color: $white; |
|||
overflow-y:auto; |
|||
|
|||
button{ |
|||
width: 100%; |
|||
} |
|||
} |
|||
.eject-content{ |
|||
width: 45%; |
|||
margin: 10upx; |
|||
padding: 0 5upx; |
|||
height: 40px; |
|||
font-size: 14px; |
|||
position: relative; |
|||
} |
|||
.size{ |
|||
position: absolute; |
|||
top: 0; |
|||
left: 34px; |
|||
} |
|||
.show{ |
|||
display: block !important; |
|||
} |
|||
.type-box{ |
|||
flex: 1; |
|||
padding-right: 20upx; |
|||
border-radius: 5px; |
|||
margin-bottom: 10upx; |
|||
padding-left: 10px; |
|||
font-size: 14px; |
|||
height: auto; |
|||
min-height: 30px; |
|||
line-height: 30px; |
|||
border: 1px solid #eee; |
|||
} |
|||
.incubator-box{ |
|||
display: none; |
|||
background-color: $white; |
|||
padding-left: 20upx; |
|||
padding-right: 20upx; |
|||
border-radius: 0 0 5px 5px; |
|||
position: absolute; |
|||
z-index: 10; |
|||
width: 690upx; |
|||
border: 1px solid $grey; |
|||
border-top: none !important; |
|||
} |
|||
.incubator-content{ |
|||
line-height: 30px; |
|||
margin-bottom: 4px; |
|||
height: 30px; |
|||
border-bottom: 1px solid #eee; |
|||
} |
|||
.btnsure{ |
|||
height: 40px; |
|||
line-height: 40px; |
|||
} |
|||
</style> |
@ -0,0 +1,286 @@ |
|||
<template> |
|||
<view> |
|||
<view class="transmit-name allcss"> |
|||
孵化器名称 :<text v-text="listDetail.incubator"></text> |
|||
</view> |
|||
<view class="demand-box allcss"> |
|||
<view class="demand-title"> |
|||
<text>需求内容 :</text> |
|||
<view class="enroll-box" v-if="isEnroll"><text>已揭榜</text></view> |
|||
</view> |
|||
<view class="demand-content"> |
|||
{{ listDetail.content }} |
|||
</view> |
|||
</view> |
|||
<view class="unveiling allcss"> |
|||
<view class="unveiling-title"> |
|||
揭榜 : |
|||
</view> |
|||
<view class="unveiling-content"> |
|||
电话 :<input type="number" class="reason-ipt" placeholder="请输入您的电话" v-model="contactPhone"/> |
|||
</view> |
|||
<view class="unveiling-content"> |
|||
称呼 :<input type="text" class="reason-ipt" placeholder="请输入您的称呼" v-model="contacts"/> |
|||
</view> |
|||
<view class="unveiling-content"> |
|||
企业名称 :<input type="text" class="reason-ipt" placeholder="请输入您的企业名称" v-model="enterpriseName"/> |
|||
</view> |
|||
<view class="unveiling-content reason"> |
|||
揭榜理由 :<textarea class="filed" placeholder="非必填,不得多于200字" v-model="remark"></textarea> |
|||
</view> |
|||
</view> |
|||
<button type="default" class="unveilingBtn" @click="unveilingBtn">请揭榜</button> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { listDetails } from 'api/listDetails' |
|||
import { candidate } from 'api/candidate' |
|||
import { detail } from 'api/detail' |
|||
import { candidateQuery } from 'api/candidateQuery' |
|||
|
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/HomePages/ListDetails' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
listDetail:{ |
|||
"incubator":'', |
|||
"content":'' |
|||
}, |
|||
contactPhone:'', |
|||
contacts:'', |
|||
enterpriseName:'', |
|||
remark:'', |
|||
isEnroll:false |
|||
} |
|||
}, |
|||
async onLoad(options) { |
|||
const that = this |
|||
try{ |
|||
const params1 = { |
|||
param:{ |
|||
"publishId":options.id - 0 |
|||
} |
|||
} |
|||
const data1 = await candidateQuery(params1) |
|||
// console.log(data1) |
|||
if(data1 !== null){ |
|||
that.isEnroll = true |
|||
that.contactPhone = data1.contactPhone |
|||
that.contacts = data1.contacts |
|||
that.enterpriseName = data1.enterpriseName |
|||
that.remark = data1.remark |
|||
}else if(that.$store.state.user.bindMsg.bindStatus-0 === 1){ |
|||
const params = { |
|||
param:{ |
|||
} |
|||
} |
|||
const data = await detail(params) |
|||
that.contactPhone = data.contactPhone |
|||
that.contacts = data.contacts |
|||
that.enterpriseName = data.name |
|||
} |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
console.log(e) |
|||
} |
|||
if(options.id){ |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
"id": options.id - 0 |
|||
} |
|||
} |
|||
const data = await listDetails(params) |
|||
if(data.content){ |
|||
that.listDetail = data |
|||
} |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
async unveilingBtn(){ |
|||
const that = this |
|||
if(that.contactPhone == ''){ |
|||
uni.showModal({ |
|||
title:'请填写电话', |
|||
icon:'none', |
|||
duration:2000 |
|||
}) |
|||
}else if(that.contacts == ''){ |
|||
uni.showModal({ |
|||
title:'请填写称呼', |
|||
icon:'none', |
|||
duration:2000 |
|||
}) |
|||
}else if(that.enterpriseName == ''){ |
|||
uni.showModal({ |
|||
title:'请填写企业名称', |
|||
icon:'none', |
|||
duration:2000 |
|||
}) |
|||
}else if(that.isEnroll === true){ |
|||
uni.showModal({ |
|||
title:"提示", |
|||
content:"您已揭榜过,是否确认修改报名信息", |
|||
success: async function(res) { |
|||
if(res.confirm){ |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"contactPhone": that.contactPhone, |
|||
"contacts": that.contacts, |
|||
"enterpriseName": that.enterpriseName, |
|||
"publishId": that.listDetail.id, |
|||
"remark": that.remark |
|||
} |
|||
} |
|||
const data = await candidate(params) |
|||
console.log(data) |
|||
uni.showToast({ |
|||
title:'揭榜成功', |
|||
icon:'none' |
|||
}) |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
uni.showToast({ |
|||
title:'揭榜失败 :' + err, |
|||
icon:'none' |
|||
}) |
|||
console.log(err) |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
}else{ |
|||
try{ |
|||
const params = { |
|||
"param": { |
|||
"contactPhone": that.contactPhone, |
|||
"contacts": that.contacts, |
|||
"enterpriseName": that.enterpriseName, |
|||
"publishId": that.listDetail.id, |
|||
"remark": that.remark |
|||
} |
|||
} |
|||
const data = await candidate(params) |
|||
console.log(data) |
|||
uni.showToast({ |
|||
title:'揭榜成功', |
|||
icon:'none' |
|||
}) |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
uni.showToast({ |
|||
title:'揭榜失败 :' + err, |
|||
icon:'none' |
|||
}) |
|||
console.log(err) |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.allcss{ |
|||
background-color: $white; |
|||
margin-bottom: 10px; |
|||
} |
|||
.transmit-name{ |
|||
padding-left: 30upx; |
|||
height: 88upx; |
|||
line-height: 88upx; |
|||
} |
|||
.demand-box{ |
|||
height: auto; |
|||
position: relative; |
|||
padding-bottom: 30upx; |
|||
} |
|||
.demand-title{ |
|||
padding-left: 30upx; |
|||
height: 60upx; |
|||
line-height: 60upx; |
|||
border-bottom: 1px solid #eee; |
|||
} |
|||
.demand-content{ |
|||
margin-left: 70upx; |
|||
margin-right: 75upx; |
|||
margin-top: 10px; |
|||
padding:0 10px; |
|||
min-height: 140px; |
|||
// line-min-height: 48upx; |
|||
} |
|||
.unveiling{ |
|||
height: auto; |
|||
} |
|||
.unveiling-title{ |
|||
padding-left: 30upx; |
|||
height: 60upx; |
|||
line-height: 60upx; |
|||
border-bottom: 1px solid #eee; |
|||
} |
|||
.unveiling-content{ |
|||
position: relative; |
|||
margin-left: 30upx; |
|||
width: 690upx; |
|||
border-bottom: 1px solid #eee; |
|||
padding: 10px; |
|||
} |
|||
.reason{ |
|||
border: none !important; |
|||
} |
|||
.reason-ipt{ |
|||
position: absolute; |
|||
border: 1px solid #eee; |
|||
border-radius: 5px; |
|||
top: 10px; |
|||
left: 180upx; |
|||
padding-left: 10px; |
|||
} |
|||
.filed{ |
|||
border: 1px solid #eee; |
|||
border-radius: 5px; |
|||
padding: 10upx; |
|||
height: 100px; |
|||
width: 660upx; |
|||
} |
|||
.unveilingBtn{ |
|||
margin-left: 30upx; |
|||
width: 690upx; |
|||
background-color: $red !important; |
|||
color: $white !important; |
|||
} |
|||
.enroll-box{ |
|||
position: absolute; |
|||
right: 100upx; |
|||
top: 100upx; |
|||
height: 100px; |
|||
width: 100px; |
|||
border: 2px solid #FF4500; |
|||
line-height: 100px; |
|||
color: #FF4500; |
|||
font-size: 24px; |
|||
border-radius: 50%; |
|||
text-align: center; |
|||
transform: rotate(25deg); |
|||
|
|||
text{ |
|||
border: 1px solid #FF4500; |
|||
padding: 4px; |
|||
border-radius: 5px; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,367 @@ |
|||
<template> |
|||
<view> |
|||
<view class="home-nav"> |
|||
<view class="search-box"> |
|||
<input class="home-ipt" v-model="name" placeholder="请输入您要搜索的政策" /> |
|||
<icon class="iconfont icon-sousuo search" type=""></icon> |
|||
</view> |
|||
<view class="home-text" @click="searchPolicy"> |
|||
搜 索 |
|||
</view> |
|||
</view> |
|||
<view class="pt-88 screen-box"> |
|||
<view class="content"> |
|||
<view @click="showDom">{{defaultCity.areaName}}</view> |
|||
<view class="screen-content" :class="showUni===true ? 'show' : ''" v-for="(item,index) in areaList" :key="index" @click="changeCityValue(item)">{{item.areaName}}</view> |
|||
</view> |
|||
|
|||
<!-- 项目类别,写成一个单独界面,可以多选 --> |
|||
<view class="type-choose" @click="jumpType"> |
|||
项目类型选择 |
|||
</view> |
|||
|
|||
<!-- 项目类别,写成一个单独界面,可以多选 最多5个--> |
|||
<view class="type-choose" @click="jumpType1"> |
|||
产业类别选择 |
|||
</view> |
|||
|
|||
<!-- 项目类别选择 --> |
|||
<view class="eject-box" :class="isShow==0 ? 'show' : ''"> |
|||
<view class="eject"> |
|||
<view class="eject-content" v-for="(item,index) in projectList" :key="index"> |
|||
<label> |
|||
<checkbox @click="choice(item)" /><view class="size">{{item}}</view> |
|||
</label> |
|||
</view> |
|||
<button type="default" @click="changeShow">确定</button> |
|||
</view> |
|||
</view> |
|||
<!-- 产业类别选择 --> |
|||
<view class="eject-box" :class="isShow==1 ? 'show' : ''"> |
|||
<view class="eject"> |
|||
<view class="eject-content" v-for="(item,index) in industryList" :key="index"> |
|||
<label> |
|||
<checkbox @click="choice1(item,index)" /><view class="size">{{item}}</view> |
|||
</label> |
|||
</view> |
|||
<button type="default" @click="changeShow">确定</button> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
</view> |
|||
<view class="pt-200"> |
|||
<Policy :showModal="showModal"></Policy> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { areaquery } from 'api/area' |
|||
import { typeSelection } from 'api/type' |
|||
|
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/HomePages/SearchPage' |
|||
} |
|||
}, |
|||
async onLoad(){ |
|||
const that = this |
|||
const params = { |
|||
param:{ |
|||
type:0 |
|||
} |
|||
} |
|||
const data = await typeSelection(params) |
|||
that.projectList = data |
|||
console.log(that.projectList) |
|||
const params1 = { |
|||
param:{ |
|||
type:1 |
|||
} |
|||
} |
|||
const data1 = await typeSelection(params1) |
|||
that.industryList = data1 |
|||
console.log(that.industryList) |
|||
}, |
|||
data() { |
|||
return { |
|||
value2: [], |
|||
label2: ['山西','太原','高薪'], |
|||
areaList: this.$store.state.user.cityList, |
|||
defaultCity:{ |
|||
id: 140100, |
|||
areaName:'地区选择' |
|||
}, |
|||
showModal:{ |
|||
"areaId": this.$store.state.user.cityId, |
|||
"industrialCategories": [], //产业类别 |
|||
"name": '', //项目名称 |
|||
"projectCategories": [] //项目类别 |
|||
}, |
|||
defaultProject:'项目类别选择', |
|||
projectCategories:[], //项目类别 |
|||
projectList:[], //项目类别组 |
|||
defaultIndustry:'产业类别选择', |
|||
industrialCategories:[], //产业类别 |
|||
industryList:[], //产业类别组 |
|||
name:'', //项目名称 |
|||
isShow:2, |
|||
showUni:false |
|||
} |
|||
}, |
|||
onReachBottom: function () { |
|||
this.$store.state.policy.pagenum ++ |
|||
}, |
|||
methods: { |
|||
changeCityValue(value){ |
|||
this.defaultCity = value |
|||
this.showUni = false |
|||
}, |
|||
showDom(){ |
|||
this.showUni = !this.showUni |
|||
}, |
|||
jumpType(){ |
|||
this.isShow = 0 |
|||
}, |
|||
jumpType1(){ |
|||
this.isShow = 1 |
|||
}, |
|||
changeShow(){ |
|||
const that = this |
|||
if(that.isShow == 1){ |
|||
let arr = [] |
|||
for(let i=0;i<5;i++){ |
|||
arr.push(that.industrialCategories[i]) |
|||
} |
|||
for(let j=0;j<arr.length;j++){ |
|||
if(arr[j] === undefined){ |
|||
arr.splice(j,1) |
|||
j -= 1 |
|||
} |
|||
} |
|||
console.log(that.industrialCategories) |
|||
} |
|||
that.isShow = 2 |
|||
}, |
|||
searchPolicy(){ |
|||
const that = this |
|||
that.$store.state.policy.pagenum = 1 |
|||
that.showModal.areaId = that.defaultCity.id |
|||
that.showModal.industrialCategories = that.industrialCategories |
|||
that.showModal.name = that.name |
|||
that.showModal.projectCategories = that.projectCategories |
|||
}, |
|||
handleConfirm (item) { |
|||
// console.log('confirm::', item) |
|||
this.label2 = [item.item[0].label,item.item[1].label,item.item[2].label] |
|||
}, |
|||
choice(item){ |
|||
const that = this |
|||
console.log(item) |
|||
if(that.projectCategories.length == 0){ |
|||
that.projectCategories.push(item) |
|||
}else{ |
|||
for(let i=0;i<that.projectCategories.length;i++){ |
|||
if(that.projectCategories[i] == item){ |
|||
that.projectCategories.splice(i,1) |
|||
break |
|||
}else if(i == that.projectCategories.length - 1){ |
|||
that.projectCategories.push(item) |
|||
break |
|||
} |
|||
} |
|||
} |
|||
console.log(that.projectCategories) |
|||
}, |
|||
choice1(item,index){ |
|||
const that = this |
|||
if(that.industrialCategories.length == 0){ |
|||
that.industrialCategories.push(item) |
|||
}else{ |
|||
for(let i=0;i<that.industrialCategories.length;i++){ |
|||
if(that.industrialCategories[i] == item){ |
|||
that.industrialCategories.splice(i,1) |
|||
break |
|||
}else if(i == that.industrialCategories.length-1){ |
|||
that.industrialCategories.push(item) |
|||
break |
|||
} |
|||
} |
|||
} |
|||
if(that.industrialCategories.length > 5){ |
|||
uni.showModal({ |
|||
title:'最多只能选择5项,多出无效' |
|||
}) |
|||
} |
|||
console.log(that.industrialCategories) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.home-nav{ |
|||
position: relative; |
|||
height: 88upx; |
|||
background-color: $red; |
|||
position: fixed; |
|||
width: 100%; |
|||
z-index: 100; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: flex-start; |
|||
} |
|||
.home-ipt{ |
|||
flex: 1; |
|||
background-color: white; |
|||
border-radius: 25upx; |
|||
height: 48upx; |
|||
padding-left: 70upx; |
|||
font-size: 24upx; |
|||
} |
|||
.home-text{ |
|||
padding-right: 30upx; |
|||
display: flex; |
|||
justify-content: flex-end; |
|||
color: $white; |
|||
font-size: 24upx; |
|||
vertical-align: middle; |
|||
} |
|||
|
|||
.search-box{ |
|||
position: relative; |
|||
height: 48upx; |
|||
margin-left: 40upx; |
|||
margin-right: 40upx; |
|||
flex: 1; |
|||
|
|||
.search{ |
|||
position: absolute; |
|||
left: 15upx; |
|||
top:50%; |
|||
transform: translate3d(0,-50%,0); |
|||
line-height: 50upx !important; |
|||
font-size: 40upx; |
|||
margin-top: 0 !important; |
|||
padding-top: 0 !important; |
|||
|
|||
} |
|||
} |
|||
.triangle{ |
|||
margin-left: 6upx; |
|||
display: inline-flex; |
|||
align-items: center; |
|||
} |
|||
.pt-88{ |
|||
padding-top: 88upx; |
|||
} |
|||
.pt-200{ |
|||
padding-top: 188upx; |
|||
} |
|||
.screen-box{ |
|||
display: flex; |
|||
position: fixed; |
|||
width: 750upx; |
|||
z-index: 10; |
|||
|
|||
.content{ |
|||
flex: 1; |
|||
height: 48px; |
|||
line-height: 48px; |
|||
text-align: center; |
|||
} |
|||
} |
|||
.triangle{ |
|||
margin-left: 6upx; |
|||
display: inline-flex; |
|||
align-items: center; |
|||
font-size: 24upx; |
|||
} |
|||
.content-box{ |
|||
flex: 1; |
|||
position: relative; |
|||
z-index: 100; |
|||
} |
|||
.content{ |
|||
background-color: $white; |
|||
} |
|||
.warp{ |
|||
flex: 1; |
|||
z-index: 100; |
|||
} |
|||
.screen-content{ |
|||
display: none; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
background-color: #fafafa; |
|||
border-top: 1px solid #f5f5f5; |
|||
} |
|||
.type-choose{ |
|||
flex: 1; |
|||
display: flex; |
|||
height: 48px; |
|||
justify-content: center; |
|||
align-items: center; |
|||
background-color: $white; |
|||
border-left: 1px solid #eee; |
|||
border-right: 1px solid #eee; |
|||
} |
|||
.eject-box{ |
|||
display: none; |
|||
width: 750upx; |
|||
height: 100vh; |
|||
position: fixed; |
|||
bottom: 0; |
|||
z-index: 100; |
|||
padding:100upx 25upx 3vh 25upx; |
|||
background-color: rgba($color: #000000, $alpha: 0.5); |
|||
} |
|||
.eject{ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
border-radius: 10px; |
|||
height: 90vh; |
|||
width: 700upx; |
|||
padding: 20upx; |
|||
background-color: $white; |
|||
overflow-y:auto; |
|||
|
|||
button{ |
|||
width: 100%; |
|||
} |
|||
} |
|||
.eject-content{ |
|||
width: 45%; |
|||
margin: 10upx; |
|||
padding: 0 5upx; |
|||
height: 40px; |
|||
font-size: 10px; |
|||
position: relative; |
|||
} |
|||
.size{ |
|||
position: absolute; |
|||
top: 0; |
|||
left: 30px; |
|||
} |
|||
.show{ |
|||
display: block !important; |
|||
} |
|||
.type-box{ |
|||
flex: 1; |
|||
padding-right: 20upx; |
|||
border-radius: 5px; |
|||
margin-bottom: 10upx; |
|||
padding-left: 10px; |
|||
font-size: 14px; |
|||
height: auto; |
|||
min-height: 30px; |
|||
line-height: 30px; |
|||
border: 1px solid #eee; |
|||
} |
|||
</style> |
@ -0,0 +1,298 @@ |
|||
<template> |
|||
<view> |
|||
<view class="transmit-name allcss"> |
|||
<text style="flex: 1;"> |
|||
培训标题 : |
|||
</text> |
|||
<text style="width:80%"> |
|||
{{listDetail.trainTitle}} |
|||
</text> |
|||
</view> |
|||
<view class="demand-box allcss"> |
|||
<view class="demand-title"> |
|||
<text>活动内容 :</text> |
|||
<view class="enroll-box" v-if="isEnroll"><text>已报名</text></view> |
|||
</view> |
|||
<view class="demand-content"> |
|||
<view>{{listDetail.trainContent}}</view> |
|||
<view>培训讲师:{{listDetail.trainTeacher}}</view> |
|||
<view>培训标题:{{listDetail.trainTitle}}</view> |
|||
<view>培训时间:{{listDetail.trainTime}}</view> |
|||
<view>培训地点:{{listDetail.trainPlace}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="unveiling allcss"> |
|||
<view class="unveiling-title"> |
|||
现在报名 : |
|||
</view> |
|||
<view class="unveiling-content"> |
|||
电话 :<input type="number" class="reason-ipt" placeholder="请输入您的电话" v-model="contactPhone"/> |
|||
</view> |
|||
<view class="unveiling-content"> |
|||
人数 :<input type="number" class="reason-ipt" placeholder="请输入培训人数" v-model="contactNum"/> |
|||
</view> |
|||
<view class="unveiling-content"> |
|||
联系人 :<input type="text" class="reason-ipt" placeholder="请输入联系人名称" v-model="contactMan"/> |
|||
</view> |
|||
<!-- <view class="unveiling-content reason"> |
|||
揭榜理由 :<textarea class="filed" placeholder="非必填,不得多于200字"></textarea> |
|||
</view> --> |
|||
</view> |
|||
<button type="default" class="unveilingBtn" @click="commit">报名确认</button> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { trainInform } from 'api/trainInform' |
|||
import { trainApply } from 'api/trainApply' |
|||
import { detail } from 'api/detail' |
|||
import { trainApplyquery } from 'api/trainApplyquery' |
|||
|
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/HomePages/peixun' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
listDetail:{ |
|||
"incubator":'', |
|||
"trainContent":'', |
|||
"trainTeacher":'', |
|||
"trainTitle":'', |
|||
"trainTime":'', |
|||
"trainPlace":'', |
|||
}, |
|||
contactPhone:'', |
|||
contactNum:'', |
|||
contactMan:'', |
|||
Id:'', |
|||
isEnroll:false |
|||
} |
|||
}, |
|||
async onLoad(options) { |
|||
// console.log(options) |
|||
const that = this |
|||
try{ |
|||
const params1 = { |
|||
param:{ |
|||
"trainInformId":options.id |
|||
} |
|||
} |
|||
const data1 = await trainApplyquery(params1) |
|||
// console.log(data1) |
|||
if(data1 !== null){ |
|||
that.isEnroll = true |
|||
that.contactPhone = data1.contactPhone |
|||
that.contactNum = data1.applyNum |
|||
that.contactMan = data1.contacts |
|||
}else if(that.$store.state.user.bindMsg.bindStatus-0 === 1){ |
|||
const params = { |
|||
param:{ |
|||
} |
|||
} |
|||
const data = await detail(params) |
|||
that.contactPhone = data.contactPhone |
|||
that.contactMan = data.contacts |
|||
} |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
console.log(e) |
|||
} |
|||
that.Id = options.id |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
"id": options.id |
|||
} |
|||
} |
|||
const data = await trainInform(params) |
|||
if(data.trainTeacher){ |
|||
that.listDetail = data |
|||
} |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
} |
|||
}, |
|||
methods: { |
|||
async commit(){ |
|||
const that = this |
|||
// console.log(that.contactPhone,that.contactNum,that.contactMan,that.Id) |
|||
if(that.contactPhone == ''){ |
|||
uni.showModal({ |
|||
title:'请填写联系方式', |
|||
icon:'none', |
|||
duration:2000 |
|||
}) |
|||
}else if(that.contactNum == ''){ |
|||
uni.showModal({ |
|||
title:'请填写培训人数', |
|||
icon:'none', |
|||
duration:2000 |
|||
}) |
|||
}else if(that.contactMan == ''){ |
|||
uni.showModal({ |
|||
title:'请填写培训联系人', |
|||
icon:'none', |
|||
duration:2000 |
|||
}) |
|||
}else if(that.isEnroll === true){ |
|||
uni.showModal({ |
|||
title:"提示", |
|||
content:"您已报名过,是否确认修改报名信息", |
|||
success: async function(res) { |
|||
if(res.confirm){ |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
applyNum:that.contactNum - 0, |
|||
contactPhone:that.contactPhone, |
|||
contacts:that.contactMan, |
|||
trainInformId:that.Id - 0 |
|||
} |
|||
} |
|||
const data = await trainApply(params) |
|||
uni.showToast({ |
|||
title:'报名成功', |
|||
icon:'none' |
|||
}) |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
uni.showToast({ |
|||
title:'报名失败 :' + e, |
|||
icon:'none' |
|||
}) |
|||
console.log(e) |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
}else{ |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
applyNum:that.contactNum - 0, |
|||
contactPhone:that.contactPhone, |
|||
contacts:that.contactMan, |
|||
trainInformId:that.Id - 0 |
|||
} |
|||
} |
|||
const data = await trainApply(params) |
|||
uni.showToast({ |
|||
title:'报名成功', |
|||
icon:'none' |
|||
}) |
|||
}catch(e){ |
|||
//TODO handle the exception |
|||
uni.showToast({ |
|||
title:'报名失败 :' + e, |
|||
icon:'none' |
|||
}) |
|||
console.log(e) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.allcss{ |
|||
background-color: $white; |
|||
margin-bottom: 10px; |
|||
} |
|||
.transmit-name{ |
|||
padding-left: 30upx; |
|||
min-height: 88upx; |
|||
// line-height: 88upx; |
|||
display: flex; |
|||
flex-wrap: no-wrap; |
|||
align-items: center; |
|||
} |
|||
.demand-box{ |
|||
height: auto; |
|||
position: relative; |
|||
padding-bottom: 30upx; |
|||
} |
|||
.demand-title{ |
|||
padding-left: 30upx; |
|||
height: 60upx; |
|||
line-height: 60upx; |
|||
border-bottom: 1px solid #eee; |
|||
} |
|||
.demand-content{ |
|||
margin-left: 70upx; |
|||
margin-right: 75upx; |
|||
margin-top: 10px; |
|||
padding:0 10px; |
|||
min-height: 140px; |
|||
height: auto; |
|||
line-height: 48upx; |
|||
} |
|||
.unveiling{ |
|||
height: auto; |
|||
} |
|||
.unveiling-title{ |
|||
padding-left: 30upx; |
|||
height: 60upx; |
|||
line-height: 60upx; |
|||
border-bottom: 1px solid #eee; |
|||
} |
|||
.unveiling-content{ |
|||
position: relative; |
|||
margin-left: 30upx; |
|||
width: 690upx; |
|||
border-bottom: 1px solid #eee; |
|||
padding: 10px; |
|||
} |
|||
.reason{ |
|||
border: none !important; |
|||
} |
|||
.reason-ipt{ |
|||
position: absolute; |
|||
border: 1px solid #eee; |
|||
border-radius: 5px; |
|||
top: 10px; |
|||
left: 180upx; |
|||
padding-left: 10px; |
|||
} |
|||
.filed{ |
|||
border: 1px solid #eee; |
|||
border-radius: 5px; |
|||
padding: 10upx; |
|||
height: 100px; |
|||
width: 660upx; |
|||
} |
|||
.unveilingBtn{ |
|||
margin-left: 30upx; |
|||
width: 690upx; |
|||
background-color: $red !important; |
|||
color: $white !important; |
|||
} |
|||
.enroll-box{ |
|||
position: absolute; |
|||
right: 100upx; |
|||
top: 100upx; |
|||
height: 100px; |
|||
width: 100px; |
|||
border: 2px solid #FF4500; |
|||
line-height: 100px; |
|||
color: #FF4500; |
|||
font-size: 24px; |
|||
border-radius: 50%; |
|||
text-align: center; |
|||
transform: rotate(25deg); |
|||
|
|||
text{ |
|||
border: 1px solid #FF4500; |
|||
padding: 4px; |
|||
border-radius: 5px; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,70 @@ |
|||
<template> |
|||
<view> |
|||
<view class="polict-content"> |
|||
<rich-text :nodes="content"></rich-text> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { updateStatus } from 'api/updateStatus' |
|||
import { queryMsgDetail } from 'api/queryMsgDetail' |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/MessaegPage/MessaegPage' |
|||
} |
|||
}, |
|||
async onLoad(option){ |
|||
// console.log(option.id) |
|||
const that = this |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
id: option.id, |
|||
readStatus: 1 |
|||
} |
|||
} |
|||
await updateStatus(params) |
|||
const params1 = { |
|||
param:{ |
|||
id: option.id |
|||
} |
|||
} |
|||
const data = await queryMsgDetail(params1) |
|||
// console.log(data.content) |
|||
that.content = data.content |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
content: '', |
|||
} |
|||
}, |
|||
methods: { |
|||
collection(){ |
|||
this.state = !this.state |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.polict-content{ |
|||
background-color: $white; |
|||
margin-left: 30upx; |
|||
width: 690upx; |
|||
height: auto; |
|||
font-size: 16px; |
|||
padding: 20upx; |
|||
margin-top: 30upx; |
|||
border-radius: 5px; |
|||
} |
|||
</style> |
@ -0,0 +1,117 @@ |
|||
<template> |
|||
<view> |
|||
<view v-if="list[0]"> |
|||
<view class="collection-box" v-for="(item,index) in list" :key="index" @click="jumppolicy(item.collectId)"> |
|||
<text class="collection-title">{{item.title}}</text> |
|||
</view> |
|||
</view> |
|||
<view v-else class="noData"> |
|||
暂时没有收藏过政策 |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { querySelf } from 'api/querySelf' |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/MyPages/CollectionPage' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
pageNum:1, |
|||
pageSize:20, |
|||
list:[], |
|||
hasNextPage:true |
|||
} |
|||
}, |
|||
async onLoad(){ |
|||
const that = this |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
pageNum:that.pageNum, |
|||
pageSize:that.pageSize |
|||
} |
|||
} |
|||
const data = await querySelf(params) |
|||
that.hasNextPage = data.hasNextPage |
|||
that.list = data.list |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
} |
|||
}, |
|||
onReachBottom: function () { |
|||
this.pageNum ++ |
|||
}, |
|||
methods: { |
|||
jumppolicy(id){ |
|||
uni.navigateTo({ |
|||
url:`/pages/Policy/PolicyDetails?id=${id}&token=${this.$store.state.user.token}` |
|||
}) |
|||
} |
|||
}, |
|||
watch:{ |
|||
async pageNum(val){ |
|||
uni.showToast({ |
|||
title:'正在加载', |
|||
icon:'loading' |
|||
}) |
|||
const that = this |
|||
console.log(val) |
|||
if(that.hasNextPage === true){ |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
pageNum:val, |
|||
pageSize:that.pageSize |
|||
} |
|||
} |
|||
const data = await querySelf(params) |
|||
that.hasNextPage = data.hasNextPage |
|||
console.log(data) |
|||
that.list = that.list.concat(data.list) |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
} |
|||
}else{ |
|||
uni.showToast({ |
|||
title:'到底了', |
|||
icon:'none' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.collection-box{ |
|||
height: 40px; |
|||
display: flex; |
|||
align-items: center; |
|||
padding:0 15px; |
|||
background-color: $white; |
|||
margin-top: 6px; |
|||
} |
|||
.collection-title{ |
|||
flex: 4; |
|||
white-space:nowrap; |
|||
overflow: hidden; |
|||
text-overflow:ellipsis; |
|||
-webkit-line-clamp: 1; |
|||
} |
|||
.noData{ |
|||
margin-top: 300upx; |
|||
color: $gray; |
|||
text-align: center; |
|||
} |
|||
</style> |
@ -0,0 +1,163 @@ |
|||
<template> |
|||
<view> |
|||
<view v-if="list[0]"> |
|||
<view class="msg-head"> |
|||
<text>全部消息</text> |
|||
<button type="default" class="all-read" @click="allRead">全部已读</button> |
|||
</view> |
|||
<view class="collection-box" v-for="(item,index) in list" :key="index" @click="jumpMessage(item.messageId,index)"> |
|||
<text class="collection-title">{{item.content}}</text> |
|||
<text class="collection-time">{{item.createdAt}}</text> |
|||
<text class="collection-isread" v-if="item.readStatus === 1">已读</text> |
|||
<text class="collection-read" v-else>未读</text> |
|||
</view> |
|||
</view> |
|||
<view v-else class="noData"> |
|||
暂时没有系统消息 |
|||
</view> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { queryMsg } from 'api/queryMsg' |
|||
import { updateAllSta } from 'api/updateAllSta' |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/MyPages/MessagePage' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
pageNum:1, |
|||
pageSize:15, |
|||
hasNextPage:true, |
|||
list:[] |
|||
} |
|||
}, |
|||
async onLoad(){ |
|||
const that = this |
|||
const params={ |
|||
param:{ |
|||
pageNum:that.pageNum, |
|||
pageSize:that.pageSize |
|||
} |
|||
} |
|||
const data = await queryMsg(params) |
|||
console.log(data) |
|||
that.hasNextPage = data.hasNextPage |
|||
that.list = data.list |
|||
}, |
|||
onReachBottom: function () { |
|||
this.pageNum ++ |
|||
}, |
|||
watch:{ |
|||
async pageNum(val){ |
|||
const that = this |
|||
if(that.hasNextPage === true){ |
|||
const params={ |
|||
param:{ |
|||
pageNum:val, |
|||
pageSize:that.pageSize |
|||
} |
|||
} |
|||
const data = await queryMsg(params) |
|||
console.log(data) |
|||
that.hasNextPage = data.hasNextPage |
|||
that.list = that.list.concat(data.list) |
|||
}else{ |
|||
uni.showToast({ |
|||
title:'到底了', |
|||
icon:'none' |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
jumpMessage(id,index){ |
|||
uni.navigateTo({ |
|||
url:`/pages/MessagePage/MessagePage?id=${id}` |
|||
}) |
|||
this.list[index].readStatus = 1 |
|||
}, |
|||
allRead(){ |
|||
const that = this |
|||
let arr = [] |
|||
for(let i=0;i<that.list.length;i++){ |
|||
arr.push(that.list[i].messageId) |
|||
} |
|||
console.log(arr) |
|||
async function main(){ |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
|
|||
} |
|||
} |
|||
await updateAllSta(params) |
|||
}catch(err){ |
|||
//TODO handle the exception |
|||
console.log(err) |
|||
} |
|||
} |
|||
main() |
|||
for(let i=0;i<that.list.length;i++){ |
|||
that.list[i].readStatus = 1 |
|||
// console.log(that) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.collection-box{ |
|||
height: 40px; |
|||
display: flex; |
|||
align-items: center; |
|||
padding-left: 10px; |
|||
background-color: $white; |
|||
margin-bottom: 6px; |
|||
} |
|||
.collection-title{ |
|||
flex: 4; |
|||
white-space:nowrap; |
|||
overflow: hidden; |
|||
text-overflow:ellipsis; |
|||
-webkit-line-clamp: 1; |
|||
} |
|||
.collection-time{ |
|||
flex: 2; |
|||
text-align: center; |
|||
} |
|||
.collection-read{ |
|||
flex: 1; |
|||
text-align: center; |
|||
} |
|||
.collection-isread{ |
|||
flex: 1; |
|||
text-align: center; |
|||
color: $grey; |
|||
} |
|||
.msg-head{ |
|||
display: flex; |
|||
height: 40px; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
padding: 10px; |
|||
} |
|||
.all-read{ |
|||
margin: 0; |
|||
font-size: 12px; |
|||
} |
|||
.noData{ |
|||
margin-top: 300upx; |
|||
color: $gray; |
|||
text-align: center; |
|||
} |
|||
</style> |
@ -0,0 +1,73 @@ |
|||
<template> |
|||
<view> |
|||
<web-view v-if="show" :src="url"></web-view> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
import { fileLocationQuery } from 'api/fileLocationQuery' |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: `/pages/Policy/PolicyDetails?id=${this.id}&token=wutoken` |
|||
} |
|||
}, |
|||
async onLoad(option){ |
|||
var that = this |
|||
that.url = `https://www.sxwikionline.com/miniprogram/index.html?id=` + option.id + `&token=` + option.token |
|||
that.id = option.id |
|||
if(option.t && option.e){ |
|||
that.show = false |
|||
const params = { |
|||
param:{ |
|||
fileLocation: option.e |
|||
} |
|||
} |
|||
const data = await fileLocationQuery(params) |
|||
console.log(data) |
|||
// 请求后台查询文件路径,截取文件后缀 |
|||
// console.log(option.t + '?path=' + option.e) |
|||
const arr = data[0].fileLocation.split('.') |
|||
const lastName = arr[arr.length-1] |
|||
console.log(lastName) |
|||
uni.downloadFile({ |
|||
url: option.t + '?path=' + option.e, |
|||
success(res) { |
|||
const lastPath = res.tempFilePath |
|||
console.log(lastPath) |
|||
uni.openDocument({ |
|||
filePath: lastPath, |
|||
fileType: lastName, |
|||
success: function (res) { |
|||
console.log('打开文档成功') |
|||
console.log(res) |
|||
}, |
|||
fail:function(err){ |
|||
console.log(err) |
|||
} |
|||
}); |
|||
}, |
|||
fail(err){ |
|||
console.log(err) |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
url:'', |
|||
content:{}, |
|||
show:true, |
|||
id:0, |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss"> |
|||
*{ |
|||
display: none; |
|||
} |
|||
</style> |
@ -0,0 +1,251 @@ |
|||
<template> |
|||
<view> |
|||
<view class="demand-box"> |
|||
<view> |
|||
<text>企业名称:</text> |
|||
<input type="text" disabled="" v-model="name"/> |
|||
</view> |
|||
<view> |
|||
<text>联系人:</text> |
|||
<input type="text" v-model="man"/> |
|||
</view> |
|||
<view> |
|||
<text>联系方式:</text> |
|||
<input type="text" v-model="tel"/> |
|||
</view> |
|||
<view> |
|||
<text>需求类型:</text> |
|||
<view class="select-content" @click="changetype"> |
|||
<text>{{publishingData}}</text> |
|||
<icon class="iconfont icon-jiantou-xia triangle" type=""></icon> |
|||
</view> |
|||
<view class="publishing-box" :class="state == 1 ? 'show' : ''"> |
|||
<view v-for="(item,index) in stateList" :key="index" class="publishing-type" @click="changedatavalue(item,index)">{{item}}</view> |
|||
</view> |
|||
</view> |
|||
<view> |
|||
<text>需求内容:</text> |
|||
<button @click="uploadfile">上传文件</button> |
|||
<textarea maxlength="1000" class="demand-content" v-model="content"/> |
|||
</view> |
|||
</view> |
|||
<view class="padding flex flex-direction"> |
|||
<button class="cu-btn bg-red margin-tb-sm lg" @click="release">发布</button> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { detail } from 'api/detail' |
|||
import { publish } from 'api/publish' |
|||
import { upLoad } from 'api/upLoad' |
|||
|
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/RequirementRelease/RequirementRelease' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
state:0, |
|||
name:'', |
|||
man:'', |
|||
tel:'', |
|||
content:'', |
|||
publishingData:'技术转移转化', |
|||
publishingNum:0, |
|||
msg: 0, |
|||
fileIds:[], |
|||
stateList :['技术转移转化','工业设计咨询','科技金融建设','政策项目咨询','知识产权咨询','创新体系建设','创新创业咨询','信息技术服务','协同创新服务'], |
|||
} |
|||
}, |
|||
async onLoad(option){ |
|||
const that = this |
|||
if(option.man){ |
|||
that.man = decodeURI(option.man) |
|||
that.tel = decodeURI(option.tel) |
|||
that.publishingData = decodeURI(option.type) |
|||
for(var i=0;i<that.stateList.length-1;i++){ |
|||
if(decodeURI(option.type) == that.stateList[i]){ |
|||
that.publishingNum = i |
|||
} |
|||
} |
|||
that.content = decodeURI(option.content) |
|||
var arr = [] |
|||
arr = decodeURI(option.id).split(',') |
|||
that.fileIds = arr |
|||
console.log(that.fileIds) |
|||
}else if(that.man == ''){ |
|||
const params1 = { |
|||
param:{ |
|||
} |
|||
} |
|||
const data1 = await detail(params1) |
|||
that.name = data1.name |
|||
that.man = data1.contacts |
|||
that.tel = data1.contactPhone |
|||
} |
|||
const params2 = { |
|||
param:{ |
|||
} |
|||
} |
|||
const data2 = await detail(params2) |
|||
that.name = data2.name |
|||
}, |
|||
onUnload: function () { |
|||
uni.switchTab({ |
|||
url:'/pages/tabBar/Enterprise' |
|||
}) |
|||
}, |
|||
methods: { |
|||
changetype(){ |
|||
if(this.state != 1){ |
|||
this.state = 1 |
|||
}else{ |
|||
this.state = 0 |
|||
} |
|||
}, |
|||
changedatavalue(item,index){ |
|||
this.publishingData = item |
|||
this.publishingNum = index |
|||
this.state = 0 |
|||
}, |
|||
async release(){ |
|||
const that = this |
|||
var Arr = [] |
|||
for(var i=0;i<that.fileIds.length;i++){ |
|||
Arr.push(that.fileIds[i] - 0) |
|||
} |
|||
try{ |
|||
const params = { |
|||
param:{ |
|||
contactPhone: that.tel, |
|||
contacts: that.man, |
|||
content: that.content, |
|||
fileIds: Arr, |
|||
type: that.publishingNum |
|||
} |
|||
} |
|||
const data = await publish(params) |
|||
that.$store.state.policy.release++ |
|||
uni.showToast({ |
|||
title:'即将跳转...', |
|||
icon:"success", |
|||
duration: 2000 |
|||
}) |
|||
setTimeout(function(){ |
|||
uni.switchTab({ |
|||
url:'/pages/tabBar/Enterprise' |
|||
}) |
|||
},2000) |
|||
}catch(e){ |
|||
console.log(e) |
|||
uni.showToast({ |
|||
title:'发布失败 : ' + e, |
|||
icon:'none' |
|||
}) |
|||
} |
|||
}, |
|||
uploadfile(){ |
|||
const that = this |
|||
const man = that.man |
|||
const tel = that.tel |
|||
const type = that.publishingData |
|||
const content = that.content |
|||
uni.navigateTo({ |
|||
url:`/pages/RequirementRelease/upload?man=${man}&tel=${tel}&type=${type}&content=${content}&Token=` + that.$store.state.user.token |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.demand-box{ |
|||
margin: 10px 15px; |
|||
background-color: $white; |
|||
|
|||
view{ |
|||
display: flex; |
|||
height: auto; |
|||
line-height: 40px; |
|||
padding-left: 20px; |
|||
border-bottom: 1px solid $grey; |
|||
position: relative; |
|||
input{ |
|||
position: absolute; |
|||
height: 20px; |
|||
font-size: 14px; |
|||
left: 200upx; |
|||
top: 8px; |
|||
} |
|||
.select-content{ |
|||
position: absolute; |
|||
left: 200upx; |
|||
padding-left: 0; |
|||
top: 0px; |
|||
width: 400upx; |
|||
display: flex; |
|||
text{ |
|||
flex: 1; |
|||
} |
|||
icon{ |
|||
flex: 1; |
|||
} |
|||
} |
|||
.publishing-box{ |
|||
left: 160upx; |
|||
padding-left: 0; |
|||
top: 42px; |
|||
display: none; |
|||
position: absolute; |
|||
background-color: $white; |
|||
border-radius: 5px; |
|||
z-index: 1000; |
|||
height: auto; |
|||
width: 300upx; |
|||
.publishing-type{ |
|||
height: 40px; |
|||
line-height: 40px; |
|||
text-align: center; |
|||
} |
|||
} |
|||
|
|||
button{ |
|||
height: 20px; |
|||
line-height: 20px; |
|||
font-size: 12px; |
|||
width: 80px; |
|||
position: absolute; |
|||
top: 10px; |
|||
right: 15px; |
|||
} |
|||
} |
|||
} |
|||
.demand-content{ |
|||
border: 1px solid $grey; |
|||
flex: 1; |
|||
margin-top: 40px; |
|||
margin-left: -140upx; |
|||
margin-right: 15px; |
|||
padding: 0 10px; |
|||
border-radius: 5px; |
|||
margin-bottom: 10px; |
|||
height: 150px; |
|||
} |
|||
.show{ |
|||
display: block !important; |
|||
} |
|||
.triangle{ |
|||
margin-left: 6upx; |
|||
display: inline-flex; |
|||
align-items: center; |
|||
font-size: 24upx; |
|||
color: $gray; |
|||
} |
|||
</style> |
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<view> |
|||
<web-view :src="url"></web-view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
onLoad(option) { |
|||
const that = this |
|||
that.url = `https://www.sxwikionline.com/miniprogram/upload.html?man=${option.man}&tel=${option.tel}&type=${option.type}&content=${option.content}&Token=${option.Token}` |
|||
}, |
|||
data() { |
|||
return { |
|||
url:'https://www.sxwikionline.com/miniprogram/upload.html' |
|||
} |
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
</style> |
@ -0,0 +1,164 @@ |
|||
<template> |
|||
<view> |
|||
<view class="score-box"> |
|||
<text>测评类型:</text> |
|||
<view> |
|||
<view class="select-content" @click="changetype"> |
|||
<text class="select-content-left">{{publishingData}}</text> |
|||
<icon class="iconfont icon-jiantou-xia triangle" type=""></icon> |
|||
</view> |
|||
<view class="publishing-box" :class="state == 1 ? 'show' : ''"> |
|||
<view v-for="(item,index) in stateList" :key="index" class="publishing-type" @click="changedatavalue(item)">{{item}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="padding flex flex-direction"> |
|||
<button class="cu-btn bg-red margin-tb-sm lg" @click="evaluation">测评</button> |
|||
</view> |
|||
<view v-if="resultList != ''" class="result-box"> |
|||
<view v-if="resultList.result == 1"> |
|||
<icon class="iconfont icon-tongguo bingo triangle" type=""></icon><br> |
|||
测评通过 |
|||
</view> |
|||
<view v-else> |
|||
<icon class="iconfont icon-icon_wrong no-bingo triangle" type=""></icon><br> |
|||
测评未通过 |
|||
</view> |
|||
<view class="result-report"> |
|||
<view>{{resultList.reason}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { evaluate } from 'api/evaluate' |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/TestScore/TestScore' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
state:"0", |
|||
publishingData:"发布类型", |
|||
stateList:['高企','科小'], |
|||
resultList:'', |
|||
isAdopt:true |
|||
} |
|||
}, |
|||
methods: { |
|||
changetype(){ |
|||
if(this.state != 1){ |
|||
this.state = 1 |
|||
}else{ |
|||
this.state = 0 |
|||
} |
|||
}, |
|||
changedatavalue(index){ |
|||
this.publishingData = index |
|||
this.state = 0 |
|||
}, |
|||
async evaluation(){ |
|||
const that = this |
|||
if(that.publishingData === "高企"){ |
|||
const params = { |
|||
param:{ |
|||
type:0 |
|||
} |
|||
} |
|||
const data = await evaluate(params) |
|||
that.resultList = data |
|||
}else if(that.publishingData === "科小"){ |
|||
const params = { |
|||
param:{ |
|||
type:1 |
|||
} |
|||
} |
|||
const data = await evaluate(params) |
|||
that.resultList = data |
|||
}else{ |
|||
uni.showModal({ |
|||
title:'请先选择需要测评的类型' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.score-box{ |
|||
margin: 10px 15px 0 15px; |
|||
padding-left: 10px; |
|||
border-radius: 5px; |
|||
background-color: $white; |
|||
height: 60px; |
|||
display: flex; |
|||
justify-content: left; |
|||
align-items: center; |
|||
} |
|||
.select-content{ |
|||
display: flex; |
|||
margin-left: 100upx; |
|||
width: 300upx; |
|||
text{ |
|||
flex: 1; |
|||
} |
|||
icon{ |
|||
flex: 1; |
|||
} |
|||
} |
|||
.triangle{ |
|||
margin-left: 6upx; |
|||
display: inline-flex; |
|||
align-items: center; |
|||
font-size: 24upx; |
|||
} |
|||
.publishing-box{ |
|||
display: none; |
|||
position: absolute; |
|||
background-color: $white; |
|||
border-radius:0 0 10px 10px; |
|||
z-index: 1000; |
|||
margin-left: -26upx; |
|||
margin-top: 18px; |
|||
.publishing-type{ |
|||
height: 40px; |
|||
line-height: 40px; |
|||
width: 300upx; |
|||
text-align: center; |
|||
} |
|||
} |
|||
.show{ |
|||
display: block !important; |
|||
} |
|||
.result-box{ |
|||
margin: 0 15px; |
|||
text-align: center; |
|||
view{ |
|||
padding: 10px 0; |
|||
background-color: $white; |
|||
border-radius: 10px; |
|||
} |
|||
.result-report{ |
|||
margin-top: 10upx; |
|||
padding-left: 10px; |
|||
min-height: 200upx; |
|||
text-align: left; |
|||
} |
|||
.bingo{ |
|||
font-size: 50px; |
|||
color: $uni-color-success; |
|||
} |
|||
.no-bingo{ |
|||
font-size: 50px; |
|||
color: $uni-color-error; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,29 @@ |
|||
<template> |
|||
<web-view :src="url"></web-view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: `/pages/outH5/outH5?con=${this.url}` |
|||
} |
|||
}, |
|||
data() { |
|||
return{ |
|||
url:'' |
|||
} |
|||
}, |
|||
onLoad(option){ |
|||
console.log(option) |
|||
this.url = option.con |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
@ -0,0 +1,191 @@ |
|||
<template> |
|||
<view> |
|||
<view v-if="user"> |
|||
<!-- 评分按钮及需求发布按钮 --> |
|||
<view class="padding flex"> |
|||
<button class="cu-btn bg-red margin-tb-sm lg margin-right" @click="jumpScore">高企/科小评分</button> |
|||
<button class="cu-btn bg-red margin-tb-sm lg" @click="jumpRelease">需求发布</button> |
|||
</view> |
|||
<!-- 往期发布需求标题栏 --> |
|||
<view class="select-box"> |
|||
<text class="select-content select-title">往期发布需求及结果</text> |
|||
<view class="select-content" @click="changeData"> |
|||
<text class="select-content-left">{{publishingData}}</text> |
|||
<icon class="iconfont icon-jiantou-xia triangle" type=""></icon> |
|||
</view> |
|||
<!-- 往期发布需求标题栏下的时间选择器 --> |
|||
<view class="select-content" @click="changeTime"> |
|||
<text class="select-content-left">{{publishingTime}}</text> |
|||
<icon class="iconfont icon-jiantou-xia triangle" type=""></icon> |
|||
</view> |
|||
</view> |
|||
<!-- 往期发布需求标题栏的类型选择器 --> |
|||
<view class="publishing-box" :class="staA == 1 ? 'show' : ''"> |
|||
<view v-for="(item,index) in statelist" :key="index" class="publishing-type" @click="changeDataValue(item,index)">{{item}}</view> |
|||
</view> |
|||
<!-- 往期发布需求标题栏的时间选择器 --> |
|||
<view class="publishing-box" :class="staB == 1 ? 'show' : ''"> |
|||
<view v-for="(item,index) in timelist" :key="index" class="publishing-type" @click="changeTimeValue(item,index)">{{item}}</view> |
|||
</view> |
|||
<!-- 往期发布需求及结果正体内容 --> |
|||
<Demand :typeList="typeList" :num="num"></Demand> |
|||
</view> |
|||
<view v-else class="cu-modal" :class="'show'"> |
|||
<view class="cu-dialog"> |
|||
<view class="cu-bar bg-white justify-end"> |
|||
<view class="content">提示</view> |
|||
</view> |
|||
<view class="padding-xl"> |
|||
您当前为游客状态,请先绑定企业基本信息 |
|||
</view> |
|||
<view class="cu-bar bg-white justify-end"> |
|||
<view class="action"> |
|||
<button class="cu-btn line-green text-green" @click="jumpFirst">取消</button> |
|||
<button class="cu-btn bg-green margin-left" @click="jumpEdit">确定</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/tabBar/Enterprise' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
user: this.$store.state.user.bindMsg.bindStatus, |
|||
staA:'0', |
|||
staB:'0', |
|||
num:1, |
|||
typeList:[0,1], |
|||
publishingData :"技术转移转化", |
|||
publishingTime :"降序", |
|||
statelist :['技术转移转化','工业设计咨询','科技金融建设','政策项目咨询','知识产权咨询','创新体系建设','创新创业咨询','信息技术服务','协同创新服务'], |
|||
timelist :['升序','降序'], |
|||
} |
|||
}, |
|||
onReachBottom: function () { |
|||
this.num ++ |
|||
}, |
|||
methods: { |
|||
jumpFirst(){ |
|||
uni.switchTab({ |
|||
url:'/pages/tabBar/HomePage' |
|||
}) |
|||
}, |
|||
jumpEdit(){ |
|||
uni.navigateTo({ |
|||
url:'/pages/Edit/Edit' |
|||
}) |
|||
}, |
|||
jumpScore(){ |
|||
uni.navigateTo({ |
|||
url:'/pages/TestScore/TestScore' |
|||
}) |
|||
}, |
|||
jumpRelease(){ |
|||
uni.navigateTo({ |
|||
url:'/pages/RequirementRelease/RequirementRelease' |
|||
}) |
|||
}, |
|||
changeData () { |
|||
if(this.staA != 1){ |
|||
this.staA = 1 |
|||
}else{ |
|||
this.staA = 0 |
|||
} |
|||
}, |
|||
changeTime () { |
|||
if(this.staB != 1){ |
|||
this.staB = 1 |
|||
}else{ |
|||
this.staB = 0 |
|||
} |
|||
}, |
|||
changeDataValue(item,index){ |
|||
this.publishingData = item |
|||
this.typeList[0] = index |
|||
this.staA = 0 |
|||
this.num = 1 |
|||
}, |
|||
changeTimeValue(item,index){ |
|||
this.publishingTime = item |
|||
this.typeList[1] = index |
|||
console.log(this.typeList) |
|||
this.staB = 0 |
|||
this.num = 1 |
|||
} |
|||
}, |
|||
watch:{ |
|||
'$store.state.user.bindMsg'(val){ |
|||
const that = this |
|||
that.user = val |
|||
console.log(that.user) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.cu-btn{ |
|||
flex: 1; |
|||
height: 50px; |
|||
} |
|||
.padding{ |
|||
padding: 5px 15px; |
|||
} |
|||
.select-box{ |
|||
height: 40px; |
|||
background-color: $white; |
|||
display: flex; |
|||
justify-content: left; |
|||
align-items: center; |
|||
font-size: 12px; |
|||
} |
|||
.select-content{ |
|||
display: flex; |
|||
flex: 3; |
|||
margin-right: 15px; |
|||
} |
|||
.select-title{ |
|||
margin-left: 15px; |
|||
flex: 4; |
|||
} |
|||
.triangle{ |
|||
margin-left: 6upx; |
|||
display: inline-flex; |
|||
align-items: center; |
|||
font-size: 24upx; |
|||
color: $gray; |
|||
} |
|||
.publishing-box{ |
|||
position: absolute; |
|||
background-color: $white; |
|||
display: none; |
|||
z-index: 1000; |
|||
.publishing-type{ |
|||
width: 750upx; |
|||
height: 40px; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
font-size: 14px; |
|||
border-top:1px solid #f5f6f9; |
|||
} |
|||
} |
|||
.show{ |
|||
display: block !important; |
|||
} |
|||
.select-content-left{ |
|||
flex: 1; |
|||
} |
|||
</style> |
@ -0,0 +1,36 @@ |
|||
<template> |
|||
<view> |
|||
<HomeNav></HomeNav> |
|||
<HomeRotation></HomeRotation> |
|||
<!-- <navigator url="https://www.sxwikionline.com/miniprogram/01.html">xxxx</navigator> --> |
|||
<HomeTab></HomeTab> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/tabBar/HomePage' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
} |
|||
}, |
|||
onReachBottom: function () { |
|||
this.$store.state.policy.pagenum ++ |
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
</style> |
@ -0,0 +1,269 @@ |
|||
<template> |
|||
<view class="content"> |
|||
|
|||
<!-- 用户头像名称信息 --> |
|||
<view class="cu-list menu-avatar bg-white pad-box"> |
|||
<view v-if="userName"> |
|||
<view class="user-section"> |
|||
<view class="url"> |
|||
<image :src="userUrl" class="cu-avatar xl round"></image> |
|||
</view> |
|||
<view class="text-black text-sm padding binding infor-box"> |
|||
<view><text> 用户名: </text><text>{{userName}}</text></view> |
|||
<view><text> 绑定企业: </text><text>{{list[0].content.name}}</text></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view v-else> |
|||
<button open-type="getUserInfo" bindgetuserinfo="userInfoHandler" @getuserinfo="xx">点击此处授权登录</button> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- 企业基本信息下拉上拉框 --> |
|||
<view class="drop-box"> |
|||
<!-- <uni-section :title="item.name" type="line"></uni-section> --> |
|||
<uni-collapse ref="add" class="warp"> |
|||
<uni-collapse-item class="content-box" v-for="(sub, key) in list" :key="key" :open="sub.open" :show-animation="sub.showAnimation" :disabled="sub.disabled" :title="sub.subName"> |
|||
<view class="content"> |
|||
<view>企业名称:<text class="con-text">{{sub.content.name}}</text></view> |
|||
<view>联系人:<text class="con-text">{{sub.content.contacts}}</text></view> |
|||
<view>联系电话:<text class="con-text">{{sub.content.contactPhone}}</text></view> |
|||
<view>孵化器类型:<text class="con-text" v-if="sub.content.incubatorType == 1">实体孵化器</text><text class="con-text" v-else-if="sub.content.incubatorType == 0">虚拟孵化器</text></view> |
|||
<view>孵化器名称:<text class="con-text">{{sub.content.incubator}}</text></view> |
|||
<view>注册地址:<text class="con-text" v-if="sub.content.province !== undefined">{{sub.content.cities[0]}}-{{sub.content.cities[1]}}-{{sub.content.cities[2]}}</text></view> |
|||
<view>详细地址:<text class="con-text">{{sub.content.registrationPlace}}</text></view> |
|||
<view>注册时间:<text class="con-text">{{sub.content.registrationDate}}</text></view> |
|||
<view>税务号:<text class="con-text">{{sub.content.theTaxNo}}</text></view> |
|||
<view class="no-bottom">企业类型:<view class="con-text1"><text v-for="(item,index) in sub.content.category" :key="index">{{item}}</text></view></view> |
|||
<button type="default" @click="jumpEdit">编辑企业基本信息</button> |
|||
</view> |
|||
</uni-collapse-item> |
|||
</uni-collapse> |
|||
</view> |
|||
|
|||
<!-- 列表 --> |
|||
<view class="cu-list menu"> |
|||
|
|||
<!-- 完善企业信息 --> |
|||
<view class="cu-item arrow"> |
|||
<navigator class="content" hover-class="none" url="/pages/Binding/Binding"> |
|||
<text class="text-gray">完善企业信息</text> |
|||
</navigator> |
|||
</view> |
|||
|
|||
<!-- 我的收藏 --> |
|||
<view class="cu-item arrow"> |
|||
<navigator class="content" hover-class="none" url="/pages/MyPages/CollectionPage"> |
|||
<!-- <text :class="item.icon"></text> --> |
|||
<text class="text-gray">我的收藏</text> |
|||
</navigator> |
|||
</view> |
|||
|
|||
<!-- 系统消息 --> |
|||
<view class="cu-item arrow"> |
|||
<navigator class="content" hover-class="none" url="/pages/MyPages/MessagePage"> |
|||
<!-- <text :class="item.icon"></text> --> |
|||
<text class="text-gray">系统消息</text> |
|||
</navigator> |
|||
</view> |
|||
</view> |
|||
|
|||
<!-- 关于我们 --> |
|||
<view class="about"> |
|||
<navigator url="/pages/About/About">关于我们</navigator> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { userInfo } from 'api/userInfo' |
|||
import { detail } from 'api/detail' |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/tabBar/My' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
userName:'', |
|||
// this.$store.state.user.user.wxInfo.nickname, |
|||
userUrl:'', |
|||
list: [{ |
|||
type: true, |
|||
subName: '企业基本信息', |
|||
showAnimation: true, |
|||
content: {} |
|||
}] |
|||
} |
|||
}, |
|||
async created(){ |
|||
const that = this |
|||
if (that.$store.state.user.user) { |
|||
that.userName = that.$store.state.user.user.wxInfo.nickname |
|||
that.userUrl = that.$store.state.user.user.wxInfo.headImgUrl |
|||
} |
|||
const params = { |
|||
param:{ |
|||
} |
|||
} |
|||
const data = await detail(params) |
|||
if(data){ |
|||
that.list[0].content = data |
|||
console.log(data) |
|||
}else{ |
|||
console.log('xxxs') |
|||
} |
|||
}, |
|||
methods: { |
|||
async xx(e){ |
|||
const that = this |
|||
try{ |
|||
const params = { |
|||
"city": e.detail.userInfo.city, |
|||
"country": e.detail.userInfo.country, |
|||
"headImgUrl": e.detail.userInfo.avatarUrl, |
|||
"language": e.detail.userInfo.language, |
|||
"nickname": e.detail.userInfo.nickName, |
|||
"province": e.detail.userInfo.province, |
|||
"sex": e.detail.userInfo.gender |
|||
} |
|||
const data = await userInfo(params) |
|||
that.userName = data.nickname |
|||
that.userUrl = data.headImgUrl |
|||
} catch(err){ |
|||
console.log(err) |
|||
} |
|||
}, |
|||
jumpEdit(local){ |
|||
const that = this |
|||
uni.navigateTo({ |
|||
url:`/pages/Edit/Edit` |
|||
}) |
|||
|
|||
// "http://store/wx808fa75921bd8f22.o6zAJs7mfXqhm1b8GtrCMulfGIss.ZFEwiETuAsHXbd7b5cfa01dc9c19e51bcac48e9441b0.bin" |
|||
} |
|||
}, |
|||
watch:{ |
|||
'$store.state.user.ischange'(val){ |
|||
const that = this |
|||
async function main(){ |
|||
const params = { |
|||
param:{ |
|||
} |
|||
} |
|||
const data = await detail(params) |
|||
that.list[0].content = data |
|||
console.log(data) |
|||
} |
|||
main() |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.pad-box{ |
|||
padding: 20upx; |
|||
} |
|||
.infor-box{ |
|||
padding: 20upx 20upx 0 20upx; |
|||
view{ |
|||
margin: 10px 0; |
|||
display: flex; |
|||
|
|||
text{ |
|||
flex: 1; |
|||
} |
|||
} |
|||
} |
|||
.url { |
|||
border-radius: 50%; |
|||
width: 120rpx; |
|||
height: 120rpx; |
|||
overflow: hidden; |
|||
} |
|||
.user-section { |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
.drop-box{ |
|||
height: 86upx; |
|||
margin: 10px 0; |
|||
background-color: $white; |
|||
display: flex; |
|||
position: relative; |
|||
.warp{ |
|||
flex: 1; |
|||
z-index: 100; |
|||
} |
|||
view{ |
|||
flex: 1; |
|||
z-index: 100; |
|||
background-color: $white; |
|||
} |
|||
} |
|||
.content-box{ |
|||
|
|||
.content{ |
|||
padding: 24upx; |
|||
view{ |
|||
background-color: rgba(255,255,255,0); |
|||
margin-bottom: 14px; |
|||
} |
|||
} |
|||
} |
|||
.con-text{ |
|||
position: absolute; |
|||
left: 240upx; |
|||
padding-right: 20upx; |
|||
|
|||
text{ |
|||
margin-right: 20upx; |
|||
} |
|||
} |
|||
.con-text1{ |
|||
position: relative; |
|||
top: -20px; |
|||
left: 216upx; |
|||
width: 486upx; |
|||
height: auto; |
|||
max-height: 60px; |
|||
margin-bottom: 0 !important; |
|||
|
|||
text{ |
|||
margin-right: 20upx; |
|||
} |
|||
} |
|||
.triangle{ |
|||
display: inline-flex; |
|||
align-items: center; |
|||
position: absolute; |
|||
bottom: 5px; |
|||
left: 50%; |
|||
transform: translate3d(-50%,0,0); |
|||
} |
|||
.cu-item{ |
|||
padding-left: 15px !important; |
|||
font-size: 12px !important; |
|||
} |
|||
.about{ |
|||
position: absolute; |
|||
border-bottom: 2px solid $red; |
|||
margin-left: 50%; |
|||
bottom: 4px; |
|||
text-align: center; |
|||
transform: translate3d(-50%,0,0); |
|||
} |
|||
.binding{ |
|||
text-align: left; |
|||
width: 622upx; |
|||
} |
|||
.no-bottom{ |
|||
margin-bottom: 0 !important; |
|||
} |
|||
</style> |
@ -0,0 +1,184 @@ |
|||
<template> |
|||
<view> |
|||
<view v-if="user" class="top-move"> |
|||
<view class="cu-load bg-grey">这是根据您的信息,为您推荐的政策...</view> |
|||
<Policy :showModal="showModal"></Policy> |
|||
<view class="yincang">1</view> |
|||
</view> |
|||
<view v-else class="cu-modal" :class="'show'"> |
|||
<view class="cu-dialog"> |
|||
<view class="cu-bar bg-white justify-end"> |
|||
<view class="content">提示</view> |
|||
</view> |
|||
<view class="padding-xl"> |
|||
您当前为游客状态,请先绑定企业基本信息 |
|||
</view> |
|||
<view class="cu-bar bg-white justify-end"> |
|||
<view class="action"> |
|||
<button class="cu-btn line-green text-green" @click="jumpfirst">取消</button> |
|||
<button class="cu-btn bg-green margin-left" @click="jumpedit">确定</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
export default { |
|||
onShareAppMessage(res) { |
|||
if (res.from === 'button') {// 来自页面内分享按钮 |
|||
console.log(res.target) |
|||
} |
|||
return { |
|||
title: '', |
|||
path: '/pages/tabBar/Recommend' |
|||
} |
|||
}, |
|||
created(){ |
|||
this.$store.state.policy.pagenum = 1 |
|||
console.log(this.$store.state.policy.pagenum) |
|||
}, |
|||
data() { |
|||
return { |
|||
showModal: "-----推荐页面打开的政策-----", |
|||
user: this.$store.state.user.bindMsg.bindStatus, |
|||
modalName: null, |
|||
} |
|||
}, |
|||
onReachBottom: function () { |
|||
this.$store.state.policy.pagenum ++ |
|||
console.log(this.$store.state.policy.pagenum) |
|||
}, |
|||
methods:{ |
|||
jumpfirst(){ |
|||
uni.switchTab({ |
|||
url:'/pages/tabBar/HomePage' |
|||
}) |
|||
}, |
|||
jumpedit(){ |
|||
uni.navigateTo({ |
|||
url:'/pages/Edit/Edit' |
|||
}) |
|||
}, |
|||
jumpbinding(){ |
|||
uni.navigateTo({ |
|||
url:'/pages/Binding/Binding' |
|||
}) |
|||
} |
|||
}, |
|||
watch:{ |
|||
'$store.state.user.bindMsg'(val){ |
|||
const that = this |
|||
that.user = val |
|||
console.log(that.user) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.cu-load { |
|||
display: block; |
|||
line-height: 3em; |
|||
text-align: center; |
|||
} |
|||
|
|||
.top-move{ |
|||
animation:top-move 5s forwards; |
|||
} |
|||
@keyframes top-move{ |
|||
from{ |
|||
transform: translate3d(0,0,0); |
|||
} |
|||
to{ |
|||
transform: translate3d(0,-3em,0); |
|||
margin-bottom: -3em; |
|||
} |
|||
} |
|||
.yincang{ |
|||
margin-top: -100%; |
|||
} |
|||
.cu-modal { |
|||
position: fixed; |
|||
top: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
left: 0; |
|||
z-index: 1110; |
|||
opacity: 0; |
|||
outline: 0; |
|||
text-align: center; |
|||
-ms-transform: scale(1.185); |
|||
transform: scale(1.185); |
|||
backface-visibility: hidden; |
|||
perspective: 2000upx; |
|||
background: rgba(0, 0, 0, 0.6); |
|||
transition: all 0.3s ease-in-out 0s; |
|||
pointer-events: none; |
|||
} |
|||
.cu-modal::before { |
|||
content: "\200B"; |
|||
display: inline-block; |
|||
height: 100%; |
|||
vertical-align: middle; |
|||
} |
|||
.cu-modal.show { |
|||
opacity: 1; |
|||
transition-duration: 0.3s; |
|||
-ms-transform: scale(1); |
|||
transform: scale(1); |
|||
overflow-x: hidden; |
|||
overflow-y: auto; |
|||
pointer-events: auto; |
|||
} |
|||
.cu-dialog { |
|||
position: relative; |
|||
display: inline-block; |
|||
vertical-align: middle; |
|||
margin-left: auto; |
|||
margin-right: auto; |
|||
width: 680upx; |
|||
max-width: 100%; |
|||
background-color: #f8f8f8; |
|||
border-radius: 10upx; |
|||
overflow: hidden; |
|||
} |
|||
.cu-modal.bottom-modal::before { |
|||
vertical-align: bottom; |
|||
} |
|||
.cu-modal.bottom-modal .cu-dialog { |
|||
width: 100%; |
|||
border-radius: 0; |
|||
} |
|||
.cu-modal.bottom-modal { |
|||
margin-bottom: -1000upx; |
|||
} |
|||
.cu-modal.bottom-modal.show { |
|||
margin-bottom: 0; |
|||
} |
|||
.cu-modal.drawer-modal { |
|||
transform: scale(1); |
|||
display: flex; |
|||
} |
|||
.cu-modal.drawer-modal .cu-dialog { |
|||
height: 100%; |
|||
min-width: 200upx; |
|||
border-radius: 0; |
|||
margin: initial; |
|||
transition-duration: 0.3s; |
|||
} |
|||
.cu-modal.drawer-modal.justify-start .cu-dialog { |
|||
transform: translateX(-100%); |
|||
} |
|||
.cu-modal.drawer-modal.justify-end .cu-dialog { |
|||
transform: translateX(100%); |
|||
} |
|||
.cu-modal.drawer-modal.show .cu-dialog { |
|||
transform: translateX(0%); |
|||
} |
|||
.cu-modal .cu-dialog>.cu-bar:first-child .action{ |
|||
min-width: 100rpx; |
|||
margin-right: 0; |
|||
min-height: 100rpx; |
|||
} |
|||
</style> |
@ -0,0 +1,5 @@ |
|||
@tall = 'https://49.232.6.143/gateway/tall/v1.0' |
|||
|
|||
### login |
|||
|
|||
GET {{tall}}/debug |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.4 KiB |
@ -0,0 +1,60 @@ |
|||
@font-face {font-family: "iconfont"; |
|||
src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAZUAAsAAAAAD3QAAAYEAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEQgqPUIxTATYCJAM0CxwABCAFhG0HgUkbEA1RlFBOBNmPw9g9UoKBfORLa+M70SZX7LmKh6e1sve7aqh7JkAs44AVg0IWZm0UkArbsDCJMICOZG/g7hzB1VzuF1lV3fiEXZEV2oY2QJvZ3AXGF5yrUhWyFa7zn5v+YB6qaiTUxCYWNgeqCsxEQ8XefXat/7Vfq6fxsNBcYmEoaZe/J293P8OiltyaSoWk0xlCOrfp90lXMmSttAQXKiBSm5cyE9wKM3uy5ARKE2gmK68enmFBZtNgzfEs8WGh0CF35IZ2a7MhaBYXNbSL88UL4EL09vGDE20KjcT2uuHgZQQndfTfT33/99kTqJDz9WERioR5QCbuNQ7ckBKYF7GyaXN2Ghhiw/reoo66WVf1uHp2va6+3n////+p6i7vZF8PQ5xAu0AhyRq6ymet09LWUfnnNQnrcuROobMOTyh2vImQ4BVCho9DaMBnI43j6xBK+GWEgF+BOhe/itCCX0Now69TRYf++9tUoBcEGQMsAMUegDSHLW+JyifZQFmbNmShEF2amdYdEXnx8HF/M+DDZIa7W22LVkXxYliA46hSKfz1C/n5M1tAEON8cjjehkoPKERqiKR3Hus4oD6ojaMqHJADBjlu+jU1h5+5ce+8aD6BEgIcb+JIpRo6QzrKEKVS9At5hgxoaUnEqkAF8HMoDCrsTVazQTclAjb5lUxQ1kymExhEAacBFMzA5EMaJQqRVZFkYH5avViKqRaK6zi3v+sThxQiGSD0Spjcvj6IeKAQmxZh+Gu6RKZGEKsyRH0QdEDKYGDXxt15DEy60KIBk0MQw4/+gILJvPVID/TPd3BnZIDSO62enyuehai8pyYyh1QACYSoUIggAqQrkz3ZL/h8acoQFpUghQWJaEBacolfx/Rra1Qwj30/YCNE5Qd+iKwQoeLXt1+WAkQyotl/ccVylrj6hTTriNVVf4K09pk4i5W1tdlPGPHuXSJmUIBlgnjvLgETJHZ4KlZX5Qr9ZoP78xQUGwLfcTpZRzWNG2ke4pImL2+jR8KZtSA+0tva0qEMCAtECuIzaqPgdrq83DnNPJQXEWUKu15L3Ex8XnkeBO9IDYGCIbCPsom0YBBCvGtGb45fpPP44ZxAHUfBfNa2i0JbOpzAcD5P+8E4CHTEk30AxDYMxE8Dn+5LAiVPPSknAgL8xWMBIFDA/h7cLNk9IpmXpqfAsghu5T64NiKLlfkTD7it/z+Q48JwScv9nTeVtaHUTIBOLYYzKS3kysBmSiZcbIKCzFbodNt/hGtPyU0guBB/V6vVQrla/k7GWwLJlWjPQ4CHH1wMi8WAcRgVbwUSg2KMGzZy3jG+O8tmKm/EiXrKhuXOP3ZuV4bKrA+f6QzSEBXli1T8uw0K2oryCwerzaBv4q/9KgoE3USRoqKSEhR9/AjsfdjH8b1Z8v5U1yPg6kiVlbusLNvjsQOxjyJ4NMdsW1l+HyOyL6uqMfzyIY37x8k/4P/n6WFaRP6V9Dqtyx/J0v6m11JfmmtqMmlsb6Rn8RukDVN3ZnY3HUgxAXLm87On93LWD35tM/+Tbn1cPDKLHP7fm6U+tBVtg8HkhiiP5L3J7uzl7cF50hkKe/ZanyxQOleY2IwM8XcdebiaTN3k4VlxoWU8pCb9NMjo5xU3VOZDE/2S4tJc16ErQ7FpkTuY453iMMh3cWGA55DQ/0BG/1vcMMK/pYkhUnFpW2xHWZkRR5bOGX2JkQhGkYVUx263XIrXPmKiSp/FNHP3itxmVAvbsI5z11gjn8NH2yWOlLGImSpxZbxgWZJomHIMpZEy2+yZZrzyaYRUwZIVGPLJoHxECIyNMyFSi2+Wliqv/wgllJKPO3bcNX6FWCt7vmAzWAr1NatVO97L5lYn4ZDSFxPeJCNVIl9Zfah0ponQNDvKoZBkSEdMNvaYclKsZcb15eo3fwQl++V6UUSKHI1oRiva0YkyquhGLwZoniPVKprpKcLlr/LT3iK/7jGba1NSI64HREXlc6G7epnVuFN8Ug+pGTfGSFu+PFDK6OJZSUNCeebXkpQ+ZP68pDpJFC0NEz0X2gEAAAAA') format('woff2'); |
|||
} |
|||
|
|||
.iconfont { |
|||
font-family: "iconfont" !important; |
|||
font-size: 16px; |
|||
font-style: normal; |
|||
-webkit-font-smoothing: antialiased; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
} |
|||
|
|||
.icon-sousuo:before { |
|||
content: "\e692"; |
|||
} |
|||
|
|||
.icon-wode:before { |
|||
content: "\e601"; |
|||
} |
|||
|
|||
.icon-icon_danwei:before { |
|||
content: "\e606"; |
|||
} |
|||
|
|||
.icon-shouye:before { |
|||
content: "\e60b"; |
|||
} |
|||
|
|||
.icon-bookmark-3-line:before { |
|||
content: "\e61c"; |
|||
} |
|||
|
|||
.icon-bookmark-3-line-copy:before { |
|||
content: "\e693"; |
|||
} |
|||
|
|||
.icon-icon_danwei-copy:before { |
|||
content: "\e694"; |
|||
} |
|||
|
|||
.icon-shouye-copy:before { |
|||
content: "\e695"; |
|||
} |
|||
|
|||
.icon-wode-copy:before { |
|||
content: "\e696"; |
|||
} |
|||
|
|||
.icon-jiantou-xia:before { |
|||
content: "\e64e"; |
|||
} |
|||
|
|||
.icon-tongguo:before { |
|||
content: "\e7ab"; |
|||
} |
|||
|
|||
.icon-icon_wrong:before { |
|||
content: "\e629"; |
|||
} |
|||
|
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 13 KiB |
@ -1,11 +1,12 @@ |
|||
import Vue from 'vue'; |
|||
import Vuex from 'vuex'; |
|||
import user from './modules/user/index'; |
|||
import policy from './modules/policy/index'; |
|||
|
|||
|
|||
Vue.use(Vuex); |
|||
const store = new Vuex.Store({ |
|||
modules: { user }, |
|||
modules: { user,policy }, |
|||
}); |
|||
|
|||
export default store; |
|||
|
@ -0,0 +1,7 @@ |
|||
import { http } from 'plugins/request/index'; |
|||
|
|||
const actions = { |
|||
|
|||
}; |
|||
|
|||
export default actions; |
@ -0,0 +1,5 @@ |
|||
import state from './state'; |
|||
import mutations from './mutations'; |
|||
import actions from './actions.js'; |
|||
|
|||
export default { namespaced: true, state, actions, mutations }; |
@ -0,0 +1,5 @@ |
|||
const mutations = { |
|||
|
|||
}; |
|||
|
|||
export default mutations; |
@ -0,0 +1,6 @@ |
|||
const state = { |
|||
pagenum: 1, |
|||
release: 0 |
|||
}; |
|||
|
|||
export default state; |