yujialong 11 months ago
parent acd91b5d0a
commit d2a0fb0517
  1. 2
      apis/modules/user.js
  2. 21
      config/common.js
  3. 1
      other/activityDetail/activityDetail.vue
  4. 172
      other/supplierDetail/supplierDetail.vue
  5. 2
      pages.json
  6. 14
      pages/index/index.vue
  7. 48
      pages/login/login.vue
  8. 43
      pages/person/person.vue
  9. 11
      pages/supplier/supplier.vue
  10. 17
      team/auth/auth.vue
  11. 1
      team/info/info.vue
  12. 17
      team/infoEdit/infoEdit.vue
  13. 13
      team/personAuth/personAuth.vue
  14. 4
      team/userName/userName.vue

@ -52,7 +52,7 @@ export const queryCity = (data) => {
}
export const updateAvatars = data => {
return post(`users/users/user/updateAvatars?openId=${data.openId}&url=${data.url}&userName=${data.userName}`)
return post(`users/users/user/updateAvatars?openId=${data.openId}&url=${data.url}&userName=${data.userName}&platformId=7`)
}
export const sendPhoneOrEmailCode = (data) => {

@ -25,7 +25,7 @@ export default {
name: '供应商'
},
],
// 认证状态
// 审核状态
auditStatus: [
{
id: null,
@ -48,4 +48,23 @@ export default {
name: '不通过'
},
],
// 认证状态
authenticationStatus: [
{
id: null,
name: '不限'
},
{
id: 0,
name: '未认证'
},
{
id: 1,
name: '认证中'
},
{
id: 2,
name: '已认证'
},
],
}

