yujialong 12 months ago
parent 0893a628ef
commit 724c037db5
  1. 26
      apis/modules/article.js
  2. 17
      apis/modules/user.js
  3. 2
      config/request.js
  4. 2
      index.html
  5. 2
      manifest.json
  6. 8
      pages.json
  7. 35
      pages/index/index.vue
  8. 216
      pages/login/login.vue
  9. 161
      pages/person/person.vue
  10. 6
      pages/supplier/supplier.vue
  11. BIN
      static/image/person-bg.png
  12. BIN
      static/image/person1.png
  13. BIN
      static/image/person2.png
  14. BIN
      static/image/person26.png
  15. BIN
      static/image/person27.png
  16. BIN
      static/image/person3.png
  17. BIN
      static/image/person4.png
  18. BIN
      static/image/person5.png
  19. BIN
      static/image/person6.png
  20. BIN
      static/image/person7.png
  21. BIN
      static/image/person8.png
  22. BIN
      static/image/person9.png
  23. BIN
      static/image/product.png
  24. BIN
      static/image/workbench/index1.png
  25. BIN
      static/image/workbench/index10.png
  26. BIN
      static/image/workbench/index11.png
  27. BIN
      static/image/workbench/index12.png
  28. BIN
      static/image/workbench/index2.png
  29. BIN
      static/image/workbench/index3.png
  30. BIN
      static/image/workbench/index4.png
  31. BIN
      static/image/workbench/index5.png
  32. BIN
      static/image/workbench/index6.png
  33. BIN
      static/image/workbench/index7.png
  34. BIN
      static/image/workbench/index8.png
  35. BIN
      static/image/workbench/index9.png
  36. 29
      styles/common.scss
  37. 212
      team/article/article.vue
  38. 25
      team/auth/auth.vue
  39. 5
      team/certified/certified.vue
  40. 24
      team/infoEdit/infoEdit.vue
  41. 169
      team/personAuth/personAuth.vue
  42. 2
      team/setting/setting.vue

@ -1,26 +0,0 @@
import request from '@/apis/request.js'
const { get, post } = request
export const partnerOperatingList = (data) => {
return post('nakadai/nakadai/partner/article/management/partnerOperatingList', data)
}
export const findById = id => {
return post('nakadai/nakadai/applets/partner/browse?contentId=' + id)
}
export const queryClassificationByType = id => {
return post('nakadai/nakadai/partner/article/classification/queryClassificationByType?typeId=' + id)
}
export const schemeList = data => {
return post('nakadai/nakadai/partner/schemeManagement/schemeList', data)
}
export const schemeFindById = id => {
return post('nakadai/nakadai/partner/schemeManagement/findById?id=' + id)
}
export const collectCourse = (id, state) => {
return post('nakadai/nakadai/partner/article/management/collectCourse?contentId=' + id + '&state=' + state)
}

@ -2,7 +2,22 @@ import request from '@/apis/request.js'
const { get, post } = request
export const login = (data) => {
return post('users/users/user/weChatAppletCallbackByPartner', data)
return post('nakadai/kindergarten/platformTeamAccount/weChatAppletCallbackByKindergarten', data)
}
export const kindergartenWeChatApplication = (data) => {
return post('nakadai/kindergarten/platformTeamAccount/kindergartenWeChatApplication', data)
}
export const realNameAuthentication = (data) => {
return post(`users/users/autonym/realNameAuthentication`, data)
}
export const faceAuthenticationByObject = (data) => {
return post(`users/users/autonym/faceAuthenticationByObject`, data)
}
export const faceAuthentication = (data) => {
return post(`users/users/autonym/faceAuthentication?imgFile=${data.imgFile}&side=${data.side}`)
}
export const authenticationOrNot = (data) => {
return post(`users/users/autonym/authenticationOrNot`)
}
export const queryProvince = () => {

@ -6,7 +6,7 @@
export default {
// baseURL: 'https://huorantech.cn/',
baseURL: 'http://192.168.31.217:10010/',
baseURL: 'http://192.168.31.51:10010/',
// baseURL: 'http://121.37.12.51/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'

@ -4,6 +4,8 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
<!-- <script src="https://occupationlab.com/images/preschoolEdu/image-resize.min.js"></script>
<script src="https://occupationlab.com/images/preschoolEdu/quill.min.js"></script> -->
<!--preload-links-->
<!--app-context-->
</head>

@ -49,7 +49,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx2b506fdb0eeee65d",
"appid" : "wxd210bb4686c9c580",
"setting" : {
"urlCheck" : false,
"es6" : true,

@ -162,6 +162,14 @@
"navigationBarTitleText" : "幼儿园认证",
"enablePullDownRefresh" : false
}
},
{
"path" : "personAuth/personAuth",
"style" :
{
"navigationBarTitleText" : "实名认证",
"enablePullDownRefresh" : false
}
}
]
}

