Commit e8b051d0 by yuzhenWang

加禁用,加注销发测试

parent 3dbd64ac
......@@ -7,7 +7,8 @@
export default {
data() {
return {
invitationHandled: false // 在data中明确定义
invitationHandled: false ,// 在data中明确定义,
dataToken:''
}
},
onLaunch: function() {
......@@ -79,8 +80,33 @@
onShow: function(options) {
console.log('App Show', options);
// 每次进应用显示时检查用户状态
this.checkUserStatus();
if(this.dataToken){
const params = {
loginType:'5',
authToken:this.dataToken
}
api.loginVerification(params).then((res)=>{
if(res['success']){
uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', this.userId);
uni.setStorageSync('uni-token', res.data['token']);
this.checkUserStatus();
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}else {
// 每次进应用显示时检查用户状态
this.checkUserStatus();
}
// App平台从options获取参数
// #ifdef APP-PLUS
if(options && options.query) {
......@@ -92,7 +118,7 @@
console.log('App Hide')
},
methods: {
// 检查用户状态的方法
// 检查用户状态的方法 防止多端操作导致此用户不存在
async checkUserStatus() {
// 只有已登录用户才需要检查
if(uni.getStorageSync('loginType') == 'codelogin' && uni.getStorageSync('cffp_userId')) {
......@@ -128,15 +154,12 @@
}
}
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
...res.data
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
uni.setStorageSync('userinfodataForm', res.data);
}
} catch (err) {
console.error('检查用户状态失败:', err);
......@@ -238,6 +261,9 @@
// 使用uni.setStorageSync存储到本地
try {
if(params.dataToken){
this.dataToken = params.dataToken
}
if(params.addSystemType){
uni.setStorageSync('addSystemType', params.addSystemType);
}
......
......@@ -29,7 +29,7 @@
<image style="width: 80rpx;height: 80rpx;" src="../../static/Slice3.png" mode=""></image>
</view>
</view>
<restrictedTip ref="restrictedTip"/>
</view>
</template>
......@@ -38,6 +38,7 @@
import common from '../../common/common';
import {companyInfo} from "@/environments/environment";
import dataHandling from "@/util/dataHandling";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue'
export default {
props:{
wayType:{
......@@ -49,6 +50,9 @@
type:String,
}
},
components:{
restrictedTip
},
data() {
return {
agreeFlag:false,
......@@ -132,6 +136,11 @@
}
api.loginVerification(params).then((res)=>{
if(res['success']){
// 禁用账号,不让登录
if(res.data.userIsActive == 2){
this.$refs.restrictedTip.open()
return
}
this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin');
......@@ -170,12 +179,9 @@
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
...res.data
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
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>
<view class="wrapper">
<restrictedTip ref="restrictedTip"/>
<view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin">
<view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view>
<!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> -->
......@@ -183,7 +184,7 @@
uni.setStorageSync('cffp_userId',this.userId);
uni.setStorageSync('loginType',this.loginType);
uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
if(urlType == 'personalCenter'){
uni.switchTab({
url:'/pages/personalCenter/personalCenter'
......
......@@ -16,16 +16,27 @@
</view>
</view>
</view>
<restrictedTip
ref="restrictedOrCanelTip"
:showCode="false"
confirmText="知道了"
content="您已解约,无需重复操作"
@confirm="$refs.restrictedOrCanelTip.close()"
/>
</view>
</template>
<script>
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
props: {
menuList: {
type: Array
}
},
components:{
restrictedTip
},
data() {
return {}
},
......@@ -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({
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';
// #ifndef VUE3
import Vue from 'vue'
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// // #ifndef VUE3
// import Vue from 'vue'
// App.mpType = 'app'
// const app = new Vue({
// ...App
// })
// app.$mount()
// // #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
......@@ -22,3 +23,5 @@ export function createApp() {
//#ifdef H5
window.sessionStorage.setItem('firstEntryUrl',window.location.href.split('#')[0])
// #endif
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip
ref="restrictedOrCanelTip"
:showCode="showCode"
confirmText="前往首页"
:content="restrictedOrCanelContent"
@confirm="gotoIndex()"
/>
<image
class="imgbox"
:src="baseURL + `/${imgType}/static/images/applyBg.png`"
......@@ -29,7 +37,6 @@
type="text"
placeholder="请输入2~10个字符"
v-model="form.nickName"
:disabled="editNickName"
/>
</view>
</view>
......@@ -119,9 +126,11 @@
import common from '@/common/common';
import dataHandling from "@/util/dataHandling";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{
everyJoinPopup,
restrictedTip
},
data() {
return {
......@@ -147,6 +156,9 @@
editMobile:false,
shareId:'',//邀请人分享得id
invitationCode:'',//邀请码
showCode:false ,//弹窗是否展示客服二维码
restrictedOrCanelContent:'', //禁用/注销展示文本
sharePosterObj:{invitationCode:'',inviteUserId:''},//通过分享海报进来
}
},
onLoad(options){
......@@ -168,13 +180,13 @@
},
onShow(){
if(uni.getStorageSync('loginType')){
this.loginType = uni.getStorageSync('loginType')
}
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
console.log('show',this.userInfo)
if(uni.getStorageSync('cffp_userId')){
this.userId = uni.getStorageSync('cffp_userId')
}
......@@ -183,12 +195,12 @@
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.editMobile = true
}
// 非邀请状态
if(!this.inviteUserId&&this.loginType == 'codelogin'&&!this.form.nickName){
if(!this.shareId&&this.loginType == 'codelogin'&&!this.form.nickName){
this.queryInfo()
}
// 登录状态
......@@ -202,6 +214,12 @@
},
methods: {
gotoIndex(){
uni.switchTab({
url:'/pages/index/index'
})
this.$refs.restrictedOrCanelTip.close()
},
// 未登录状态下需要重新获取token
checkToken(){
api.checkToken().then(res=>{
......@@ -289,6 +307,24 @@
}
},
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){
common.errorDialog(1,'请输入昵称');
return false;
......@@ -330,13 +366,29 @@
if(!this.loginType || this.loginType == 'visitor'){
api.loginVerification(params).then((res)=>{
if(res['success']){
// 不能登录并且是禁用状态
if(res.data.userIsActive == 2){
this.showCode = true
this.restrictedOrCanelContent = '您的账号处在不可用状态,请扫码添加客服咨询情况'
this.$refs.restrictedOrCanelTip.open()
return
}
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()
// 禁用和注销状态并存,以禁用为准
// 已经进行过注销操作的, 弹窗提示90天内不可再次申请加盟为合伙人
// 登录并且是注销状态
if(res.data.partnerIsActive==2){
this.showCode = false
this.restrictedOrCanelContent = '90天内不可再次申请加盟为合伙人'
this.$refs.restrictedOrCanelTip.open()
return
}
// 是合伙人就不让在加盟
if(res.data.isPartner){
this.$refs.everyJoinPopup.open()
......@@ -370,12 +422,9 @@
}else {
this.editNickName = false
}
delete res.data.commonResult
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
...res.data
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
......@@ -388,7 +437,7 @@
// 申请加盟
getApply(){
let params = {}
if(this.inviteUserId){
if(this.shareId){
params = {
applyType:'1',
applyUserId:this.userId,
......@@ -398,13 +447,14 @@
inviterInvitationCode:this.invitationCode,
shareId:this.shareId
}
// return
}else {
params = {
applyType:'2',
applyUserId:this.userId,
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)=>{
......@@ -423,23 +473,20 @@
'pages/saleCourseLists/saleCourseLists'
)
this.$refs.successJoinPopup.open()
}else{
// 由于注销需求,依据后端报错展示弹窗
this.showCode = false
this.restrictedOrCanelContent = res['message']
this.$refs.restrictedOrCanelTip.open()
// uni.showToast({
// title: '您已加盟成功',
// duration: 1000,
// title: res['message'],
// duration: 2000,
// icon: 'none'
// })
// uni.switchTab({
// url:'/pages/index/index'
// })
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
},
},
}
......
<template>
<view class="wrapper">
<restrictedTip ref="restrictedTip"/>
<view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin">
<view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view>
<!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> -->
......@@ -61,6 +62,7 @@
import common from '../../common/common';
import {companyInfo} from "@/environments/environment";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
data() {
return {
......@@ -89,6 +91,9 @@
goBack:true
}
},
components:{
restrictedTip
},
methods: {
c_agreeFlag(){
this.agreeFlag=!this.agreeFlag;
......@@ -179,12 +184,18 @@
}
api.loginVerification(params).then((res)=>{
if(res['success']){
// 禁用账号,不让登录
if(res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.hideLoading()
return
}
this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1');
uni.setStorageSync('cffp_userId',this.userId);
uni.setStorageSync('loginType',this.loginType);
uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
if(urlType == 'personalCenter'){
uni.switchTab({
url:'/pages/personalCenter/personalCenter'
......
......@@ -53,7 +53,7 @@ export default {
}
},
onShow() {
this.userInfo = uni.getStorageSync('userinfodataForm')
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.loginType = uni.getStorageSync('loginType')
if(!this.loginType || this.loginType == 'visitor'){
this.codeUrl = `${this.baseURL}/pages/index/index`
......
<template>
<!-- <template>
<view class="account-cancel-protocol">
<view class="header">
<text class="title">账号注销协议</text>
......@@ -159,4 +159,250 @@ export default {
}
}
}
</style> -->
<template>
<view class="container">
<view class="header">
<text class="title">合伙人解约协议</text>
</view>
<view class="content">
<text class="notice">
请您在解除与银盾家族办公室分销系统(以下简称"家办分销")的合伙人关系前,充分阅读、理解并同意下列内容。如您不同意下列任一内容,或无法准确理解任何条款的含义,请不要进行解约操作。您通过网络页面确认申请解约,视为您同意本协议项下所有权利义务。如您对本协议有任何疑问,可通过银盾家族办公室分销系统-我的-咨询客服,联系在线客服。
</text>
<view class="section">
<text class="section-title">1、解约须知</text>
<text class="section-content">
如果您申请解除与家办分销的合伙人关系,请在提交申请前确认以下信息,以保证您的权益和资产安全:
</text>
<view class="subsection">
<text class="subsection-content">
1.1\n您申请解约的合伙人账号应当是您本人注册并使用的账号。该账号应处于正常状态,即非被盗、被封禁(禁言、停用)或其他账号异常情形。
</text>
</view>
<view class="subsection">
<text class="subsection-content">
1.2\n账号内资产已处理完毕。包括但不限于:您的家办分销账户佣金、分红、优惠券、权益、积分、兑换码等资产,可用款项已全部提现,或通过兑换、消费等途径支用完毕。您的账户内没有未使用完毕的合伙人权益或您已购买但未使用完的其他权益类、资格类产品和订单。同时,您也有权选择放弃该账号内的资产。
</text>
</view>
<view class="subsection">
<text class="subsection-content">1.3 账号已解除与第三方产品的绑定关系或授权登录关系。</text>
</view>
<view class="subsection">
<text class="subsection-content">
1.4\n账号未涉及任何争议纠纷,包括但不限于与客户、其他合伙人或家办分销平台的纠纷。
</text>
</view>
<view class="subsection">
<text class="subsection-content">1.5 实名账号已解除实名信息(如适用)。</text>
</view>
<view class="subsection">
<text class="subsection-content">
1.6\n合伙人关系解除后,包括但不限于《家办分销合伙人协议》、《隐私政策》等项下所有权利义务终止。
</text>
</view>
</view>
<view class="section">
<text class="section-title">2、特别提醒</text>
<view class="subsection">
<text class="subsection-content">
2.1\n您的合伙人身份一旦解除将不可恢复,您将无法再享有合伙人权益或找回任何与合伙人身份相关的内容或信息(即使您使用相同的手机号再次注册并使用家办分销系统),包括但不限于:
</text>
<view class="sub-subsection">
<text class="sub-subsection-content">
2.1.1\n您账号下的合伙人资料(如合伙人等级、团队信息、业绩记录等)、与合伙人身份相关的数据和权益(如分红记录、团队收益、专属优惠等),都将无法恢复。请您务必在解约前自行备份与合伙人身份相关的所有内容或信息。您理解并同意,家办分销无法协助您恢复前述内容或信息。
</text>
</view>
<view class="sub-subsection">
<text class="sub-subsection-content">
2.1.2\n您理解并同意,您在解约前确认放弃的合伙人权益、分红、优惠券、积分等,在解约后将无法继续使用,历史交易无法通过该账号进行退款或售后。
</text>
</view>
</view>
<view class="subsection">
<text class="subsection-content">
2.2\n您申请解约的合伙人账号所对应的其他账号应当不存在任何由于解约而导致的未了结的合同关系或其他基于合伙人身份产生的权利义务。家办分销有权认为解约会由此产生未了结的权利义务或纠纷的情况。
</text>
</view>
<view class="subsection">
<text class="subsection-content">
2.3\n在您的解约申请处理期间,如您的合伙人账号被他人举报、投诉、被国家机关调查或正处于诉讼、仲裁程序中,家办分销有权自行终止您的解约流程而无需另行获得您的同意。
</text>
</view>
<view class="subsection">
<text class="subsection-content">
2.4\n解除合伙人关系并不代表解约前的行为和相关责任得到任何形式的豁免或减轻。
</text>
</view>
<view class="subsection">
<text class="subsection-content">2.5 自解约之日起,90天内不可再次申请加盟为合伙人</text>
</view>
</view>
<view class="section">
<text class="section-title">3、争议解决</text>
<view class="subsection">
<text class="subsection-content">
3.1\n凡因本协议引起的或与本协议有关的任何争议,均应提交上海仲裁委员会按照该会仲裁规则进行仲裁。仲裁裁决是终局的,对双方当事人均有约束力。
</text>
</view>
</view>
</view>
<!-- <view class="footer">
<checkbox-group @change="checkboxChange">
<label class="checkbox-label">
<checkbox :checked="agreed" color="#1890ff" />
<text>我已阅读并同意《合伙人解约协议》</text>
</label>
</checkbox-group>
<button class="submit-btn" :disabled="!agreed" @click="handleSubmit">
确认解约
</button>
</view> -->
</view>
</template>
<script>
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
export default {
data() {
return {
}
},
onShow(){
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
}
}
</script>
<style lang="scss" scoped>
.container {
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;
border-radius: 12rpx;
padding: 30rpx;
margin-bottom: 30rpx;
}
.notice {
font-size: 28rpx;
color: #666;
line-height: 1.6;
margin-bottom: 30rpx;
display: block;
}
.section {
margin-bottom: 40rpx;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 20rpx;
display: block;
}
.section-content {
font-size: 28rpx;
color: #666;
line-height: 1.6;
margin-bottom: 20rpx;
display: block;
}
.subsection {
margin-left: 20rpx;
margin-bottom: 20rpx;
}
.subsection-content {
font-size: 28rpx;
color: #666;
line-height: 1.6;
display: block;
white-space: pre-line;
}
.sub-subsection {
margin-left: 40rpx;
margin-top: 10rpx;
}
.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>
\ No newline at end of file
......@@ -11,12 +11,12 @@
<view class="wapperBox">
<view class="warn">
<text class="iconfont icon-redgantanhao"></text>
<text>注销后,您将无法使用当前账号</text>
<text>相关数据也将被删除无法找回</text>
<text>解约后,您可正常使用当前账号</text>
<text>但合伙人相关数据也将被删除无法找回</text>
</view>
<view class="cancelBox">
<view class="title">
注销账号
解约账号
</view>
<view class="phone">
{{mobile}}
......@@ -51,19 +51,20 @@
<view class="empty" v-if="!isTick" @click="isTick=true"></view>
<text v-else class="iconfont icon-icon_duihao-mian" @click="isTick=false"></text>
<text style="color: #666;">我已阅读并同意</text>
<text style="color: #20269B;" @click="jump()">账号注销协议》</text>
<text style="color: #20269B;" @click="jump()">合伙人解约协议》</text>
</view>
<view
class="bottomBtn"
:style="{opacity:isTick?'1':'.5'}"
@click="applyCancel()"
>
申请注销
申请解约
</view>
</view>
<everyJoinPopup
ref="successCancelPopup"
content="注销成功"
content="解约成功"
continueText="前往我的"
:maskClick="false"
@continue="jumpPage"
/>
......@@ -96,16 +97,17 @@
}
},
onLoad() {
let dataForm = uni.getStorageSync('userinfodataForm')
this.mobile = dataForm.mobile
},
onShow(){
let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.mobile = dataForm.mobile
this.lockScroll()
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
},
beforeDestroy() {
console.log('组件销毁');
......@@ -134,15 +136,15 @@
},
jumpPage(){
dataHandling.pocessTracking(
'注销',
`用户注销账号`,
'解约',
`用户解约`,
'点击',
2,
'注销账号',
'解约账号',
'/myPackageA/setting/logOff'
)
uni.switchTab({
url:'/pages/index/index'
url:'/pages/personalCenter/personalCenter'
})
this.$refs.successCancelPopup.close()
},
......@@ -199,10 +201,10 @@
jump(){
dataHandling.pocessTracking(
'查看',
`用户点击了账户注销协议`,
`用户点击了合伙人解约协议`,
'点击',
2,
'注销账号',
'解约账号',
'/myPackageA/setting/logOff'
)
uni.navigateTo({
......@@ -213,7 +215,7 @@
applyCancel(){
if(!this.isTick){
uni.showToast({
title: '请阅读并勾选《账号注销协议》',
title: '请阅读并勾选《合伙人解约协议》',
duration: 3000,
icon: 'none'
})
......@@ -251,11 +253,10 @@
"signatureHash":hashResult,
"timestamp":timestamp,
}
console.log('注销参数',params);
api.cancellation(params).then(res =>{
if(res['success']){
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
// uni.clearStorageSync();
// uni.setStorageSync('loginType','visitor');
this.$refs.successCancelPopup.open()
}else{
uni.showToast({
......@@ -265,7 +266,7 @@
}
})
this.releaseScroll()
this.checkToken()
// this.checkToken()
}
})
},
......@@ -290,21 +291,6 @@
cancel(){
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>
......
......@@ -103,7 +103,8 @@
dropIndex:0,
dropReasons:[{id:null,name:'请选择'}],
withdrawal: true,
readonlyFlag:false
readonlyFlag:false,
tipMessage:''
};
},
methods:{
......@@ -136,7 +137,9 @@
if(res['success']){
this.dropInfo = res['data']
}else {
this.tipMessage = res['message']
this.withdrawal = false
this.readonlyFlag = true
}
})
},
......@@ -144,7 +147,7 @@
submit(){
if(!this.withdrawal){
uni.showToast({
title: '已退款不能重新申请',
title: this.tipMessage,
icon: 'none',
duration: 2000
});
......
<template>
<view class="container">
<!-- -->
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="shareheader" style="" v-if="coursesharing != 1 || deviceType==3">
<!-- #ifdef APP -->
<view class="iconfont icon-youjiantou" style="margin-left: 30rpx;" @click="goBack()"></view>
......@@ -184,6 +185,7 @@
</template>
<script>
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import api from "../../api/api";
import BootPage from "@/components/bootpage/bootpage.vue";
......@@ -202,7 +204,8 @@
BootPage,
LoginPopup,
VerifyPopup,
PartnerTipPopup
PartnerTipPopup,
restrictedTip
},
data() {
return {
......@@ -525,6 +528,15 @@
}
},
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 = ''
// 不同得公司主题不同得购买平台
// #ifdef APP
......@@ -962,13 +974,18 @@
queryInfo(){
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
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;
}
})
},
init() {
if (!uni.getStorageSync('isLogin')) {
if (!uni.getStorageSync('loginType')&& uni.getStorageSync('loginType')=='visitor') {
api.loginVerification({
"loginType": 1
}).then((res) => {
......@@ -1010,7 +1027,7 @@
uni.setStorageSync('h5_coursesharing', this.coursesharing);
this.getshareData()
}
let dataForm = uni.getStorageSync('userinfodataForm')
let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.realName = dataForm.realName;
if(!this.realName){
this.queryInfo();
......
<template>
<!-- :style="{paddingTop: showFlag ? '0' : '60rpx'}" -->
<view class="container" :style="{paddingTop: showFlag ? '0' : '60rpx'}">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="homeHeader" v-if="showFlag">
<view class="one">
<text style="font-size: 80rpx;">01</text>
......@@ -121,6 +123,7 @@
import {hshare,setWechatShare,initJssdkShare} from '@/util/fiveshare';
import UniShareWx from "@/uni_modules/uni-share-wx/index.vue";
import {nanoid} from 'nanoid';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default{
name:'courselist',
props:{
......@@ -140,7 +143,8 @@
search,
UniShareWx,
BootPage,
PartnerTipPopup
PartnerTipPopup,
restrictedTip
},
watch: {
// 监听 prop 变化,更新本地副本
......@@ -447,13 +451,13 @@
}).then((res) => {
if (res['success']) {
uni.setStorageSync('fileUploadItemCFFPList', res['data']['fileUploadItemCFFPList'])
const cffp_userInfo = {
name: res['data']['userReName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
levelCode:res['data']['levelCode'],
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
// const cffp_userInfo = {
// name: res['data']['userReName'],
// mobile: res['data']['mobile'],
// partnerType:res['data']['partnerType'],
// levelCode:res['data']['levelCode'],
// }
// uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
this.fileUploadItemCFFPList = uni.getStorageSync('fileUploadItemCFFPList');
}
})
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="homeHeader">
<view class="top">
<view class="one">
......@@ -57,12 +59,7 @@
</view> -->
<!-- 产品区域 -->
<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">
<courselist
:showFlag="false"
......@@ -71,27 +68,7 @@
></courselist>
<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 class="productEmpty" v-else>
......@@ -211,6 +188,7 @@
@join="jumpPage('2')"
@continue="jumpPage('1')"
/>
</template>
<script>
......@@ -226,6 +204,7 @@
import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import {hshare} from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
data() {
return {
......@@ -235,12 +214,6 @@
searchQuery: '',
companyFullName : companyInfo.companyFullName,
cffpCourseInfos: [],
x: 0,
y: 0,
old: {
x: 0,
y: 0
},
featureLists: [
{
key: '02',
......@@ -276,14 +249,12 @@
name: '',
type: '' //类型1,区域中心,2工作室
},
announcementInfo: null,
tagIds: 123,
currentPage: 'index',
carouselList: [],
userId: uni.getStorageSync('cffp_userId'),
shareId: null,
kefu: '../../static/kefu.png',
loginornot: true,
queryName: '',
loginType : uni.getStorageSync('loginType'),
userInfo:{} ,//用户信息,
......@@ -297,7 +268,8 @@
search,
courseItem,
JoinPopup,
PartnerTipPopup
PartnerTipPopup,
restrictedTip
},
onShow() {
......@@ -317,6 +289,11 @@
},
onLoad(options) {
// 从家办商城跳进来
// if(options.dataToken){
// uni.setStorageSync('uni-token',options.dataToken)
// }
if(options.sharePoster){
dataHandling.pocessTracking(
'进入',
......@@ -326,16 +303,14 @@
'首页',
'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',()=>{
this.queryAreaCenterInfo();
})
if (uni.getStorageSync('isLogin')) {
this.announcementQuery();
this.courseList();
}
},
beforeDestroy() {
......@@ -354,7 +329,7 @@
},
jumpPage(type){
console.log('type',type);
if(type=='1'){
uni.navigateTo({
url:'/pages/inviteJoin/inviteJoin'
......@@ -371,23 +346,48 @@
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
...res.data
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
console.log('cffp_userInfo.partnerType',cffp_userInfo.partnerType);
if(cffp_userInfo.partnerType){
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: '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}];
}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 @@
this.courseList()
this.initShare();
this.getOneProduct()
this.queryAreaCenterInfo()
}else {
// 未登录
this.featureLists =[
{
key: '02',
......@@ -479,17 +481,6 @@
]
uni.removeTabBarBadge({ index: 3 });
}
if (uni.getStorageSync('isLogin')) {
if (loginType == "visitor") {
this.loginornot = false
}else{
this.loginornot = true;
}
this.queryAreaCenterInfo();
} else {
api.loginVerification({
"loginType": 1
}).then((res) => {
......@@ -499,12 +490,10 @@
uni.setStorageSync('cffp_userId', this.userId);
uni.setStorageSync('loginType', 'visitor');
uni.setStorageSync('uni-token', res.data['token']);
this.loginornot = false;
this.queryAreaCenterInfo();
this.announcementQuery();
this.courseList();
this.getOneProduct()
this.initShare();
this.queryAreaCenterInfo()
} else {
uni.showToast({
title: res['message'],
......@@ -514,7 +503,7 @@
}
})
}
},
},
querySystemMessage() {
api.querySystemMessage({systemType:1,userId:uni.getStorageSync('cffp_userId')}).then(res => {
if (res['success']&& res['data']['dataList'].length>0) {
......@@ -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() {
let url = 'http://q.url.cn/abkzV9?_type=wpa&qidian=true' // URL是要跳转的外部地址 作为参数
// #ifdef APP-PLUS
......@@ -619,7 +596,14 @@
2,
'首页',
'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}`});
return
......@@ -650,7 +634,7 @@
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()
return
}
......@@ -685,6 +669,7 @@
} else {
const urlObj = JSON.parse(JSON.stringify(featureItem))
urlObj.link =urlObj.enName=='order'? `${urlObj.link}?partnerType=${this.cffpUserInfo.partnerType}`:urlObj.link
console.log('url',urlObj.link);
uni.navigateTo({
url: urlObj.link
})
......@@ -697,6 +682,7 @@
})
}
},
// 获取轮播图
queryAreaCenterInfo() {
api.queryAreaCenterInfo({
userId: uni.getStorageSync('cffp_userId'),
......@@ -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) {
this.type = type;
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
......@@ -749,10 +726,7 @@
url: '../../pages/courselist/courselist'
})
},
onChange: function(e) {
this.old.x = e.detail.x
this.old.y = e.detail.y
},
getOneProduct() {
api.courseList().then(res => {
if (res['success']) {
......
......@@ -15,7 +15,7 @@
<view v-if="tabType===1">
<view class="ulBox">
<view class="liBox">
<text>昵称:</text>
<text>昵称(被邀请人可修改)</text>
<text>
<input
v-model="dataForm.name"
......@@ -81,25 +81,13 @@
<h4 class="noListTip" v-if="!inviteLists || inviteLists.length<=0">暂无邀请记录!</h4>
<view class="listUl ulBox" v-for="(item,index) in inviteLists" :key="index">
<view class="liBox">
<text>姓名</text>
<text>昵称</text>
<text>{{item.name}}</text>
</view>
<view class="liBox">
<text>手机号:</text>
<text>{{item.mobileNumber}}</text>
</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">
<text>邀请状态:</text>
<text v-if="item.approvalStatus=='0'">邀请中</text>
......@@ -199,7 +187,7 @@
}else {
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.invitationCode = dataForm.invitationCode
if(!this.realName){
......@@ -222,7 +210,11 @@
queryInfo(){
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
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.invitationCode = res.data.invitationCode;
}
......@@ -293,6 +285,7 @@
// this.dataForm.name = ''
// return
// }
this.dataForm.remarkName = this.dataForm.name
if (common.mobileNoValid(this.dataForm.mobileNumber)) {
api.saveApplyInfo(this.dataForm).then(res => {
if (res['success']) {
......
......@@ -162,6 +162,7 @@
@join="jumpPage('2')"
@continue="jumpPage('1')"
/>
<restrictedTip ref="restrictedTip"/>
</view>
</template>
......@@ -175,6 +176,7 @@
import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
data() {
return {
......@@ -232,7 +234,8 @@
components:{
tabBar,
JoinPopup,
PartnerTipPopup
PartnerTipPopup,
restrictedTip
},
onShow() {
this.loginType = uni.getStorageSync('loginType')
......@@ -478,12 +481,15 @@
'我的',
'pages/personalCenter/personalCenter'
)
if(this.customerBasicInfo.userIsActive == 2){
this.$refs.restrictedTip.open()
return
}
this.getPartnerStatistic()
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()
return
}
......@@ -597,7 +603,6 @@
this.inviteEqrode = this.customerBasicInfo.invitationCode;
uni.setStorageSync('user_mobile', res.data.mobile)
uni.setStorageSync('userinfodataForm', res.data)
}else {
// 清空全部本地存储
......
......@@ -5,7 +5,7 @@
<!-- #endif -->
<view class="">
<menu-list :menuList="minorMenuLists"></menu-list>
<menu-list :menuList="minorMenuLists" @tipMessage="tipMessage()"></menu-list>
</view>
......@@ -21,8 +21,10 @@
},
data() {
return {
userInfo:{},
minorMenuLists: [
{
key:'1',
title: '手机号绑定',
icon: '',
link: '',
......@@ -30,42 +32,45 @@
isOpen: true,
isShow: true,
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: '',
link: '/myPackageA/setting/logOff',
isOpen: true,
isShow: true,
isTips: false,
isType: 'radio'
isType: 'radio',
isJump:false,
}
]
}
},
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
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
},
methods:{
goBack() {
uni.navigateBack({
delta: 1
});
}
},
}
}
</script>
......
......@@ -41,7 +41,10 @@
}
},
onLoad() {
let dataForm = uni.getStorageSync('userinfodataForm')
},
onShow() {
let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.mobile = dataForm.mobile
},
destroyed() {
......
......@@ -43,14 +43,14 @@
isShow: true,
isTips: true,
},
{
title: '关于'+companyInfo.appName+'APP',
icon: 'myCertify',
link: '/pages/personalCenter/accountoperation/aboutcffp',
isOpen: true,
isShow: true,
isTips: false,
},
// {
// title: '关于'+companyInfo.appName+'APP',
// icon: 'myCertify',
// link: '/pages/personalCenter/accountoperation/aboutcffp',
// isOpen: true,
// isShow: true,
// isTips: false,
// },
]
}
},
......@@ -59,7 +59,17 @@
initJssdkShare(() => {
setWechatShare();
}, 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() {
uni.hideToast();
......@@ -85,9 +95,6 @@
'设置',
'pages/personalCenter/system/settings'
)
uni.redirectTo({
url:'/myPackageA/login/login'
})
try {
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
......@@ -95,6 +102,10 @@
console.log(e)
// error
}
uni.redirectTo({
url:'/myPackageA/login/login'
})
uni.showToast({
title: '操作成功',
icon: 'none'
......
<template>
<view class="content">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text>
<!-- #endif -->
<view class="container">
<view class="header">
<view class="headportrait" @click="uploadAvatar()">
<view class="userHeader">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text>
<!-- #endif -->
<view class="avartBox" @click="uploadAvatar()">
<text class="iconfont icon-jiahao2fill" ></text>
<image :src="optionForm.headPicture ? optionForm.headPicture :companyLogo" mode="widthFix"></image>
</view>
</view>
<!-- <view class="linechart">
<echarts ref="echart" :option="option" style="height: 300px;"></echarts>
</view> -->
<view class="band">
<view class="contentItem">
<text class="left">姓名</text>
<input
class="user-input"
v-model="optionForm.realName"
type="text"
placeholder="请输入姓名"
maxlength="10"
/>
<view class="userInformation">
<view style="flex: 1;">
<view class="wave">
<image src="@/static/images/wave2.png" mode="widthFix"></image>
<view class="nickNameBox">
<view class="box">
<view style="padding-bottom: 20rpx;">昵称</view>
<input
v-model="optionForm.nickName"
maxlength="10"
type="text"
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 class="contentItem">
<text class="left">昵称</text>
<input class="user-input" v-model="optionForm.nickName" maxlength="10" type="text"
placeholder="请输入2~10个字符" />
<view class="bottomBox">
<view class="cancelBtn" @click="$refs.unbindTipPopup.open()">
取消
</view>
<view class="saveBtn" @tap="submitinfo">
<text class="iconfont icon-save" ></text>
<text>保存</text>
</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>
<!-- 解绑实名提示 -->
<partner-tip-popup
ref="unbindTipPopup"
content="确定撤销所有修改吗?"
joinText="暂不撤销"
continueText="确认撤销"
btnType="horizontal"
:tipIcon="true"
@join="continueCancel()"
@continue="$refs.unbindTipPopup.close()"
/>
</view>
</template>
......@@ -44,19 +115,24 @@
import {
CommonUpload
} from '@/util/uploaderFile'
import Echarts from '@/components/charts/charts.vue'
import EchartsEl from '@/components/echarts/echarts-el.vue'
import api from "@/api/api";
import common from '../../common/common';
import {companyInfo} from "@/environments/environment";
import {companyInfo,shareURL} from "@/environments/environment";
import dataHandling from "@/util/dataHandling";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import commonSelect from '@/components/commonSelect/commonSelect.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
export default {
data() {
return {
idTypeIdx: null,//证件默认值
showIdType:false,//证件类型下拉框
idTypesList: [{id:null,name:'请选择'}],
//实名信息
realInfo:{
shiming:{},//实名信息
},
isComposing: false,
// 敏感词列表(可扩展)
bannedWords: ["admin", "test", "root", "password"],
companyType : companyInfo.companyType,
companyLogo : '../../static/logo2.png',
dataForm: {
......@@ -68,30 +144,13 @@
targetSeq: "0"
},
optionForm: {},
option :{
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)'
}
}
]
}
tempInfo:{} //暂存信息 ,以便取消恢复未填写之前的数据
}
},
components: {
Echarts,
EchartsEl
commonSelect,
PartnerTipPopup
},
onLoad(options) {
if(this.companyType == '1'){
......@@ -99,64 +158,94 @@
}else if(this.companyType == '2'){
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() {
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
initJssdkShare(() => {
setWechatShare();
}, window.location.href);
// #endif
this.getIdType()
},
methods: {
handleKeyDown(e) {
console.log('this.isComposing',this.isComposing);
const key = e.key;
if (this.isComposing || ["Backspace", "Delete", "ArrowLeft", "ArrowRight"].includes(key)) return;
if (!/^[a-zA-Z0-9\u4e00-\u9fa5]$/.test(key)) {
e.preventDefault();
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); // 拼音输入结束,检查内容
},
continueCancel(){
// 使用深拷贝还原数据
this.optionForm = JSON.parse(JSON.stringify(this.tempInfo.optionForm));
this.realInfo.shiming = JSON.parse(JSON.stringify(this.tempInfo.shiming));
this.idTypeIdx = this.tempInfo.idTypeIdx;
this.$refs.unbindTipPopup.close();
},
// 改变实名证件类型
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() {
let back = getCurrentPages();
......@@ -174,48 +263,129 @@
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() {
if(!this.optionForm.realName || this.optionForm.realName.length <= 0){
uni.showToast({title: '请填写真实姓名',duration: 2000,icon: 'none'});
if (this.optionForm.nickName&&this.optionForm.nickName.length<2) {
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;
}else if (!common.nameValid(this.optionForm.realName)) {
let that = this;
}
if (!common.nameValid(this.realInfo.shiming.realName)) {
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
}else{
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
if(this.realInfo.shiming.idType == 'IDENTITY_CARD'&&this.realInfo.shiming.idNumber.length<18 ){
uni.showToast({title: '请输入18位实名身份证号',duration: 2000,icon: 'none'});
return
}
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});
setTimeout(() => {
uni.navigateBack({delta: 1});
}, 1000)
if(this.realInfo.shiming.idType == 'IDENTITY_CARD' ){
let obj = common.IdCodeValid(this.realInfo.shiming.idNumber)
if(!obj.pass){
uni.showToast({title: '请输入有效的实名身份证号',duration: 2000,icon: 'none'});
return
}
})
}
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 +397,196 @@
font-size: 12px;
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;
.avartBox{
position: absolute;
bottom: 1%;
left: 14%;
z-index: 99;
margin-top: 50rpx;
margin-left: 100rpx;
width: 200rpx;
height: 200rpx;
border-radius: 50%;
box-sizing: border-box;
box-shadow: 0 0 30rpx 15rpx rgba(150, 150, 150, 0.1);
position: relative;
.icon-jiahao2fill{
position: absolute;
bottom: 2%;
right: 3%;
color: #20269B;
font-size: 50rpx;
z-index: 2;
}
image{
margin-top: 2rpx;
display: block; /* 确保图片是块级元素 */
width: 100%; /* 宽度填满容器 */
height: 100%; /* 高度填满容器 */
border-radius: 50%; /* 保持圆形 */
object-fit: cover; /* 防止图片变形(可选) */
}
}
}
.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;
}
.error-tip{
position: absolute;
right: 0;
bottom: -30rpx;
color: #F43530;
font-size: 22rpx;
}
}
}
}
}
.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 {
padding-top: 20rpx;
width: 100vw;
}
.user-input {
text-align: right;
padding-right: 15rpx;
flex: 1;
}
// .user-input {
// text-align: right;
// padding-right: 15rpx;
// flex: 1;
// }
.user-textarea {
border: 1px solid #C7C7C7;
......@@ -276,14 +626,6 @@
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 {
margin-top: 40rpx;
display: flex;
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="kuaiBox" v-for="item in mainMenuLists" :key="item.id">
<view class="kuaiTit">
{{item.categoryName}}
......@@ -30,8 +32,8 @@
<script>
import dataHandling from "@/util/dataHandling";
import tabBar from '../../components/tabBar/tabBar.vue';
import courseItem from "@/components/courseItem/courseItem.vue";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
data() {
return {
......@@ -72,6 +74,9 @@
]
}
},
components: {
restrictedTip
},
onShow() {
// #ifdef H5
initJssdkShare(() => {
......
......@@ -55,6 +55,18 @@
<ul class="icon_lists dib-box">
<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>
<div class="name">icon_对号-面</div>
<div class="code-name">&amp;#xe300;</div>
......@@ -384,9 +396,9 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1751592106397') format('woff2'),
url('iconfont.woff?t=1751592106397') format('woff'),
url('iconfont.ttf?t=1751592106397') format('truetype');
src: url('iconfont.woff2?t=1754461035462') format('woff2'),
url('iconfont.woff?t=1754461035462') format('woff'),
url('iconfont.ttf?t=1754461035462') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
......@@ -413,6 +425,24 @@
<ul class="icon_lists dib-box">
<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>
<div class="name">
icon_对号-面
......@@ -909,6 +939,22 @@
<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>
</svg>
<div class="name">icon_对号-面</div>
......
@font-face {
font-family: "iconfont"; /* Project id 4933433 */
src: url('iconfont.woff2?t=1751592106397') format('woff2'),
url('iconfont.woff?t=1751592106397') format('woff'),
url('iconfont.ttf?t=1751592106397') format('truetype');
src: url('iconfont.woff2?t=1754461035462') format('woff2'),
url('iconfont.woff?t=1754461035462') format('woff'),
url('iconfont.ttf?t=1754461035462') format('truetype');
}
.iconfont {
......@@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-save:before {
content: "\e302";
}
.icon-jiahao2fill:before {
content: "\e301";
}
.icon-icon_duihao-mian:before {
content: "\e300";
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,6 +6,20 @@
"description": "",
"glyphs": [
{
"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",
"name": "icon_对号-面",
"font_class": "icon_duihao-mian",
......
import api from "@/api/api";
import dataHandling from './dataHandling'
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
......@@ -23,8 +28,11 @@ export default function initApp(){
uni.addInterceptor('navigateTo', {
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke (e) {
let userInfo = {}
if(uni.getStorageSync('cffp_userInfo')){
userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
let pages = getCurrentPages()
let pagesLength = pages.length
if(whiteList.indexOf(e.url)==-1&&!uni.getStorageSync('loginType')){
......@@ -47,18 +55,22 @@ export default function initApp(){
}
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
levelCode:res['data']['levelCode'],
...res.data
}
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']
// 1. 解析 URL 中的 from 参数
const getQueryParam = (url, key) => {
......@@ -69,7 +81,6 @@ export default function initApp(){
};
const fromParam = getQueryParam(e.url, 'from');
console.log('2222',!hasPermission(e.url));
if(!hasPermission(e.url)){
// 如果 from 参数在 whiteArr 中,说明是tabbar页带着tabbar的标志参数跳转到登录页,以便未登录状态下回到对应的tabbar页
if (fromParam && whiteArr.includes(fromParam)) {
......@@ -77,7 +88,6 @@ export default function initApp(){
url: `/myPackageA/login/login?from=${fromParam}`
})
}else {
console.log('zoujinlaile');
uni.redirectTo({
url: '/myPackageA/login/login'
})
......@@ -155,4 +165,4 @@ function hasPermission (url) {
return true
}
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