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);
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
});
......
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,10 +97,11 @@
}
},
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(() => {
......@@ -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'],
......@@ -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
......@@ -620,6 +597,13 @@
'首页',
'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,30 +32,32 @@
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();
......@@ -65,7 +69,8 @@
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,
// },
]
}
},
......@@ -60,6 +60,16 @@
setWechatShare();
}, window.location.href);
// #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="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,7 +28,10 @@ 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
......@@ -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'
})
......
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