@ -35,6 +35,7 @@
<view class="meta ell">主办方{{ item.sponsor }}</view>
<view v-if="item.whetherToShowApplicants === '1'" class="meta ell">{{ item.applicantNum }}/{{ item.quantityLimit }}人已报名</view>
<view v-if="item.signing" class="sign" @click.stop="presign(item)">报名</view>
<view v-if="!item.whetherToSignUp" class="sign signed" @click.stop="cancelSign(item)">取消报名</view>
</view>
</view>
</view>
@ -49,7 +50,7 @@
</template>
<script>
import { postLoginActivity, individualEventRegistration } from '@/apis/modules/activity.js'
import { postLoginActivity, individualEventRegistration, cancelRegistration } from '@/apis/modules/activity.js'
import Util from '@/libs/util'
export default {
data() {
@ -68,6 +69,7 @@
timer: null,
now: '',
invitationCode: '',
submiting: false,
tabs: [
{
name: '全部',
@ -112,7 +114,7 @@
}
},
onShow() {
uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzAyMjg4MDEzLCJleHAiOjE3MDMxNTIwMTMsImFjY291bnRJZCI6IjEifQ.3dZSZAG7w8tSPU9DBL0VdULgkQmiZpYVzjf1qfxx5HY')
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzAyMjg4MDEzLCJleHAiOjE3MDMxNTIwMTMsImFjY291bnRJZCI6IjEifQ.3dZSZAG7w8tSPU9DBL0VdULgkQmiZpYVzjf1qfxx5HY')
this.keyword = ''
this.per = true
this.initList()
@ -209,6 +211,27 @@
this.invitationCode = value
this.sign()
},
//
cancelSign(row) {
if (this.submiting) return false
this.submiting = true
const that = this
uni.showModal({
title: '提示',
content: '确定要取消报名吗?',
success(res) {
if (res.confirm) {
cancelRegistration(row.id).then(res => {
that.$util.sucMsg('取消报名成功')
that.initList()
that.submiting = false
}).catch(res => {})
} else {
that.submiting = false
}
}
})
}
}
}
</script>
@ -225,9 +248,6 @@
width: 100%;
}
}
.hot {
width: 100%;
}
.module {
margin: 20rpx;
padding: 20rpx;
@ -277,11 +297,14 @@
position: absolute;
bottom: 0;
right: 0;
padding: 10rpx 30rpx;
padding: 8rpx 28rpx;
font-size: 28rpx;
color: #fff;
background-color: $uni-primary;
border-radius: 4px;
}
.signed {
background-color: #ff7b32;
}
}
</style>

@ -22,11 +22,41 @@
<text @click="toAgreement(1)">用户隐私协议</text>
</view>
</view>
<uni-popup ref="popup" :is-mask-click="false">
<view class="type-wrap">
<view class="title-wrap">
<view class="title">请选择注册类型</view>
<uni-icons class="close" type="closeempty" size="20" color="#333"></uni-icons>
</view>
<view class="types">
<view class="item">
<view class="icon">
<image class="img" src="https://occupationlab.com/images/preschoolEdu/role-icon1.png" mode="widthFix" />
</view>
<view class="text">我是幼儿园</view>
</view>
<view class="item item2">
<view class="icon">
<image class="img" src="https://occupationlab.com/images/preschoolEdu/role-icon2.png" mode="widthFix" />
</view>
<view class="text">我是供应商</view>
</view>
<view class="item item3" @click="toReg">
<view class="icon">
<image class="img" src="https://occupationlab.com/images/preschoolEdu/role-icon3.png" mode="widthFix" />
</view>
<view class="text">我是个人</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import { login, userBinding, getSessionKey, queryPartnerAccount } from '@/apis/modules/user.js'
import { login, userBinding, getSessionKey, kindergartenWeChatApplication } from '@/apis/modules/user.js'
import WXBizDataCrypt from '@/libs/WXBizDataCrypt'
export default {
data() {
@ -41,12 +71,12 @@
sessionKey: '',
openid: '',
unionid: '',
code: '',
submiting: false
}
},
onShow() {
uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzAyMjg4MDEzLCJleHAiOjE3MDMxNTIwMTMsImFjY291bnRJZCI6IjEifQ.3dZSZAG7w8tSPU9DBL0VdULgkQmiZpYVzjf1qfxx5HY')
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNzAyMjg4MDEzLCJleHAiOjE3MDMxNTIwMTMsImFjY291bnRJZCI6IjEifQ.3dZSZAG7w8tSPU9DBL0VdULgkQmiZpYVzjf1qfxx5HY')
//
this.checkLogin()
},
@ -78,25 +108,28 @@
this.submiting = true
login({
code,
avatarUrl: userInfo.avatarUrl
}).then((res) => {
const { data, status } = res
avatarUrl: userInfo.avatarUrl,
}).then(({ data }) => {
const { sessionKey, state } = data
this.submiting = false
//
if (status == 10028) {
if (state === 'bind') {
this.code = code
this.openid = sessionKey.openid
this.isLogin = true
this.isReg = true
// unilogincode
uni.login({
success: ({ code }) => {
getSessionKey({
code,
}).then(({ sessionKey }) => {
this.sessionKey = sessionKey.session_key
this.openid = sessionKey.openid
this.isLogin = true
}).catch(e => {})
this.isReg = true
}
})
// uni.login({
// success: ({ code }) => {
// getSessionKey({
// code,
// }).then(({ sessionKey }) => {
// this.sessionKey = sessionKey.session_key
// this.openid = sessionKey.openid
// }).catch(e => {})
// this.isReg = true
// }
// })
} else {
const e = data.sessionKey
this.sessionKey = e.session_key
@ -142,7 +175,7 @@
this.submiting = true
const phone = data.phoneNumber
if (this.isReg) { //
this.$util.to(`../reg/reg?openid=${this.openid}&phone=${phone}`)
this.$refs.popup.open('bottom')
} else { //
userBinding({
openid: this.openid,
@ -180,47 +213,52 @@
}
},
//
toReg() {
this.isReg = true
if (this.agree.length) {
const that = this
uni.getUserProfile({
lang: 'zh_CN',
desc: '登录',
success: ({ userInfo }) => {
console.log(22, userInfo)
uni.setStorageSync('userName', userInfo.nickName)
uni.setStorageSync('avatar', userInfo.avatarUrl)
uni.login({
success: ({ code }) => {
if (code) {
this.submiting = true
getSessionKey({
code,
}).then(({ sessionKey }) => {
console.log(11, sessionKey)
this.sessionKey = sessionKey.session_key
this.openid = sessionKey.openid
this.submiting = false
this.isLogin = true
async toReg() {
const res = await kindergartenWeChatApplication({
code: this.code,
openId: this.openid,
platformId: 7
})
// this.isReg = true
// if (this.agree.length) {
// const that = this
// uni.getUserProfile({
// lang: 'zh_CN',
// desc: '',
// success: ({ userInfo }) => {
// console.log(22, userInfo)
// uni.setStorageSync('userName', userInfo.nickName)
// uni.setStorageSync('avatar', userInfo.avatarUrl)
// uni.login({
// success: ({ code }) => {
// if (code) {
// this.submiting = true
// getSessionKey({
// code,
// }).then(({ sessionKey }) => {
// console.log(11, sessionKey)
// this.sessionKey = sessionKey.session_key
// this.openid = sessionKey.openid
// this.submiting = false
// this.isLogin = true
}).catch(e => {
this.submiting = false
})
} else {
this.submiting = false
that.$util.errMsg('登录失败!')
}
}
})
},
fail(res) {
that.$util.errMsg('登录授权失败!')
}
})
} else {
this.$util.errMsg('请先阅读勾选协议!')
}
// }).catch(e => {
// this.submiting = false
// })
// } else {
// this.submiting = false
// that.$util.errMsg('')
// }
// }
// })
// },
// fail(res) {
// that.$util.errMsg('')
// }
// })
// } else {
// this.$util.errMsg('')
// }
},
toAgreement(id) {
this.$util.openFile(id)
@ -326,4 +364,62 @@
}
}
}
.type-wrap {
width: 100%;
padding: 30rpx 30rpx 60rpx;
background-color: #fff;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
box-sizing: border-box;
.title-wrap {
display: flex;
justify-content: space-between;
}
.title {
font-size: 28rpx;
color: #333;
}
.types {
width: 95%;
margin: 0 auto;
font-size: 24rpx;
color: #fff;
text-align: center;
}
.item {
display: flex;
align-items: center;
height: 150rpx;
padding: 0 50rpx;
margin-top: 30rpx;
border-radius: 12px;
background: url('https://occupationlab.com/images/preschoolEdu/role-bg1.png') 0 0/100% 100% no-repeat;
box-sizing: border-box;
}
.icon {
display: inline-flex;
justify-content: center;
align-items: center;
padding: 10rpx;
margin-right: 20rpx;
background-color: #fff7f1;
border-radius: 50%;
}
.img {
width: 80rpx;
}
.text {
font-size: 24rpx;
color: #fff;
}
.item2 {
background-image: url('https://occupationlab.com/images/preschoolEdu/role-bg2.png');
}
.item3 {
background: #ffb150;
.img {
width: 70rpx;
}
}
}
</style>

@ -1,15 +1,19 @@
<template>
<view class="page">
<view class="status-bar"></view>
<image class="bg" src="https://occupationlab.com/images/preschoolEdu/person-bg.png"></image>
<image class="bg" src="https://occupationlab.com/images/preschoolEdu/person-bg.png" />
<view class="wrap">
<view class="info">
<button class="avatar-btn" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar" :src="avatar" mode=""></image>
</button>
<view class="text">
<view class="name">{{ my.info.userName }}</view>
<view class="phone">{{ my.info.phone }}</view>
<view class="name">{{ info.realName }}</view>
<view class="phone">1369641301</view>
</view>
<view class="auth" @click="toAuth">
{{ isAuth ? '' : '待' }}实名认证
<uni-icons class="icon" type="right" size="16" color="#4876f9"></uni-icons>
</view>
<view v-if="!disabled" class="tag">团队负责人</view>
</view>
@ -45,16 +49,20 @@
</ul>
</view>
<view class="block">
<view class="supplier">
<view v-if="role" class="block" style="padding-bottom: 0;">
<view class="identity">
<view class="title">我是供应商</view>
<view class="badge">供应商负责人</view>
<view class="auth" @click="toPage('/team/certified/certified')">未认证</view>
</view>
</view>
<view class="block" style="padding-bottom: 0;">
<view class="identity-bg">
<image class="pic" src="https://occupationlab.com/images/preschoolEdu/vip.png" mode="widthFix" />
<view class="open">
立即开通
<uni-icons class="icon" type="right" size="12" color="#c5530d"></uni-icons>
</view>
</view>
<view class="title">工作台</view>
<ul class="func">
@ -97,10 +105,29 @@
</ul>
</view>
<template v-else>
<view class="types">
<view class="item">
<view class="icon">
<image class="img" src="https://occupationlab.com/images/preschoolEdu/role-icon1.png" mode="widthFix" />
</view>
<view class="text">我是幼儿园</view>
</view>
</view>
<view class="types">
<view class="item item2">
<view class="icon">
<image class="img" src="https://occupationlab.com/images/preschoolEdu/role-icon2.png" mode="widthFix" />
</view>
<view class="text">我是供应商</view>
</view>
</view>
</template>
<view class="list">
<view class="item" @click="toPage(`/team/setting/setting`)">
<view class="left">
<image class="icon" src="@/static/image/person3.png" mode=""></image>
<image class="icon" src="https://occupationlab.com/images/preschoolEdu/setting.png" mode=""></image>
<text class="name">设置</text>
</view>
</view>
@ -112,7 +139,7 @@
<script>
import { my, editProvinceCity } from '@/apis/modules/parner.js'
import { queryProvince, queryCity, updateAvatars, getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import { authenticationOrNot, queryProvince, queryCity, updateAvatars, getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import { getTeamsByAccountId } from '@/apis/modules/client.js'
export default {
data() {
@ -120,28 +147,19 @@
per: true, //
teamId: uni.getStorageSync('teamId') || '',
teams: [],
my: {
info: {
userName: '谢道韫',
phone: '1356413671'
},
teamInfo: {
annualMarketingFee: '',
annualTeamFee: '',
},
myIncome: 0,
teamIncome: 0
},
info: {},
// avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png',
avatar: 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png',
userName: uni.getStorageSync('userName'),
hasOwnTeam: 0, //
disabled: true,
isAuth: false,
role: 0
}
},
onShow() {
this.per = true
// this.getTeam()
this.getAuthOrNot()
},
methods: {
//
@ -152,6 +170,14 @@
this.getInfo()
}
},
//
async getAuthOrNot() {
const res = await authenticationOrNot()
if (res.authenticationInformation) {
this.isAuth = true
this.info = res.authenticationInformation
}
},
//
getAuth() {
uni.showLoading({
@ -269,6 +295,10 @@
toPage(href) {
this.$util.to(href)
},
//
toAuth() {
this.isAuth || this.toPage('/team/personAuth/personAuth')
},
//
tips() {
this.$util.errMsg('功能暂未开放!')
@ -299,7 +329,7 @@
}
.info {
display: flex;
align-items: center;
align-items: flex-start;
padding: 26rpx 0;
.avatar-btn {
padding: 0;
@ -321,11 +351,24 @@
.name {
margin-bottom: 10rpx;
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.phone {
font-size: 26rpx;
color: #333;
color: #5d5d5d;
}
.auth {
display: inline-flex;
align-items: center;
padding: 4rpx 16rpx;
font-size: 24rpx;
color: $uni-primary;
border: 1px solid #8ca5eb;
border-radius: 20px;
.icon {
color: $uni-primary;
}
}
.tag {
padding: 8rpx 16rpx;
@ -363,7 +406,7 @@
color: #333;
}
}
.supplier {
.identity {
display: flex;
justify-content: space-between;
align-items: center;
@ -382,6 +425,25 @@
color: #9c9c9c;
}
}
.identity-bg {
position: relative;
margin: 20rpx 0 50rpx;
.pic {
width: 100%;
}
.open {
position: absolute;
top: 46rpx;
right: 20rpx;
display: flex;
align-items: center;
padding: 8rpx 14rpx;
font-size: 22rpx;
color: #c5530d;
background-color: #f9cf9d;
border-radius: 20px;
}
}
.list {
margin-top: 16rpx;
.item {
@ -407,13 +469,44 @@
color: #333;
}
}
.location {
margin-top: 30rpx;
}
.picker-wrap {
margin-top: 4px;
}
.name {
.types {
margin: 30rpx 0;
font-size: 24rpx;
color: #fff;
text-align: center;
.item {
display: flex;
align-items: center;
height: 150rpx;
padding: 0 50rpx;
border-radius: 12px;
background: url('https://occupationlab.com/images/preschoolEdu/role-bg1.png') 0 0/100% 100% no-repeat;
box-sizing: border-box;
}
.icon {
display: inline-flex;
justify-content: center;
align-items: center;
padding: 10rpx;
margin-right: 20rpx;
background-color: #fff7f1;
border-radius: 50%;
}
.img {
width: 80rpx;
}
.text {
font-size: 24rpx;
color: #fff;
}
.item2 {
background-image: url('https://occupationlab.com/images/preschoolEdu/role-bg2.png');
}
.item3 {
background: #ffb150;
.img {
width: 70rpx;
}
}
}
</style>

@ -66,15 +66,15 @@
name: '家具'
},
{
id: 4,
id: 5,
name: '设备'
},
{
id: 4,
id: 6,
name: '服务'
},
{
id: 4,
id: 7,
name: '其它'
},
],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 773 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

@ -89,8 +89,8 @@ ul {
}
.form-list {
.line {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
padding: 28rpx 0;
border-bottom: 1px solid #E6E8ED;
@ -102,28 +102,29 @@ ul {
font-size: 28rpx;
color: #999;
}
.with-arrow {
.val {
display: inline-flex;
align-items: center;
}
.arrow {
margin-left: 15rpx;
}
.arrow {
position: absolute;
right: 0;
}
.name {
min-width: 200rpx;
white-space: nowrap;
font-size: 28rpx;
color: #4a4a4a;
}
.val, input, textarea {
font-size: 28rpx;
color: #333;
&.edit-form {
.name {
color: #666;
}
}
.val {
font-size: 26rpx;
color: #a9a9a9;
}
input, textarea {
flex: 1;
margin-left: 20rpx;
text-align: right;
font-size: 28rpx;
color: #333;
}
.textarea-line {
align-items: flex-start;

@ -1,212 +0,0 @@
<template>
<view>
<image class="banner" :src="form.bannerImg" mode="widthFix"></image>
<view class="wrap">
<view class="title">{{ form.title }}</view>
<view class="metas">
<template v-if="isInfo">
<view class="meta">{{ form.source }}</view>
<view class="meta">{{ form.releaseTime }}</view>
</template>
<view v-else class="meta">
<uni-icons class="icon" type="eye" size="22" color="#007FFF"></uni-icons>
{{ form.totalBrowsing }}人学过
</view>
<!-- <view class="meta" @click.stop="collect">
<uni-icons class="icon" :type="form.collectionStatus ? 'star-filled' : 'star'" size="22" color="#007eff"></uni-icons>
</view> -->
<view v-if="form.labelNameList" class="labels">
<view v-for="(label, j) in form.labelNameList" :key="j" class="label">{{ label }}</view>
</view>
</view>
<view class="text">
<mp-html :content="form.mainBody"/>
</view>
<view v-if="form.fileList" class="files">
<view v-for="(file, i) in form.fileList" :key="i" class="item" @click="download(file)">
<view class="file">{{ file.fileName }}</view>
<view class="download">下载</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { findById, collectCourse } from '@/apis/modules/article.js'
export default {
data() {
return {
id: '',
isInfo: 0, //
form: {
totalBrowsing: ''
}
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.id = options.id
this.isInfo = options.info
options.info && uni.setNavigationBarTitle({
title: '资讯'
})
this.getInfo()
},
methods: {
//
getInfo() {
uni.showLoading({
title: '加载中'
})
findById(this.id).then(({ message }) => {
const str = message.mainBody
const newStyle = 'width: 85% !important; height: auto;';
const regex = /(<img[^>]*?\s+style=")([^"]*)("[^>]*?>)/g;
const newStr = str.replace(regex, `$1${newStyle}$3`);
const videoStr = this.replaceAllVideoTagStyles(str, "width: 95%; height: 450rpx;display: block;margin:0 auto")
const imgStr = this.addImgStyle(videoStr)
message.mainBody = imgStr
this.form = message
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
},
getAllVideoTagIndices(str) {
const regex = /<video.*?>.*?<\/video>/gs;
const indices = [];
let match;
while ((match = regex.exec(str)) !== null) {
indices.push(match.index);
}
return indices;
},
// videostyle
replaceVideoTagStyle(str, index, newStyle) {
const startIndex = str.indexOf("<video", index);
const endIndex = str.indexOf("</video>", startIndex) + 7;
const videoTag = str.substring(startIndex, endIndex);
const newVideoTag = videoTag.replace(/style="(.*?)"/, `style="${newStyle}"`);
return str.substring(0, startIndex) + newVideoTag + str.substring(endIndex);
},
// videostyle
replaceAllVideoTagStyles(str, newStyle) {
const indices = this.getAllVideoTagIndices(str);
let newStr = str;
for (let i = indices.length - 1; i >= 0; i--) {
newStr = this.replaceVideoTagStyle(newStr, indices[i], newStyle);
}
return newStr;
},
addImgStyle(str) {
      return str.replace(/<(img).*?(\/>|<\/img>)/g, function (a) {
        if (a.indexOf('style') < 0) {
          // style
          return a.replace(/<\s*img/, '<img style="width:100%"');
        } else {
          // style
          return a.replace(/style=("|')/, 'style=$1width: 85% !important; height: auto;')
        }
      });
    },
//
download(item) {
uni.setStorageSync('files', {
copyWriting: this.form.title,
fileName: [item.fileName],
urls: [item.filePath]
})
this.$util.to(`/team/send/send`)
},
//
collect() {
const state = this.form.collectionStatus ? 0 : 1
collectCourse(this.form.id, state).then(({ data }) => {
this.form.collectionStatus = state
}).catch(e => {})
},
}
}
</script>
<style scoped lang="scss">
.wrap {
padding: 30rpx;
background-color: #fff;
}
.banner {
width: 100%;
}
.title {
font-size: 34rpx;
font-weight: 600;
color: #333;
}
.metas {
display: flex;
justify-content: space-between;
margin: 20rpx 0;
.labels {
display: inline-flex;
align-items: center;
flex-wrap: wrap;
margin: 15rpx;
}
.label {
padding: 2px 6px;
margin: 0 20rpx 15rpx 0;
font-size: 24rpx;
color: #fff;
background-color: #ccc;
border-radius: 4px;
}
.meta {
display: inline-flex;
align-items: center;
white-space: nowrap;
font-size: 24rpx;
color: #ccc;
}
.icon {
margin-right: 8rpx;
}
}
.text {
font-size: 28rpx;
line-height: 1.6;
text-align: justify;
p{
width: 100%;
}
img,image{
width: 100% !important;
}
/deep/ image,img {
margin: 0 auto;
}
}
.files {
margin-top: 20rpx;
.item {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.file {
margin-right: 20rpx;
font-size: 26rpx;
color: #5a5a5a;
}
.download {
font-size: 26rpx;
color: #007EFF;
}
}
</style>

@ -4,24 +4,18 @@
<view class="form-list">
<view class="line with-arrow">
<view class="name">幼儿园名称</view>
<view class="val">
<input type="text" placeholder="请输入幼儿园名称" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<input type="text" placeholder="请输入幼儿园名称" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line with-arrow">
<view class="name">统一社会信用代码</view>
<view class="val">
<input type="text" placeholder="请输入证件号码" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<input type="text" placeholder="请输入证件号码" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line with-arrow">
<view class="name">法人</view>
<view class="val">
<input type="text" placeholder="请输入法人" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<input type="text" placeholder="请输入法人" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
</view>
</view>
@ -53,7 +47,7 @@
}
},
onShow() {
this.getInfo()
// this.getInfo()
},
methods: {
//
@ -106,4 +100,9 @@
.credential {
width: 100%;
}
.form-list {
.name {
min-width: 250rpx;
}
}
</style>

@ -70,4 +70,9 @@
color: #333;
}
}
.form-list {
.name {
min-width: 250rpx;
}
}
</style>

@ -1,27 +1,23 @@
<template>
<view>
<view class="block">
<view class="form-list">
<view class="form-list edit-form">
<view class="line with-arrow">
<view class="name">LOGO</view>
<view class="val" @click="uploadLogo">
<view @click="uploadLogo">
<image class="avatar" :src="logo"></image>
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
</view>
<view class="line with-arrow">
<view class="name">幼儿园名称</view>
<view class="val">
<input type="text" placeholder="请输入幼儿园名称" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<input type="text" placeholder="请输入幼儿园名称" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line with-arrow">
<view class="name">标签</view>
<view class="val">
<input type="text" placeholder="请输入标签" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<input type="text" placeholder="请输入标签" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line textarea-line">
<view class="name">幼儿园slogan</view>
@ -33,6 +29,9 @@
</view>
<view class="line textarea-line">
<view class="name">幼儿园简介</view>
<!-- <editor id="editor" class="ql-container" placeholder="请输入幼儿园简介" show-img-size show-img-toolbar
show-img-resize @ready="onEditorReady">
</editor> -->
<textarea placeholder="请输入幼儿园简介"></textarea>
</view>
</view>
@ -86,6 +85,11 @@
}
});
},
onEditorReady() {
uni.createSelectorQuery().select('#editor').context((res) => {
this.editorCtx = res.context
}).exec()
},
//
submit() {

@ -0,0 +1,169 @@
<template>
<view class="page">
<view class="block">
<view class="title">上传身份证正面照片</view>
<image class="credential" :src="theFrontOfIDCard" mode="widthFix" @click="uploadFront"></image>
</view>
<view class="block">
<view class="title">上传身份证反面照片</view>
<image class="credential" :src="reverseOfIDCard" mode="widthFix" @click="uploadBack"></image>
</view>
<view class="block">
<view class="form-list">
<view class="line with-arrow">
<view class="name">姓名</view>
<input type="text" placeholder="请输入名称" v-model="form.userName" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line with-arrow">
<view class="name">手机号</view>
<input type="text" placeholder="请输入手机号" v-model="form.phone" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
<view class="line">
<view class="name">证件类型</view>
<view class="val">身份证</view>
</view>
<view class="line with-arrow">
<view class="name">证件号</view>
<input type="text" placeholder="请输入证件号" v-model="form.idCardNo" />
<uni-icons type="right" size="18" color="#ababab"></uni-icons>
</view>
</view>
</view>
<view class="btn-wrap">
<view class="btn" @click="submit">认证信息</view>
</view>
</view>
</template>
<script>
import { realNameAuthentication, faceAuthenticationByObject, faceAuthentication } from '@/apis/modules/user.js'
import OSS from '@/libs/Oss/upload'
export default {
data() {
return {
form: {
userName: '',
idCardNo: '',
phone: '',
},
theFrontOfIDCard: 'https://occupationlab.com/images/preschoolEdu/credentials1.png',
reverseOfIDCard: 'https://occupationlab.com/images/preschoolEdu/credentials2.png',
frontData: {},
backData: {}
}
},
onShow() {
// this.getInfo()
},
methods: {
//
getInfo() {
const { partnerId, teamId } = uni.getStorageSync('team')
my({
partnerId,
teamId
}).then(({ my }) => {
this.info = my.info
}).catch(e => {})
},
//
uploadFront() {
const that = this
uni.chooseImage({
success: (res) => {
const file = res.tempFilePaths[0];
OSS(file, async (name) => {
that.theFrontOfIDCard = name
const { data } = await faceAuthentication({
imgFile: name,
side: 'face'
})
if (data) {
that.frontData = data
that.form.userName = data.name
that.form.idCardNo = data.num
}
})
}
});
},
//
uploadBack() {
const that = this
uni.chooseImage({
success: (res) => {
const file = res.tempFilePaths[0];
OSS(file, async (name) => {
that.reverseOfIDCard = name
const { data } = await faceAuthentication({
imgFile: name,
side: 'back'
})
that.backData = data
})
}
});
},
submit() {
const { form } = this
if (!form.userName) return this.$util.errMsg('请输入姓名!')
if (!form.idCardNo) return this.$util.errMsg('请输入证件号!')
const { frontData } = this
const { backData } = this
realNameAuthentication({
address: frontData.address,
birthday: frontData.birth,
endDate: backData.end_date,
frontOfIdCard: this.theFrontOfIDCard,
idCardNo: frontData.num,
issue: backData.issue,
nationality: frontData.nationality,
realName: frontData.name,
reverseOfIdCard: this.reverseOfIDCard,
sex: frontData.sex,
startDate: backData.start_date,
}).then(res => {
this.$util.sucMsg('认证成功!')
setTimeout(() => {
uni.switchTab({
url: '/pages/person/person'
})
}, 1500)
}).catch(e => {})
},
}
}
</script>
<style scoped lang="scss">
.page {
padding-bottom: 170rpx;
-webkit-overflow-scrolling: touch;
}
.avatar {
width: 80rpx;
height: 80rpx;
border: 0;
border-radius: 50%;
}
.block {
padding: 24rpx;
}
.title {
margin-bottom: 20rpx;
font-size: 28rpx;
}
.credential {
width: 100%;
}
.form-list {
.name {
// min-width: 250rpx;
}
}
</style>

@ -42,7 +42,7 @@
}
},
onShow() {
this.getInfo()
// this.getInfo()
},
methods: {
//

Loading…
Cancel
Save