yujialong 10 months ago
parent 74831cceaf
commit 50791074c1
  1. 3
      apis/modules/parner.js
  2. 38
      apis/modules/user.js
  3. 2
      apis/request.js
  4. 4
      libs/share.js
  5. 19
      other/activityDetail/activityDetail.vue
  6. 22
      other/supplierDetail/supplierDetail.vue
  7. 16
      pages.json
  8. 4
      team/auth/auth.vue
  9. 188
      team/join/join.vue
  10. 44
      team/joinSuccess/joinSuccess.vue
  11. 9
      team/phone/phone.vue
  12. 36
      team/qrcode/qrcode.vue
  13. 46
      team/teams/teams.vue

@ -48,3 +48,6 @@ export const getTeamsByPlatformId = data => {
export const platformTeamAccountList = data => {
return post(`nakadai/kindergarten/platformTeamAccount/platformTeamAccountList`, data)
}
export const transferTeam = data => {
return post(`nakadai/kindergarten/platformTeamAccount/transferTeam`, data)
}

@ -68,30 +68,6 @@ export const userBinding = (data) => {
return post('users/users/user/userBinding', data)
}
export const examinePassword = (data) => {
return post('users/users/userAccount/examinePassword', data)
}
export const getUserRolesPermissionMenu = (data) => {
return get('users/users/user-role/getUserRolesPermissionMenu', data)
}
export const updatePersonCenter = (data) => {
return post('users/users/userAccount/updatePersonCenter', data)
}
export const queryUserInfoDetails = () => {
return get('users/users/userAccount/queryUserInfoDetails')
}
export const updateMyEmail = (data) => {
return post('nakadai/nakadai/partner-team/updateMyEmail', data)
}
export const mailCodeSend = (data) => {
return post('nakadai/nakadai/partner-team/mailCodeSend', data)
}
export const changeAccount = account => {
return post(`users/users/applets/mine/changeAccount?account=${account}`)
}
@ -116,16 +92,6 @@ export const getSessionKey = data => {
return post(`users/users/user/getSessionKey`, data)
}
export const partnerAccountApplication = data => {
return post(`nakadai/nakadai/partnerAccount/partnerAccountApplication`, data)
}
export const loginByOpenid = openid => {
return post(`users/users/user/loginByOpenid?openid=` + openid)
}
export const checkWorkNumOrAccount = account => {
return post(`occupationlab/occupationlab/architecture/checkWorkNumOrAccount?platformId=4&type=0&account=` + account)
export const inviteJoinOrganization = data => {
return post(`nakadai/kindergarten/platformTeamAccount/inviteJoinOrganization`, data)
}
export const updateUserAvatars = `http://39.108.250.202:9000/users/users/userAccount/updateUserAvatars`

@ -14,7 +14,7 @@ const request = options => {
const header = Object.assign({}, config.headers, {
token: uni.getStorageSync('token')
})
const otherUrl = ['queryPartnerAccount', 'getSessionKey', 'loginByOpenid', 'partnerAccountApplication', 'checkWorkNumOrAccount']
const otherUrl = []
return new Promise((resolve, reject)=>{
const { url } = options
uni.request({

@ -1,12 +1,10 @@
export default{
// 监听用户点击右上角菜单的「转发」按钮时触发的事件
onShareAppMessage(e) {
const pages = getCurrentPages()
const { route, $page } = pages[pages.length - 1]
// 设置转发的参数
return {
title: "GPAC",
path: route === 'other/activityDetail/activityDetail' ? $page : '',
path: '',
imageUrl: "",
success: function(res) {
if (res.errMsg == 'shareAppMessage:ok') {

@ -142,6 +142,25 @@
onLoad() {
this.focus = false
},
//
onShareAppMessage(e) {
const pages = getCurrentPages()
const { $page } = pages[pages.length - 1]
//
return {
title: "GPAC",
path: $page,
imageUrl: "",
success: function(res) {
if (res.errMsg == 'shareAppMessage:ok') {
console.log("成功", res)
}
},
fail: function(res) {
console.log("失败", res)
}
}
},
methods: {
//
getInfo() {

@ -2,7 +2,8 @@
<view class="wrap">
<view class="top">
<view class="name-wrap">
<image class="logo" :src="form.logoUrl ? form.logoUrl : Common.shopIcon"></image>
<image v-if="form.logoUrl" class="icon logo" :src="form.logoUrl"></image>
<image v-else class="icon" :src="Common.shopIcon"></image>
<view class="name ell2">{{ form.classificationName }}</view>
</view>
@ -27,7 +28,7 @@
</swiper-item>
</swiper>
</uni-swiper-dot>
<view class="des">{{ form.briefIntroduction }}</view>
<view class="des">{{ form.briefIntroduction || '暂无数据' }}</view>
<view class="title">联系我们</view>
<view class="info address">
@ -258,13 +259,18 @@
font-weight: 600;
color: #000;
}
.icon {
width: 80rpx;
min-width: 80rpx;
height: 80rpx;
margin-right: 20rpx;
border-radius: 50%;
object-fit: cover;
}
.logo {
width: 120rpx;
min-width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
border-radius: 50%;
object-fit: cover;
}
.slogan {
margin-top: 40rpx;
@ -301,15 +307,15 @@
}
.info {
display: flex;
align-items: flex-start;
align-items: center;
font-size: 26rpx;
color: #333;
&.address {
margin: 30rpx 0 20rpx;
}
.icon {
width: 40rpx;
min-width: 40rpx;
width: 30rpx;
min-width: 30rpx;
margin-right: 10rpx;
}
}

@ -250,6 +250,22 @@
"navigationBarTitleText" : "实名认证",
"enablePullDownRefresh" : false
}
},
{
"path" : "join/join",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
},
{
"path" : "joinSuccess/joinSuccess",
"style" :
{
"navigationBarTitleText" : "加入成功",
"enablePullDownRefresh" : false
}
}
]
}

@ -136,12 +136,12 @@
success: (res) => {
uni.setStorageSync('platformId', that.platformId)
const name = that.platformId == 6 ? '供应商' : '幼儿园'
that.$util.sucMsg(`您已成功提交${name}认证,现在为您切换到${name}端。`)
that.$util.errMsg(`您已成功提交${name}认证,现在为您切换到${name}端。`)
setTimeout(() => {
uni.switchTab({
url: '/pages/person/person'
})
}, 1500)
}, 2000)
},
fail: function(err) {
uni.showToast({

@ -0,0 +1,188 @@
<template>
<view class="wrap">
<view class="title">欢迎加入</view>
<view class="wel">
<image class="icon" src="http://124.71.79.122/images/miniProgram/house.png" mode="widthFix" />
<view class="text">{{ teamName + '邀请你加入他的团队' }}</view>
</view>
<view class="inner">
<view class="input">
<uni-easyinput type="text" v-model="form.name" placeholder="请输入你的真实姓名" :clearable="false" />
</view>
<view class="input">
<uni-easyinput type="number" v-model="form.phone" placeholder="请填写你的手机号" maxlength="11" :clearable="false" />
</view>
<view class="input code-wrap">
<uni-easyinput class="code" type="number" v-model="form.code" placeholder="验证码" maxlength="6" :clearable="false" />
<view class="send-code" @click="sendCode" :disabled="codeDisabled">{{ phoneBtnText }}</view>
</view>
<button class="submit" type="primary" @click="submit">立即加入</button>
</view>
</view>
</template>
<script>
import { sendPhoneOrEmailCode, inviteJoinOrganization } from '@/apis/modules/user.js'
export default {
data () {
return {
teamName: '',
form: {
accountId: '',
classificationId: '',
platformId: '',
phone: '',
code: '',
name: '',
},
rules: {
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' }
],
code: [
{ required: true, message: "请输入验证码", trigger: 'blur' }
]
},
repeat: false, //
codeDisabled: false,
phoneTimer: null,
phoneOpener: '',
phoneBtnText: '发送验证码',
submiting: false //
};
},
onShow () {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.teamName = options.teamName
this.form.accountId = options.accountId
this.form.classificationId = options.id
this.form.platformId = options.platformId
},
methods: {
//
verifyPhone (phone) {
if (!phone) {
this.$util.errMsg("请输入手机号")
return false
}
if (!/^1[3456789]\d{9}$/.test(phone) && !/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(phone)) {
this.$util.errMsg("请输入正确的手机号")
return false
}
return true
},
//
phoneCountdown () {
let count = 60
if (!this.phoneTimer) {
this.codeDisabled = true
this.phoneTimer = setInterval(() => {
if (count > 0) {
count--
this.phoneBtnText = `${count}秒后重试`
} else {
this.codeDisabled = false
clearInterval(this.phoneTimer)
this.phoneTimer = null
this.phoneBtnText = `发送验证码`
}
}, 1000)
}
},
//
sendCode () {
const { phone } = this.form
if (!this.verifyPhone(phone)) return false
sendPhoneOrEmailCode({
phone,
types: 2
}).then(({ message }) => {
if (message.opener) {
this.phoneCountdown()
this.phoneOpener = message.opener
} else {
this.$util.errMsg(message)
}
}).catch(res => { })
},
//
submit () {
if (this.submiting) return false
if (this.phoneRepeat) return this.$util.errMsg("该手机号已存在")
const { form } = this
form.uniqueIdentification = Date.now()
this.submiting = true
inviteJoinOrganization(form).then(res => {
this.$util.sucMsg('加入成功!')
setTimeout(() => {
uni.redirectTo({
url: '/team/joinSuccess/joinSuccess'
})
}, 1500)
}).catch(res => {
this.submiting = false
})
},
}
};
</script>
<style lang="scss" scoped>
.wrap {
margin: 100px 30rpx;
text-align: center;
border-radius: 6px;
background-color: #fff;
border-radius: 6px;
overflow: hidden;
.title {
padding: 15rpx 0;
font-size: 36rpx;
color: #fff;
background-color: $uni-primary;
}
.icon {
width: 120rpx;
margin: 50rpx 0 30rpx;
}
.text {
margin-bottom: 20rpx;
font-size: 28rpx;
color: #565656;
}
.inner {
padding: 20px;
}
.input {
margin-bottom: 30rpx;
input {
border-color: #dedede !important;
}
}
.code-wrap {
display: flex;
}
.code {
flex: 1;
}
.send-code {
width: 100px;
margin-left: 20px;
text-align: center;
color: #4386ff;
font-size: 12px;
line-height: 36px;
border: 1px solid #4386ff;
border-radius: 5px;
}
.submit {
width: 100%;
margin-top: 40rpx;
font-size: 36rpx;
background-color: $uni-primary;
border-color: #007eff;
border-radius: 20px;
}
}
</style>

@ -0,0 +1,44 @@
<template>
<view class="wrap">
<uni-icons type="checkbox-filled" size="50" color="#4876f9"></uni-icons>
<view class="tips">加入成功</view>
<view class="btn" @click="toLogin">前往登录</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
toLogin() {
uni.clearStorageSync()
this.$util.to('/pages/login/login')
}
}
}
</script>
<style lang="scss" scoped>
.wrap {
padding: 100rpx 30rpx;
text-align: center;
.tips {
margin: 10rpx 0 30rpx;
font-size: 30rpx;
color: $uni-primary;
}
.btn {
width: 100%;
line-height: 80rpx;
font-size: 30rpx;
text-align: center;
color: #fff;
border-radius: 10rpx;
background-color: $uni-primary;
}
}
</style>

@ -107,13 +107,6 @@
flex: 1;
}
.send-code {
width: 100px;
margin-left: 20px;
text-align: center;
color: #4386ff;
font-size: 12px;
line-height: 36px;
border: 1px solid #4386ff;
border-radius: 5px;
font-size: 24rpx;
}
</style>

@ -11,13 +11,15 @@
</view>
</view>
<view class="com">{{ team.partnerClassificationName }}</view>
<u-qrcode class="qrcode" ref="qrcode" canvas-id="qrcode" isQueueLoadImage :size="size" :value="link" @complete="qrcodeComplete"></u-qrcode>
<button class="share" open-type="share">邀请</button>
<!-- <u-qrcode class="qrcode" ref="qrcode" canvas-id="qrcode" isQueueLoadImage :size="size" :value="link" @complete="qrcodeComplete"></u-qrcode>
<image class="qrcode-img" :src="qrcodeImg" show-menu-by-longpress @click="previewImage"></image>
<view class="tips" style="margin-top: 20rpx;">扫一扫加入我们吧</view>
<view class="tips">长按可转发至微信好友和保存图片</view>
<view class="tips">长按可转发至微信好友和保存图片</view> -->
</view>
<view class="warn">邀请二维码失效日期{{ expireTime }}</view>
<!-- <view class="warn">邀请二维码失效日期{{ expireTime }}</view> -->
</view>
</view>
</template>
@ -30,6 +32,7 @@
data() {
return {
Common,
team: uni.getStorageSync('team'),
teamId: uni.getStorageSync('teamId'),
openId: uni.getStorageSync('openId'),
platformId: uni.getStorageSync('platformId'),
@ -39,12 +42,27 @@
link: '',
qrcodeImg: '',
size: uni.upx2px(420),
team: uni.getStorageSync('team')
}
},
onShow() {
this.getInfo()
},
//
onShareAppMessage(e) {
return {
title: "GPAC",
path: `/team/join/join?accountId=${this.team.accountId}&id=${this.teamId}&isTeam=0&teamName=${this.info.userName}&platformId=${this.platformId}`,
imageUrl: "",
success: function(res) {
if (res.errMsg == 'shareAppMessage:ok') {
console.log("成功", res)
}
},
fail: function(res) {
console.log("失败", res)
}
}
},
methods: {
//
async getInfo() {
@ -143,6 +161,16 @@
margin: 20rpx 0;
font-size: 30rpx;
}
.share {
width: 300rpx;
margin: 0;
font-size: 28rpx;
color: #fff;
text-align: center;
background-color: $uni-primary;
border-radius: 40rpx;
border: 0;
}
.qrcode {
display: none;
}

@ -21,6 +21,7 @@
</view>
</view>
<view v-if="item.isTeam == 1" class="tag">团队负责人</view>
<view v-if="item.isTeam != 1" class="btn" @click.stop="transfer(item)">转让超管</view>
</li>
</ul>
<uni-load-more :status="status" />
@ -34,7 +35,7 @@
</template>
<script>
import { platformTeamAccountList } from '@/apis/modules/parner.js'
import { platformTeamAccountList, transferTeam } from '@/apis/modules/parner.js'
export default {
data() {
return {
@ -47,7 +48,8 @@
keyword: '',
list: [],
page: 1,
pageSize: 10
pageSize: 10,
submiting: false
}
},
watch: {
@ -107,7 +109,35 @@
this.page = 1
this.reachBottom = 0
this.getList()
}
},
//
transfer(row) {
if (this.submiting) return false
this.submiting = true
const caption = this.list.find(e => e.isTeam === '1')
const that = this
uni.showModal({
title: '提示',
content: '确定要把管理员的角色转让为该成员吗?',
success(res) {
if (res.confirm) {
transferTeam({
adminManageId: caption.manageId,
adminTeamId: caption.classificationId,
memberManageId: row.manageId,
memberName: row.userName,
memberTeamId: row.classificationId
}).then(res => {
that.$util.sucMsg('转让成功')
that.initList()
that.submiting = false
}).catch(res => {})
} else {
that.submiting = false
}
}
})
},
}
}
</script>
@ -161,6 +191,16 @@
background-color: #2979ff;
border-radius: 20px;
}
.btn {
position: absolute;
bottom: 20rpx;
right: 40rpx;
padding: 8rpx 28rpx;
font-size: 28rpx;
color: #fff;
background-color: $uni-primary;
border-radius: 4px;
}
}
.plus {
position: fixed;

Loading…
Cancel
Save