|
|
|
@ -1,67 +1,81 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="container"> |
|
|
|
|
<uni-card :is-shadow="false" :border="false" is-full> |
|
|
|
|
<uni-card :is-shadow="false" :border="false" padding="0" is-full> |
|
|
|
|
<view class="form"> |
|
|
|
|
<view class="line"> |
|
|
|
|
<uni-data-checkbox v-model="myVal" :localdata="checkList" @change="myChange"></uni-data-checkbox> |
|
|
|
|
<text>我的邮箱</text> |
|
|
|
|
<uni-easyinput v-model="form.contact" disabled /> |
|
|
|
|
<uni-easyinput v-model="email" disabled /> |
|
|
|
|
</view> |
|
|
|
|
<view class="line"> |
|
|
|
|
<uni-data-checkbox v-model="otherVal" :localdata="checkList" @change="otherChange"></uni-data-checkbox> |
|
|
|
|
<text>其他邮箱</text> |
|
|
|
|
<uni-easyinput v-model="form.contact" placeholder="请输入其他邮箱" /> |
|
|
|
|
<uni-easyinput v-model="otherEmail" placeholder="请输入其他邮箱" /> |
|
|
|
|
</view> |
|
|
|
|
<button type="primary" @click="submit('valiForm')">确认</button> |
|
|
|
|
<button type="primary" @click="submit">确认</button> |
|
|
|
|
</view> |
|
|
|
|
</uni-card> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { mailFileSend } from '@/apis/modules/parner.js' |
|
|
|
|
import { my } from '@/apis/modules/parner.js' |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
id: '', |
|
|
|
|
email: '', |
|
|
|
|
otherEmail: '', |
|
|
|
|
myVal: 1, |
|
|
|
|
otherVal: 2, |
|
|
|
|
checkList: [{ |
|
|
|
|
text: '', |
|
|
|
|
value: 1 |
|
|
|
|
}], |
|
|
|
|
form: { |
|
|
|
|
name: '', |
|
|
|
|
provience: '', |
|
|
|
|
city: '', |
|
|
|
|
industryId: '', |
|
|
|
|
age: '', |
|
|
|
|
introduction: '', |
|
|
|
|
sex: 2, |
|
|
|
|
hobby: [5], |
|
|
|
|
datetimesingle: 1627529992399 |
|
|
|
|
} |
|
|
|
|
files: [ |
|
|
|
|
'人工智能实验室建设方案-2020.1.docx', |
|
|
|
|
'大数据管理与应用专业建设方案.docx', |
|
|
|
|
'金融科技实验室建设方案V2.0.docx' |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
|
console.log(getApp()) |
|
|
|
|
onShow() { |
|
|
|
|
const pages = getCurrentPages() |
|
|
|
|
const { options } = pages[pages.length - 1] |
|
|
|
|
this.id = options.id |
|
|
|
|
this.getInfo() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 获取个人信息 |
|
|
|
|
getInfo() { |
|
|
|
|
const team = uni.getStorageSync('team') |
|
|
|
|
my({ |
|
|
|
|
partnerId: team.partnerId, |
|
|
|
|
teamId: team.teamId |
|
|
|
|
}).then(({ my }) => { |
|
|
|
|
this.email = my.info.email |
|
|
|
|
}).catch(e => {}) |
|
|
|
|
}, |
|
|
|
|
myChange(e) { |
|
|
|
|
this.otherVal = '' |
|
|
|
|
console.log('---------onchange:', e); |
|
|
|
|
}, |
|
|
|
|
otherChange(e) { |
|
|
|
|
this.myVal = '' |
|
|
|
|
console.log('---------onchange:', e); |
|
|
|
|
}, |
|
|
|
|
submit(ref) { |
|
|
|
|
this.$refs[ref].validate().then(res => { |
|
|
|
|
console.log('success', res); |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: `校验通过` |
|
|
|
|
}) |
|
|
|
|
}).catch(err => { |
|
|
|
|
console.log('err', err); |
|
|
|
|
}) |
|
|
|
|
// 提交 |
|
|
|
|
submit() { |
|
|
|
|
const { otherEmail } = this |
|
|
|
|
if (this.otherVal && !otherEmail) return this.$util.errMsg('请输入邮箱!') |
|
|
|
|
mailFileSend({ |
|
|
|
|
copyWriting: this.files[this.id], |
|
|
|
|
mail: this.myVal ? this.email : otherEmail |
|
|
|
|
}).then(res => { |
|
|
|
|
this.$util.sucMsg('发送成功!') |
|
|
|
|
setTimeout(() => { |
|
|
|
|
uni.navigateBack() |
|
|
|
|
}, 1000) |
|
|
|
|
}).catch(e => {}) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|