@ -248,6 +248,7 @@
.label {
min-width: 180rpx;
font-size: 28rpx;
text-align: right;
}
.val {
font-size: 28rpx;

@ -1,21 +1,19 @@
<template>
<view class="wrap">
<view class="banner-wrap bg-wh">
<view class="pic-wrap">
<image class="pic" :src="form.mall.coverDrawing" mode="widthFix"></image>
<view class="pro-title">{{ form.mall.productName }}</view>
</view>
<view class="top">
<view class="name">{{ form.classificationName }}</view>
</view>
<view class="detail">
<ul class="tabs">
<li :class="{active: curTab === 0}" @click="tabChange(0)">主页</li>
<li :class="{active: curTab === 1, disabled: !form.interfaceDiagram}" @click="tabChange(1)">商品</li>
<li :class="{active: curTab === 1}" @click="tabChange(1)">商品</li>
</ul>
</view>
<view v-if="!curTab" class="detail">
<view class="title">公司简介</view>
<view v-html="form.briefIntroduction"></view>
</view>
<view v-else class="list">
<!-- <view class="item">
@ -51,10 +49,11 @@
</template>
<script>
import { queryTeamInfo } from '@/apis/modules/user.js'
export default {
data() {
return {
id: '',
teamId: '',
curTab: 0,
tabs: [
{
@ -71,13 +70,8 @@
}
],
form: {
classificationIds: [],
interfaceDiagram: [],
mall: {
coverDrawing: ''
},
goodsRes: {},
mallAnnex: []
classificationName: '',
briefIntroduction: ''
},
shopCartTotal: 0,
types: [],
@ -97,129 +91,25 @@
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.id = options.id
this.teamId = options.teamId
this.getInfo()
this.getShopCart()
this.getTypes()
},
methods: {
//
getInfo() {
async getInfo() {
uni.showLoading({
title: '加载中'
})
detailsOfGoods(this.id).then(res => {
const e = res.orderDetails
e.mall.productIntroduction = this.$util.removeTag(e.mall.productIntroduction)
// e.mall.detailedIntroduction = this.$util.removeTag(e.mall.detailedIntroduction)
this.form = e
const pics = this.form.mall.interfaceDiagram
if (pics) {
this.form.interfaceDiagram = pics.split(',')
// this.tabs.push({
// name: '',
// id: 1
// })
}
// this.form.mallAnnex && this.form.mallAnnex.length && this.tabs.push({
// name: '',
// id: 2
// })
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
const res = await queryTeamInfo({
teamId: this.teamId
})
},
//
getShopCart() {
shoppingCartList({
pageNum: 1,
pageSize: 1000,
}).then(({ data }) => {
this.shopCartTotal = data.total
}).catch(e => {})
},
//
getTypes() {
productCategoryList().then(res => {
this.types = res.classificationList
}).catch(e => {})
this.form = res.teamInfo
uni.hideLoading()
},
// tab
tabChange(id) {
this.curTab = id
},
//
downloadAll() {
const fileName = []
const urls = []
this.form.mallAnnex.forEach(e => {
fileName.push(e.fileName)
urls.push(e.filePath)
})
uni.setStorageSync('files', {
copyWriting: this.form.mall.productName,
fileName,
urls
})
this.$util.to(`/team/send/send`)
},
//
download(item) {
uni.setStorageSync('files', {
copyWriting: this.form.mall.productName,
fileName: [item.fileName],
urls: [item.filePath]
})
this.$util.to(`/team/send/send`)
},
//
addShop() {
uni.showLoading({
title: '加载中'
})
addToShoppingCart({
mallId: this.id
}).then(res => {
this.$util.sucMsg('加购成功')
uni.hideLoading()
this.getShopCart()
}).catch(e => {
uni.hideLoading()
})
},
//
order() {
const { mall } = this.form
const classificationId = this.form.classificationIds[0]
const authority = this.$util.getOrderType(classificationId)
//
uni.setStorageSync('courses', [{
dataOrCourseId: mall.associatedProduct, // id
mallId: mall.mallId,
productName: mall.productName, //
periodOfUse: '', // 使
startTime: this.$util.formatDate(new Date(), 'yyyy-MM-dd'), //
endTime: '', //
remainingPeriod: '', //
marketValue: '', //
marketPrice: mall.marketUnitPrice, //
finalPrice: 0, //
finalValue: 0, //
discountRate: '0%', //
accountNum: 1, //
totalAmount: '', //
isEnable: 0, // 10
ship: 0, // 01
authority, //
options: 2,
miniProgramPictureAddress: mall.appletIcon || '', //
settlementPrice: 0, //
settlementPriceUnit: 0, //
serviceFee: 0 //
}])
this.$util.to(`../orderDetail/orderDetail?shopCart=1`)
}
}
}
</script>
@ -228,38 +118,10 @@
.wrap {
padding-bottom: 140rpx;
}
.banner-wrap {
width: 100%;
border-radius: 0px 0px 20px 20px;
.pic-wrap {
padding: 20rpx 32rpx;
border-bottom: 1px solid #E2E2E2;
}
.pic {
width: 100%;
}
.pro-title {
margin-top: 22rpx;
.top {
padding: 20rpx;
.name {
font-size: 30rpx;
font-weight: 600;
color: #333;
}
.fields {
padding: 26rpx 32rpx;
}
.field {
display: flex;
align-items: center;
font-size: 28rpx;
color: #333;
&:first-child {
margin-bottom: 22rpx;
}
.icon {
width: 36rpx;
height: 36rpx;
margin-right: 12rpx ;
}
}
}
.tabs {

@ -150,7 +150,7 @@
"path" : "certified/certified",
"style" :
{
"navigationBarTitleText" : "幼儿园认证",
"navigationBarTitleText" : "认证",
"enablePullDownRefresh" : false
}
},

@ -2,7 +2,7 @@
<view :class="[{oh: !per}]">
<view class="page">
<view class="search-wrap">
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="initList" @clear="clearKeyword" />
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="initList" />
<view>
<uni-icons type="notification" size="20"></uni-icons>
</view>
@ -43,8 +43,8 @@
</view>
<view v-if="!per" class="per-mask">功能升级中敬请期待...</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog mode="input" placeholder="请输入4位数邀请码" :duration="2000" :before-close="true" @close="closePopup" @confirm="codeSubmit"></uni-popup-dialog>
<!-- <uni-popup ref="popup" type="dialog">
<uni-popup-dialog mode="input" placeholder="请输入4位数邀请码" :duration="2000" :before-close="true" @close="closePopup" @confirm="codeSubmit"></uni-popup-dialog> -->
</uni-popup>
</view>
</template>
@ -127,6 +127,9 @@
},
//
getList() {
uni.showLoading({
title: '加载中'
})
postLoginActivity({
pageNum: this.page,
pageSize: this.pageSize,
@ -142,11 +145,14 @@
this.now = await Util.getNow()
this.statusInterval()
uni.hideLoading()
this.timer = setInterval(() => {
this.now = new Date(this.now.setSeconds(this.now.getSeconds() + 1))
this.statusInterval()
}, 1000)
}).catch(e => {})
}).catch(e => {
uni.hideLoading()
})
},
async statusInterval () {
this.list.map(item => {

@ -116,6 +116,7 @@
this.submiting = false
//
if (state === 'bind') {
this.submiting = false
this.code = code
this.openid = sessionKey.openid
this.sessionKey = sessionKey.session_key
@ -159,6 +160,7 @@
const phone = data.phoneNumber
this.phone = phone
if (this.isReg) { //
this.submiting = false
this.$refs.popup.open('bottom')
} else { //
userBinding({
@ -198,28 +200,34 @@
},
//
async toReg(platformId) {
const { data } = await kindergartenWeChatApplication({
code: this.code,
openId: this.openid,
platformId,
phone: this.phone
})
this.teamName = data.teamName
uni.setStorageSync('token', data.token)
uni.setStorageSync('platformId', platformId)
uni.setStorageSync('openId', data.openId)
uni.setStorageSync('teamId', data.teamId)
//
if (platformId === 5 || platformId === 6) {
await saveCertification({
openId: data.openId,
auditStatus: 0,
platformSource: platformId,
companyName: this.teamName
if (this.submiting) return false
this.submiting = true
try {
const { data } = await kindergartenWeChatApplication({
code: this.code,
openId: this.openid,
platformId,
phone: this.phone
})
this.teamName = data.teamName
uni.setStorageSync('token', data.token)
uni.setStorageSync('platformId', platformId)
uni.setStorageSync('openId', data.openId)
uni.setStorageSync('teamId', data.teamId)
//
if (platformId === 5 || platformId === 6) {
await saveCertification({
openId: data.openId,
auditStatus: 0,
platformSource: platformId,
companyName: this.teamName
})
}
this.toIndex()
} catch(e) {
this.submiting = false
}
this.toIndex()
},
toAgreement(id) {
this.$util.openFile(id)

@ -4,7 +4,7 @@
<image class="bg" src="https://occupationlab.com/images/preschoolEdu/person-bg.png" />
<view class="team-wrap" :style="{paddingTop: headerTop}">
<view v-if="platformId !== 7" class="team">
<view v-if="platformId !== 7 && teams.length" class="team">
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="teams" :map="{text: 'classificationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker>
</view>
</view>
@ -15,8 +15,8 @@
<image class="avatar" :src="info.userAvatars" mode=""></image>
</button>
<view class="text">
<view class="name">{{ curAccount.account || userName }}</view>
<view class="phone">{{ curAccount.phone }}</view>
<view class="name">{{ info.userName || userName }}</view>
<view class="phone">{{ curAccount.account || info.phone }}</view>
</view>
<view class="auth" @click="toAuth">
{{ info.authentication }}
@ -86,7 +86,6 @@
<view v-if="!isMember" class="badge">{{ platformName }}负责人</view>
<view class="auth">{{ auditStatus }}</view>
</view>
<view v-if="enterInfo.companyName" class="company-name">{{ enterInfo.companyName }}</view>
<view class="identity-bg">
<image v-if="isPreschool" class="pic" src="https://occupationlab.com/images/preschoolEdu/preschool1.png" mode="widthFix" />
<image v-else class="pic" src="https://occupationlab.com/images/preschoolEdu/supplier1.png" mode="widthFix" />
@ -177,7 +176,9 @@
auditStatus: '',
isMember: true, //
organizationName: '',
curAccount: {}
curAccount: {
account: ''
}
}
},
computed: {
@ -211,6 +212,16 @@
const { result } = await viewUserDetails({
openId: this.openId
})
// statusfalse退
if (result.status === false) {
this.$util.errMsg(result.message)
setTimeout(() => {
uni.clearStorageSync()
this.$util.to('/pages/login/login')
}, 1500)
return false
}
if (result.hrUserInfo) {
if (!result.hrUserInfo.userAvatars) result.hrUserInfo.userAvatars = Common.avatar //
this.info = result.hrUserInfo
@ -224,13 +235,18 @@
if (accountList && accountList.length) {
const enter = accountList.find(e => e.platformId !== '7')
this.curAccount = enter || accountList[0]
//
if (!enter) {
uni.setStorageSync('platformId', 7)
this.platformId = 7
}
}
},
//
async getEnterInfo() {
const { data } = await enterpriseCertificationStatus(this.openId)
if (data) {
this.auditStatus = Common.auditStatus.find(e => e.id === data.auditStatus).name
this.auditStatus = Common.authenticationStatus.find(e => e.id === data.authenticationStatus).name
this.enterInfo = data
}
},
@ -272,7 +288,8 @@
updateAvatars({
url,
userName: '',
openId: this.openId
openId: this.openId,
platformId: this.platformId,
}).then(res => {
this.getInfo()
}).catch(e => {})
@ -287,9 +304,9 @@
},
//
toEnterAuth(platformId) {
const { auditStatus, platformSource } = this.enterInfo
const { authenticationStatus, platformSource } = this.enterInfo
// (0 1.2.3.)
if (auditStatus === 1) {
if (authenticationStatus === 1) {
if (platformSource != platformId) {
//
this.$util.errMsg(`您已提交我是${platformId === 5 ? '供应商' : '幼儿园'}的认证,无法再提交${platformId === 5 ? '幼儿园' : '供应商'}认证。`)
@ -297,7 +314,7 @@
this.$util.errMsg('您已提交认证,请等待审核。')
}
} else {
this.$util.to(auditStatus === 2 ? '/team/certified/certified' : '/team/auth/auth?platformId=' + platformId)
this.$util.to(authenticationStatus === 2 ? '/team/certified/certified' : '/team/auth/auth?platformId=' + platformId)
}
},
//
@ -402,12 +419,6 @@
width: 25%;
margin-bottom: 30rpx;
text-align: center;
&:last-child {
image {
width: 50rpx;
height: 50rpx;
}
}
}
image {
width: 60rpx;

@ -119,6 +119,9 @@
},
//
getList() {
uni.showLoading({
title: '加载中'
})
selectEnterpriseCertificationList({
auditStatus: null,
authenticationStatus: 2,
@ -132,7 +135,10 @@
const noMore = this.list.length === data.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {})
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
},
// keyword
clearKeyword() {
@ -141,7 +147,7 @@
},
//
toDetail(item) {
this.$util.to('/other/supplierDetail/supplierDetail?id=' + item.id)
this.$util.to('/other/supplierDetail/supplierDetail?teamId=' + item.teamId)
},
// tab
tabChange(tab) {
@ -199,6 +205,7 @@
color: #999;
}
.meta {
margin: 10rpx 0;
font-size: 28rpx;
color: #333;
}

@ -114,7 +114,10 @@
if (!form.companyName) return this.$util.errMsg(`请输入${platformName}名称!`)
if (!form.creditCode) return this.$util.errMsg('请输入统一社会信用代码!')
if (!form.legalPerson) return this.$util.errMsg('请输入法人!')
this.submiting = false
this.submiting = true
uni.showLoading({
title: '提交中'
})
const data = {
...form,
auditStatus: 1,
@ -144,15 +147,15 @@
classificationName: form.companyName
})
}
this.$util.sucMsg('提交成功,请重新登录!')
setTimeout(() => {
uni.clearStorageSync()
this.$util.to('/pages/login/login')
}, 1500)
} catch(e) {
uni.hideLoading()
this.submiting = false
}
this.$util.sucMsg('提交成功,请重新登录!')
setTimeout(() => {
uni.clearStorageSync()
this.$util.to('/pages/login/login')
}, 1500)
},
}
}

@ -92,7 +92,6 @@
getInfo() {
queryTeamInfo({
teamId: this.teamId
// teamId: 281
}).then(res => {
const data = res.teamInfo
if (!data.logoUrl) data.logoUrl = Common.avatar

@ -123,6 +123,7 @@
provinces: [],
cities: [],
desPics: [],
submiting: false
}
},
computed: {
@ -233,18 +234,24 @@
},
//
async submit() {
if (this.submiting) return false
const { form } = this
if (!form.classificationName) return this.$util.errMsg(`请输入幼儿园名称!`)
this.submiting = true
form.pictureUrl = this.desPics.map(e => e.url).join()
form.qrCodeOneUrl = this.qrCodeOne.length ? this.qrCodeOne[0].url : ''
form.qrCodeTwoUrl = this.qrCodeTwo.length ? this.qrCodeTwo[0].url : ''
form.qrCodeThreeUrl = this.qrCodeThree.length ? this.qrCodeThree[0].url : ''
await updateTeamInfo(form)
try {
await updateTeamInfo(form)
this.$util.sucMsg('保存成功!')
setTimeout(() => {
uni.navigateBack()
}, 1500)
this.$util.sucMsg('保存成功!')
setTimeout(() => {
uni.navigateBack()
}, 1500)
} catch(e) {
this.submiting = false
}
}
}
}

@ -55,7 +55,8 @@
theFrontOfIDCard: 'https://occupationlab.com/images/preschoolEdu/credentials1.png',
reverseOfIDCard: 'https://occupationlab.com/images/preschoolEdu/credentials2.png',
frontData: {},
backData: {}
backData: {},
submiting: false
}
},
onShow() {
@ -111,9 +112,14 @@
});
},
submit() {
if (this.submiting) return false
const { form } = this
if (!form.userName) return this.$util.errMsg('请输入姓名!')
if (!form.idCardNo) return this.$util.errMsg('请输入证件号!')
this.submiting = true
uni.showLoading({
title: '提交中'
})
const { frontData } = this
const { backData } = this
realNameAuthentication({
@ -136,7 +142,10 @@
url: '/pages/person/person'
})
}, 1500)
}).catch(e => {})
}).catch(e => {
uni.hideLoading()
this.submiting = false
})
},
}
}

@ -12,6 +12,7 @@
export default {
data() {
return {
platformId: uni.getStorageSync('platformId'),
info: {
userName: ''
},
@ -37,7 +38,8 @@
await updateAvatars({
url: '',
userName,
openId: this.openId
openId: this.openId,
platformId: this.platformId,
})
this.$util.sucMsg('修改成功!')
setTimeout(() => {

Loading…
Cancel
Save