Commit 9f6abe71 by yuzhenWang

Merge branch 'feature-20250731wyz-修改bug' into 'uat'

Feature 20250731wyz 修改bug

See merge request !63
parents ae1170b8 4f69162c
<script> <script>
import initApp from "@/util/router.js"; import initApp from "@/util/router.js";
import {interceptor} from "@/util/interceptor"; import {interceptor} from "@/util/interceptor";
import {baseURL,apiURL,cffpURL,companyInfo} from "@/environments/environment"; import {baseURL,apiURL,cffpURL,companyInfo} from "@/environments/environment";
import api from './api/api'; import api from './api/api';
import {hshare} from '@/util/fiveshare'; import {hshare} from '@/util/fiveshare';
export default { export default {
data() { data() {
return { return {
invitationHandled: false // 在data中明确定义 invitationHandled: false ,// 在data中明确定义,
dataToken:'',
} }
}, },
onLaunch: function() { onLaunch: function() {
console.log('App Launch'); console.log('App Launch');
if(!uni.getStorageSync('loginType')){ if(!uni.getStorageSync('loginType')){
console.log('走进来了');
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor'); uni.setStorageSync('loginType','visitor');
} }
// 处理外部链接参数 // 处理外部链接参数
...@@ -79,8 +80,36 @@ ...@@ -79,8 +80,36 @@
onShow: function(options) { onShow: function(options) {
console.log('App Show', options); console.log('App Show', options);
// 每次进应用显示时检查用户状态 if(this.dataToken){
this.checkUserStatus();
const params = {
loginType:'5',
authToken:this.dataToken.replace(/\%/g, ' ')
// authToken:'zuihuibi eyJhbGciOiJIUzUxMiJ9.eyJVc2VySWQiOjEyODMsImNyZWF0ZWQiOjE3NTQ2NDk1MDA5NzIsImV4cCI6MTc1NzI0MTUwMH0.udjBlMY4FswgBU7zv9jD-zK8ANGR1KKXk_DiJEQkwhiC9DYwxAc7wAp6BWIKY_oiNr58QJqDtBAJ85bGOcCpeQ'
}
api.loginVerification(params).then((res)=>{
if(res['success']){
uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', res.data.userId);
uni.setStorageSync('uni-token', res.data['token']);
this.checkUserStatus();
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
return
}else {
// 每次进应用显示时检查用户状态
this.checkUserStatus();
}
// App平台从options获取参数 // App平台从options获取参数
// #ifdef APP-PLUS // #ifdef APP-PLUS
if(options && options.query) { if(options && options.query) {
...@@ -92,7 +121,8 @@ ...@@ -92,7 +121,8 @@
console.log('App Hide') console.log('App Hide')
}, },
methods: { methods: {
// 检查用户状态的方法
// 检查用户状态的方法 防止多端操作导致此用户不存在
async checkUserStatus() { async checkUserStatus() {
// 只有已登录用户才需要检查 // 只有已登录用户才需要检查
if(uni.getStorageSync('loginType') == 'codelogin' && uni.getStorageSync('cffp_userId')) { if(uni.getStorageSync('loginType') == 'codelogin' && uni.getStorageSync('cffp_userId')) {
...@@ -128,15 +158,12 @@ ...@@ -128,15 +158,12 @@
} }
} }
if (res['success']) { if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = { const cffp_userInfo = {
name: res['data']['realName'], ...res.data
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
} }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)) uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
uni.setStorageSync('userinfodataForm', res.data);
} }
} catch (err) { } catch (err) {
console.error('检查用户状态失败:', err); console.error('检查用户状态失败:', err);
...@@ -148,7 +175,7 @@ ...@@ -148,7 +175,7 @@
}, },
// 清除登录状态 // 清除登录状态
clearLoginState() { clearLoginState() {
uni.clearStorageSync(); // uni.clearStorageSync();
uni.setStorageSync('loginType', 'visitor'); uni.setStorageSync('loginType', 'visitor');
this.checkToken() this.checkToken()
// 可以在这里添加其他需要清除的状态 // 可以在这里添加其他需要清除的状态
...@@ -238,6 +265,17 @@ ...@@ -238,6 +265,17 @@
// 使用uni.setStorageSync存储到本地 // 使用uni.setStorageSync存储到本地
try { try {
// #ifdef H5
if(params.dataToken){
this.dataToken = params.dataToken
}
// #endif
// #ifdef MP-WEIXIN
if(params.dataToken){
this.dataToken = uni.getStorageSync('hoservice_token')
}
// #endif
if(params.addSystemType){ if(params.addSystemType){
uni.setStorageSync('addSystemType', params.addSystemType); uni.setStorageSync('addSystemType', params.addSystemType);
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<image style="width: 80rpx;height: 80rpx;" src="../../static/Slice3.png" mode=""></image> <image style="width: 80rpx;height: 80rpx;" src="../../static/Slice3.png" mode=""></image>
</view> </view>
</view> </view>
<restrictedTip ref="restrictedTip"/>
</view> </view>
</template> </template>
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
import common from '../../common/common'; import common from '../../common/common';
import {companyInfo} from "@/environments/environment"; import {companyInfo} from "@/environments/environment";
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue'
export default { export default {
props:{ props:{
wayType:{ wayType:{
...@@ -47,8 +48,15 @@ ...@@ -47,8 +48,15 @@
// 哪个地方中用到了这个登录 // 哪个地方中用到了这个登录
loginSource:{ loginSource:{
type:String, type:String,
},
// 哪个页面中用到了这个登录
pageSource:{
type:String,
} }
}, },
components:{
restrictedTip
},
data() { data() {
return { return {
agreeFlag:false, agreeFlag:false,
...@@ -132,6 +140,11 @@ ...@@ -132,6 +140,11 @@
} }
api.loginVerification(params).then((res)=>{ api.loginVerification(params).then((res)=>{
if(res['success']){ if(res['success']){
// 禁用账号,不让登录
if(res.data.userIsActive == 2){
this.$refs.restrictedTip.open()
return
}
this.userId = String(res['data']['userId']); this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1'); uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin'); uni.setStorageSync('loginType','codelogin');
...@@ -140,7 +153,7 @@ ...@@ -140,7 +153,7 @@
this.loginTypeSync = "codelogin"; this.loginTypeSync = "codelogin";
this.queryInfo() this.queryInfo()
uni.$emit('loginUpdate'); uni.$emit('loginUpdate');
this.$emit('afterLogin')
}else{ }else{
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
...@@ -170,12 +183,9 @@ ...@@ -170,12 +183,9 @@
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{ api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if (res['success']) { if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = { const cffp_userInfo = {
name: res['data']['realName'], ...res.data
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
} }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)) uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
this.closebootpage() this.closebootpage()
......
<template>
<uni-popup ref="popup" type="center" background-color="#fff" v-if="visible">
<!-- 你的弹窗内容 -->
<view class="joinContent">
<view class="title">{{ title }}</view>
<view class="joinHeader" >
<view class="iconfont icon-exclamation" ></view>
</view>
<view class="joinCon">
<view class="one">{{ content }}</view>
<view class="qrCode" v-if="showCode">
<image src="@/static/images/customer.jpg" mode="widthFix"></image>
</view>
</view>
<view class="joinFotter">
<view @click="handleConfirm">{{ confirmText }}</view>
</view>
</view>
</uni-popup>
</template>
<script>
import {shareURL} from "@/environments/environment";
export default {
name: 'restrictedTip',
props: {
title: String,
content: {
type: String,
default: '您的账号处在不可用状态,请扫码添加客服咨询情况'
},
showCode: {
type: Boolean,
default: true
},
confirmText: {
type: String,
default: '我知道了'
}
},
data() {
return {
visible: false
}
},
methods: {
open() {
this.visible = true
this.$nextTick(() => {
this.$refs.popup.open() // 确保DOM渲染后再打开
})
},
close() {
this.visible = false
},
handleConfirm() {
this.close()
this.$emit('confirm')
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .uni-popup .uni-popup__wrapper{
margin: 0 !important;
border-radius: 30rpx;
}
.joinContent {
width: 550rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
.title{
text-align: center;
width: 100%;
}
.joinHeader {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background: #FFC300;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
.icon-exclamation{
color: #fff;
font-size: 30rpx;
}
}
.joinCon {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 10rpx;
box-sizing: border-box;
.one {
font-size: 28rpx;
color: #F43530;
text-align: center;
margin-bottom: 10rpx;
}
.qrCode{
width: 50%;
image{
width: 100rpx;
}
}
.two {
color: rgba(145, 144, 148, 1);
font-size: 26rpx;
text-align: center;
margin-top: 10rpx;
margin-bottom: 20rpx;
}
}
.joinFotter {
width: 100%;
color: #fff;
display: flex;
align-items: center;
flex-direction: column;
box-sizing: border-box;
font-size: 26rpx;
view {
width: 80%;
background: rgba(54, 57, 169, 1);
border-radius: 40rpx;
padding: 20rpx;
text-align: center;
margin-top: 20rpx;
}
}
.horizontal{
flex-direction: row;
justify-content: space-between;
view{
width: auto;
border-radius:15rpx;
}
}
}
</style>
\ No newline at end of file
<template> <template>
<view class="wrapper"> <view class="wrapper">
<restrictedTip ref="restrictedTip"/>
<view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin"> <view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin">
<view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view> <view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view>
<!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> --> <!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> -->
...@@ -183,7 +184,7 @@ ...@@ -183,7 +184,7 @@
uni.setStorageSync('cffp_userId',this.userId); uni.setStorageSync('cffp_userId',this.userId);
uni.setStorageSync('loginType',this.loginType); uni.setStorageSync('loginType',this.loginType);
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
if(urlType == 'personalCenter'){ if(urlType == 'personalCenter'){
uni.switchTab({ uni.switchTab({
url:'/pages/personalCenter/personalCenter' url:'/pages/personalCenter/personalCenter'
......
...@@ -16,16 +16,27 @@ ...@@ -16,16 +16,27 @@
</view> </view>
</view> </view>
</view> </view>
<restrictedTip
ref="restrictedOrCanelTip"
:showCode="false"
confirmText="知道了"
content="您已解约,无需重复操作"
@confirm="$refs.restrictedOrCanelTip.close()"
/>
</view> </view>
</template> </template>
<script> <script>
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
props: { props: {
menuList: { menuList: {
type: Array type: Array
} }
}, },
components:{
restrictedTip
},
data() { data() {
return {} return {}
}, },
...@@ -50,7 +61,14 @@ ...@@ -50,7 +61,14 @@
} }
} }
}); });
} else if (item.link != null) { } else if (item.isJump) {
console.log('333333',item)
this.$refs.restrictedOrCanelTip.open()
// uni.navigateTo({
// url: item.link
// });
return
}else if (item.link != null) {
uni.navigateTo({ uni.navigateTo({
url: item.link url: item.link
}); });
......
<template>
<view class="applyBox">
<view style="height: 550rpx;">
<view class="inputBox">
<view class="txt">
<text class="require">*</text>昵称 <text class="desTxt">(用于邀请好友及统计业绩显示)</text>
</view>
<view class="">
<input
class="user-input"
maxlength="10"
type="text"
placeholder="请输入2~10个字符"
v-model="form.nickName"
:disabled="editNickName"
/>
</view>
</view>
<view class="inputBox">
<view class="txt">
<text class="require">*</text>手机号码 <text class="desTxt">(账号唯一标识)</text>
</view>
<view class="codeBox">
<input
type="number"
class="user-input"
name="mobileNo"
placeholder="请输入手机号"
v-model="form.mobile"
maxlength="11"
:disabled="editMobile"
/>
<text
:class="{'grey':disabledSendBtn}"
@click.stop="sendMessage()"
v-if="loginType=== 'visitor'"
>
{{sendCodeHtml}}
</text>
</view>
</view>
<view class="inputBox" v-if="loginType=== 'visitor'">
<view class="txt">
<text class="require">*</text>验证码
</view>
<view class="">
<input
type="number"
class="user-input"
name="mobileNo"
placeholder="请输入短信验证码"
v-model="form.code"
maxlength="6"
/>
</view>
</view>
<view class="protol">
<view class="empty" v-if="!agreeFlag" @click="agreeFlag=true"></view>
<text v-else class="iconfont icon-icon_duihao-mian" @click="agreeFlag=false"></text>
<text style="color: #666;">我已阅读并同意</text>
<text style="color: #20269B;" @click="getFile(1)">服务协议</text>
<text style="color: #666666;"></text>
<text style="color: #20269B;" @click="getFile(2)">隐私条款</text>
</view>
</view>
<view class="btnBox" @click="$emit('apply')">
{{loginType=='codelogin'?'确认加盟':'注册并加盟'}}
</view>
</view>
</template>
<script>
import api from '@/api/api';
import * as environment from "@/environments/environment";
import common from '@/common/common';
import dataHandling from "@/util/dataHandling";
export default {
props: {
// 弹窗内容
form: {
type: Object,
},
editNickName: {
type: Boolean,
default:false,
},
editMobile: {
type: Boolean,
default:false,
},
},
data() {
return {
companyInfo:environment.companyInfo,
imgType:environment.companyInfo.imgType,
baseURL:environment.baseURL,
agreeFlag:false,
sendCodeHtml:'发送验证码',
disabledSendBtn:false,
timer:null,
remainTimes:60,
loginType:uni.getStorageSync('loginType'),
}
},
onLoad(options){
this.loginType=uni.getStorageSync('loginType')
},
onShow(){
if(uni.getStorageSync('loginType')){
this.loginType = uni.getStorageSync('loginType')
}
},
methods: {
getqueryById(shareId){
api.queryById({id:shareId}).then(res =>{
this.form.nickName = res.data.data.name
this.form.mobile = res.data.data.mobileNumber
this.editNickName = this.editMobile = true
})
},
jumpPage(){
uni.switchTab({
url:'/pages/index/index'
})
this.$refs.successJoinPopup.close()
this.$refs.everyJoinPopup.close()
},
getFile(type){
let typeName = type==1?'服务协议':type==2?'隐私条款':''
// dataHandling.pocessTracking(
// '查看协议',
// `查看${typeName}`,
// '点击',
// 2,
// '申请加盟',
// 'pages/saleCourseLists/saleCourseLists'
// )
uni.navigateTo({
url:`/myPackageA/ruleAndContract/clause?type=${type}`
})
},
c_agreeFlag(){
this.agreeFlag=!this.agreeFlag;
},
delayTime() {
this.disabledSendBtn = true;
this.timer = setInterval(() => {
this.remainTimes--;
this.sendCodeHtml = `${this.remainTimes}(S)`;
if (this.remainTimes <= 0) {
this.sendCodeHtml = '获取验证码';
this.remainTimes = 60;
this.disabledSendBtn = false;
clearInterval(this.timer);
}
}, 1000);
},
sendMessage(){
const params = {
mobileNo:this.form.mobile,
type:"1",
source: "cffp"
}
if(common.mobileNoValid(this.form.mobile)){
if(!this.disabledSendBtn){
api.verificationCode(params).then((res)=>{
if(res['success']){
this.delayTime()
}else{
common.errorDialog(2,res['message'])
}
})
}
}else{
common.errorDialog(2,'请填写手机号')
}
},
gotoApply(){
if(!this.form.nickName){
common.errorDialog(1,'请输入昵称');
return false;
}
if(this.form.nickName&&this.form.nickName.length<2){
common.errorDialog(1,'昵称长度为2~10个字符');
return
}
if(!this.form.mobile){
common.errorDialog(1,'请输入手机号');
return false;
}
if(!common.mobileNoValid(this.form.mobile)){
common.errorDialog(2,'手机号格式填写错误');
return false;
}
if(!this.loginType || this.loginType=== 'visitor'){
if(!this.form.code){
common.errorDialog(1,'请输入验证码');
return false;
}
}
if(!this.agreeFlag){
uni.showToast({
title: '请阅读并勾选'+`${this.companyInfo.companyFullName}`+'服务协议和隐私条款',
duration: 3000,
icon: 'none'
})
return false;
}
const params = {
loginType:'3',
...this.form
}
if(this.loginType == 'codelogin'){
this.getApply()
return
}
if(!this.loginType || this.loginType == 'visitor'){
api.loginVerification(params).then((res)=>{
if(res['success']){
this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', this.userId);
uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
this.queryInfo()
// 是合伙人就不让在加盟
if(res.data.isPartner){
this.$refs.everyJoinPopup.open()
return
}
// 不是合伙人就加盟
if(!res.data.isPartner){
this.getApply()
}
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
this.form.nickName = res['data']['nickName']
if(this.form.nickName){
this.editNickName = true
}else {
this.editNickName = false
}
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
}else {
uni.setStorageSync('loginType', 'visitor')
}
})
},
// 申请加盟
getApply(){
let params = {}
if(this.inviteUserId){
params = {
applyType:'1',
applyUserId:this.userId,
applyMobile:this.form.mobile,
inviteUserId:this.inviteUserId,
nickName:this.form.nickName,
inviterInvitationCode:this.invitationCode,
shareId:this.shareId
}
// return
}else {
params = {
applyType:'2',
applyUserId:this.userId,
applyMobile:this.form.mobile,
nickName:this.form.nickName
}
}
api.newSaveApplyInfo(params).then((res)=>{
if(res['success']){
// 是合伙人就不让在加盟
if(res.data.isPartner){
this.$refs.everyJoinPopup.open()
return
}
dataHandling.pocessTracking(
'加盟',
`已成功加盟为合伙人`,
'点击',
2,
'申请加盟',
'pages/saleCourseLists/saleCourseLists'
)
this.$refs.successJoinPopup.open()
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
},
}
</script>
<style lang="scss" scoped>
.applyBox{
background-color: #fff;
padding: 30rpx;
border-radius: 20rpx;
margin-top: 100rpx;
box-sizing: border-box;
.inputBox{
margin-bottom: 20rpx;
padding-bottom: 10rpx;
border-bottom: 1rpx solid #E8E8E8;
.require{
font-size: 24rpx;
color: red;
}
.desTxt{
font-size: 24rpx;
color: #333333;
}
.user-input{
color: black;
font-size: 26rpx;
margin-top: 15rpx;
}
.codeBox{
display: flex;
align-items: center;
justify-content: space-between;
color: #20279B;
font-size: 26rpx;
.grey{
color: rgba(32, 39, 155, 0.5); /* 50% 透明 */
}
}
}
.agreeBox{
padding-top: 20rpx;
font-size: 26rpx;
color:#20279B ;
}
.protol{
display: flex;
align-items: center;
font-size: 26rpx;
.empty{
width: 30rpx;
height: 30rpx;
border: 1rpx solid #20269B;
border-radius: 50%;
margin-right: 5rpx;
}
.icon-icon_duihao-mian{
font-size: 30rpx;
color: #20269B;
margin-right: 5rpx;
}
}
.btnBox{
box-sizing: border-box;
width: 80%;
text-align: center;
padding: 20rpx;
border-radius: 50rpx;
background-color: #20279B;
color: #fff;
font-size: 28rpx;
margin: 0rpx 50rpx 30rpx 50rpx;
}
}
</style>
\ No newline at end of file
import App from './App'; import App from './App';
// #ifndef VUE3 // // #ifndef VUE3
import Vue from 'vue' // import Vue from 'vue'
App.mpType = 'app' // App.mpType = 'app'
const app = new Vue({ // const app = new Vue({
...App // ...App
}) // })
app.$mount()
// #endif // app.$mount()
// // #endif
// #ifdef VUE3 // #ifdef VUE3
import { createSSRApp } from 'vue' import { createSSRApp } from 'vue'
...@@ -22,3 +23,5 @@ export function createApp() { ...@@ -22,3 +23,5 @@ export function createApp() {
//#ifdef H5 //#ifdef H5
window.sessionStorage.setItem('firstEntryUrl',window.location.href.split('#')[0]) window.sessionStorage.setItem('firstEntryUrl',window.location.href.split('#')[0])
// #endif // #endif
<template> <template>
<view class="container"> <view class="container">
<!-- 禁用弹窗 -->
<restrictedTip
ref="restrictedOrCanelTip"
:showCode="showCode"
confirmText="前往首页"
:content="restrictedOrCanelContent"
@confirm="gotoIndex()"
/>
<image <image
class="imgbox" class="imgbox"
:src="baseURL + `/${imgType}/static/images/applyBg.png`" :src="baseURL + `/${imgType}/static/images/applyBg.png`"
...@@ -29,7 +37,6 @@ ...@@ -29,7 +37,6 @@
type="text" type="text"
placeholder="请输入2~10个字符" placeholder="请输入2~10个字符"
v-model="form.nickName" v-model="form.nickName"
:disabled="editNickName"
/> />
</view> </view>
</view> </view>
...@@ -119,9 +126,11 @@ ...@@ -119,9 +126,11 @@
import common from '@/common/common'; import common from '@/common/common';
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
components:{ components:{
everyJoinPopup, everyJoinPopup,
restrictedTip
}, },
data() { data() {
return { return {
...@@ -147,6 +156,9 @@ ...@@ -147,6 +156,9 @@
editMobile:false, editMobile:false,
shareId:'',//邀请人分享得id shareId:'',//邀请人分享得id
invitationCode:'',//邀请码 invitationCode:'',//邀请码
showCode:false ,//弹窗是否展示客服二维码
restrictedOrCanelContent:'', //禁用/注销展示文本
sharePosterObj:{invitationCode:'',inviteUserId:''},//通过分享海报进来
} }
}, },
onLoad(options){ onLoad(options){
...@@ -161,20 +173,20 @@ ...@@ -161,20 +173,20 @@
if(options.shareId){ if(options.shareId){
this.shareId = options.shareId this.shareId = options.shareId
this.getqueryById(options.shareId) this.getqueryById(options.shareId)
uni.clearStorageSync() // uni.clearStorageSync()
uni.setStorageSync('loginType', 'visitor') uni.setStorageSync('loginType', 'visitor')
} }
}, },
onShow(){ onShow(){
if(uni.getStorageSync('loginType')){ if(uni.getStorageSync('loginType')){
this.loginType = uni.getStorageSync('loginType') this.loginType = uni.getStorageSync('loginType')
} }
if(uni.getStorageSync('cffp_userInfo')){ if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo')) this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
} }
console.log('show',this.userInfo)
if(uni.getStorageSync('cffp_userId')){ if(uni.getStorageSync('cffp_userId')){
this.userId = uni.getStorageSync('cffp_userId') this.userId = uni.getStorageSync('cffp_userId')
} }
...@@ -183,12 +195,12 @@ ...@@ -183,12 +195,12 @@
this.checkToken() this.checkToken()
} }
// 非邀请状态 // 非邀请状态
if(!this.inviteUserId&&this.loginType == 'codelogin'&&this.userInfo.mobile){ if(!this.shareId&&this.loginType == 'codelogin'&&this.userInfo.mobile){
this.form.mobile = this.userInfo.mobile this.form.mobile = this.userInfo.mobile
this.editMobile = true this.editMobile = true
} }
// 非邀请状态 // 非邀请状态
if(!this.inviteUserId&&this.loginType == 'codelogin'&&!this.form.nickName){ if(!this.shareId&&this.loginType == 'codelogin'&&!this.form.nickName){
this.queryInfo() this.queryInfo()
} }
// 登录状态 // 登录状态
...@@ -202,6 +214,12 @@ ...@@ -202,6 +214,12 @@
}, },
methods: { methods: {
gotoIndex(){
uni.switchTab({
url:'/pages/index/index'
})
this.$refs.restrictedOrCanelTip.close()
},
// 未登录状态下需要重新获取token // 未登录状态下需要重新获取token
checkToken(){ checkToken(){
api.checkToken().then(res=>{ api.checkToken().then(res=>{
...@@ -289,6 +307,24 @@ ...@@ -289,6 +307,24 @@
} }
}, },
gotoApply(){ gotoApply(){
if(uni.getStorageSync('sharePosterObj')){
this.sharePosterObj = uni.getStorageSync('sharePosterObj')
}
console.log('this.sharePosterObj',this.sharePosterObj)
// 登录并且是禁用状态
if(this.loginType == 'codelogin'&& this.userInfo.userIsActive == 2){
this.showCode = true
this.restrictedOrCanelContent = '您的账号处在不可用状态,请扫码添加客服咨询情况'
this.$refs.restrictedOrCanelTip.open()
return
}
// 登录并且是注销状态
if(this.loginType == 'codelogin'&& this.userInfo.partnerIsActive == 2){
this.showCode = false
this.restrictedOrCanelContent = '90天内不可再次申请加盟为合伙人'
this.$refs.restrictedOrCanelTip.open()
return
}
if(!this.form.nickName){ if(!this.form.nickName){
common.errorDialog(1,'请输入昵称'); common.errorDialog(1,'请输入昵称');
return false; return false;
...@@ -330,13 +366,29 @@ ...@@ -330,13 +366,29 @@
if(!this.loginType || this.loginType == 'visitor'){ if(!this.loginType || this.loginType == 'visitor'){
api.loginVerification(params).then((res)=>{ api.loginVerification(params).then((res)=>{
if(res['success']){ if(res['success']){
// 不能登录并且是禁用状态
if(res.data.userIsActive == 2){
this.showCode = true
this.restrictedOrCanelContent = '您的账号处在不可用状态,请扫码添加客服咨询情况'
this.$refs.restrictedOrCanelTip.open()
return
}
this.userId = String(res['data']['userId']); this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1'); uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin'); uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', this.userId); uni.setStorageSync('cffp_userId', this.userId);
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
this.queryInfo() this.queryInfo()
// 禁用和注销状态并存,以禁用为准
// 已经进行过注销操作的, 弹窗提示90天内不可再次申请加盟为合伙人
// 登录并且是注销状态
if(res.data.partnerIsActive==2){
this.showCode = false
this.restrictedOrCanelContent = '90天内不可再次申请加盟为合伙人'
this.$refs.restrictedOrCanelTip.open()
return
}
// 是合伙人就不让在加盟 // 是合伙人就不让在加盟
if(res.data.isPartner){ if(res.data.isPartner){
this.$refs.everyJoinPopup.open() this.$refs.everyJoinPopup.open()
...@@ -370,12 +422,9 @@ ...@@ -370,12 +422,9 @@
}else { }else {
this.editNickName = false this.editNickName = false
} }
delete res.data.commonResult
const cffp_userInfo = { const cffp_userInfo = {
name: res['data']['realName'], ...res.data
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
} }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)) uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
...@@ -388,7 +437,7 @@ ...@@ -388,7 +437,7 @@
// 申请加盟 // 申请加盟
getApply(){ getApply(){
let params = {} let params = {}
if(this.inviteUserId){ if(this.shareId){
params = { params = {
applyType:'1', applyType:'1',
applyUserId:this.userId, applyUserId:this.userId,
...@@ -398,13 +447,14 @@ ...@@ -398,13 +447,14 @@
inviterInvitationCode:this.invitationCode, inviterInvitationCode:this.invitationCode,
shareId:this.shareId shareId:this.shareId
} }
// return
}else { }else {
params = { params = {
applyType:'2', applyType:'2',
applyUserId:this.userId, applyUserId:this.userId,
applyMobile:this.form.mobile, applyMobile:this.form.mobile,
nickName:this.form.nickName nickName:this.form.nickName,
inviteUserId:this.sharePosterObj.inviteUserId,
invitationCode:this.sharePosterObj.invitationCode
} }
} }
api.newSaveApplyInfo(params).then((res)=>{ api.newSaveApplyInfo(params).then((res)=>{
...@@ -423,23 +473,20 @@ ...@@ -423,23 +473,20 @@
'pages/saleCourseLists/saleCourseLists' 'pages/saleCourseLists/saleCourseLists'
) )
this.$refs.successJoinPopup.open() this.$refs.successJoinPopup.open()
}else{
// 由于注销需求,依据后端报错展示弹窗
this.showCode = false
this.restrictedOrCanelContent = res['message']
this.$refs.restrictedOrCanelTip.open()
// uni.showToast({ // uni.showToast({
// title: '您已加盟成功', // title: res['message'],
// duration: 1000, // duration: 2000,
// icon: 'none' // icon: 'none'
// }) // })
// uni.switchTab({
// url:'/pages/index/index'
// })
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
} }
}) })
} },
}, },
} }
......
...@@ -168,8 +168,8 @@ ...@@ -168,8 +168,8 @@
continueText="暂不解绑" continueText="暂不解绑"
btnType="horizontal" btnType="horizontal"
:tipIcon="false" :tipIcon="false"
@join="continueBind()" @join="$refs.unbindTipPopup.close()"
@continue="$refs.unbindTipPopup.close()" @continue="continueBind()"
/> />
</view> </view>
...@@ -226,6 +226,7 @@ ...@@ -226,6 +226,7 @@
}, },
methods:{ methods:{
continueBind(){ continueBind(){
console.log('解绑');
let params = { let params = {
userId:uni.getStorageSync('cffp_userId'), userId:uni.getStorageSync('cffp_userId'),
oprType:this.paymentMethod oprType:this.paymentMethod
...@@ -593,7 +594,8 @@ ...@@ -593,7 +594,8 @@
color: black; color: black;
font-size: 26rpx; font-size: 26rpx;
text-align: right; text-align: right;
padding-right: 20rpx;
width: 60%;
} }
.error-tip{ .error-tip{
position: absolute; position: absolute;
......
<template> <template>
<view class="wrapper"> <view class="wrapper">
<restrictedTip ref="restrictedTip"/>
<view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin"> <view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin">
<view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view> <view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view>
<!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> --> <!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> -->
...@@ -61,6 +62,7 @@ ...@@ -61,6 +62,7 @@
import common from '../../common/common'; import common from '../../common/common';
import {companyInfo} from "@/environments/environment"; import {companyInfo} from "@/environments/environment";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
data() { data() {
return { return {
...@@ -89,6 +91,9 @@ ...@@ -89,6 +91,9 @@
goBack:true goBack:true
} }
}, },
components:{
restrictedTip
},
methods: { methods: {
c_agreeFlag(){ c_agreeFlag(){
this.agreeFlag=!this.agreeFlag; this.agreeFlag=!this.agreeFlag;
...@@ -179,12 +184,18 @@ ...@@ -179,12 +184,18 @@
} }
api.loginVerification(params).then((res)=>{ api.loginVerification(params).then((res)=>{
if(res['success']){ if(res['success']){
// 禁用账号,不让登录
if(res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.hideLoading()
return
}
this.userId = String(res['data']['userId']); this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1'); uni.setStorageSync('isLogin','1');
uni.setStorageSync('cffp_userId',this.userId); uni.setStorageSync('cffp_userId',this.userId);
uni.setStorageSync('loginType',this.loginType); uni.setStorageSync('loginType',this.loginType);
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
if(urlType == 'personalCenter'){ if(urlType == 'personalCenter'){
uni.switchTab({ uni.switchTab({
url:'/pages/personalCenter/personalCenter' url:'/pages/personalCenter/personalCenter'
......
<template>
<view class="container">
<view class="myHeader">
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
<text style="font-size: 30rpx;">我的团队</text>
</view>
<!-- #endif -->
<view class="timeBox" v-if="currentBtn == '2'" @click="showTime1 = true">
<CommonTimePicker
:timeData="startDate"
:visible="showTime1"
iconColor="#fff"
@confirmDate="changeStartTime"
@closeTime="showTime1=false"
/>
</view>
<view class="renshu" :style="{marginTop}">
<view class="top">
<view class="left">
<text v-if="currentBtn == '1'">团队有效人数</text>
<text v-if="currentBtn == '2'">团队标准销售额</text>
</view>
<view class="right" @click="changeCurrentBtn">
<text v-if="currentBtn == '1'">查看业绩</text>
<text v-if="currentBtn == '2'">查看团队</text>
</view>
</view>
<view class="bottom">
<text v-if="currentBtn == '1'">{{teamCount}}</text>
<text v-if="currentBtn == '2'">{{monthStandardSales}}</text>
</view>
</view>
<view class="moneyBox">
<view class="one">
<view v-if="currentBtn == '1'" class="">
{{monthStandardSales}}
</view>
<view v-if="currentBtn == '2'" class="">
{{totalCoursePrice}}
</view>
<view style="margin-top: 5rpx;">
<text v-if="currentBtn == '1'">本月团队标准销售额</text>
<text v-if="currentBtn == '2'">总销售额</text>
</view>
</view>
<view class="two">
<view class="">
{{totalOrder}}
</view>
<view style="margin-top: 5rpx;">
<text>团队出单数</text>
</view>
</view>
</view>
</view>
<view
v-if="currentBtn == '2'"
class="filterBox"
style="background: none;margin: 10rpx 0;">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="120">
<view
class="scrollBtn"
v-for="item in btnList"
:key="item.id"
:class="{active:item.id == currentFilterBtn }"
@click="sortswitch(item)"
>
{{item.title}}
</view>
</scroll-view>
</view>
<view class="filterBox" :style="{marginTop:currentBtn=='1'?'20rpx':''}">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="120">
<view
class="scroll-view-item_H"
v-for="item in tabList"
:key="item.id"
:class="{active:item.id == currentTab }"
@click="changeTab(item)"
>
{{item.title}}
</view>
</scroll-view>
</view>
<view class="tableBox">
<view class="table">
<view class="content-box">
<view class="content-box-title" v-for="(item,index) in tableHeaderList" :key="index">
<text class="title">{{item.title}}</text>
</view>
</view>
<view v-if="currentBtn == '1'&&myTeamList.length>0">
<view class="content-sam-box" v-for="(pointItem,index) in myTeamList" :key="index">
<span class="content-box-title cell">{{pointItem.parentName}}</span>
<span class="content-box-title cell">{{pointItem.name}}</span>
<span class="content-box-title cell">{{pointItem.levelName}}</span>
<span class="content-box-title cell">{{pointItem.referrer}}</span>
</view>
</view>
<view v-else-if="currentBtn == '2'&&currentFilterBtn!=='3'&& myTeamAchievementList.length>0">
<view class="content-sam-box" v-for="(pointItem,index) in myTeamAchievementList" :key="index">
<span class="content-box-title cell">{{pointItem.name}}</span>
<span class="content-box-title cell">{{pointItem.orderNum}}</span>
<span class="content-box-title cell">{{pointItem.coursePrice}}</span>
<span class="content-box-title cell" >{{pointItem.standardSales || '0.00'}}</span>
</view>
</view>
<view v-else-if="currentBtn == '2'&& currentFilterBtn=='3'&& myTeamAchievementList.length>0">
<view class="content-sam-box" v-for="(pointItem,index) in myTeamAchievementList" :key="index">
<span class="content-box-title cell">{{pointItem.saleDate}}</span>
<span class="content-box-title cell">{{pointItem.orderNum}}</span>
<span class="content-box-title cell">{{pointItem.coursePrice}}</span>
<span class="content-box-title cell" >{{pointItem.standardSales || '0.00'}}</span>
</view>
</view>
<view class="empty" v-else>
暂无数据
</view>
</view>
</view>
<boot-page
loginSource="我的团队"
v-if="sharelogin"
ref="sharelogin"
@close="sharelogin = false"
@afterLogin="afterLogin"
pageSource="myTeam"
></boot-page>
</view>
</template>
<script>
import CommonTimePicker from '@/components/commonTimePicker/commonTimePicker.vue';
import dataHandling from "@/util/dataHandling";
import api from "@/api/api";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import BootPage from "@/components/bootpage/bootpage.vue";
export default {
components: {
CommonTimePicker,
BootPage
},
data() {
return {
showTime1:false,
startDate:{year:dataHandling.getDateParts().year,month:dataHandling.getDateParts().month},
tabList:[
{title:'全部',id: '1',type:4},
{title:'直辖团队',id: '2',type:1},
{title:'所辖团队',id: '3',type:2},
],
btnList:[
{title:'按标准销售额',id: '1',sortType:5},
{title:'按销售额',id: '2',sortType:2},
{title:'按销售日期',id: '3',sortType:4},
],
tableHeaderList:[
{title:'上级',id:'1'},
{title:'成员',id:'2'},
{title:'职级',id:'3'},
{title:'关系',id:'4'},
],
currentTab:'1',
currentBtn:'1', // 1代表团队 2代表业绩
currentFilterBtn:'1',
teamCount:0,//团队总人数,育成团队人数不算
userId: uni.getStorageSync('cffp_userId'),
otherList: null, // 直辖团队
directList: null, //所辖团队数组
myTeamList:[],//我的团队表格数据,
myTeamData:{},//我的团队总数据,
CffpOrgInfoReqVO: {
startDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`,
endDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`,
courseOrPolicy: '1',
type: '2',
sortType:5
},
totalOrder: '0', //总单数
totalCoursePrice: '0.00', // 总销售额
monthStandardSales:'0.00',//本月团队标准销售额
myTeamAchievementList:[],//我的业绩数据列表,
marginTop:'30rpx',
sharelogin: false,
}
},
watch: {
currentBtn: {
deep: true,
handler(newVal) {
if(newVal == '1') {
this.tableHeaderList = [
{title:'上级',id:'1'},
{title:'成员',id:'2'},
{title:'职级',id:'3'},
{title:'关系',id:'4'},
]
// #ifdef H5
this.marginTop = '30rpx'
// #endif
this.getmyseatem()
return
}
if(newVal == '2') {
this.tableHeaderList = [
{title:'成员',id:'1'},
{title:'单数',id:'2'},
{title:'销售额',id:'3'},
{title:'标准销售额',id:'4'},
]
this.getqueryTeamAchievement()
// #ifdef H5
this.marginTop = '0rpx'
// #endif
return
}
}
},
currentTab: {
deep: true,
handler(newVal) {
this.myTeamList = []
if(newVal == '1') {
if(this.myTeamData.other && this.myTeamData.other.length != 0 && this.myTeamData.other != null){
this.myTeamList.push(...this.myTeamData['other'])
}
if(this.myTeamData.directList && this.myTeamData.directList.length != 0 && this.myTeamData.directList != null){
this.myTeamList.push( ...this.myTeamData['directList'])
}
return
}
if(newVal == '2') {
if(this.myTeamData.other && this.myTeamData.other.length != 0 && this.myTeamData.other != null){
this.myTeamList.push(...this.myTeamData['other'])
}
}
if(newVal == '3'){
if(this.myTeamData.directList && this.myTeamData.directList.length != 0 && this.myTeamData.directList != null){
this.myTeamList.push( ...this.myTeamData['directList'])
}
}
}
},
currentFilterBtn: {
deep: true,
handler(newVal) {
if(newVal == '3'&&this.currentBtn=='2') {
this.tableHeaderList = [
{title:'销售日期',id:'1'},
{title:'单数',id:'2'},
{title:'销售额',id:'3'},
{title:'标准销售额',id:'4'},
]
this.getqueryTeamAchievement()
return
}else {
this.tableHeaderList = [
{title:'成员',id:'1'},
{title:'单数',id:'2'},
{title:'销售额',id:'3'},
{title:'标准销售额',id:'4'},
]
this.getqueryTeamAchievement()
return
}
}
},
},
onLoad(options){
// 未登录,弹出登录框
if(options.myTeam&&(!uni.getStorageSync('loginType')||uni.getStorageSync('loginType')=='visitor' )){
this.sharelogin = true
}else {
this.getmyseatem()
this.getqueryTeamAchievement()
}
},
onShow() {
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
},
methods: {
sortswitch(obj) {
this.currentFilterBtn = obj.id
this.CffpOrgInfoReqVO.sortType = obj.sortType
this.getqueryTeamAchievement()
},
changeTab(item){
this.currentTab = item.id
if(this.currentBtn == '2'){
this.getqueryTeamAchievement()
}
},
getqueryTeamAchievement() {
this.CffpOrgInfoReqVO.userId=uni.getStorageSync('cffp_userId'),
this.CffpOrgInfoReqVO.queryType = this.tabList.filter(item=>item.id == this.currentTab)[0].type
this.CffpOrgInfoReqVO.sortType = this.btnList.filter(item=>item.id == this.currentFilterBtn)[0].sortType
api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => {
if (res['success']) {
this.myTeamAchievementList = []
// this.listType = true
this.myTeamAchievementList = res.data.list || [];
if(this.myTeamAchievementList.length>0){
this.myTeamAchievementList.forEach(item=>{
item.saleDate = dataHandling.dateFormat2(item.saleDate,'yyyy-MM-dd')
item.coursePrice = Number(item.coursePrice).toFixed(2) || '0.00'
})
}
this.totalOrder = res.data.totalOrder ? res.data.totalOrder : '0';
this.totalCoursePrice = res.data.totalCoursePrice ? Number(res.data.totalCoursePrice).toFixed(2) : '0.00';
this.monthStandardSales = res.data.monthStandardSales ? Number(res.data.monthStandardSales).toFixed(2) : '0.00';
}else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
// 获取团队数据
getmyseatem() {
this.myTeamList = []
api.queryMyTeamInfo({
userId: this.userId,
type: '1'
}).then(res =>{
if(res['success']){
let data = res.data
this.myTeamData = res.data
if(data.orgInfo) {
this.teamCount = data.orgInfo.count
}
if(data.other && data.other.length != 0 && data.other != null){
this.myTeamList.push(...data['other'])
}
if(data.directList && data.directList.length != 0 && data.directList != null){
this.myTeamList.push( ...data['directList'])
}
}else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
changeStartTime(obj){
this.startDate = obj
this.CffpOrgInfoReqVO.startDate=`${obj.year}-${obj.month<10?`0${obj.month}`:obj.month}`
this.CffpOrgInfoReqVO.endDate=`${obj.year}-${obj.month<10?`0${obj.month}`:obj.month}`
this.getqueryTeamAchievement()
this.showTime1 = false
},
changeCurrentBtn(){
this.currentTab = '1'
this.currentFilterBtn = '1'
if(this.currentBtn == '1'){
this.currentBtn = '2'
return
}
if(this.currentBtn == '2'){
this.currentBtn = '1'
}
},
goBack(){
uni.navigateBack({
delta: 1
});
},
goteam(item) {
if(item.type===1){
uni.navigateTo({
url:`/pages/personalCenter/teamMembers/teamMembers`,
})
}else{
uni.navigateTo({
url:`/pages/personalCenter/teamPerformance/teamPerformance`,
})
}
},
afterLogin(){
this.userId = uni.getStorageSync('cffp_userId'),
this.getmyseatem()
this.getqueryTeamAchievement()
}
},
}
</script>
<style lang="scss" scoped>
.container{
background-color: rgba(235, 239, 247, 1);
display: flex;
flex-direction: column;
box-sizing: border-box;
.myHeader{
color: #fff;
box-sizing: border-box;
background: linear-gradient(225deg, rgba(65, 69, 188, 1) 0%, rgba(29, 30, 125, 1) 100%);
.backArrow{
box-sizing: border-box;
display: flex;
height: 60rpx;
justify-content: space-between;
align-items: center;
position: relative;
width: 100%;
margin-bottom: 10rpx;
color: #fff;
margin-top: 20rpx;
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
.timeBox{
margin-top: 30rpx;
padding-left: 25rpx;
width: 50%;
}
.renshu{
padding: 10rpx 25rpx;
color: #fff;
.top{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 26rpx;
.right{
padding: 10rpx 15rpx;
background-color: #fff;
border-radius: 30rpx;
color: rgba(32, 39, 155, 1);
font-size: 25rpx;
}
}
.bottom{
font-size: 34rpx;
font-weight: 500;
}
}
.moneyBox{
box-sizing: border-box;
width: 100%;
background-color: rgba(255,255,255,.15);
padding:15rpx 20rpx;
display: flex;
align-items: center;
justify-content: space-around;
.one{
font-size: 26rpx;
text-align: center;
width: 50%;
position: relative;
}
.one::after{
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 0;
content: '';
height: 40rpx;
border: 1rpx dashed #fff;
}
.two{
font-size: 26rpx;
text-align: center;
width: 50%;
}
}
}
.filterBox{
box-sizing: border-box;
// margin: 20rpx 0;
width: 100%;
background-color: #fff;
padding: 20rpx 60rpx 0 60rpx;
display: flex;
align-items: center;
justify-content: space-between;
.scroll-view_H {
white-space: nowrap;
width: 100%;
box-sizing: border-box;
}
.scroll-view-item {
text-align: center;
font-size: 36rpx;
}
.scroll-view-item_H {
margin-bottom: 20rpx;
display: inline-block;
margin-right: 20rpx;
text-align: center;
font-size: 27rpx;
padding: 10rpx 20rpx;
color: rgba(46, 38, 29, 1);
&.active{
color: rgba(32, 39, 155, 1);
position: relative;
}
&.active::before{
display: block;
content: "";
position: absolute;
left: 50%;
transform: translate(-50%);
bottom: -3%;
width: 50%;
// height: 1rpx;
border: 1rpx solid rgba(32, 39, 155, 1);
border-radius: 5rpx;
}
}
.scroll-view-item_H:last-child{
margin-right: 0rpx;
}
.scrollBtn {
display: inline-block;
margin-right: 20rpx;
text-align: center;
font-size: 27rpx;
padding: 10rpx 20rpx;
color: rgba(46, 38, 29, 1);
&.active{
color: rgba(32, 39, 155, 1);
}
}
.scrollBtn:last-child{
margin-right: 0rpx;
}
.filterItem{
background: #f7f7f7;
font-size: 27rpx;
padding: 10rpx;
color: rgba(46, 38, 29, 1);
border-radius: 8rpx;
&.active{
background: rgba(32, 39, 155, 1);
color: #fff;
}
}
}
.tableBox{
// background-color: #fff;
padding: 20rpx;
width: 100%;
box-sizing: border-box;
border-radius: 20rpx;
.table{
background-color: #fff;
border-radius: 20rpx;
padding: 10rpx 0;
margin-bottom: 50rpx;
box-sizing: border-box;
.content-box {
display: flex;
font-weight: 600;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #F2F2F2;
padding: 20rpx 0;
}
.content-box-title {
flex: 1;
font-size: 28rpx;
text-align: center;
}
.content-sam-box{
background-color: #fff;
display: flex;
align-items: center;
font-size: 24rpx;
justify-content: space-between;
padding: 20rpx 0;
color: #333333;
border-bottom: 1px solid #F2F2F2;
.cell{
font-size: 24rpx;
}
}
.content-sam-box:last-child{
border: none;
}
.empty{
width: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 200rpx;
font-size: 26rpx;
color: #333333;
}
}
}
}
</style>
\ No newline at end of file
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
} }
}, },
onShow() { onShow() {
this.userInfo = uni.getStorageSync('userinfodataForm') this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.loginType = uni.getStorageSync('loginType') this.loginType = uni.getStorageSync('loginType')
if(!this.loginType || this.loginType == 'visitor'){ if(!this.loginType || this.loginType == 'visitor'){
this.codeUrl = `${this.baseURL}/pages/index/index` this.codeUrl = `${this.baseURL}/pages/index/index`
......
<template> <template>
<view class="account-cancel-protocol"> <view class="container">
<view class="header"> <view class="header">
<text class="title">账号注销协议</text> <text class="title">合伙人解约协议</text>
</view> </view>
<view class="content"> <view class="content">
<view class="section"> <text class="notice">
<text class="text"> 请您在解除与银盾家族办公室分销系统(以下简称"家办分销")的合伙人关系前,充分阅读、理解并同意下列内容。如您不同意下列任一内容,或无法准确理解任何条款的含义,请不要进行解约操作。您通过网络页面确认申请解约,视为您同意本协议项下所有权利义务。如您对本协议有任何疑问,可通过银盾家族办公室分销系统-我的-咨询客服,联系在线客服。
请您在注销银盾家族办公室分销系统(以下简称家办分销)账号前,充分阅读、理解并同意下列内容:(如您不同意下列任一内容,或无法准确理解任何条款的含义,请不要进行账号注销操作。您通过网络页面确认申请注销,视为您同意本协议项下所有权利义务。如您对本协议有任何疑问,可通过银盾家族办公室分销系统-我的-咨询客服,联系在线客服) </text>
</text>
</view>
<view class="section"> <view class="section">
<text class="section-title">1、注销须知</text> <text class="section-title">1、解约须知</text>
<text class="text"> <text class="section-content">
如果您申请注销家办分销账号,请在提交申请前确认以下信息,以保证您的账号和资产安全: 如果您申请解除与家办分销的合伙人关系,请在提交申请前确认以下信息,以保证您的权益和资产安全:
</text> </text>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">1.1您申请注销的家办分销账号应当是您本人注册并使用的账号。该账号应处于正常状态,即非被盗、被封禁(禁言、停用)、其他账号异常情形等;</text> <text class="subsection-content">
1.1 您申请解约的合伙人账号应当是您本人注册并使用的账号。该账号应处于正常状态,即非被盗、被封禁(禁言、停用)或其他账号异常情形。
</text>
</view> </view>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">1.2 账号内资产已处理完毕。包括但不限于:您的家办分销账户佣金、红包、优惠券、权益、积分、兑换码等资产,可用款项已全部提现,或者通过兑换、消费等途径支用完毕。您的账户内没有未使用完毕的会员权益或您已购买但未使用完的其他权益类、资格类产品和订单。同时,您也有权选择放弃该账号内的资产。</text> <text class="subsection-content">
1.2 账号内资产已处理完毕。包括但不限于:您的家办分销账户佣金、分红、优惠券、权益、积分、兑换码等资产,可用款项已全部提现,或通过兑换、消费等途径支用完毕。您的账户内没有未使用完毕的合伙人权益或您已购买但未使用完的其他权益类、资格类产品和订单。同时,您也有权选择放弃该账号内的资产。
</text>
</view> </view>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">1.3 账号已解除与第三方产品的绑定关系或授权登录关系。</text> <text class="subsection-content">1.3 账号已解除与第三方产品的绑定关系或授权登录关系。</text>
</view> </view>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">1.4 账号未涉及任何争议纠纷。</text> <text class="subsection-content">
1.4 账号未涉及任何争议纠纷,包括但不限于与客户、其他合伙人或家办分销平台的纠纷。
</text>
</view> </view>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">1.5 实名账号已解除实名信息</text> <text class="subsection-content">1.5 实名账号已解除实名信息(如适用)</text>
</view> </view>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">1.6 账号注销成功后,包括但不限于《家办分销用户协议》、《隐私政策》等项下所有权利义务终止。</text> <text class="subsection-content">
1.6 合伙人关系解除后,包括但不限于《家办分销合伙人协议》、《隐私政策》等项下所有权利义务终止。
</text>
</view> </view>
</view> </view>
...@@ -46,34 +54,52 @@ ...@@ -46,34 +54,52 @@
<text class="section-title">2、特别提醒</text> <text class="section-title">2、特别提醒</text>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">2.1您的家办分销账号一旦被注销成功将不可恢复,您将无法再使用本账号或找回任何本账号内容或信息(即使您使用相同的手机号再次注册并使用家办分销系统),包括但不限于:</text> <text class="subsection-content">
2.1 您的合伙人身份一旦解除将不可恢复,您将无法再享有合伙人权益或找回任何与合伙人身份相关的内容或信息(即使您使用相同的手机号再次注册并使用家办分销系统),包括但不限于:
</text>
<view class="sub-subsection"> <view class="sub-subsection">
<text class="sub-subsection-text">2.1.1您账号下的个人资料(头像、昵称、用户名、身份认证信息等)、与账号有关的信息和数据(团队、交易记录、积分记录、分享数据、浏览记录等),都将无法找回。请您务必在注销之前自行备份与账号相关的前述所有内容或信息。您理解并同意,家办分销也无法协助您恢复前述内容或信息,且针对该账号注销的申请一经提交,您不会以任何理由要求家办分销平台予以撤销。</text> <text class="sub-subsection-content">
2.1.1 您账号下的合伙人资料(如合伙人等级、团队信息、业绩记录等)、与合伙人身份相关的数据和权益(如分红记录、团队收益、专属优惠等),都将无法恢复。请您务必在解约前自行备份与合伙人身份相关的所有内容或信息。您理解并同意,家办分销无法协助您恢复前述内容或信息。
</text>
</view> </view>
<view class="sub-subsection"> <view class="sub-subsection">
<text class="sub-subsection-text">2.1.2 您理解并同意,您在注销前确认放弃的家办分销账户佣金、红包、优惠券、权益、积分、兑换码、资产性权益、资格类产品等,在您注销账号后将无法继续使用,历史交易无法通过该账号进行退款或售后,即使您使用相同的手机号再次注册并使用家办分销的,家办分销也无法协助您重新恢复前述权益。</text> <text class="sub-subsection-content">
2.1.2 您理解并同意,您在解约前确认放弃的合伙人权益、分红、优惠券、积分等,在解约后将无法继续使用,历史交易无法通过该账号进行退款或售后。
</text>
</view> </view>
</view> </view>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">2.3 您申请注销的家办分销账号所对应的其他账号应当不存在任何由于该账号被注销而导致的未了结的合同关系与其他基于该账号的存在而产生或维持的权利义务,及本公司认为注销该账号会由此产生未了结的权利义务而产生纠纷的情况。</text> <text class="subsection-content">
2.2 您申请解约的合伙人账号所对应的其他账号应当不存在任何由于解约而导致的未了结的合同关系或其他基于合伙人身份产生的权利义务。家办分销有权认为解约会由此产生未了结的权利义务或纠纷的情况。
</text>
</view> </view>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">2.4 在您的账号注销期间,如您的家办分销账号被他人举报、被投诉、被国家机关调查或正处于诉讼、仲裁程序中,家办分销有权自行终止您的家办分销账号注销流程而无需另行获得您的同意。</text> <text class="subsection-content">
2.3 在您的解约申请处理期间,如您的合伙人账号被他人举报、投诉、被国家机关调查或正处于诉讼、仲裁程序中,家办分销有权自行终止您的解约流程而无需另行获得您的同意。
</text>
</view> </view>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">2.5 注销家办分销账号并不代表账号注销前的行为和相关责任得到任何形式的豁免或减轻。</text> <text class="subsection-content">
2.4 解除合伙人关系并不代表解约前的行为和相关责任得到任何形式的豁免或减轻。
</text>
</view>
<view class="subsection">
<text class="subsection-content">2.5 自解约之日起,90天内不可再次申请加盟为合伙人</text>
</view> </view>
</view> </view>
<view class="section"> <view class="section">
<text class="section-title">3、争议解决</text> <text class="section-title">3、争议解决</text>
<view class="subsection"> <view class="subsection">
<text class="subsection-text">3.1凡因本协议引起的或与本协议有关的任何争议,均应提交上海仲裁委员会按照该会仲裁规则进行仲裁。仲裁裁决是终局的,对双方当事人均有约束力。</text> <text class="subsection-content">
3.1 凡因本协议引起的或与本协议有关的任何争议,均应提交上海仲裁委员会按照该会仲裁规则进行仲裁。仲裁裁决是终局的,对双方当事人均有约束力。
</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -98,65 +124,111 @@ export default { ...@@ -98,65 +124,111 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.account-cancel-protocol { .container {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
min-height: 100vh;
box-sizing: border-box;
}
.header {
margin-bottom: 30rpx;
text-align: center;
}
.title {
font-size: 36rpx;
font-weight: bold;
color: #333;
}
.content {
background-color: #fff; background-color: #fff;
border-radius: 12rpx;
.header { padding: 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
text-align: center; }
.title { .notice {
font-size: 36rpx; font-size: 28rpx;
font-weight: bold; color: #666;
color: #333; line-height: 1.6;
} margin-bottom: 30rpx;
} display: block;
}
.content {
.section { .section {
margin-bottom: 30rpx; margin-bottom: 40rpx;
}
.section-title {
font-size: 32rpx; .section-title {
font-weight: bold; font-size: 32rpx;
color: #333; font-weight: bold;
display: block; color: #333;
margin-bottom: 15rpx; margin-bottom: 20rpx;
} display: block;
}
.text {
font-size: 28rpx; .section-content {
color: #333; font-size: 28rpx;
line-height: 1.6; color: #666;
display: block; line-height: 1.6;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} display: block;
}
.subsection {
margin-bottom: 15rpx; .subsection {
margin-left: 20rpx;
.subsection-text { margin-bottom: 20rpx;
font-size: 28rpx; }
color: #333;
line-height: 1.6; .subsection-content {
display: block; font-size: 28rpx;
} color: #666;
} line-height: 1.6;
display: block;
.sub-subsection { white-space: pre-line;
margin-left: 30rpx; }
margin-top: 10rpx;
.sub-subsection {
.sub-subsection-text { margin-left: 40rpx;
font-size: 28rpx; margin-top: 10rpx;
color: #333; }
line-height: 1.6;
display: block; .sub-subsection-content {
} font-size: 26rpx;
} color: #666;
} line-height: 1.6;
} display: block;
white-space: pre-line;
}
.footer {
background-color: #fff;
border-radius: 12rpx;
padding: 30rpx;
}
.checkbox-label {
display: flex;
align-items: center;
margin-bottom: 30rpx;
font-size: 28rpx;
color: #333;
}
.submit-btn {
background-color: #1890ff;
color: #fff;
border-radius: 50rpx;
font-size: 32rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
}
.submit-btn[disabled] {
background-color: #ccc;
color: #fff;
} }
</style> </style>
\ No newline at end of file
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
<view class="wapperBox"> <view class="wapperBox">
<view class="warn"> <view class="warn">
<text class="iconfont icon-redgantanhao"></text> <text class="iconfont icon-redgantanhao"></text>
<text>注销后,您将无法使用当前账号</text> <text>解约后,您可正常使用当前账号</text>
<text>相关数据也将被删除无法找回</text> <text>但合伙人相关数据也将被删除无法找回</text>
</view> </view>
<view class="cancelBox"> <view class="cancelBox">
<view class="title"> <view class="title">
注销账号 解约账号
</view> </view>
<view class="phone"> <view class="phone">
{{mobile}} {{mobile}}
...@@ -51,19 +51,20 @@ ...@@ -51,19 +51,20 @@
<view class="empty" v-if="!isTick" @click="isTick=true"></view> <view class="empty" v-if="!isTick" @click="isTick=true"></view>
<text v-else class="iconfont icon-icon_duihao-mian" @click="isTick=false"></text> <text v-else class="iconfont icon-icon_duihao-mian" @click="isTick=false"></text>
<text style="color: #666;">我已阅读并同意</text> <text style="color: #666;">我已阅读并同意</text>
<text style="color: #20269B;" @click="jump()">账号注销协议》</text> <text style="color: #20269B;" @click="jump()">合伙人解约协议》</text>
</view> </view>
<view <view
class="bottomBtn" class="bottomBtn"
:style="{opacity:isTick?'1':'.5'}" :style="{opacity:isTick?'1':'.5'}"
@click="applyCancel()" @click="applyCancel()"
> >
申请注销 申请解约
</view> </view>
</view> </view>
<everyJoinPopup <everyJoinPopup
ref="successCancelPopup" ref="successCancelPopup"
content="注销成功" content="解约成功"
continueText="前往我的"
:maskClick="false" :maskClick="false"
@continue="jumpPage" @continue="jumpPage"
/> />
...@@ -96,16 +97,17 @@ ...@@ -96,16 +97,17 @@
} }
}, },
onLoad() { onLoad() {
let dataForm = uni.getStorageSync('userinfodataForm')
this.mobile = dataForm.mobile
}, },
onShow(){ onShow(){
let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.mobile = dataForm.mobile
this.lockScroll() this.lockScroll()
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
}, },
beforeDestroy() { beforeDestroy() {
console.log('组件销毁'); console.log('组件销毁');
...@@ -134,15 +136,15 @@ ...@@ -134,15 +136,15 @@
}, },
jumpPage(){ jumpPage(){
dataHandling.pocessTracking( dataHandling.pocessTracking(
'注销', '解约',
`用户注销账号`, `用户解约`,
'点击', '点击',
2, 2,
'注销账号', '解约账号',
'/myPackageA/setting/logOff' '/myPackageA/setting/logOff'
) )
uni.switchTab({ uni.switchTab({
url:'/pages/index/index' url:'/pages/personalCenter/personalCenter'
}) })
this.$refs.successCancelPopup.close() this.$refs.successCancelPopup.close()
}, },
...@@ -199,10 +201,10 @@ ...@@ -199,10 +201,10 @@
jump(){ jump(){
dataHandling.pocessTracking( dataHandling.pocessTracking(
'查看', '查看',
`用户点击了账户注销协议`, `用户点击了合伙人解约协议`,
'点击', '点击',
2, 2,
'注销账号', '解约账号',
'/myPackageA/setting/logOff' '/myPackageA/setting/logOff'
) )
uni.navigateTo({ uni.navigateTo({
...@@ -213,7 +215,7 @@ ...@@ -213,7 +215,7 @@
applyCancel(){ applyCancel(){
if(!this.isTick){ if(!this.isTick){
uni.showToast({ uni.showToast({
title: '请阅读并勾选《账号注销协议》', title: '请阅读并勾选《合伙人解约协议》',
duration: 3000, duration: 3000,
icon: 'none' icon: 'none'
}) })
...@@ -251,11 +253,10 @@ ...@@ -251,11 +253,10 @@
"signatureHash":hashResult, "signatureHash":hashResult,
"timestamp":timestamp, "timestamp":timestamp,
} }
console.log('注销参数',params);
api.cancellation(params).then(res =>{ api.cancellation(params).then(res =>{
if(res['success']){ if(res['success']){
uni.clearStorageSync(); // uni.clearStorageSync();
uni.setStorageSync('loginType','visitor'); // uni.setStorageSync('loginType','visitor');
this.$refs.successCancelPopup.open() this.$refs.successCancelPopup.open()
}else{ }else{
uni.showToast({ uni.showToast({
...@@ -265,7 +266,7 @@ ...@@ -265,7 +266,7 @@
} }
}) })
this.releaseScroll() this.releaseScroll()
this.checkToken() // this.checkToken()
} }
}) })
}, },
...@@ -290,21 +291,6 @@ ...@@ -290,21 +291,6 @@
cancel(){ cancel(){
uni.navigateBack({delta:1}) uni.navigateBack({delta:1})
}, },
sunmit(){
api.cancellation({userId: this.userId}).then(res =>{
if(res['success']){
uni.showToast({
title: '操作成功',
icon: 'none'
});
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
uni.redirectTo({
url:'/myPackageA/login/login?from=index'
})
}
})
},
} }
} }
</script> </script>
......
...@@ -544,6 +544,11 @@ ...@@ -544,6 +544,11 @@
"style": { "style": {
"navigationBarTitleText": "分销海报" "navigationBarTitleText": "分销海报"
} }
},{
"path": "myTeam/myTeam",
"style": {
"navigationBarTitleText": "我的团队"
}
} }
] ]
},{ },{
......
...@@ -103,7 +103,8 @@ ...@@ -103,7 +103,8 @@
dropIndex:0, dropIndex:0,
dropReasons:[{id:null,name:'请选择'}], dropReasons:[{id:null,name:'请选择'}],
withdrawal: true, withdrawal: true,
readonlyFlag:false readonlyFlag:false,
tipMessage:''
}; };
}, },
methods:{ methods:{
...@@ -136,7 +137,9 @@ ...@@ -136,7 +137,9 @@
if(res['success']){ if(res['success']){
this.dropInfo = res['data'] this.dropInfo = res['data']
}else { }else {
this.tipMessage = res['message']
this.withdrawal = false this.withdrawal = false
this.readonlyFlag = true
} }
}) })
}, },
...@@ -144,7 +147,7 @@ ...@@ -144,7 +147,7 @@
submit(){ submit(){
if(!this.withdrawal){ if(!this.withdrawal){
uni.showToast({ uni.showToast({
title: '已退款不能重新申请', title: this.tipMessage,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
......
<template> <template>
<view class="container"> <view class="container">
<!-- --> <!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="shareheader" style="" v-if="coursesharing != 1 || deviceType==3"> <view class="shareheader" style="" v-if="coursesharing != 1 || deviceType==3">
<!-- #ifdef APP --> <!-- #ifdef APP -->
<view class="iconfont icon-youjiantou" style="margin-left: 30rpx;" @click="goBack()"></view> <view class="iconfont icon-youjiantou" style="margin-left: 30rpx;" @click="goBack()"></view>
...@@ -184,6 +185,7 @@ ...@@ -184,6 +185,7 @@
</template> </template>
<script> <script>
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue"; import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import api from "../../api/api"; import api from "../../api/api";
import BootPage from "@/components/bootpage/bootpage.vue"; import BootPage from "@/components/bootpage/bootpage.vue";
...@@ -202,7 +204,8 @@ ...@@ -202,7 +204,8 @@
BootPage, BootPage,
LoginPopup, LoginPopup,
VerifyPopup, VerifyPopup,
PartnerTipPopup PartnerTipPopup,
restrictedTip
}, },
data() { data() {
return { return {
...@@ -525,6 +528,15 @@ ...@@ -525,6 +528,15 @@
} }
}, },
jumppurchase() { jumppurchase() {
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
// 登录并且是禁用状态
if(this.userInfo.userIsActive==2){
this.$refs.restrictedTip.open()
return
}
let orderPlatform = '' let orderPlatform = ''
// 不同得公司主题不同得购买平台 // 不同得公司主题不同得购买平台
// #ifdef APP // #ifdef APP
...@@ -962,13 +974,18 @@ ...@@ -962,13 +974,18 @@
queryInfo(){ queryInfo(){
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{ api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if(res['success']){ if(res['success']){
uni.setStorageSync('userinfodataForm', res.data); delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
this.realName = res.data.realName; this.realName = res.data.realName;
} }
}) })
}, },
init() { init() {
if (!uni.getStorageSync('isLogin')) { if (!uni.getStorageSync('loginType')&& uni.getStorageSync('loginType')=='visitor') {
api.loginVerification({ api.loginVerification({
"loginType": 1 "loginType": 1
}).then((res) => { }).then((res) => {
...@@ -1010,7 +1027,7 @@ ...@@ -1010,7 +1027,7 @@
uni.setStorageSync('h5_coursesharing', this.coursesharing); uni.setStorageSync('h5_coursesharing', this.coursesharing);
this.getshareData() this.getshareData()
} }
let dataForm = uni.getStorageSync('userinfodataForm') let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.realName = dataForm.realName; this.realName = dataForm.realName;
if(!this.realName){ if(!this.realName){
this.queryInfo(); this.queryInfo();
...@@ -1032,45 +1049,10 @@ ...@@ -1032,45 +1049,10 @@
} }
this.userId = uni.getStorageSync('cffp_userId') this.userId = uni.getStorageSync('cffp_userId')
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
},
mounted() {
let _this = this;
if(this.isWeixin){
//var btn = document.getElementById('launch-btn');
//btn.addEventListener('launch', function(e) {
//console.log('success');
//});
//btn.addEventListener('error', function(e) {
// uni.navigateTo({
// url:'/pages/downloadAppCommon/downloadAppCommon'
// })
// uni.showModal({
// title: '系统消息',
// content: '您的手机未找到当前应用,是否去下载?',
// success: function(res) {
// if (res.confirm) {
// if(uni.getSystemInfoSync().platform == 'ios'){
// window.location.href = "http://itunes.apple.com/us/app/id399608199";
// }else {
// uni.navigateTo({
// url:'/pages/downloadApp/index'
// })
// // alert('android')
// }
// //在App Store Connect中的App Store下的app信息,可找到appleId
// console.log('用户点击确定');
// } else if (res.cancel) {
// console.log('用户点击取消');
// }
// }
// });
//});
}
}, },
onReady() { onReady() {
this.videoContext = uni.createVideoContext('myVideo'); this.videoContext = uni.createVideoContext('myVideo');
......
<template> <template>
<!-- :style="{paddingTop: showFlag ? '0' : '60rpx'}" --> <!-- :style="{paddingTop: showFlag ? '0' : '60rpx'}" -->
<view class="container" :style="{paddingTop: showFlag ? '0' : '60rpx'}"> <view class="container" :style="{paddingTop: showFlag ? '0' : '60rpx'}">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="homeHeader" v-if="showFlag"> <view class="homeHeader" v-if="showFlag">
<view class="one"> <view class="one">
<text style="font-size: 80rpx;">01</text> <text style="font-size: 80rpx;">01</text>
...@@ -121,6 +123,7 @@ ...@@ -121,6 +123,7 @@
import {hshare,setWechatShare,initJssdkShare} from '@/util/fiveshare'; import {hshare,setWechatShare,initJssdkShare} from '@/util/fiveshare';
import UniShareWx from "@/uni_modules/uni-share-wx/index.vue"; import UniShareWx from "@/uni_modules/uni-share-wx/index.vue";
import {nanoid} from 'nanoid'; import {nanoid} from 'nanoid';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default{ export default{
name:'courselist', name:'courselist',
props:{ props:{
...@@ -140,7 +143,8 @@ ...@@ -140,7 +143,8 @@
search, search,
UniShareWx, UniShareWx,
BootPage, BootPage,
PartnerTipPopup PartnerTipPopup,
restrictedTip
}, },
watch: { watch: {
// 监听 prop 变化,更新本地副本 // 监听 prop 变化,更新本地副本
...@@ -447,13 +451,13 @@ ...@@ -447,13 +451,13 @@
}).then((res) => { }).then((res) => {
if (res['success']) { if (res['success']) {
uni.setStorageSync('fileUploadItemCFFPList', res['data']['fileUploadItemCFFPList']) uni.setStorageSync('fileUploadItemCFFPList', res['data']['fileUploadItemCFFPList'])
const cffp_userInfo = { // const cffp_userInfo = {
name: res['data']['userReName'], // name: res['data']['userReName'],
mobile: res['data']['mobile'], // mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'], // partnerType:res['data']['partnerType'],
levelCode:res['data']['levelCode'], // levelCode:res['data']['levelCode'],
} // }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)); // uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
this.fileUploadItemCFFPList = uni.getStorageSync('fileUploadItemCFFPList'); this.fileUploadItemCFFPList = uni.getStorageSync('fileUploadItemCFFPList');
} }
}) })
......
<template> <template>
<view class="container"> <view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="homeHeader"> <view class="homeHeader">
<view class="top"> <view class="top">
<view class="one"> <view class="one">
...@@ -57,12 +59,7 @@ ...@@ -57,12 +59,7 @@
</view> --> </view> -->
<!-- 产品区域 --> <!-- 产品区域 -->
<view class="productContainer"> <view class="productContainer">
<!-- <view class="productTitle">
<view class="titleTxt">
<text style="font-size: 30rpx;font-weight: 500;">推荐产品</text>
<text class="more" @click="goToCourselist()">更多 <text class="iconfont icon-youjiantou"></text> </text>
</view>
</view> -->
<view class="productList" v-if="cffpCourseInfos.length>0"> <view class="productList" v-if="cffpCourseInfos.length>0">
<courselist <courselist
:showFlag="false" :showFlag="false"
...@@ -71,27 +68,7 @@ ...@@ -71,27 +68,7 @@
></courselist> ></courselist>
<view class="productListBox"> <view class="productListBox">
<!-- <view class="productListItem" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)"> -->
<!-- <view class="top"> -->
<!-- <view class="shareBtn" @click.stop="shareProduct"> -->
<!-- 分享按钮 -->
<!-- <text class="iconfont icon-zhuanfa"></text><text>分享赚钱</text>
</view> -->
<!-- <image class="productImg" :src="item.displayImage" alt="" mode="widthFix"></image>
<view class="productDesBox">
{{item.fileSynopsis}}
</view> -->
<!-- </view> -->
<!-- <view class="bottom" style="text-align: left !important;">
<view class="one">
{{item.fileTitle}}
</view>
<view class="two">
<text class="price" style="">{{item.coursePrice}}</text>
<text v-if="Number(item.salesNumber)>0" class="num" >已售{{item.salesNumber}}</text>
</view>
</view> -->
<!-- </view> -->
</view> </view>
</view> </view>
<view class="productEmpty" v-else> <view class="productEmpty" v-else>
...@@ -211,6 +188,7 @@ ...@@ -211,6 +188,7 @@
@join="jumpPage('2')" @join="jumpPage('2')"
@continue="jumpPage('1')" @continue="jumpPage('1')"
/> />
</template> </template>
<script> <script>
...@@ -226,6 +204,7 @@ ...@@ -226,6 +204,7 @@
import JoinPopup from '@/components/commonPopup/JoinPopup.vue'; import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue"; import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import {hshare} from '@/util/fiveshare'; import {hshare} from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
data() { data() {
return { return {
...@@ -235,12 +214,6 @@ ...@@ -235,12 +214,6 @@
searchQuery: '', searchQuery: '',
companyFullName : companyInfo.companyFullName, companyFullName : companyInfo.companyFullName,
cffpCourseInfos: [], cffpCourseInfos: [],
x: 0,
y: 0,
old: {
x: 0,
y: 0
},
featureLists: [ featureLists: [
{ {
key: '02', key: '02',
...@@ -276,14 +249,12 @@ ...@@ -276,14 +249,12 @@
name: '', name: '',
type: '' //类型1,区域中心,2工作室 type: '' //类型1,区域中心,2工作室
}, },
announcementInfo: null,
tagIds: 123, tagIds: 123,
currentPage: 'index', currentPage: 'index',
carouselList: [], carouselList: [],
userId: uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
shareId: null, shareId: null,
kefu: '../../static/kefu.png', kefu: '../../static/kefu.png',
loginornot: true,
queryName: '', queryName: '',
loginType : uni.getStorageSync('loginType'), loginType : uni.getStorageSync('loginType'),
userInfo:{} ,//用户信息, userInfo:{} ,//用户信息,
...@@ -297,7 +268,8 @@ ...@@ -297,7 +268,8 @@
search, search,
courseItem, courseItem,
JoinPopup, JoinPopup,
PartnerTipPopup PartnerTipPopup,
restrictedTip
}, },
onShow() { onShow() {
...@@ -317,6 +289,11 @@ ...@@ -317,6 +289,11 @@
}, },
onLoad(options) { onLoad(options) {
// 从家办商城跳进来
// if(options.dataToken){
// uni.setStorageSync('uni-token',options.dataToken)
// }
if(options.sharePoster){ if(options.sharePoster){
dataHandling.pocessTracking( dataHandling.pocessTracking(
'进入', '进入',
...@@ -326,16 +303,14 @@ ...@@ -326,16 +303,14 @@
'首页', '首页',
'pages/index/index' 'pages/index/index'
) )
// https://mdev.anjibao.cn/cffp/pages/index/index?invitationCode=SOYAMU&inviteUserId=72323&sharePoster=1
let sharePosterObj = {invitationCode:options.invitationCode,inviteUserId:options.inviteUserId,sharePoster:1}
uni.setStorageSync('sharePosterObj',sharePosterObj)
} }
//如果用户在其他的地方快捷登录,没有返回到首页,执行此监听方法 //如果用户在其他的地方快捷登录,没有返回到首页,执行此监听方法
uni.$on('loginUpdate',()=>{ uni.$on('loginUpdate',()=>{
this.queryAreaCenterInfo(); this.queryAreaCenterInfo();
}) })
if (uni.getStorageSync('isLogin')) {
this.announcementQuery();
this.courseList();
}
}, },
beforeDestroy() { beforeDestroy() {
...@@ -354,7 +329,7 @@ ...@@ -354,7 +329,7 @@
}, },
jumpPage(type){ jumpPage(type){
console.log('type',type);
if(type=='1'){ if(type=='1'){
uni.navigateTo({ uni.navigateTo({
url:'/pages/inviteJoin/inviteJoin' url:'/pages/inviteJoin/inviteJoin'
...@@ -371,23 +346,48 @@ ...@@ -371,23 +346,48 @@
queryInfo() { queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{ api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息 // 保存用户得个人信息
if (res['success']) { if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = { const cffp_userInfo = {
name: res['data']['realName'], ...res.data
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
} }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)); uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
console.log('cffp_userInfo.partnerType',cffp_userInfo.partnerType); uni.setStorageSync('user_mobile', res.data.mobile)
if(cffp_userInfo.partnerType){ if(cffp_userInfo.partnerType){
this.featureLists = [{key: '00',name: '成交订单',icon:'icon-dingdan',link: '/pages/saleCourseLists/saleCourseLists',isOpen: true,enName:'order'}, this.featureLists = [{key: '00',name: '成交订单',icon:'icon-dingdan',link: '/pages/saleCourseLists/saleCourseLists',isOpen: true,enName:'order'},
{key: '01',name: '佣金',icon: 'icon-yongjin',link: '/pages/pointsExchange/pointsExchange',isOpen: true,isJoin: true}, {key: '01',name: '佣金',icon: 'icon-yongjin',link: '/pages/pointsExchange/pointsExchange',isOpen: true,isJoin: true},
{key: '07',name: '分享产品',icon: 'icon-zhuanfa',link: '/pages/courselist/courselist',isOpen: true}, {key: '07',name: '分享产品',icon: 'icon-zhuanfa',link: '/pages/courselist/courselist',isOpen: true},
{key: '04',name: '邀请加盟',icon: 'icon-yaoqing',link: '/pages/inviteJoin/inviteJoin',isOpen: true,isJoin: true}]; {key: '04',name: '邀请加盟',icon: 'icon-yaoqing',link: '/pages/inviteJoin/inviteJoin',isOpen: true,isJoin: true}];
}else {
this.featureLists =[
{
key: '02',
name: '申请加盟',
icon: 'icon-hezuo',
link: '/myPackageA/applyFranchise/applyFranchise',
isOpen: true,
isApply:true
},
{
key: '07',
name: '分享产品',
icon: 'icon-zhuanfa',
link: '/pages/courselist/courselist',
isOpen: true,
},
{
key: '04',
name: '邀请加盟',
icon: 'icon-yaoqing',
link: '/pages/inviteJoin/inviteJoin',
isOpen: true,
isJoin: true
},
]
} }
} }
...@@ -450,7 +450,9 @@ ...@@ -450,7 +450,9 @@
this.courseList() this.courseList()
this.initShare(); this.initShare();
this.getOneProduct() this.getOneProduct()
this.queryAreaCenterInfo()
}else { }else {
// 未登录
this.featureLists =[ this.featureLists =[
{ {
key: '02', key: '02',
...@@ -479,17 +481,6 @@ ...@@ -479,17 +481,6 @@
] ]
uni.removeTabBarBadge({ index: 3 }); uni.removeTabBarBadge({ index: 3 });
}
if (uni.getStorageSync('isLogin')) {
if (loginType == "visitor") {
this.loginornot = false
}else{
this.loginornot = true;
}
this.queryAreaCenterInfo();
} else {
api.loginVerification({ api.loginVerification({
"loginType": 1 "loginType": 1
}).then((res) => { }).then((res) => {
...@@ -499,12 +490,10 @@ ...@@ -499,12 +490,10 @@
uni.setStorageSync('cffp_userId', this.userId); uni.setStorageSync('cffp_userId', this.userId);
uni.setStorageSync('loginType', 'visitor'); uni.setStorageSync('loginType', 'visitor');
uni.setStorageSync('uni-token', res.data['token']); uni.setStorageSync('uni-token', res.data['token']);
this.loginornot = false;
this.queryAreaCenterInfo();
this.announcementQuery();
this.courseList(); this.courseList();
this.getOneProduct() this.getOneProduct()
this.initShare(); this.initShare();
this.queryAreaCenterInfo()
} else { } else {
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
...@@ -514,10 +503,10 @@ ...@@ -514,10 +503,10 @@
} }
}) })
} }
}, },
querySystemMessage() { querySystemMessage() {
api.querySystemMessage({systemType:1,userId:uni.getStorageSync('cffp_userId')}).then(res => { api.querySystemMessage({systemType:1,userId:uni.getStorageSync('cffp_userId')}).then(res => {
if (res['success']&& res['data']['dataList'].length>0) { if (res['success']&& res['data']['dataList']&& res['data']['dataList'].length>0) {
let total = res['data']['dataList'].filter(item=>{ let total = res['data']['dataList'].filter(item=>{
...@@ -582,18 +571,6 @@ ...@@ -582,18 +571,6 @@
} }
}) })
}, },
getOneProduct() {
api.courseList().then(res => {
if (res['success']) {
let result = res['data']['data'];
if(result.length>0){
result.forEach(item=>{
item.coursePrice =Number(item.coursePrice).toFixed(2) || '0.00'
})
}
}
})
},
tokefu() { tokefu() {
let url = 'http://q.url.cn/abkzV9?_type=wpa&qidian=true' // URL是要跳转的外部地址 作为参数 let url = 'http://q.url.cn/abkzV9?_type=wpa&qidian=true' // URL是要跳转的外部地址 作为参数
// #ifdef APP-PLUS // #ifdef APP-PLUS
...@@ -619,7 +596,14 @@ ...@@ -619,7 +596,14 @@
2, 2,
'首页', '首页',
'pages/index/index' 'pages/index/index'
) )
// const urlObj = JSON.parse(JSON.stringify(featureItem))
// let poster = JSON.parse(JSON.stringify(uni.getStorageSync('sharePosterObj')))
// if(poster.sharePoster){
// urlObj.link =`${urlObj.link}?partnerType=${this.cffpUserInfo.partnerType}`
// }
uni.navigateTo({url: `${featureItem.link}`}); uni.navigateTo({url: `${featureItem.link}`});
return return
...@@ -650,7 +634,7 @@ ...@@ -650,7 +634,7 @@
return return
} }
//当为见习合伙人的时候,弹出框提示 //当为见习合伙人的时候,弹出框提示
if(featureItem.key == '04'&& this.userInfo.levelCode == 'P1'){ if(featureItem.key == '04'&& this.userInfo.levelCode == 'P1'&& this.userInfo.userIsActive == 1){
this.$refs.PartnerTipPopup.open() this.$refs.PartnerTipPopup.open()
return return
} }
...@@ -685,6 +669,7 @@ ...@@ -685,6 +669,7 @@
} else { } else {
const urlObj = JSON.parse(JSON.stringify(featureItem)) const urlObj = JSON.parse(JSON.stringify(featureItem))
urlObj.link =urlObj.enName=='order'? `${urlObj.link}?partnerType=${this.cffpUserInfo.partnerType}`:urlObj.link urlObj.link =urlObj.enName=='order'? `${urlObj.link}?partnerType=${this.cffpUserInfo.partnerType}`:urlObj.link
console.log('url',urlObj.link);
uni.navigateTo({ uni.navigateTo({
url: urlObj.link url: urlObj.link
}) })
...@@ -697,6 +682,7 @@ ...@@ -697,6 +682,7 @@
}) })
} }
}, },
// 获取轮播图
queryAreaCenterInfo() { queryAreaCenterInfo() {
api.queryAreaCenterInfo({ api.queryAreaCenterInfo({
userId: uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
...@@ -709,15 +695,6 @@ ...@@ -709,15 +695,6 @@
} }
}) })
}, },
announcementQuery() {
api.announcementQuery({
announcementTypeId: 686
}).then((res) => {
this.announcementInfo = res['data']['announcementInfoList'] ? res['data'][
'announcementInfoList'
][0]['title'] : `${companyInfo.companyFullName}`+'公告'
})
},
getIntroduce(type) { getIntroduce(type) {
this.type = type; this.type = type;
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
...@@ -749,10 +726,7 @@ ...@@ -749,10 +726,7 @@
url: '../../pages/courselist/courselist' url: '../../pages/courselist/courselist'
}) })
}, },
onChange: function(e) {
this.old.x = e.detail.x
this.old.y = e.detail.y
},
getOneProduct() { getOneProduct() {
api.courseList().then(res => { api.courseList().then(res => {
if (res['success']) { if (res['success']) {
......
...@@ -15,13 +15,14 @@ ...@@ -15,13 +15,14 @@
<view v-if="tabType===1"> <view v-if="tabType===1">
<view class="ulBox"> <view class="ulBox">
<view class="liBox"> <view class="liBox">
<text>昵称:</text> <text>昵称 <text style="font-size: 22rpx;">(被邀请人可修改)</text> </text>
<text> <text>
<input <input
v-model="dataForm.name" v-model="dataForm.name"
class="uni-input" class="uni-input"
maxlength="10" maxlength="10"
placeholder="昵称" placeholder="昵称"
style="width: 300rpx;"
/> />
</text> </text>
</view> </view>
...@@ -30,48 +31,6 @@ ...@@ -30,48 +31,6 @@
<text><input v-model="dataForm.mobileNumber" class="uni-input" type="number" maxlength="11" <text><input v-model="dataForm.mobileNumber" class="uni-input" type="number" maxlength="11"
placeholder="手机号" /></text> placeholder="手机号" /></text>
</view> </view>
<!-- <view class="liBox">
<text>申请身份:</text>
<text>
<picker @change="bindPickerChange" :value="applyIdentity" :range="identityArr">
<view class="uni-input">{{identityArr[applyIdentity]}}</view>
</picker>
</text>
</view>
<view class="liBox">
<text>所属组织:</text>
<text>
<input v-if="isCross==true" v-model="dataForm.areaName" class="uni-input"
placeholder="请填写组织名称" />
<picker v-else @change="bindPChange" :value="index" :range="orgdataList">
<view class="uni-input">{{ orgdataList[index]}}</view>
</picker>
</text>
</view>
<view class="liBox">
<text>是否跨区邀请:</text>
<view class="isCrossBox">
<view :class="{checked:isCross}">
<i class="circle" @click="isCross = true"></i>
<text></text>
</view>
<view :class="{checked:!isCross}">
<i class="circle" @click="isCross = false"></i>
<text></text>
</view>
</view>
</view>
<view class="describeLabel">晋升机制:当事业伙伴成功邀请加盟人数超过10人时,经过人工审核通过后,即可成功晋升为工作室。</view>
-->
<!-- <view class="liBox" v-if="isCross== true">
<text>所属组织名称:</text>
<text>
<picker @change="bindPickerChange" :value="applyIdentity" :range="identityArr">
<view class="uni-input">{{identityArr[applyIdentity]}}</view>
</picker>
</text>
</view> -->
</view> </view>
<!-- <share></share> --> <!-- <share></share> -->
<button type="primary" plain="true" class="sendInvite" @click="shareToggle()">发出邀请</button> <button type="primary" plain="true" class="sendInvite" @click="shareToggle()">发出邀请</button>
...@@ -81,25 +40,13 @@ ...@@ -81,25 +40,13 @@
<h4 class="noListTip" v-if="!inviteLists || inviteLists.length<=0">暂无邀请记录!</h4> <h4 class="noListTip" v-if="!inviteLists || inviteLists.length<=0">暂无邀请记录!</h4>
<view class="listUl ulBox" v-for="(item,index) in inviteLists" :key="index"> <view class="listUl ulBox" v-for="(item,index) in inviteLists" :key="index">
<view class="liBox"> <view class="liBox">
<text>姓名</text> <text>昵称</text>
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="liBox"> <view class="liBox">
<text>手机号:</text> <text>手机号:</text>
<text>{{item.mobileNumber}}</text> <text>{{item.mobileNumber}}</text>
</view> </view>
<!-- <view class="liBox">
<text>申请身份:</text>
<text>{{item.partnerLevel == 'A1'? '事业伙伴' : '工作室'}}</text>
</view>
<view class="liBox">
<text>所属组织:</text>
<text>{{item.orgName}}</text>
</view>
<view class="liBox">
<text>是否跨区邀请:</text>
<text>{{item.hasCrossDistrict==1 ? '是' : '否'}}</text>
</view> -->
<view class="liBox"> <view class="liBox">
<text>邀请状态:</text> <text>邀请状态:</text>
<text v-if="item.approvalStatus=='0'">邀请中</text> <text v-if="item.approvalStatus=='0'">邀请中</text>
...@@ -199,7 +146,7 @@ ...@@ -199,7 +146,7 @@
}else { }else {
this.ydLogoShare = `${shareURL}/static/logo2.png`; this.ydLogoShare = `${shareURL}/static/logo2.png`;
} }
let dataForm = uni.getStorageSync('userinfodataForm') let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.realName = dataForm.realName || dataForm.nickName; this.realName = dataForm.realName || dataForm.nickName;
this.invitationCode = dataForm.invitationCode this.invitationCode = dataForm.invitationCode
if(!this.realName){ if(!this.realName){
...@@ -222,7 +169,11 @@ ...@@ -222,7 +169,11 @@
queryInfo(){ queryInfo(){
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{ api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if(res['success']){ if(res['success']){
uni.setStorageSync('userinfodataForm', res.data); delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
this.realName = res.data.realName ||res.data.nickName ; this.realName = res.data.realName ||res.data.nickName ;
this.invitationCode = res.data.invitationCode; this.invitationCode = res.data.invitationCode;
} }
...@@ -293,6 +244,7 @@ ...@@ -293,6 +244,7 @@
// this.dataForm.name = '' // this.dataForm.name = ''
// return // return
// } // }
this.dataForm.remarkName = this.dataForm.name
if (common.mobileNoValid(this.dataForm.mobileNumber)) { if (common.mobileNoValid(this.dataForm.mobileNumber)) {
api.saveApplyInfo(this.dataForm).then(res => { api.saveApplyInfo(this.dataForm).then(res => {
if (res['success']) { if (res['success']) {
......
...@@ -121,6 +121,14 @@ ...@@ -121,6 +121,14 @@
</view> </view>
</view> </view>
</view> </view>
<boot-page
loginSource="我的团队"
v-if="sharelogin"
ref="sharelogin"
@close="sharelogin = false"
@afterLogin="afterLogin"
pageSource="myTeam"
></boot-page>
</view> </view>
</template> </template>
...@@ -129,9 +137,11 @@ ...@@ -129,9 +137,11 @@
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import api from "@/api/api"; import api from "@/api/api";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import BootPage from "@/components/bootpage/bootpage.vue";
export default { export default {
components: { components: {
CommonTimePicker CommonTimePicker,
BootPage
}, },
data() { data() {
return { return {
...@@ -164,7 +174,6 @@ ...@@ -164,7 +174,6 @@
myTeamList:[],//我的团队表格数据, myTeamList:[],//我的团队表格数据,
myTeamData:{},//我的团队总数据, myTeamData:{},//我的团队总数据,
CffpOrgInfoReqVO: { CffpOrgInfoReqVO: {
userId: uni.getStorageSync('cffp_userId'),
startDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`, startDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`,
endDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`, endDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`,
courseOrPolicy: '1', courseOrPolicy: '1',
...@@ -175,7 +184,8 @@ ...@@ -175,7 +184,8 @@
totalCoursePrice: '0.00', // 总销售额 totalCoursePrice: '0.00', // 总销售额
monthStandardSales:'0.00',//本月团队标准销售额 monthStandardSales:'0.00',//本月团队标准销售额
myTeamAchievementList:[],//我的业绩数据列表, myTeamAchievementList:[],//我的业绩数据列表,
marginTop:'30rpx' marginTop:'30rpx',
sharelogin: false,
} }
}, },
watch: { watch: {
...@@ -260,29 +270,30 @@ ...@@ -260,29 +270,30 @@
} }
}, },
}, },
onLoad(){ onLoad(options){
this.getmyseatem() // 未登录,弹出登录框
this.getqueryTeamAchievement() if(options.myTeam&&(!uni.getStorageSync('loginType')||uni.getStorageSync('loginType')=='visitor' )){
this.sharelogin = true
}else {
this.getmyseatem()
this.getqueryTeamAchievement()
}
}, },
onShow() { onShow() {
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
}, },
methods: { methods: {
sortswitch(obj) { sortswitch(obj) {
this.currentFilterBtn = obj.id this.currentFilterBtn = obj.id
this.CffpOrgInfoReqVO.sortType = obj.sortType this.CffpOrgInfoReqVO.sortType = obj.sortType
this.getqueryTeamAchievement() this.getqueryTeamAchievement()
// if(obj.sortType == 4){
// this.CffpOrgInfoReqVO.sortType = obj.sortType
// this.getqueryTeamAchievement()
// }else{
// delete this.CffpOrgInfoReqVO.sortType
// this.getqueryTeamAchievement()
// }
}, },
changeTab(item){ changeTab(item){
this.currentTab = item.id this.currentTab = item.id
...@@ -292,6 +303,7 @@ ...@@ -292,6 +303,7 @@
}, },
getqueryTeamAchievement() { getqueryTeamAchievement() {
this.CffpOrgInfoReqVO.userId=uni.getStorageSync('cffp_userId'),
this.CffpOrgInfoReqVO.queryType = this.tabList.filter(item=>item.id == this.currentTab)[0].type this.CffpOrgInfoReqVO.queryType = this.tabList.filter(item=>item.id == this.currentTab)[0].type
this.CffpOrgInfoReqVO.sortType = this.btnList.filter(item=>item.id == this.currentFilterBtn)[0].sortType this.CffpOrgInfoReqVO.sortType = this.btnList.filter(item=>item.id == this.currentFilterBtn)[0].sortType
api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => { api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => {
...@@ -379,6 +391,11 @@ ...@@ -379,6 +391,11 @@
}) })
} }
}, },
afterLogin(){
this.userId = uni.getStorageSync('cffp_userId'),
this.getmyseatem()
this.getqueryTeamAchievement()
}
}, },
} }
......
...@@ -162,6 +162,7 @@ ...@@ -162,6 +162,7 @@
@join="jumpPage('2')" @join="jumpPage('2')"
@continue="jumpPage('1')" @continue="jumpPage('1')"
/> />
<restrictedTip ref="restrictedTip"/>
</view> </view>
</template> </template>
...@@ -175,6 +176,7 @@ ...@@ -175,6 +176,7 @@
import JoinPopup from '@/components/commonPopup/JoinPopup.vue'; import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue"; import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
data() { data() {
return { return {
...@@ -205,6 +207,7 @@ ...@@ -205,6 +207,7 @@
{title:'申请加盟',icon:'icon-hezuo',link:'/myPackageA/applyFranchise/applyFranchise?',isOpen:true,isShow:true,isApply:true}, {title:'申请加盟',icon:'icon-hezuo',link:'/myPackageA/applyFranchise/applyFranchise?',isOpen:true,isShow:true,isApply:true},
{key:'06',title:'邀请加盟',icon:'icon-yaoqing',link:'/pages/inviteJoin/inviteJoin',isOpen:true,isShow:true,identity: true}, {key:'06',title:'邀请加盟',icon:'icon-yaoqing',link:'/pages/inviteJoin/inviteJoin',isOpen:true,isShow:true,identity: true},
{title:'我的团队',icon:'icon-tuandui',link:'/pages/personalCenter/myTeam',isOpen:true,isShow:true,identity: true}, {title:'我的团队',icon:'icon-tuandui',link:'/pages/personalCenter/myTeam',isOpen:true,isShow:true,identity: true},
// {title:'我的团队',icon:'icon-tuandui',link:'/myPackageA/myTeam/myTeam',isOpen:true,isShow:true,identity: true},
{title:'育成团队',icon:'icon-yuchengguanxi',link:'/pages/personalCenter/myTeamIncubate',isOpen:true,isShow:true,identity: true}, {title:'育成团队',icon:'icon-yuchengguanxi',link:'/pages/personalCenter/myTeamIncubate',isOpen:true,isShow:true,identity: true},
], ],
}, },
...@@ -232,7 +235,8 @@ ...@@ -232,7 +235,8 @@
components:{ components:{
tabBar, tabBar,
JoinPopup, JoinPopup,
PartnerTipPopup PartnerTipPopup,
restrictedTip
}, },
onShow() { onShow() {
this.loginType = uni.getStorageSync('loginType') this.loginType = uni.getStorageSync('loginType')
...@@ -405,7 +409,6 @@ ...@@ -405,7 +409,6 @@
url: '/myPackageA/login/login?from=personalCenter' url: '/myPackageA/login/login?from=personalCenter'
}) })
try { try {
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor'); uni.setStorageSync('loginType','visitor');
} catch (e) { } catch (e) {
...@@ -478,12 +481,15 @@ ...@@ -478,12 +481,15 @@
'我的', '我的',
'pages/personalCenter/personalCenter' 'pages/personalCenter/personalCenter'
) )
if(this.customerBasicInfo.userIsActive == 2){
this.$refs.restrictedTip.open()
return
}
this.getPartnerStatistic() this.getPartnerStatistic()
return return
} }
//当为见习合伙人的时候,弹出框提示 //当为见习合伙人的时候,弹出框提示
if(item.key == '06'&& this.userInfo.levelCode == 'P1' && uni.getStorageSync('loginType') == 'codelogin'){ if(item.key == '06'&& this.userInfo.levelCode == 'P1' && uni.getStorageSync('loginType') == 'codelogin'&& this.userInfo.userIsActive == 1){
this.$refs.PartnerTipPopup.open() this.$refs.PartnerTipPopup.open()
return return
} }
...@@ -597,11 +603,9 @@ ...@@ -597,11 +603,9 @@
this.inviteEqrode = this.customerBasicInfo.invitationCode; this.inviteEqrode = this.customerBasicInfo.invitationCode;
uni.setStorageSync('user_mobile', res.data.mobile) uni.setStorageSync('user_mobile', res.data.mobile)
uni.setStorageSync('userinfodataForm', res.data)
}else { }else {
// 清空全部本地存储
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor') uni.setStorageSync('loginType','visitor')
this.showMyName = '' this.showMyName = ''
this.loginType = 'visitor' this.loginType = 'visitor'
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!-- #endif --> <!-- #endif -->
<view class=""> <view class="">
<menu-list :menuList="minorMenuLists"></menu-list> <menu-list :menuList="minorMenuLists" @tipMessage="tipMessage()"></menu-list>
</view> </view>
...@@ -21,8 +21,10 @@ ...@@ -21,8 +21,10 @@
}, },
data() { data() {
return { return {
userInfo:{},
minorMenuLists: [ minorMenuLists: [
{ {
key:'1',
title: '手机号绑定', title: '手机号绑定',
icon: '', icon: '',
link: '', link: '',
...@@ -30,42 +32,45 @@ ...@@ -30,42 +32,45 @@
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isTips: false, isTips: false,
isType: 'text' isType: 'text',
isJump: true
}, },
// {
// title: '重置密码',
// icon: '',
// link: '/pages/personalCenter/accountoperation/resetpassword',
// isOpen: true,
// isShow: true,
// isTips: false,
// isType: 'radio'
// },
{ {
title: '注销账号', key:'2',
title: '合伙人解约',
icon: '', icon: '',
link: '/myPackageA/setting/logOff', link: '/myPackageA/setting/logOff',
isOpen: true, isOpen: true,
isShow: true, isShow: true,
isTips: false, isTips: false,
isType: 'radio' isType: 'radio',
isJump:false,
} }
] ]
} }
}, },
onShow() { onShow() {
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
if(this.userInfo.partnerIsActive&&this.userInfo.partnerIsActive==2){
this.minorMenuLists.forEach(item=>{
if(item.key=='2'){
item.isJump = true
}
})
}
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
}, },
methods:{ methods:{
goBack() { goBack() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
} },
} }
} }
</script> </script>
......
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
} }
}, },
onLoad() { onLoad() {
let dataForm = uni.getStorageSync('userinfodataForm')
},
onShow() {
let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.mobile = dataForm.mobile this.mobile = dataForm.mobile
}, },
destroyed() { destroyed() {
......
...@@ -43,14 +43,14 @@ ...@@ -43,14 +43,14 @@
isShow: true, isShow: true,
isTips: true, isTips: true,
}, },
{ // {
title: '关于'+companyInfo.appName+'APP', // title: '关于'+companyInfo.appName+'APP',
icon: 'myCertify', // icon: 'myCertify',
link: '/pages/personalCenter/accountoperation/aboutcffp', // link: '/pages/personalCenter/accountoperation/aboutcffp',
isOpen: true, // isOpen: true,
isShow: true, // isShow: true,
isTips: false, // isTips: false,
}, // },
] ]
} }
}, },
...@@ -59,7 +59,17 @@ ...@@ -59,7 +59,17 @@
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
// #ifdef APP
this.minorMenuLists.push({
title: '关于'+companyInfo.appName+'APP',
icon: 'myCertify',
link: '/pages/personalCenter/accountoperation/aboutcffp',
isOpen: true,
isShow: true,
isTips: false,
},)
// #endif
}, },
destroyed() { destroyed() {
uni.hideToast(); uni.hideToast();
...@@ -85,16 +95,16 @@ ...@@ -85,16 +95,16 @@
'设置', '设置',
'pages/personalCenter/system/settings' 'pages/personalCenter/system/settings'
) )
uni.redirectTo({
url:'/myPackageA/login/login'
})
try { try {
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor'); uni.setStorageSync('loginType','visitor');
} catch (e) { } catch (e) {
console.log(e) console.log(e)
// error // error
} }
uni.redirectTo({
url:'/myPackageA/login/login'
})
uni.showToast({ uni.showToast({
title: '操作成功', title: '操作成功',
icon: 'none' icon: 'none'
......
<template> <template>
<view class="content"> <view class="container">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text>
<!-- #endif -->
<view class="header">
<view class="headportrait" @click="uploadAvatar()"> <view class="userHeader">
<image :src="optionForm.headPicture ? optionForm.headPicture :companyLogo" mode="widthFix"></image> <!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text>
<!-- #endif -->
<view class="headerBox">
<view class="add">
<text class="iconfont icon-jiahao" ></text>
</view>
<view class="avartBox" @click="uploadAvatar()">
<image :src="optionForm.headPicture ? optionForm.headPicture :companyLogo" mode="widthFix"></image>
</view>
</view> </view>
</view> </view>
<!-- <view class="linechart"> <view class="userInformation">
<echarts ref="echart" :option="option" style="height: 300px;"></echarts> <view style="flex: 1;">
</view> --> <view class="wave">
<view class="band"> <image src="@/static/images/wave2.png" mode="widthFix"></image>
<view class="contentItem"> <view class="nickNameBox">
<text class="left">姓名</text> <view class="box">
<input <view style="padding-bottom: 20rpx;">昵称</view>
class="user-input" <input
v-model="optionForm.realName" v-model="optionForm.nickName"
type="text" maxlength="10"
placeholder="请输入姓名" type="text"
maxlength="10" placeholder="请输入2~10个字符"
/> />
</view>
</view>
</view>
<view class="shimingBox">
<view class="itemBox">
<view class="title">
实名信息
</view>
<view class="subTit">
<text class="iconfont icon-circleDuiHao"></text>
<text>您提供的身份信息只用于实名制签约和税务申报</text>
</view>
<view class="tips">
姓名和证件号码必须和证件信息相同
</view>
<view class="formBox">
<view class="formItem">
<view class="left">
<text class="require">*</text>
<text>姓名</text>
</view>
<input
class="user-input"
maxlength="10"
type="text"
placeholder="请输入"
v-model="realInfo.shiming.realName"
/>
</view>
<view class="formItem" @click="this.showIdType = true">
<view class="left">
<text class="require">*</text>
<text>证件类型</text>
</view>
<commonSelect
:dataList="idTypesList"
:visible="showIdType"
:showValue="idTypeIdx"
@confirm="changeIdTypeSelect"
@close="showIdType=false"
v-if="idTypesList.length>1"
/>
</view>
<view class="formItem">
<view class="left">
<text class="require">*</text>
<text>证件号码</text>
</view>
<input
class="user-input"
maxlength="18"
type="number"
placeholder="请输入"
v-model="realInfo.shiming.idNumber"
/>
</view>
</view>
</view>
</view>
</view> </view>
<view class="contentItem"> <view class="bottomBox">
<text class="left">昵称</text> <view class="cancelBtn" @click="$refs.unbindTipPopup.open()">
<input class="user-input" v-model="optionForm.nickName" maxlength="10" type="text" 取消
placeholder="请输入2~10个字符" /> </view>
<view class="saveBtn" @tap="submitinfo">
<text class="iconfont icon-save" ></text>
<text>保存</text>
</view>
</view> </view>
<!-- <view class="contentItem">
<text>个人简介</text>
<textarea class="user-textarea" v-model="optionForm.userDescription" placeholder="请输入个人简介"></textarea>
</view> -->
</view>
<view class="footer">
<button class="user-button" @tap="submitinfo">保存</button>
</view> </view>
<!-- 解绑实名提示 -->
<partner-tip-popup
ref="unbindTipPopup"
content="确定撤销所有修改吗?"
joinText="暂不撤销"
continueText="确认撤销"
btnType="horizontal"
:tipIcon="true"
@join="continueCancel()"
@continue="$refs.unbindTipPopup.close()"
/>
</view> </view>
</template> </template>
...@@ -44,19 +120,24 @@ ...@@ -44,19 +120,24 @@
import { import {
CommonUpload CommonUpload
} from '@/util/uploaderFile' } from '@/util/uploaderFile'
import Echarts from '@/components/charts/charts.vue'
import EchartsEl from '@/components/echarts/echarts-el.vue'
import api from "@/api/api"; import api from "@/api/api";
import common from '../../common/common'; import common from '../../common/common';
import {companyInfo} from "@/environments/environment"; import {companyInfo,shareURL} from "@/environments/environment";
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import commonSelect from '@/components/commonSelect/commonSelect.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
export default { export default {
data() { data() {
return { return {
idTypeIdx: null,//证件默认值
showIdType:false,//证件类型下拉框
idTypesList: [{id:null,name:'请选择'}],
//实名信息
realInfo:{
shiming:{},//实名信息
},
isComposing: false, isComposing: false,
// 敏感词列表(可扩展)
bannedWords: ["admin", "test", "root", "password"],
companyType : companyInfo.companyType, companyType : companyInfo.companyType,
companyLogo : '../../static/logo2.png', companyLogo : '../../static/logo2.png',
dataForm: { dataForm: {
...@@ -68,30 +149,13 @@ ...@@ -68,30 +149,13 @@
targetSeq: "0" targetSeq: "0"
}, },
optionForm: {}, optionForm: {},
option :{ tempInfo:{} //暂存信息 ,以便取消恢复未填写之前的数据
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
}
]
}
} }
}, },
components: { components: {
Echarts, commonSelect,
EchartsEl PartnerTipPopup
}, },
onLoad(options) { onLoad(options) {
if(this.companyType == '1'){ if(this.companyType == '1'){
...@@ -99,64 +163,94 @@ ...@@ -99,64 +163,94 @@
}else if(this.companyType == '2'){ }else if(this.companyType == '2'){
this.companyLogo='../../static/logo2.png'; this.companyLogo='../../static/logo2.png';
} }
this.optionForm = JSON.parse(options.customerBasicInfo) // 使用深拷贝保存初始数据
const initialData = JSON.parse(options.customerBasicInfo);
this.optionForm = JSON.parse(JSON.stringify(initialData));
this.tempInfo.optionForm = JSON.parse(JSON.stringify(initialData));
// 初始化 realInfo.shiming 和 tempInfo.shiming
this.realInfo.shiming = {};
this.tempInfo.shiming = {};
// this.optionForm = this.tempInfo.optionForm = JSON.parse(options.customerBasicInfo)
}, },
onShow() { onShow() {
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
setWechatShare(); setWechatShare();
}, window.location.href); }, window.location.href);
// #endif // #endif
this.getIdType()
}, },
methods: { methods: {
handleKeyDown(e) { continueCancel(){
console.log('this.isComposing',this.isComposing); // 使用深拷贝还原数据
const key = e.key; this.optionForm = JSON.parse(JSON.stringify(this.tempInfo.optionForm));
if (this.isComposing || ["Backspace", "Delete", "ArrowLeft", "ArrowRight"].includes(key)) return; this.realInfo.shiming = JSON.parse(JSON.stringify(this.tempInfo.shiming));
if (!/^[a-zA-Z0-9\u4e00-\u9fa5]$/.test(key)) { this.idTypeIdx = this.tempInfo.idTypeIdx;
e.preventDefault(); this.$refs.unbindTipPopup.close();
uni.showToast({ title: "请输入汉字", icon: "none" }); },
}
},
handleInput(e) {
if (this.isComposing) return; // 正在输入拼音,不处理
let value = e.detail.value;
// 1. 过滤特殊字符(仅允许英文、数字、汉字)
value = value.replace(/[^a-zA-Z0-9\u4e00-\u9fa5]/g, "");
// 2. 检查敏感词
const hasBannedWord = this.bannedWords.some(word =>
value.toLowerCase().includes(word.toLowerCase())
);
if (hasBannedWord) {
uni.showToast({
title: "包含敏感词汇,请修改",
icon: "none"
});
value = value.replace(new RegExp(this.bannedWords.join("|"), "gi"), "");
}
// 3. 限制长度(20字符)
if (value.length > 20) {
value = value.slice(0, 20);
uni.showToast({
title: "最多输入20个字符",
icon: "none"
});
}
// 4. 更新数据
this.optionForm.realName = value;
this.$nextTick(() => this.optionForm.realName = value); // iOS 兼容
},
handleCompositionEnd(e) {
this.isComposing = false;
this.handleInput(e); // 拼音输入结束,检查内容
},
// 改变实名证件类型
changeIdTypeSelect(value){
this.idTypeIdx= value;
this.realInfo['shiming'].idType= this.idTypesList[value].id
this.showIdType = false
},
getIdType(){
api.dropOptionsQuery({code:'SYS_ID_TYPE'}).then((res)=>{
if(res['success']&&res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'].length>0){
const result = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList']
result.forEach(item=>{
this.idTypesList.push({name:item.dropOptionName,id:item.dropOptionCode})
})
this.getImproveInfo()
}
})
},
// 查询实名信息
getImproveInfo(){
let params = {
userId:uni.getStorageSync('cffp_userId'),
oprType:'0'//因为接口不传这个值会报错,所以传一个值,拿到实名信息
}
api.improveInfo(params).then((res)=>{
if(res['success']){
let result = res['data']
for (let key in result) {
if(key!='userId'&&!result[key]){
result[key] = {}
}
}
if(JSON.stringify( result.realNameAuthResponse)!='{}'){
// 使用深拷贝
this.realInfo.shiming = JSON.parse(JSON.stringify(result.realNameAuthResponse));
this.tempInfo.shiming = JSON.parse(JSON.stringify(result.realNameAuthResponse));
// this.realInfo.shiming = this.tempInfo.shiming = result.realNameAuthResponse
}
this.$nextTick(()=>{
if(JSON.stringify(this.realInfo.shiming) != '{}'){
console.log(' this.idTypesList', this.idTypesList);
let index = this.idTypesList.findIndex(item=>item.id==this.realInfo.shiming.idType)
if(index !== -1){
this.idTypeIdx = this.tempInfo.idTypeIdx = index
}
}
})
console.log('this.tempInfo',this.tempInfo);
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
goBack() { goBack() {
let back = getCurrentPages(); let back = getCurrentPages();
...@@ -174,48 +268,129 @@ ...@@ -174,48 +268,129 @@
this.optionForm.headPicture = res.data.filePath this.optionForm.headPicture = res.data.filePath
}) })
}, },
// 修改后的表单校验方法
validateForm() {
const emptyFields = [];
// 实名信息校验
if(!this.realInfo.shiming.realName || this.realInfo.shiming.realName.trim() === '') {
emptyFields.push('姓名');
}
if(!this.realInfo.shiming.idType) {
emptyFields.push('证件类型');
}
if(!this.realInfo.shiming.idNumber || this.realInfo.shiming.idNumber.trim() === '') {
emptyFields.push('证件号码');
}
return {
isValid: emptyFields.length === 0,
emptyFields
};
},
// 修改个人资料接口 // 修改个人资料接口
submitinfo() { submitinfo() {
if(!this.optionForm.realName || this.optionForm.realName.length <= 0){ if (this.optionForm.nickName&&this.optionForm.nickName.length<2) {
uni.showToast({title: '请填写真实姓名',duration: 2000,icon: 'none'}); uni.showToast({title: '昵称为2~10个字符',duration: 2000,icon: 'none'});
return
}
const validateResult = this.validateForm();
if(!validateResult.isValid) {
let message = '请完善以下信息:\n';
validateResult.emptyFields.forEach((field, index) => {
message += `${index + 1}. ${field}\n`;
});
uni.showModal({
title: '提示',
content: message,
showCancel: false,
confirmText: '我知道了'
});
return; return;
}else if (!common.nameValid(this.optionForm.realName)) { }
let that = this; if (!common.nameValid(this.realInfo.shiming.realName)) {
uni.showToast({title: '请填写真实姓名',duration: 2000,icon: 'none'}); uni.showToast({title: '请填写真实姓名',duration: 2000,icon: 'none'});
this.optionForm.realName = '' this.realInfo.shiming.realName = ''
return
}else if (this.optionForm.nickName&&this.optionForm.nickName.length<2) {
uni.showToast({title: '昵称为2~10个字符',duration: 2000,icon: 'none'});
return return
}else{
this.saveUserInfo();
} }
}, if(this.realInfo.shiming.idType == 'IDENTITY_CARD'&&this.realInfo.shiming.idNumber.length<18 ){
saveUserInfo(){ uni.showToast({title: '请输入18位实名身份证号',duration: 2000,icon: 'none'});
let UserRequestVO = { return
id: uni.getStorageSync('cffp_userId'),
realName: this.optionForm.realName,
nickName: this.optionForm.nickName,
headPicture: this.optionForm.headPicture,
userDescription: this.optionForm.userDescription
} }
api.updateinfo(UserRequestVO).then(res => { if(this.realInfo.shiming.idType == 'IDENTITY_CARD' ){
if (res.success) { let obj = common.IdCodeValid(this.realInfo.shiming.idNumber)
uni.showToast({title: '修改成功',duration: 2000,icon: 'none'}); if(!obj.pass){
dataHandling.pocessTracking( uni.showToast({title: '请输入有效的实名身份证号',duration: 2000,icon: 'none'});
'个人资料', return
`成功修改个人资料`,
'点击',
2,
'个人资料',
'pages/personalCenter/user-information'
)
uni.$emit("handClick", {data: this.optionForm});
setTimeout(() => {
uni.navigateBack({delta: 1});
}, 1000)
} }
}) }
this.saveUserInfo();
},
saveUserInfo() {
let UserRequestVO = {
id: uni.getStorageSync('cffp_userId'),
realName: this.optionForm.realName,
nickName: this.optionForm.nickName,
headPicture: this.optionForm.headPicture,
userDescription: this.optionForm.userDescription
}
let params = {
realNameAuthRequest: {...this.realInfo.shiming},
userId: uni.getStorageSync('cffp_userId'),
oprType:0 //只更新实名
}
// 创建两个Promise
const updateInfoPromise = api.updateinfo(UserRequestVO).then(res => {
if (res.success) {
uni.showToast({title: '修改成功', duration: 2000, icon: 'none'});
dataHandling.pocessTracking(
'个人资料',
`成功修改个人资料`,
'点击',
2,
'个人资料',
'pages/personalCenter/user-information'
)
uni.$emit("handClick", {data: this.optionForm});
}
return res;
});
const improveInfoPromise = api.submitImproveInfo(params).then(res => {
if (res['success']) {
dataHandling.pocessTracking(
'实名认证成功',
`在个人中心完成实名认证`,
'点击',
2,
'个人中心实名',
'pages/personalCenter/user-information'
)
} else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
return res;
});
// 等待两个请求都完成
Promise.all([updateInfoPromise, improveInfoPromise])
.then(() => {
setTimeout(() => {
uni.navigateBack({delta: 1});
}, 1000);
})
.catch(error => {
console.error("请求出错:", error);
// 可以在这里添加错误处理逻辑
});
}, },
} }
} }
...@@ -227,16 +402,213 @@ ...@@ -227,16 +402,213 @@
font-size: 12px; font-size: 12px;
margin-left: 10px; margin-left: 10px;
} }
.container{
padding-top: 20rpx;
display: flex;
flex-direction: column;
background-color: #fff;
box-sizing: border-box;
.userHeader{
position: relative;
height: 300rpx;
width: 100%;
box-sizing: border-box;
.headerBox{
margin-top: -20rpx;
margin-left: 100rpx;
position: absolute;
bottom: 15%;
left: 14%;
z-index: 99;
.add{
position: absolute;
bottom: 2%;
right: 3%;
background-color: #20269B;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
padding: 8rpx;
border-radius: 50%;
box-sizing: border-box;
.icon-jiahao{
font-size: 28rpx;
color: #fff;
}
}
.avartBox{
width: 200rpx;
height: 200rpx;
border-radius: 50%;
border: 10rpx solid #fff;
box-sizing: border-box;
box-shadow: 0 0 30rpx 15rpx rgba(150, 150, 150, 0.1);
position: relative;
/* 添加以下属性强制硬件加速 */
transform: translateZ(0);
-webkit-transform: translateZ(0);
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
overflow: hidden;
image{
display: block; /* 确保图片是块级元素 */
width: 100%; /* 宽度填满容器 */
height: 100%; /* 高度填满容器 */
// border-radius: 50%; /* 保持圆形 */
object-fit: cover; /* 防止图片变形(可选) */
/* 同样为图片添加硬件加速 */
transform: translateZ(0);
-webkit-transform: translateZ(0);
}
}
}
}
.userInformation {
position: relative;
flex: 1;
width: 100%;
display: flex;
flex-direction: column;
.wave {
box-sizing: border-box;
min-width: 100%;
height: 120rpx;
position: relative;
padding: 0;
border: none;
box-shadow: 0 0 30rpx 100rpx rgba(253, 248, 245, 0.4);
image {
position: absolute;
top: -80%;
display: block;
min-width: 100%;
height: 100%;
object-fit: fill; /* 或 cover/contain 根据需求调整 */
}
.nickNameBox{
color: #333;
box-sizing: border-box;
width: 100%;
position: absolute;
top: -10%;
left: 0;
z-index: 88;
padding: 0rpx 30rpx 20rpx 30rpx;
font-size: 30rpx;
.box{
border-bottom: 1rpx solid #E4E4E4;
padding-bottom: 20rpx;
}
}
}
.shimingBox{
padding: 30rpx;
background-color: #fff;
color: #333;
position: relative;
.itemBox{
z-index: 100;
margin-bottom: 20rpx;
font-size: 28rpx;
.title{
font-size: 32rpx;
font-weight: 600;
color: block;
}
.subTit{
color: #666666;
font-size: 24rpx;
display: flex;
align-items: center;
padding-bottom: 10rpx;
border-bottom: 1rpx solid #EFEFEF;
margin-top: 10rpx;
.icon-circleDuiHao{
font-size: 26rpx;
color: #666666;
margin-right: 5rpx;
}
}
.tips{
color: #F43530;
margin: 15rpx 0;
}
.formBox{
.formItem{
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #E8E8E8;
height: 100rpx;
position: relative;
.left{
font-size: 26rpx;
}
.require{
color: #F43530;
}
.user-input{
color: black;
font-size: 26rpx;
text-align: right;
padding-right: 20rpx;
width: 70%;
}
}
}
}
}
.bottomBox{
box-sizing: border-box;
padding: 40rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 30rpx;
.cancelBtn{
padding: 30rpx 100rpx;
border: 1rpx solid #E4E4E4;
color: #3F4870;
border-radius: 100rpx;
}
.saveBtn{
padding: 30rpx 100rpx;
background-color: #20269B;
color: #fff;
border-radius: 100rpx;
display: flex;
align-items: center;
justify-content: space-between;
.icon-save{
color: #fff;
font-size: 28rpx;
margin-right: 10rpx;
}
}
}
}
}
.content { .content {
padding-top: 20rpx; padding-top: 20rpx;
width: 100vw; width: 100vw;
} }
.user-input { // .user-input {
text-align: right; // text-align: right;
padding-right: 15rpx; // padding-right: 15rpx;
flex: 1; // flex: 1;
} // }
.user-textarea { .user-textarea {
border: 1px solid #C7C7C7; border: 1px solid #C7C7C7;
...@@ -276,14 +648,6 @@ ...@@ -276,14 +648,6 @@
transform: translateZ(0); transform: translateZ(0);
-webkit-transform: translateZ(0); -webkit-transform: translateZ(0);
} }
/* .headportrait-img {
width: 260rpx;
height: 260rpx;
border-radius: 50%;
background-size: cover;
background-repeat: no-repeat center;
} */
.contentItem { .contentItem {
margin-top: 40rpx; margin-top: 40rpx;
display: flex; display: flex;
......
<template> <template>
<view class="container"> <view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="kuaiBox" v-for="item in mainMenuLists" :key="item.id"> <view class="kuaiBox" v-for="item in mainMenuLists" :key="item.id">
<view class="kuaiTit"> <view class="kuaiTit">
{{item.categoryName}} {{item.categoryName}}
...@@ -30,8 +32,8 @@ ...@@ -30,8 +32,8 @@
<script> <script>
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
import tabBar from '../../components/tabBar/tabBar.vue'; import tabBar from '../../components/tabBar/tabBar.vue';
import courseItem from "@/components/courseItem/courseItem.vue";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default { export default {
data() { data() {
return { return {
...@@ -72,6 +74,9 @@ ...@@ -72,6 +74,9 @@
] ]
} }
}, },
components: {
restrictedTip
},
onShow() { onShow() {
// #ifdef H5 // #ifdef H5
initJssdkShare(() => { initJssdkShare(() => {
......
...@@ -55,6 +55,24 @@ ...@@ -55,6 +55,24 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe333;</span>
<div class="name">加号</div>
<div class="code-name">&amp;#xe333;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe302;</span>
<div class="name">save</div>
<div class="code-name">&amp;#xe302;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe301;</span>
<div class="name">加号2-fill</div>
<div class="code-name">&amp;#xe301;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe300;</span> <span class="icon iconfont">&#xe300;</span>
<div class="name">icon_对号-面</div> <div class="name">icon_对号-面</div>
<div class="code-name">&amp;#xe300;</div> <div class="code-name">&amp;#xe300;</div>
...@@ -384,9 +402,9 @@ ...@@ -384,9 +402,9 @@
<pre><code class="language-css" <pre><code class="language-css"
>@font-face { >@font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('iconfont.woff2?t=1751592106397') format('woff2'), src: url('iconfont.woff2?t=1754967710345') format('woff2'),
url('iconfont.woff?t=1751592106397') format('woff'), url('iconfont.woff?t=1754967710345') format('woff'),
url('iconfont.ttf?t=1751592106397') format('truetype'); url('iconfont.ttf?t=1754967710345') format('truetype');
} }
</code></pre> </code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
...@@ -413,6 +431,33 @@ ...@@ -413,6 +431,33 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont icon-jiahao"></span>
<div class="name">
加号
</div>
<div class="code-name">.icon-jiahao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-save"></span>
<div class="name">
save
</div>
<div class="code-name">.icon-save
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiahao2fill"></span>
<div class="name">
加号2-fill
</div>
<div class="code-name">.icon-jiahao2fill
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-icon_duihao-mian"></span> <span class="icon iconfont icon-icon_duihao-mian"></span>
<div class="name"> <div class="name">
icon_对号-面 icon_对号-面
...@@ -909,6 +954,30 @@ ...@@ -909,6 +954,30 @@
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiahao"></use>
</svg>
<div class="name">加号</div>
<div class="code-name">#icon-jiahao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-save"></use>
</svg>
<div class="name">save</div>
<div class="code-name">#icon-save</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiahao2fill"></use>
</svg>
<div class="name">加号2-fill</div>
<div class="code-name">#icon-jiahao2fill</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-icon_duihao-mian"></use> <use xlink:href="#icon-icon_duihao-mian"></use>
</svg> </svg>
<div class="name">icon_对号-面</div> <div class="name">icon_对号-面</div>
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4933433 */ font-family: "iconfont"; /* Project id 4933433 */
src: url('iconfont.woff2?t=1751592106397') format('woff2'), src: url('iconfont.woff2?t=1754967710345') format('woff2'),
url('iconfont.woff?t=1751592106397') format('woff'), url('iconfont.woff?t=1754967710345') format('woff'),
url('iconfont.ttf?t=1751592106397') format('truetype'); url('iconfont.ttf?t=1754967710345') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,6 +13,18 @@ ...@@ -13,6 +13,18 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-jiahao:before {
content: "\e333";
}
.icon-save:before {
content: "\e302";
}
.icon-jiahao2fill:before {
content: "\e301";
}
.icon-icon_duihao-mian:before { .icon-icon_duihao-mian:before {
content: "\e300"; content: "\e300";
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,6 +6,27 @@ ...@@ -6,6 +6,27 @@
"description": "", "description": "",
"glyphs": [ "glyphs": [
{ {
"icon_id": "7192356",
"name": "加号",
"font_class": "jiahao",
"unicode": "e333",
"unicode_decimal": 58163
},
{
"icon_id": "448643",
"name": "save",
"font_class": "save",
"unicode": "e302",
"unicode_decimal": 58114
},
{
"icon_id": "577314",
"name": "加号2-fill",
"font_class": "jiahao2fill",
"unicode": "e301",
"unicode_decimal": 58113
},
{
"icon_id": "4735289", "icon_id": "4735289",
"name": "icon_对号-面", "name": "icon_对号-面",
"font_class": "icon_duihao-mian", "font_class": "icon_duihao-mian",
......
import api from "@/api/api"; import api from "@/api/api";
import dataHandling from './dataHandling' import dataHandling from './dataHandling'
import { initJssdkShare, setWechatShare } from '@/util/fiveshare'; import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
...@@ -19,16 +24,18 @@ const whiteList = [ ...@@ -19,16 +24,18 @@ const whiteList = [
export default function initApp(){ export default function initApp(){
let date = Date.now() let date = Date.now()
uni.addInterceptor('navigateTo', { uni.addInterceptor('navigateTo', {
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转 // 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke (e) { invoke (e) {
let userInfo = {}
if(uni.getStorageSync('cffp_userInfo')){
userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
let pages = getCurrentPages() let pages = getCurrentPages()
let pagesLength = pages.length let pagesLength = pages.length
if(whiteList.indexOf(e.url)==-1&&!uni.getStorageSync('loginType')){ if(whiteList.indexOf(e.url)==-1&&!uni.getStorageSync('loginType')){
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor') uni.setStorageSync('loginType','visitor')
uni.navigateTo({ uni.navigateTo({
url: '/myPackageA/login/login' url: '/myPackageA/login/login'
...@@ -37,8 +44,6 @@ export default function initApp(){ ...@@ -37,8 +44,6 @@ export default function initApp(){
if(uni.getStorageSync('cffp_userId')){ if(uni.getStorageSync('cffp_userId')){
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{ api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if(!res['success']){ if(!res['success']){
// 清空全部本地存储
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor') uni.setStorageSync('loginType','visitor')
uni.navigateTo({ uni.navigateTo({
url: '/myPackageA/login/login' url: '/myPackageA/login/login'
...@@ -47,18 +52,22 @@ export default function initApp(){ ...@@ -47,18 +52,22 @@ export default function initApp(){
} }
// 保存用户得个人信息 // 保存用户得个人信息
if (res['success']) { if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = { const cffp_userInfo = {
name: res['data']['realName'], ...res.data
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
} }
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo)) uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
} }
}) })
} }
if (userInfo.userIsActive == 2 &&uni.getStorageSync('loginType')=='codelogin') {
// 显示禁用用户弹窗
const currentPage = getCurrentPages()[getCurrentPages().length - 1];
currentPage.$refs.restrictedTip.open()
return false; // 返回对象而不是布尔值
}
let whiteArr = ['index','personalCenter','courselist','product'] let whiteArr = ['index','personalCenter','courselist','product']
// 1. 解析 URL 中的 from 参数 // 1. 解析 URL 中的 from 参数
const getQueryParam = (url, key) => { const getQueryParam = (url, key) => {
...@@ -69,7 +78,6 @@ export default function initApp(){ ...@@ -69,7 +78,6 @@ export default function initApp(){
}; };
const fromParam = getQueryParam(e.url, 'from'); const fromParam = getQueryParam(e.url, 'from');
console.log('2222',!hasPermission(e.url));
if(!hasPermission(e.url)){ if(!hasPermission(e.url)){
// 如果 from 参数在 whiteArr 中,说明是tabbar页带着tabbar的标志参数跳转到登录页,以便未登录状态下回到对应的tabbar页 // 如果 from 参数在 whiteArr 中,说明是tabbar页带着tabbar的标志参数跳转到登录页,以便未登录状态下回到对应的tabbar页
if (fromParam && whiteArr.includes(fromParam)) { if (fromParam && whiteArr.includes(fromParam)) {
...@@ -77,7 +85,6 @@ export default function initApp(){ ...@@ -77,7 +85,6 @@ export default function initApp(){
url: `/myPackageA/login/login?from=${fromParam}` url: `/myPackageA/login/login?from=${fromParam}`
}) })
}else { }else {
console.log('zoujinlaile');
uni.redirectTo({ uni.redirectTo({
url: '/myPackageA/login/login' url: '/myPackageA/login/login'
}) })
...@@ -155,4 +162,4 @@ function hasPermission (url) { ...@@ -155,4 +162,4 @@ function hasPermission (url) {
return true return true
} }
return false return false
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment