Browse Source

修复package.json

master
parent
commit
1bb473993a
  1. 12
      App.vue
  2. 4
      components/cs-bottom-wrapper/index.vue
  3. 6
      config.js
  4. 48
      pages.json
  5. 1
      static/scss/global.scss
  6. 392
      sub/invite/addEnterprise.vue
  7. 79
      sub/invite/enterpriseIntroduce.vue
  8. 177
      sub/invite/enterpriseTags.vue
  9. 55
      sub/invite/index.vue
  10. 369
      sub/invite/prove.vue
  11. 4
      sub/owner/invite.vue
  12. 20
      sub/task/enforce.vue

12
App.vue

@ -99,12 +99,12 @@ export default {
},
handlerNavigateTo(user) {
//
if (this.invateId) {
uni.navigateTo({
url: `/sub/enterprise/edit?invateId=${this.invateId}`
})
return
}
// if (this.invateId) {
// uni.navigateTo({
// url: `/sub/enterprise/edit?invateId=${this.invateId}`
// })
// return
// }
//
if (user.audit == 1) {

4
components/cs-bottom-wrapper/index.vue

@ -26,8 +26,10 @@ export default {
left: 0;
width: 100%;
background-color: #fff;
z-index: 99;
border-top: 1px solid #f1f1f4;
.safe {
height: 25px;
height: 20px;
}
}
</style>

6
config.js

@ -1,8 +1,8 @@
// 应用全局配置
module.exports = {
baseUrl: 'http://188.188.3.166:48080',
//baseUrl: 'https://hb.jzce.com',
//baseUrl: 'http://188.188.3.232:48080',
// baseUrl: 'http://188.188.3.166:48080',
// baseUrl: 'https://hb.jzce.com',
baseUrl: 'http://188.188.3.232:48080',
baseApi: '/admin-api',
imgUrl: 'https://hb.jzce.com',
// 应用信息

48
pages.json

@ -82,7 +82,7 @@
"style": {
"navigationBarTitleText": "政策法规",
"usingComponents": {
"van-search":"/wxcomponents/vant/search/index"
"van-search": "/wxcomponents/vant/search/index"
},
"componentPlaceholder": {
"u-modal": "view"
@ -93,8 +93,8 @@
"path": "owner/policy-detail",
"style": {
"navigationBarTitleText": "政策法规",
"usingComponents": {},
"componentPlaceholder": {}
"usingComponents": {},
"componentPlaceholder": {}
}
},
{
@ -105,7 +105,8 @@
}, {
"path": "common/waiting",
"style": {
"navigationBarTitleText": ""
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}, {
"path": "enterprise/detail",
@ -189,6 +190,44 @@
"onReachBottonDistance": 50,
"enablePullDownRefresh": true
}
},
{
"path": "invite/index",
"style": {
"navigationBarTitleText": "我的企业",
"componentPlaceholder": {
"u-modal": "view",
"uni-easyinput": "view"
}
}
},
{
"path": "invite/addEnterprise",
"style": {
"navigationBarTitleText": "新增企业",
"componentPlaceholder": {}
}
},
{
"path": "invite/enterpriseIntroduce",
"style": {
"navigationBarTitleText": "企业简介",
"componentPlaceholder": {
"uni-easyinput": "view"
}
}
},
{
"path": "invite/enterpriseTags",
"style": {
"navigationBarTitleText": "环保标签"
}
},
{
"path": "invite/prove",
"style": {
"navigationBarTitleText": ""
}
}
]
}],
@ -215,5 +254,6 @@
"navigationBarTitleText": "智慧生态",
"navigationBarBackgroundColor": "#FFF",
"backgroundColor": "#FFF"
}
}

1
static/scss/global.scss

@ -2,6 +2,7 @@ page {
background-color: #f9f9f9;
position: relative;
color: #071437;
overflow: hidden;
}
button {

392
sub/invite/addEnterprise.vue

@ -0,0 +1,392 @@
<template>
<view class="view">
<view class="block">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
企业名称
</view>
<view class="value">
<input
class="input-value"
type="text"
placeholder-class="txt"
placeholder="请输入企业名称"
v-model="form.enterpriseName"
@blur="proofName"
/>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="block">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
企业地址
</view>
<view class="value" @tap="chooseAddress">
<input
class="input-value"
type="text"
placeholder-class="txt"
placeholder="请选择企业地址"
v-model="form.address"
disabled
/>
<u-icon name="map"></u-icon>
</view>
</view>
<view class="block">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
企业介绍
</view>
<view class="value" @tap="goIntruduce">
<view class="input-textarea" v-if="form.introduce">
{{ form.introduce }}
</view>
<view class="input-textarea" style="color: #808080" v-else>
请输入企业介绍
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="upload-wrapper">
<view
class="wd-flex"
style="
justify-content: space-between;
align-items: center;
width: 100%;
"
>
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
企业照片
</view>
<view style="color: #808080">最多可传3张</view>
</view>
<u-upload
:fileList="form.photo"
@afterRead="addEnterprisePhoto"
@delete="delEnterprisePhoto"
multiple
:maxCount="3"
width="101"
height="101"
></u-upload>
</view>
<view class="block">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
企业标签
</view>
<view class="value" @tap="goTags">
<view class="input-textarea" v-if="form.introduce">
{{ form.tags }}
</view>
<view class="input-textarea" style="color: #808080" v-else>
请选择企业标签
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="block">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
企业负责人
</view>
<view class="value">
<input
class="input-value"
type="text"
placeholder-class="txt"
placeholder="请输入企业负责人"
v-model="form.contactName"
/>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="block">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
负责人电话
</view>
<view class="value">
<input
class="input-value"
type="text"
placeholder-class="txt"
placeholder="请输入负责人电话"
v-model="form.environmentalContactPhone"
@blur="proofName"
/>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="upload-wrapper">
<view
class="wd-flex"
style="
justify-content: space-between;
align-items: center;
width: 100%;
"
>
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
相关资质
</view>
<view
class="wd-flex"
style="color: #17c653; gap: 4px; align-items: center"
@tap="addProve"
>
<u-icon name="plus-circle" color="#17C653" size="14"></u-icon>
<text style="line-height: 1rem">新增资质</text>
</view>
<view
class="wd-flex"
style="justify-content: space-between"
v-for="(p, index) in prove"
:key="index"
v-if="prove.length > 0"
>
<image
src="@/static/images/enterprise/zz.png"
style="width: 90px; height: 70px"
mode="widthFix"
></image>
<view
style="flex: 1; justify-content: space-between"
class="wd-flex wd-flex-col"
>
<view class="wd-flex" style="gap: 8px; align-items: center">
<text class="label">资质名称</text>
<view>
{{
$dict.echoDicValue(
dictMap.enterprise_qua,
prove.qualificationName.toString()
)
}}
</view>
</view>
<view class="wd-flex" style="gap: 8px; align-items: center">
<text class="label">资质编号</text>
<view>
{{ prove.enterpriseAuth }}
</view>
</view>
<view class="wd-flex" style="gap: 8px; align-items: center">
<text class="label">资质到期</text>
<view>
{{ $util.formatDate(prove.expiryDate, 'YYYY/M/D') }}
</view>
</view>
</view>
</view>
</view>
</view>
<cs-bottom-wrapper>
<view class="operation">
<button class="btn green">提交审核</button>
</view>
</cs-bottom-wrapper>
</view>
</template>
<script>
import { uploadFile } from '@/api/system/file.js'
import { getDictBatchByType } from '@/api/system/dict.js'
export default {
data() {
return {
form: {
enterpiseName: undefined,
address: undefined,
gpsLocation: undefined,
introduce: '',
photo: [],
tags: {}
},
dictMap: {},
prove: [],
inviteId: undefined
}
},
onLoad(res) {
this.inviteId = res.inviteId
this.getDict()
},
onShow() {
uni.$on('enterpriseIntroduce', data => {
this.form.introduce = data.introduce
})
uni.$on('enterpriseTag', data => {
this.form.tags = data
})
uni.$on('prove', data => {
this.prove.push(data)
})
},
methods: {
proofName(v) {
console.log(v.detail.value)
},
/**
* 获取字典
*/
async getDict() {
const dict = await getDictBatchByType({
type: ['enterprise_qua'].join(',')
})
this.dictMap = {
...dict.data
}
},
chooseAddress() {
uni.chooseLocation({
success: res => {
this.form.address = res.address
this.form.gpsLocation = res.latitude + ',' + res.longitude
}
})
},
goIntruduce() {
uni.navigateTo({
url: `/sub/invite/enterpriseIntroduce?introduce=${this.form.introduce}`
})
},
goTags() {
uni.navigateTo({
url: `/sub/invite/enterpriseTags?tags=${this.form.tags}`
})
},
/**
* 选择图片并上传
* @param {Object} e
*/
async addEnterprisePhoto(e) {
e.file.forEach(p => {
this.form.photo.push({
...p,
status: 'uploading',
message: '上传中'
})
})
// 使promise.all()
await Promise.all(
this.form.photo.map(async (p, i) => {
if (p.status == 'uploading') {
const res = await uploadFile({ name: `file`, filePath: p.url })
return {
...res.data,
status: 'success',
message: ''
}
}
return p
})
).then(res => {
this.form.photo = res
})
},
/**
* 删除图片
* @param {Object} e
*/
delEnterprisePhoto(e) {
this.form.photo.splice(e.index, 1)
},
addProve() {
uni.navigateTo({
url: '/sub/invite/prove'
})
}
}
}
</script>
<style lang="scss" scoped>
.view {
padding: 12px;
display: flex;
flex-flow: column nowrap;
gap: 12px;
overflow: hidden;
overflow-y: scroll;
max-height: 100vh;
padding-bottom: 12vh;
}
.block {
display: flex;
flex-flow: row nowrap;
background-color: #fff;
padding: 12px;
border-radius: 8px;
justify-content: space-between;
align-items: center;
gap: 12px;
.value {
flex: 1;
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
gap: 4px;
.input-value {
flex: 1;
text-align: right;
white-space: nowrap;
text-overflow: ellipsis;
}
.input-textarea {
flex: 1;
display: -webkit-box;
overflow: hidden;
text-align: right;
max-height: 3rem;
line-height: 1rem;
text-overflow: ellipsis;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
word-break: break-all;
}
}
}
.upload-wrapper {
display: flex;
flex-flow: column nowrap;
background-color: #fff;
padding: 12px;
border-radius: 8px;
gap: 12px;
}
.operation {
padding: 12px;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
.btn {
flex: 1;
border-radius: 8px;
display: flex;
padding: 12px 0;
align-items: center;
justify-content: center;
}
.green {
background-color: $cs-color-main;
color: #fff;
}
}
</style>

79
sub/invite/enterpriseIntroduce.vue

@ -0,0 +1,79 @@
<template>
<view class="view">
<u--textarea
v-model="introduce"
placeholder="请输入..."
maxlength="500"
count
:autoHeight="true"
></u--textarea>
<cs-bottom-wrapper>
<view class="operation">
<button class="btn green" @tap="submit">保存</button>
</view>
</cs-bottom-wrapper>
</view>
</template>
<script>
export default {
data() {
return {
introduce: ''
}
},
onLoad(res) {
this.introduce = res.introduce
},
methods: {
submit() {
if (!this.introduce) {
uni.showToast({
icon: 'none',
title: '请填写介绍'
})
return
}
uni.$emit('enterpriseIntroduce', { introduce: this.introduce })
uni.navigateBack()
}
}
}
</script>
<style lang="scss" scoped>
.view {
background-color: #fff;
padding: 12px;
height: 100vh;
}
::v-deep .u-textarea {
min-height: 400rpx;
background-color: #f9f9f9 !important;
border: 1px solid #f9f9f9;
border-radius: 12px;
.u-textarea__count {
background-color: #f9f9f9 !important;
}
}
.operation {
padding: 12px;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
.btn {
flex: 1;
border-radius: 8px;
display: flex;
padding: 12px 0;
align-items: center;
justify-content: center;
}
.green {
background-color: $cs-color-main;
color: #fff;
}
}
</style>

177
sub/invite/enterpriseTags.vue

@ -0,0 +1,177 @@
<template>
<view class="view">
<view class="block" v-for="(tag, index) in data" :key="index">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
{{ tag.name }}
</view>
<view class="value" @click="showPicker(tag)">
<view class="input-value" v-if="form[tag.name]">
{{ form[tag.name].name }}
</view>
<view class="input-value" style="color: #808080" v-else>
{{ `请选择${tag.name}` }}
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<u-picker
:show="picker.show"
:columns="picker.data"
@cancel="closePicker"
closeOnClickOverlay
keyName="name"
ref="uPicker"
@close="closePicker"
@confirm="confirmPicker"
></u-picker>
<cs-bottom-wrapper>
<view class="operation">
<button class="btn green" @tap="submit">提交审核</button>
</view>
</cs-bottom-wrapper>
</view>
</template>
<script>
export default {
data() {
return {
data: [],
form: {},
//
picker: {
show: false,
//
key: null,
data: []
}
}
},
onLoad(res) {
this.getData()
},
methods: {
getData() {
this.data = new Array(5).fill(1).map((i, index) => {
this.form[`Tag${index + 1}`] = ''
return {
name: `Tag${index + 1}`,
label: `标签${index + 1}`,
value: index,
children: new Array(10).fill(1).map((c, cIndex) => {
return {
name: `subTag${cIndex + 1}`,
value: cIndex * 10
}
})
}
})
console.log(this.data)
},
/**
* 选择器确认回调
* @param {Object} e
*/
confirmPicker(e) {
const { value } = e
this.form[this.picker.key] = value[0].value
this.closePicker()
},
/**
* 关闭选择器
*/
closePicker() {
this.picker = {
show: false,
key: '',
data: []
}
},
showPicker(tag) {
this.picker.data.push(tag.children)
this.picker.key = tag.name
this.picker.show = true
},
submit() {
const msg = Object.keys(this.form).filter(k => {
if (this.form[k] == '') {
return this.data.find(d => d.name == k).label
}
})
if (msg.length > 0) {
uni.showToast({
icon: 'none',
title: `${msg.join('\n')}不能为空`
})
return
}
uni.$emit('enterpriseTag', this.form)
console.log(this.form)
uni.navigateBack()
}
}
}
</script>
<style lang="scss" scoped>
.view {
padding: 12px;
display: flex;
flex-flow: column nowrap;
gap: 12px;
overflow: hidden;
overflow-y: scroll;
max-height: 100vh;
padding-bottom: 12vh;
}
.input-value {
flex: 1;
text-align: right;
white-space: nowrap;
text-overflow: ellipsis;
}
.block {
display: flex;
flex-flow: row nowrap;
background-color: #fff;
padding: 12px;
border-radius: 8px;
justify-content: space-between;
align-items: center;
gap: 12px;
.value {
flex: 1;
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
gap: 4px;
.input-value {
flex: 1;
text-align: right;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
.operation {
padding: 12px;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
.btn {
flex: 1;
border-radius: 8px;
display: flex;
padding: 12px 0;
align-items: center;
justify-content: center;
}
.green {
background-color: $cs-color-main;
color: #fff;
}
}
</style>

55
sub/invite/index.vue

@ -0,0 +1,55 @@
<template>
<view>
<scroll-view direction="vertical"></scroll-view>
<cs-bottom-wrapper>
<view class="operation">
<button class="btn green" @tap="addEnterprise">新增企业</button>
</view>
</cs-bottom-wrapper>
</view>
</template>
<script>
export default {
data() {
return {
inviteId: ''
}
},
onLoad(res) {
console.log(res)
if (res.inviteId) {
this.inviteId = res.inviteId
}
},
methods: {
addEnterprise() {
uni.navigateTo({
url: `/sub/invite/addEnterprise?inviteId=${this.inviteId}`
})
}
}
}
</script>
<style lang="scss" scoped>
.operation {
padding: 12px;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
.btn {
flex: 1;
border-radius: 8px;
display: flex;
padding: 12px 0;
align-items: center;
justify-content: center;
}
.green {
background-color: $cs-color-main;
color: #fff;
}
}
</style>

369
sub/invite/prove.vue

@ -0,0 +1,369 @@
<template>
<view class="view">
<view class="block">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
资质名称
</view>
<view
class="value"
@tap="showPicker('enterprise_qua', 'qualificationName')"
>
<view class="input-textarea" v-if="prove.qualificationName">
{{
$dict.echoDicValue(
dictMap.enterprise_qua,
prove.qualificationName
)
}}
</view>
<view class="input-textarea" style="color: #808080" v-else>
请输入资质名称
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="block">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
资质编号
</view>
<view class="value">
<input
class="input-value"
type="text"
placeholder-class="txt"
placeholder="请输入资质编号"
v-model="prove.enterpriseAuth"
/>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<!-- <view class="block">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
办理时间
</view>
<view class="value" @tap="showCalendar('handleDate')">
<view class="input-textarea" v-if="prove.handleDate">
{{ prove.handleDate }}
</view>
<view class="input-textarea" style="color: #808080" v-else>
请选择办理时间
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</view> -->
<view class="block">
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
到期时间
</view>
<view class="value" @tap="showCalendar('expiryDate')">
<view class="input-textarea" v-if="prove.expiryDate">
{{ prove.expiryDate }}
</view>
<view class="input-textarea" style="color: #808080" v-else>
请选择到期时间
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="upload-wrapper">
<view
class="wd-flex"
style="
justify-content: space-between;
align-items: center;
width: 100%;
"
>
<view style="">
<text style="color: #f8285a; margin-right: 4px">*</text>
资质照片
</view>
<view style="color: #808080">要求清晰有效</view>
</view>
<u-upload
:fileList="prove.photo"
@afterRead="addPhoto"
@delete="delPhoto"
:maxCount="1"
width="101"
height="101"
></u-upload>
</view>
<cs-bottom-wrapper>
<view class="operation">
<button class="btn green" @tap="submit">保存</button>
</view>
</cs-bottom-wrapper>
<u-picker
:show="picker.show"
:columns="picker.data"
@cancel="closePicker"
closeOnClickOverlay
keyName="label"
ref="uPicker"
@close="closePicker"
@confirm="confirmPicker"
></u-picker>
<uni-calendar
ref="calendarRef"
:insert="false"
@confirm="confirmCalendar"
/>
</view>
</template>
<script>
import { uploadFile } from '@/api/system/file.js'
import { getDictBatchByType } from '@/api/system/dict.js'
export default {
data() {
return {
prove: {
id: '',
qualificationName: '',
expiryDate: '',
enterpriseAuth: '',
photo: []
},
dictMap: {},
//
picker: {
show: false,
//
key: null,
data: []
},
//
calendar: {
//
key: null
}
}
},
onLoad(res) {
uni.setNavigationBarTitle({
title: !res ? '编辑资质' : '新增资质'
})
this.getDict()
},
onShow() {},
methods: {
/**
* 获取字典
*/
async getDict() {
const dict = await getDictBatchByType({
type: ['enterprise_qua'].join(',')
})
this.dictMap = {
...dict.data
}
},
/**
* 选择图片并上传
* @param {Object} e
*/
async addPhoto(e) {
e.file.forEach(p => {
this.prove.photo.push({
...p,
status: 'uploading',
message: '上传中'
})
})
// 使promise.all()
await Promise.all(
this.prove.photo.map(async (p, i) => {
if (p.status == 'uploading') {
const res = await uploadFile({ name: `file`, filePath: p.url })
return {
...res.data,
status: 'success',
message: ''
}
}
return p
})
).then(res => {
this.prove.photo = res
})
},
/**
* 删除图片
* @param {Object} e
*/
delPhoto(e) {
this.prove.photo.splice(e.index, 1)
},
/**
* 选择器确认回调
* @param {Object} e
*/
confirmPicker(e) {
const { value } = e
this.prove[this.picker.key] = value[0].value
this.closePicker()
},
/**
* 关闭选择器
*/
closePicker() {
this.picker = {
show: false,
key: '',
data: []
}
},
showPicker(dict, key) {
this.picker.data.push(this.dictMap[dict])
this.picker.key = key
this.picker.show = true
},
/**
* 显示日历
* @param {Object} key 表单中需要赋值的键
*/
showCalendar(key) {
this.$refs.calendarRef.open()
this.calendar = {
key
}
},
/**
* 日历选中之后的回调
* @param {Object} e
*/
confirmCalendar(e) {
this.prove[this.calendar.key] = e.fulldate
this.closeCalendar()
},
/**
* 关闭日历
*/
closeCalendar() {
this.calendar = {
key: null
}
},
async submit() {
const valide = await this.verifyForm()
if (!valide) return
uni.$emit('prove', this.prove)
uni.navigateBack()
},
async verifyForm() {
const msgMap = {
qualificationName: '请填写资质名称',
expiryDate: '请选择到期日期',
enterpriseAuth: '请填写资质编号',
photo: '请上传资质照片'
}
const keys = Object.keys(this.prove).filter(i => {
if (!this.prove[i] && i != 'id') return i
if (typeof this.prove[i] == 'object' && this.prove[i].length == 0)
return i
})
if (keys.length > 0) {
const msg = keys
.map(i => {
return msgMap[i]
})
.join('\n')
uni.showToast({
icon: 'none',
title: msg
})
return false
}
return true
}
}
}
</script>
<style lang="scss" scoped>
.view {
padding: 12px;
display: flex;
flex-flow: column nowrap;
gap: 12px;
overflow: hidden;
overflow-y: scroll;
max-height: 100vh;
padding-bottom: 12vh;
}
.block {
display: flex;
flex-flow: row nowrap;
background-color: #fff;
padding: 12px;
border-radius: 8px;
justify-content: space-between;
align-items: center;
gap: 12px;
.value {
flex: 1;
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
gap: 4px;
.input-value {
flex: 1;
text-align: right;
white-space: nowrap;
text-overflow: ellipsis;
}
.input-textarea {
flex: 1;
display: -webkit-box;
overflow: hidden;
text-align: right;
max-height: 3rem;
line-height: 1rem;
text-overflow: ellipsis;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
word-break: break-all;
}
}
}
.upload-wrapper {
display: flex;
flex-flow: column nowrap;
background-color: #fff;
padding: 12px;
border-radius: 8px;
gap: 12px;
}
.operation {
padding: 12px;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
.btn {
flex: 1;
border-radius: 8px;
display: flex;
padding: 12px 0;
align-items: center;
justify-content: center;
}
.green {
background-color: $cs-color-main;
color: #fff;
}
}
</style>

4
sub/owner/invite.vue

@ -24,7 +24,7 @@ export default {
onShareAppMessage() {
return {
title: '邀请企业入驻',
path: `/pages/login?invateId=${this.$store.getters.userId}`,
path: `/sub/invite/index?inviteId=${this.$store.getters.userId}`,
imageUrl:
'http://82.156.141.150:9001/api/v1/download-shared-object/aHR0cDovL2xvY2FsaG9zdDo5MDAwL2h1YW5iYW8vbWluaWFwcC9pbnZhdGUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUQxODY1RVA2NEczMEdEUUhDVTglMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMDcyMDI0WiZYLUFtei1FeHBpcmVzPTQzMTk5JlgtQW16LVNlY3VyaXR5LVRva2VuPWV5SmhiR2NpT2lKSVV6VXhNaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpoWTJObGMzTkxaWGtpT2lKQlJERTROalZGVURZMFJ6TXdSMFJSU0VOVk9DSXNJbVY0Y0NJNk1UY3pPVGt3TmpJME55d2ljR0Z5Wlc1MElqb2lZV1J0YVc0aWZRLmp6djBhdEY5QVBYXzVjYWg4c18yeXhVV3oxek9BekFzSVdzemVrUmZwcXlHd0RPWkptazlUSGJRUnBDdVNmLVMyU0otWTI1cldUd2hpNUlrY0xBSThRJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZ2ZXJzaW9uSWQ9bnVsbCZYLUFtei1TaWduYXR1cmU9MjcxZTkzOTE1MDkwYzUzYmRjYTg0MjQ1MTJhYjk3ZWQxZWMyN2QzM2MwM2U3NGUwYmRhNTBmYjQyNWI0N2MyOQ'
}
@ -32,7 +32,7 @@ export default {
onShareTimeline() {
return {
title: '邀请企业入驻', //
path: `/pages/login?invateId=${this.$store.getters.userId}`,
path: `/sub/invite/index?inviteId=${this.$store.getters.userId}`,
imageUrl:
'http://82.156.141.150:9001/api/v1/download-shared-object/aHR0cDovL2xvY2FsaG9zdDo5MDAwL2h1YW5iYW8vbWluaWFwcC9pbnZhdGUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUQxODY1RVA2NEczMEdEUUhDVTglMkYyMDI1MDIxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMThUMDcyMDI0WiZYLUFtei1FeHBpcmVzPTQzMTk5JlgtQW16LVNlY3VyaXR5LVRva2VuPWV5SmhiR2NpT2lKSVV6VXhNaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpoWTJObGMzTkxaWGtpT2lKQlJERTROalZGVURZMFJ6TXdSMFJSU0VOVk9DSXNJbVY0Y0NJNk1UY3pPVGt3TmpJME55d2ljR0Z5Wlc1MElqb2lZV1J0YVc0aWZRLmp6djBhdEY5QVBYXzVjYWg4c18yeXhVV3oxek9BekFzSVdzemVrUmZwcXlHd0RPWkptazlUSGJRUnBDdVNmLVMyU0otWTI1cldUd2hpNUlrY0xBSThRJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZ2ZXJzaW9uSWQ9bnVsbCZYLUFtei1TaWduYXR1cmU9MjcxZTkzOTE1MDkwYzUzYmRjYTg0MjQ1MTJhYjk3ZWQxZWMyN2QzM2MwM2U3NGUwYmRhNTBmYjQyNWI0N2MyOQ'
}

20
sub/task/enforce.vue

@ -122,25 +122,27 @@ export default {
* @param {Object} e
*/
async addPhoto(e) {
this.form.photo = e.file.map(p => {
return {
e.file.forEach(p => {
this.form.photo.push({
...p,
status: 'uploading',
message: '上传中'
}
})
})
// 使promise.all()
await Promise.all(
this.form.photo.map(async (p, i) => {
const res = await uploadFile({ name: `file`, filePath: p.url })
return {
...res.data,
status: 'success',
message: ''
if (p.status == 'uploading') {
const res = await uploadFile({ name: `file`, filePath: p.url })
return {
...res.data,
status: 'success',
message: ''
}
}
return p
})
).then(res => {
//
this.form.photo = res
})
},

Loading…
Cancel
Save