Commit d7a93dcd by yuzhenWang

Merge branch 'dev' into 'master'

Dev

See merge request !111
parents 8e8ed1c5 1e724831
......@@ -126,6 +126,15 @@
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
}
......@@ -241,6 +250,7 @@
}
//家办商城跳转未登录状态下
if(params.noLogin){
uni.removeStorageSync('userIsActive')
uni.removeStorageSync('dataToken')
uni.setStorageSync('loginType','visitor');
}
......
......@@ -144,6 +144,7 @@
// 禁用账号,不让登录
if(res.data.userIsActive == 2){
this.$refs.restrictedTip.open()
return
}
this.userId = String(res['data']['userId']);
......
<template>
<uni-popup ref="popup" type="center" background-color="#fff" v-if="visible">
<uni-popup ref="popup" type="center" background-color="#fff" v-if="visible" :isMaskClick="false">
<!-- 你的弹窗内容 -->
<view class="joinContent">
<view class="title">{{ title }}</view>
......@@ -8,27 +8,28 @@
<view class="iconfont icon-exclamation" ></view>
</view>
<view class="joinCon">
<view class="one">{{ content }}</view>
<view class="one">{{ tipTxt }}</view>
<view class="qrCode" v-if="showCode">
<image src="@/static/images/customer.jpg" mode="widthFix"></image>
</view>
</view>
<view class="joinFotter">
<!-- <view class="joinFotter">
<view @click="handleConfirm">{{ confirmText }}</view>
</view>
</view> -->
</view>
</uni-popup>
</template>
<script>
import {shareURL} from "@/environments/environment";
import dataHandling from "@/util/dataHandling";
export default {
name: 'restrictedTip',
props: {
title: String,
content: {
type: String,
default: '您的账号处在不可用状态,请扫码添加客服咨询情况'
default: '您的账号处在不可用状态,请长按图片添加客服咨询情况'
},
showCode: {
type: Boolean,
......@@ -41,11 +42,22 @@
},
data() {
return {
visible: false
visible: false,
tipTxt:'您的账号处在不可用状态,请长按图片添加客服咨询情况'
}
},
onMounted(){
console.log('禁用弹窗onMounted');
},
methods: {
open() {
if(dataHandling.getRuntimeEnv()=='browser'){
this.tipTxt = '您的账号处在不可用状态,请扫码添加客服咨询情况'
}
if(this.visible){
return
}
this.visible = true
this.$nextTick(() => {
this.$refs.popup.open() // 确保DOM渲染后再打开
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
......@@ -77,9 +79,11 @@
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import {companyInfo} from "@/environments/environment";
import MultiSelectDropdown from '@/components/commonPopup/MultiSelectDropdown.vue'
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components: {
MultiSelectDropdown
MultiSelectDropdown,
restrictedTip,
},
data() {
return {
......@@ -99,6 +103,9 @@
onLoad(options){
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -111,7 +118,33 @@
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
// 获取团队数据
getWithdrawalList() {
const status = this.selectedStatus.length === 0 || this.selectedStatus.includes('-1')
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="myHeader">
<!-- #ifdef APP -->
<view class="backArrow">
......@@ -255,10 +257,12 @@
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import BootPage from "@/components/bootpage/bootpage.vue";
import {companyInfo} from "@/environments/environment";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components: {
CommonTimePicker,
BootPage
BootPage,
restrictedTip,
},
data() {
return {
......@@ -414,6 +418,9 @@
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -423,6 +430,33 @@
this.loginType = uni.getStorageSync('loginType')
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
sortswitch(obj) {
this.currentFilterBtn = obj.id
this.CffpOrgInfoReqVO.sortType = obj.sortType
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- 添加ref以便获取DOM -->
<view class="imgBox" ref="captureElement" v-if="!generatedImage">
<view class="imgContainer">
......@@ -31,10 +33,13 @@
import * as environment from "@/environments/environment";
import UQRCode from 'uqrcodejs';
import { elementToImage } from '@/util/htmlToImage';
import api from "@/api/api";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{
restrictedTip,
},
data() {
return {
companyInfo: environment.companyInfo,
......@@ -53,6 +58,9 @@ export default {
}
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.loginType = uni.getStorageSync('loginType')
if(!this.loginType || this.loginType == 'visitor'){
......@@ -79,6 +87,33 @@ export default {
// #endif
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
// 背景图片加载成功
handleBgImageLoad() {
console.log('背景图片加载完成');
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTipRef"/>
<!-- 水印容器 -->
<view class="watermark-container">
<view class="watermark" v-for="i in 24" :key="i">
......@@ -124,10 +126,12 @@
import { ref, onMounted,computed } from 'vue'
import { useRouter, useRoute } from 'vue-router';
import api from '@/api/api';
import { onLoad,onShow } from '@dcloudio/uni-app';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
// 默认最大年份是5
const maxYears = ref(5)
let restrictedTipRef = ref()
// 获取指定年份的佣金率
const getCommissionRate = (plan, year) => {
const rate = plan.termRateResponseList.find(item => item.issueNumber === year)
......@@ -190,7 +194,37 @@ const fetchRateData = async () => {
loading.value = false
}
}
const queryInfo = () => {
api.queryInfo({ userId: uni.getStorageSync('cffp_userId') })
.then((res) => {
if (res.success) {
delete res.data?.commonResult;
const cffp_userInfo = {
...res.data
};
// 账号禁用用户
if (res.data?.userIsActive === 2) {
restrictedTipRef.value.open();
uni.setStorageSync('userIsActive', String(res.data.userIsActive));
return;
}
if (res.data?.userIsActive && res.data.userIsActive !== 2) {
restrictedTipRef.value.close();
uni.removeStorageSync('userIsActive');
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data?.mobile ?? '');
}
});
};
onShow(()=>{
if(uni.getStorageSync('loginType')=='codelogin'){
queryInfo()
}
})
// 生命周期
onMounted(() => {
userId.value = uni.getStorageSync('cffp_userId') || ''
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTipRef"/>
<!-- 搜索区域 -->
<view class="search-box">
<input
......@@ -53,13 +55,15 @@
<script setup>
import { ref, computed, onMounted } from 'vue'
import { onLoad,onShow } from '@dcloudio/uni-app';
import api from '@/api/api';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
// 响应式数据
const searchKeyword = ref('')
const products = ref([])
const loading = ref(false)
const tips = ref('无默认产品,请输入产品名称进行查询')
let restrictedTipRef = ref()
// 方法
const handleSearch = () => {
// 实际项目中可以添加防抖
......@@ -71,7 +75,32 @@ const goToCommissionDetail = (product) => {
})
}
const queryInfo = () => {
api.queryInfo({ userId: uni.getStorageSync('cffp_userId') })
.then((res) => {
if (res.success) {
delete res.data?.commonResult;
const cffp_userInfo = {
...res.data
};
// 账号禁用用户
if (res.data?.userIsActive === 2) {
restrictedTipRef.value.open();
uni.setStorageSync('userIsActive', String(res.data.userIsActive));
return;
}
if (res.data?.userIsActive && res.data.userIsActive !== 2) {
restrictedTipRef.value.close();
uni.removeStorageSync('userIsActive');
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data?.mobile ?? '');
}
});
};
// 获取产品数据
const fetchProducts = async (type=0) => {
if(!searchKeyword.value){
......@@ -115,7 +144,11 @@ const fetchProducts = async (type=0) => {
loading.value = false
}
}
onShow(()=>{
if(uni.getStorageSync('loginType')=='codelogin'){
queryInfo()
}
})
// 生命周期
onMounted(() => {
})
......
<template>
<scroll-view @scroll="handleScroll" scroll-y="true" class="scroll-Y">
<view class="product-list-page">
<!-- 顶部搜索和筛选 -->
<view class="search-bar">
<view class="search-input">
<uni-icons type="search" size="18" color="#999"></uni-icons>
<input
type="text"
placeholder="搜索产品或保险公司"
v-model="searchKeyword"
@input="handleSearch"
>
</view>
<button class="filter-btn" @click="openFilter">
<view class="iconfont icon-shaixuan"></view>
</button>
</view>
<!-- 筛选弹窗 -->
<uni-popup
type="bottom"
ref="popup"
:mask-click="false"
background-color="#fff"
class="filter-popup"
@touchmove="handlePopupTouchMove"
@open="handlePopupOpen"
@close="handlePopupClose"
>
<view class="filter-title">
<text>筛选条件</text>
<button class="close-btn" @click="closeFilter">
<uni-icons type="close" size="18"></uni-icons>
</button>
</view>
<view class="filter-content">
<!-- 保险公司筛选(改为按钮多选) -->
<view class="filter-item">
<text class="filter-label">保险公司</text>
<!-- 按钮组容器,支持横向滚动 -->
<view class="btn-group-container">
<button
class="filter-btn-item"
:class="{ 'active': isCompanySelected(company.insuranceCompanyBizId) }"
@click="toggleSelection('insurer',company.insuranceCompanyBizId)"
v-for="company in insuranceCompanies"
:key="company.insuranceCompanyBizId"
>
{{ company.name }}
</button>
</view>
</view>
<!-- 产品类型筛选(如需同步改为按钮,可参考上面的逻辑) -->
<view class="filter-item">
<text class="filter-label">产品类型</text>
<view class="btn-group-container">
<button
class="filter-btn-item"
:class="{ 'active': isProductTypeSelected(item.dropOptionCode) }"
@click="toggleSelection('productType',item.dropOptionCode)"
v-for="item in productTypes"
:key="item.dropOptionCode"
<view class="">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTipRef"/>
<scroll-view @scroll="handleScroll" scroll-y="true" class="scroll-Y">
<view class="product-list-page">
<!-- 顶部搜索和筛选 -->
<view class="search-bar">
<view class="search-input">
<uni-icons type="search" size="18" color="#999"></uni-icons>
<input
type="text"
placeholder="搜索产品或保险公司"
v-model="searchKeyword"
@input="handleSearch"
>
</view>
<button class="filter-btn" @click="openFilter">
<view class="iconfont icon-shaixuan"></view>
</button>
</view>
<!-- 筛选弹窗 -->
<uni-popup
type="bottom"
ref="popup"
:mask-click="false"
background-color="#fff"
class="filter-popup"
@touchmove="handlePopupTouchMove"
@open="handlePopupOpen"
@close="handlePopupClose"
>
{{ item.dropOptionName }}
</button>
</view>
</view>
</view>
<view class="filter-actions">
<button class="reset-btn" @click="resetFilter">重置</button>
<button class="confirm-btn" @click="confirmFilter">确认筛选</button>
</view>
</uni-popup>
<!-- 产品列表 -->
<view class="product-list">
<view
class="product-item"
v-for="product in products"
:key="product.planBizId"
>
<view class="product-info" @click="navigateToDetail(product.planBizId)">
<view class="product-details">
<view class="product-name">{{ product.planName }}</view>
<view class="product-type">
<text class="type-label">险种:</text>
<text>{{ product.categoryName }}</text>
</view>
<view class="product-company">
<text class="type-label">保险公司:</text>
<text>{{ product.companyName }}</text>
</view>
<view class="product-tag">
<uni-tag :text="product.isInsured==1 ? '保融产品' : '非保融产品'" :type="product.isInsured==1 ? 'success' : 'info'" size="small"></uni-tag>
<view class="filter-title">
<text>筛选条件</text>
<button class="close-btn" @click="closeFilter">
<uni-icons type="close" size="18"></uni-icons>
</button>
</view>
<view class="filter-content">
<!-- 保险公司筛选(改为按钮多选) -->
<view class="filter-item">
<text class="filter-label">保险公司</text>
<!-- 按钮组容器,支持横向滚动 -->
<view class="btn-group-container">
<button
class="filter-btn-item"
:class="{ 'active': isCompanySelected(company.insuranceCompanyBizId) }"
@click="toggleSelection('insurer',company.insuranceCompanyBizId)"
v-for="company in insuranceCompanies"
:key="company.insuranceCompanyBizId"
>
{{ company.name }}
</button>
</view>
</view>
<!-- 产品类型筛选(如需同步改为按钮,可参考上面的逻辑) -->
<view class="filter-item">
<text class="filter-label">产品类型</text>
<view class="btn-group-container">
<button
class="filter-btn-item"
:class="{ 'active': isProductTypeSelected(item.dropOptionCode) }"
@click="toggleSelection('productType',item.dropOptionCode)"
v-for="item in productTypes"
:key="item.dropOptionCode"
>
{{ item.dropOptionName }}
</button>
</view>
</view>
</view>
<view class="filter-actions">
<button class="reset-btn" @click="resetFilter">重置</button>
<button class="confirm-btn" @click="confirmFilter">确认筛选</button>
</view>
</uni-popup>
<!-- 产品列表 -->
<view class="product-list">
<view
class="product-item"
v-for="product in products"
:key="product.planBizId"
>
<view class="product-info" @click="navigateToDetail(product.planBizId)">
<view class="product-details">
<view class="product-name">{{ product.planName }}</view>
<view class="product-type">
<text class="type-label">险种:</text>
<text>{{ product.categoryName }}</text>
</view>
<view class="product-company">
<text class="type-label">保险公司:</text>
<text>{{ product.companyName }}</text>
</view>
<view class="product-tag">
<uni-tag :text="product.isInsured==1 ? '保融产品' : '非保融产品'" :type="product.isInsured==1 ? 'success' : 'info'" size="small"></uni-tag>
</view>
</view>
</view>
<button
class="pk-btn"
@click.stop="togglePKSelection(product)"
:disabled="!isInPKList(product.planBizId) && pkList.length >= 3"
>
{{ isInPKList(product.planBizId) ? '取消选择' : 'PK' }}
</button>
</view>
<!-- 空状态 -->
<view class="empty-state" v-if="products.length === 0">
<uni-icons type="empty" size="60" color="#ccc"></uni-icons>
<text class="empty-text">未找到匹配的产品</text>
</view>
</view>
<!-- PK选择条(新增已选产品展示和删除功能) -->
<view class="pk-bar" v-if="pkList.length > 0">
<view class="pk-selected-list">
<view class="selected-product" v-for="(item, index) in pkList" :key="item.planBizId">
<text class="product-short-name">{{ getShortName(item.planName) }}</text>
<button class="delete-btn" @click.stop="removeFromPK(index)">
<uni-icons type="close" size="16" color="#fff"></uni-icons>
</button>
</view>
</view>
<button
class="compare-btn"
@click="navigateToPKPage"
:disabled="pkList.length < 1"
>
去对比
</button>
</view>
<button
class="pk-btn"
@click.stop="togglePKSelection(product)"
:disabled="!isInPKList(product.planBizId) && pkList.length >= 3"
>
{{ isInPKList(product.planBizId) ? '取消选择' : 'PK' }}
</button>
</view>
<!-- 空状态 -->
<view class="empty-state" v-if="products.length === 0">
<uni-icons type="empty" size="60" color="#ccc"></uni-icons>
<text class="empty-text">未找到匹配的产品</text>
</view>
</view>
<!-- PK选择条(新增已选产品展示和删除功能) -->
<view class="pk-bar" v-if="pkList.length > 0">
<view class="pk-selected-list">
<view class="selected-product" v-for="(item, index) in pkList" :key="item.planBizId">
<text class="product-short-name">{{ getShortName(item.planName) }}</text>
<button class="delete-btn" @click.stop="removeFromPK(index)">
<uni-icons type="close" size="16" color="#fff"></uni-icons>
</button>
</view>
</view>
<button
class="compare-btn"
@click="navigateToPKPage"
:disabled="pkList.length < 1"
>
去对比
</button>
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</template>
<script setup>
import { ref, computed, onMounted,onUnmounted } from 'vue';
import { onLoad,onShow } from '@dcloudio/uni-app';
import { useRouter } from 'vue-router';
import api from '@/api/api';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
// 路由实例
const router = useRouter();
let restrictedTipRef = ref()
// 搜索和筛选相关
const searchKeyword = ref('');
const selectedTypes = ref([]);
......@@ -302,7 +308,38 @@ const productTypes = ref([]);
// 产品列表
const products = ref([]);
const queryInfo = () => {
api.queryInfo({ userId: uni.getStorageSync('cffp_userId') })
.then((res) => {
if (res.success) {
delete res.data?.commonResult;
const cffp_userInfo = {
...res.data
};
// 账号禁用用户
if (res.data?.userIsActive === 2) {
restrictedTipRef.value.open();
uni.setStorageSync('userIsActive', String(res.data.userIsActive));
return;
}
if (res.data?.userIsActive && res.data.userIsActive !== 2) {
restrictedTipRef.value.close();
uni.removeStorageSync('userIsActive');
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data?.mobile ?? '');
}
});
};
onShow(()=>{
if(uni.getStorageSync('loginType')=='codelogin'){
queryInfo()
}
})
// 检查产品是否已在PK列表中
const isInPKList = (productId) => {
return pkList.value.some(item => item.planBizId === productId);
......
......@@ -2,6 +2,8 @@
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="header">
<text class="title">合伙人解约协议</text>
</view>
......@@ -107,14 +109,51 @@
</template>
<script>
import api from "@/api/api";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
export default {
components:{
restrictedTip,
},
data() {
return {
}
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
},
onShow(){
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......
<template>
<view class="container" >
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;" v-if="isBack !=1"></text>
<!-- #endif -->
......@@ -288,6 +290,8 @@
<script>
import {companyInfo} from "@/environments/environment";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import api from "@/api/api";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default{
data(){
return {
......@@ -296,12 +300,15 @@
isBack:null
}
},
components:{},
components:{restrictedTip,},
onLoad(options) {
this.type = options.type;
this.isBack = options.isBack
},
onShow(){
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -310,6 +317,33 @@
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
callCustomerService() {
const phoneNumber = '400-921-9290';
......
<template>
<view class="">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="content_wrapper">
<h4 style="font-size: 28rpx;">劳务报酬税缴纳规则</h4>
<view class="content">
......@@ -57,6 +59,8 @@
</template>
<script>
import api from "@/api/api";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
export default{
data(){
......@@ -64,8 +68,11 @@
}
},
components:{},
components:{restrictedTip,},
onShow(){
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -73,7 +80,33 @@
// #endif
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
}
}
</script>
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="wapper">
<!-- #ifdef APP -->
<view class="backArrow">
......@@ -78,8 +80,9 @@
import eSignature from '@/components/eSignature/eSignature.vue';
import dataHandling from "@/util/dataHandling";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{eSignature,everyJoinPopup},
components:{eSignature,everyJoinPopup,restrictedTip,},
data() {
return {
mobile:'',
......@@ -100,6 +103,9 @@
},
onShow(){
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
let dataForm = JSON.parse(uni.getStorageSync('cffp_userInfo'))
this.mobile = dataForm.mobile
this.lockScroll()
......@@ -123,6 +129,33 @@
uni.hideToast();
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
// 处理签名验证错误
handleValidationError(error) {
this.signatureError = error;
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
......@@ -79,8 +81,9 @@
import api from "@/api/api";
import dataHandling from "@/util/dataHandling";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{courseItem},
components:{courseItem,restrictedTip,},
data() {
return {
userId: uni.getStorageSync('cffp_userId'),
......@@ -97,6 +100,33 @@
};
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack(){
uni.navigateBack({
delta: 1
......@@ -149,6 +179,9 @@
this.userAfterSalesDtl()
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
......@@ -27,9 +29,11 @@
import api from "@/api/api";
import courseItem from "@/components/courseItem/courseItem.vue";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{
courseItem
courseItem,
restrictedTip,
},
data() {
return {
......@@ -39,6 +43,33 @@
};
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack(){
uni.navigateBack({
delta: 1
......@@ -73,6 +104,9 @@
this.userAfterSales()
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view style="flex: 1;">
<view class="classInfo" style="padding-top:80rpx">
<!-- #ifdef APP -->
......@@ -87,10 +89,12 @@
import commonSelect from '@/components/commonSelect/commonSelect.vue';
import dataHandling from "@/util/dataHandling";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{
courseItem,
commonSelect,
restrictedTip,
},
data() {
return {
......@@ -108,6 +112,33 @@
};
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack() {
uni.navigateBack({
delta: 1
......@@ -226,6 +257,9 @@
this.dropOptionsQuery()
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
this.userRefundCourseDtl();
// #ifdef H5
initJssdkShare(() => {
......
<template>
<view>
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" style="top: 20rpx;" @click="goBack()" ></text>
<!-- #endif -->
......@@ -15,10 +17,11 @@
// import myListItem from "@/components/my-list-item/my-list-item.vue";
import api from "@/api/api";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
// components:{
// myListItem
// },
components:{
restrictedTip,
},
data() {
return {
......@@ -34,6 +37,39 @@
}
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$nextTick(()=>{
this.$refs.restrictedTip.open()
})
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$nextTick(()=>{
this.$refs.restrictedTip.close()
})
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack() {
uni.navigateBack({
delta: 1
......@@ -78,6 +114,9 @@
this.queryDate = option.queryDate;
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......
......@@ -1169,9 +1169,19 @@
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',res.data.userIsActive)
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
this.realName = res.data.realName;
// this.realName = res.data.realName;
}
})
},
......@@ -1353,35 +1363,6 @@
// fileFirstImage:''
// }
},
startPolling() {
// 先清除可能存在的旧定时器
if (this.pollingTimer) {
clearInterval(this.pollingTimer)
this.pollingTimer = null
}
// 每3秒轮询一次,最多轮询100次(5分钟)
let count = 0
const maxCount = 100
this.pollingTimer = setInterval(() => {
count++
uni.showModal({
content: count
})
}, 1000) // 3秒轮询一次
},
// 新增:停止轮询
stopPolling() {
if (this.pollingTimer) {
clearInterval(this.pollingTimer)
this.pollingTimer = null
}
},
// 跳转到小程序登录
jumpMplogin() {
let currentUrl = ``;
......@@ -1458,10 +1439,10 @@
this.getshareData()
}
let dataForm = JSON.parse(JSON.stringify(uni.getStorageSync('cffp_userInfo')))
this.realName = dataForm.realName;
if (!this.realName) {
this.queryInfo();
}
// this.realName = dataForm.realName;
// if (!this.realName) {
// this.queryInfo();
// }
// this.switchTab(1);
},
......@@ -1484,7 +1465,9 @@
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
this.userId = uni.getStorageSync('cffp_userId')
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......
......@@ -243,6 +243,9 @@
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
this.userId = uni.getStorageSync('cffp_userId')
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -741,7 +744,34 @@
wx.miniProgram.navigateBack({
delta: 1
})
}
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
},
mounted() {
......
......@@ -375,9 +375,20 @@
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
this.userInfo = cffp_userInfo
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
......@@ -786,6 +797,16 @@
}
api.loginVerification(params).then((res)=>{
if(res['success']){
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',res.data.userIsActive)
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', JSON.stringify(res.data.userId));
......
<template>
<view class="padding-top container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text>
<!-- #endif -->
......@@ -123,11 +125,13 @@
import loadingIcon from '@/components/loading/loading.vue';
import ShareGuide from '@/components/ShareGuide/ShareGuide.vue';
import wx from 'weixin-js-sdk'
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components: {
sharePosterPop,
loadingIcon,
ShareGuide
ShareGuide,
restrictedTip,
},
data() {
return {
......@@ -195,6 +199,9 @@
this.isLoading = false
this.posterImg = ''
this.generatedImage = ''
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -616,7 +623,34 @@
closePoster() {
this.posterImg = ''
this.generatedImage = ''
}
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
}
}
</script>
......
<template>
<view class="loadTxt">Loading...</view>
<view class="">
<view class="loadTxt">Loading...</view>
<restrictedTip ref="restrictedTipRef"/>
</view>
</template>
<script setup>
......@@ -9,8 +14,10 @@
import * as environment from '@/environments/environment'
import dataHandling from "@/util/dataHandling";
import wx from 'weixin-js-sdk'
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
let jumpInfo = ref({})
let dataToken = ref()
let restrictedTipRef = ref()
onLoad((options) => {
jumpInfo.value = JSON.parse(JSON.stringify(options))
......@@ -83,6 +90,16 @@
}
api.loginVerification(params).then((res) => {
if (res['success']) {
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
restrictedTipRef.value.open()
uni.setStorageSync('userIsActive',res.data.userIsActive)
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
restrictedTipRef.value.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('isLogin', '1');
uni.setStorageSync('loginType', 'codelogin');
uni.setStorageSync('cffp_userId', res.data.userId);
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="">
<!-- 时间选择 -->
<view class="timeSelectContent">
......@@ -96,6 +98,7 @@
import CommonTimePicker from '@/components/commonTimePicker/commonTimePicker.vue';
import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
import {
fmdata
} from '@/util/currentDate.js'
......@@ -103,7 +106,8 @@
components: {
courseItem,
CommonTimePicker,
JoinPopup
JoinPopup,
restrictedTip,
},
data() {
return {
......@@ -125,6 +129,33 @@
}
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
// 去加盟
gotoApply(){
dataHandling.pocessTracking(
......@@ -234,6 +265,9 @@
this.userShareQuery();
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view style="flex: 1;">
<!-- #ifdef APP -->
<view class="backArrow">
......@@ -184,9 +186,11 @@
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import dataHandling from "@/util/dataHandling";
import wx from 'weixin-js-sdk'
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components: {
courseItem
courseItem,
restrictedTip,
},
data() {
return {
......@@ -237,7 +241,33 @@
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack() {
uni.navigateBack({
delta: 1
......@@ -628,6 +658,9 @@
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......
<template>
<view class="container" >
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
......@@ -43,7 +45,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:{
restrictedTip,
},
data() {
return {
userId: uni.getStorageSync('cffp_userId'),
......@@ -163,6 +169,33 @@
};
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack() {
uni.navigateBack({
delta: 1
......@@ -234,6 +267,9 @@
this.commissionType = option.commissionType;
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="statusBox">
<view class="successBox" v-if="orderStatus=='2'">
<i class="iconfont icon-dengdai"></i>
......@@ -59,8 +61,9 @@
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import dataHandling from "@/util/dataHandling";
import wx from 'weixin-js-sdk'
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{tabBar,courseItem},
components:{tabBar,courseItem,restrictedTip,},
data() {
return {
cffpCourseInfos:[],
......@@ -75,6 +78,9 @@
};
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -98,6 +104,33 @@
}
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
querySystemMessage() {
api.querySystemMessage({systemType:1,userId:uni.getStorageSync('cffp_userId')}).then(res => {
if (res['success']&& res['data']['dataList'].length>0) {
......
<template>
<view class="content">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 10rpx;"></text>
<!-- #endif -->
......@@ -36,9 +38,14 @@
</template>
<script>
import api from "@/api/api";
import {companyInfo} from "@/environments/environment";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{
restrictedTip,
},
data() {
return {
companyType : companyInfo.companyType,
......@@ -61,6 +68,9 @@
}
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
if(this.companyType == '1'){
this.companyLogo='../../../static/myteam/Group1633.png';
}else if(this.companyType == '2'){
......@@ -73,6 +83,33 @@
// #endif
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack() {
uni.navigateBack({
delta: 1
......
<template>
<view class="module-container">
<!-- 内容区域 -->
<view class="content">
<!-- 加载状态 -->
<view v-if="loading" class="loading">
<view class="spinner"></view>
<text>加载中...</text>
</view>
<!-- 1. 公司介绍(直接显示单个PDF) -->
<view v-if="!loading && currentType === 1 && companyPdf.urls" class="pdf-single">
<!-- 当前Tab的PDF列表 -->
<view
v-for="(url, index) in currentPdf.urls"
:key="index"
class="pdf-item-container"
>
<PdfViewer
:pdfInfo="{
<view class="module-container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTipRef"/>
<!-- 内容区域 -->
<view class="content">
<!-- 加载状态 -->
<view v-if="loading" class="loading">
<view class="spinner"></view>
<text>加载中...</text>
</view>
<!-- 1. 公司介绍(直接显示单个PDF) -->
<view v-if="!loading && currentType === 1 && companyPdf.urls" class="pdf-single">
<!-- 当前Tab的PDF列表 -->
<view v-for="(url, index) in currentPdf.urls" :key="index" class="pdf-item-container">
<PdfViewer :pdfInfo="{
title: null,
url: url
}"
:autoLoad="index === 0"
:lazyLoad="true"
:maxRetryCount="2"
@loadComplete="handlePdfLoadComplete"
@loadError="handlePdfLoadError"
@pageChange="handlePageChange"
/>
</view>
</view>
<!-- 2-4. 带Tab的模块 -->
<view v-if="!loading && currentType >= 2 && currentType <= 4">
<!-- Tab切换栏 -->
<view class="tab-bar">
<view
v-for="(tab, index) in filteredCurrentTabs"
:key="tab.id"
class="tab-item"
:class="{ active: activeTab === index }"
@click="switchTab(index)"
>
<text class="tab-text">{{ tab.title }}</text>
<view class="tab-indicator" v-if="activeTab === index"></view>
</view>
</view>
<!-- Tab对应的PDF内容 -->
<view class="pdf-tab-content" v-if="currentPdf.type === 'showURL'">
<template v-if="filteredCurrentTabs.length > 0 && currentPdf.urls">
<!-- 当前Tab的PDF列表 -->
<view
v-for="(url, index) in currentPdf.urls"
:key="index"
class="pdf-item-container"
>
<PdfViewer
:pdfInfo="{
}" :autoLoad="index === 0" :lazyLoad="true" :maxRetryCount="2" @loadComplete="handlePdfLoadComplete"
@loadError="handlePdfLoadError" @pageChange="handlePageChange" />
</view>
</view>
<!-- 2-4. 带Tab的模块 -->
<view v-if="!loading && currentType >= 2 && currentType <= 4">
<!-- Tab切换栏 -->
<view class="tab-bar">
<view v-for="(tab, index) in filteredCurrentTabs" :key="tab.id" class="tab-item"
:class="{ active: activeTab === index }" @click="switchTab(index)">
<text class="tab-text">{{ tab.title }}</text>
<view class="tab-indicator" v-if="activeTab === index"></view>
</view>
</view>
<!-- Tab对应的PDF内容 -->
<view class="pdf-tab-content" v-if="currentPdf.type === 'showURL'">
<template v-if="filteredCurrentTabs.length > 0 && currentPdf.urls">
<!-- 当前Tab的PDF列表 -->
<view v-for="(url, index) in currentPdf.urls" :key="index" class="pdf-item-container">
<PdfViewer :pdfInfo="{
title: null,
url: url,
landscapeFlag:currentPdf.landscapeFlag
}"
:autoLoad="index === 0"
:lazyLoad="true"
:maxRetryCount="2"
@loadComplete="handlePdfLoadComplete"
@loadError="handlePdfLoadError"
@pageChange="handlePageChange"
/>
</view>
</template>
<template v-else>
<view class="pdf-empty">暂无访问权限</view>
</template>
</view>
<!-- 显示产品搜索组件 -->
<view class="pdf-tab-content" v-if="currentPdf.type === 'showPage'">
<productListVue/>
</view>
</view>
<!-- 错误状态 -->
<view v-if="!loading && (currentType < 1 || currentType > 4)" class="error">
<text>无效的模块类型</text>
</view>
</view>
</view>
}" :autoLoad="index === 0" :lazyLoad="true" :maxRetryCount="2" @loadComplete="handlePdfLoadComplete"
@loadError="handlePdfLoadError" @pageChange="handlePageChange" />
</view>
</template>
<template v-else>
<view class="pdf-empty">暂无访问权限</view>
</template>
</view>
<!-- 显示产品搜索组件 -->
<view class="pdf-tab-content" v-if="currentPdf.type === 'showPage'">
<productListVue />
</view>
</view>
<!-- 错误状态 -->
<view v-if="!loading && (currentType < 1 || currentType > 4)" class="error">
<text>无效的模块类型</text>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, computed, watch } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import api from "@/api/api";
import productListVue from '@/myPackageA/product-list/product-list.vue';
// 导入PDF查看器组件
import PdfViewer from '@/components/pdf-viewer/pdf-viewer.vue';
// ========================== 类型定义 ==========================
interface PdfItem {
id: string;
title: string;
urls: string[];
type: string;
landscapeFlag?:boolean;
}
interface PermissionRight {
key: string;
}
interface PermissionItem {
key: string;
rights: PermissionRight[];
}
// ========================== 响应式数据 ==========================
const OSS_BASE_URL = 'https://csf-doc-center.oss-cn-shanghai-finance-1-pub.aliyuncs.com';
const currentType = ref<number>(1);
const loading = ref(true);
const activeTab = ref(0);
const currentPdf = ref<PdfItem>({ id: '', title: '', urls: [], type: '' ,landscapeFlag:false});
const permissionList = ref<PermissionItem[]>([]);
// 公司介绍PDF
const companyPdf = ref<PdfItem>({
id: 'company',
title: '公司介绍',
// urls: Array.from({ length: 21 }, (_, i) =>
// `${OSS_BASE_URL}/public/company-intro_part${i + 1}.pdf`
// ),
// urls: [`${OSS_BASE_URL}/public/company-intro.pdf`],
urls: [`${OSS_BASE_URL}/wslucky/product/2025/06/24/31c164ac-565c-4990-a584-b5d4935840d0.pdf`],
type: 'showURL'
});
// 其他配置保持不变...
const rawTabConfig = ref<Record<number, PdfItem[]>>({
2: [
{
id: 'case1',
title: '规划案例',
urls: [
`${OSS_BASE_URL}/cases/planning.pdf`,
],
type: 'showURL' ,
},
{
id: 'case2',
title: '团财案例',
urls: [
`${OSS_BASE_URL}/cases/CorporateServiceDeliveryCase-GroupandPropertyInsurance.pdf`
],
type: 'showURL' ,
}
],
3: [
{
id: 'product2',
title: '港险分析',
urls: [
`${OSS_BASE_URL}/products/hk-analysis-20260115.pdf`,
],
type: 'showURL' ,
landscapeFlag:true
},
{
id: 'product1',
title: '港险明细',
urls: [
`${OSS_BASE_URL}/products/hk-detail-20260115.pdf`,
],
type: 'showURL' ,
landscapeFlag:true
},
{
id: 'product3',
title: '产品对比',
urls: [],
type: 'showPage'
},
],
4: [
{
id: 'policy1',
title: '个险政策',
urls: [
`${OSS_BASE_URL}/policies/individual-policy.pdf`
],
type: 'showURL'
},
{
id: 'policy2',
title: '家办政策',
urls: [
`${OSS_BASE_URL}/policies/group-policy.pdf`,
],
type: 'showURL'
},
{
id: 'policy3',
title: '介绍费政策',
urls: [
`${OSS_BASE_URL}/policies/commission-policy.pdf`
],
type: 'showURL'
}
]
});
const typeToPermissionKey = ref<Record<number, string>>({
2: 'cases',
3: 'products',
4: 'policies'
});
// ========================== 事件处理 ==========================
const handlePdfLoadComplete = (url: string, pageCount: number) => {
console.log(`PDF加载完成: ${url}, 共 ${pageCount} 页`);
};
const handlePdfLoadError = (url: string, error: Error) => {
console.error(`PDF加载失败: ${url}`, error);
uni.showToast({
title: 'PDF加载失败',
icon: 'none',
duration: 2000
});
};
const handlePageChange = (currentPage: number, totalPages: number) => {
console.log(`页面变化: ${currentPage}/${totalPages}`);
};
// ========================== 辅助方法 ==========================
const getPdfTitle = (url: string): string => {
if (!url) return '未命名文件';
const fileName = url.split('/').pop() || '';
const title = fileName
.replace(/\.pdf$/i, '')
.replace(/[-_]/g, ' ')
.replace(/([A-Z])/g, ' $1')
.trim();
return title || 'PDF文档';
};
// ========================== 核心方法(简化版) ==========================
const queryUserInfoAndPermission = () => {
const userId = uni.getStorageSync('cffp_userId');
if (!userId) {
uni.setStorageSync('loginType', 'visitor');
initPdfAfterPermission();
return;
}
api.queryInfo({ userId }).then(res => {
if (res.success) {
permissionList.value = res.data.accessPermission || [];
} else {
uni.setStorageSync('loginType', 'visitor');
permissionList.value = [];
}
initPdfAfterPermission();
}).catch(() => {
uni.setStorageSync('loginType', 'visitor');
permissionList.value = [];
initPdfAfterPermission();
});
};
const initPdfAfterPermission = () => {
loading.value = true;
const filteredTabs = filteredCurrentTabs.value;
if (currentType.value >= 2 && currentType.value <= 4) {
if (filteredTabs.length > 0) {
activeTab.value = 0;
currentPdf.value = filteredTabs[0];
} else {
currentPdf.value = { id: '', title: '', urls: [], type: '',landscapeFlag:false };
}
}else{
currentPdf.value = { id: 'company', title: '公司介绍', urls: [`${OSS_BASE_URL}/public/company-intro.pdf`], type: 'showURL',landscapeFlag:false };
}
setTimeout(() => {
loading.value = false;
}, 200);
};
const filteredCurrentTabs = computed(() => {
const originalTabs = rawTabConfig.value[currentType.value] || [];
if (permissionList.value.length === 0) return [];
const targetPermissionKey = typeToPermissionKey.value[currentType.value];
if (!targetPermissionKey) return [];
const targetPermission = permissionList.value.find(
item => item.key === targetPermissionKey
);
if (!targetPermission || targetPermission.rights.length === 0) return [];
const allowedTabIds = new Set(
targetPermission.rights.map(right => right.key)
);
return originalTabs.filter(tab => allowedTabIds.has(tab.id));
});
const switchTab = (index: number) => {
const tabs = filteredCurrentTabs.value;
if (index < 0 || index >= tabs.length || tabs.length === 0) return;
loading.value = true;
setTimeout(() => {
activeTab.value = index;
currentPdf.value = tabs[index];
uni.setStorageSync('tabsIndex', index);
setTimeout(() => {
loading.value = false;
}, 300);
}, 100);
};
// ========================== 生命周期 ==========================
onLoad((query) => {
currentType.value = Number(query.type) || 1;
const index = uni.getStorageSync('tabsIndex');
setTimeout(() => {
if (index) {
switchTab(index);
}
}, 300);
queryUserInfoAndPermission();
});
// 监听当前PDF变化
watch(() => currentPdf.value, (newVal) => {
// Tab切换时不需要额外处理,组件会自动处理
});
import { ref, computed, watch } from 'vue';
import { onLoad,onShow } from '@dcloudio/uni-app';
import api from "@/api/api";
import productListVue from '@/myPackageA/product-list/product-list.vue';
// 导入PDF查看器组件
import PdfViewer from '@/components/pdf-viewer/pdf-viewer.vue';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
// ========================== 类型定义 ==========================
interface PdfItem {
id : string;
title : string;
urls : string[];
type : string;
landscapeFlag ?: boolean;
}
interface PermissionRight {
key : string;
}
interface PermissionItem {
key : string;
rights : PermissionRight[];
}
// 定义 API 返回的基础结构
interface QueryInfoResponse {
success: boolean;
data?: {
commonResult?: any; // 你主动 delete 的字段
userIsActive?: 1 | 2; // 1=正常,2=禁用
mobile?: string;
[key: string]: any; // 其他用户信息字段
};
}
// ========================== 响应式数据 ==========================
const OSS_BASE_URL = 'https://csf-doc-center.oss-cn-shanghai-finance-1-pub.aliyuncs.com';
const currentType = ref<number>(1);
const loading = ref(true);
const activeTab = ref(0);
const currentPdf = ref<PdfItem>({ id: '', title: '', urls: [], type: '', landscapeFlag: false });
const permissionList = ref<PermissionItem[]>([]);
let restrictedTipRef = ref()
// 公司介绍PDF
const companyPdf = ref<PdfItem>({
id: 'company',
title: '公司介绍',
// urls: Array.from({ length: 21 }, (_, i) =>
// `${OSS_BASE_URL}/public/company-intro_part${i + 1}.pdf`
// ),
// urls: [`${OSS_BASE_URL}/public/company-intro.pdf`],
urls: [`${OSS_BASE_URL}/wslucky/product/2025/06/24/31c164ac-565c-4990-a584-b5d4935840d0.pdf`],
type: 'showURL'
});
// 其他配置保持不变...
const rawTabConfig = ref<Record<number, PdfItem[]>>({
2: [
{
id: 'case1',
title: '规划案例',
urls: [
`${OSS_BASE_URL}/cases/planning.pdf`,
],
type: 'showURL',
},
{
id: 'case2',
title: '团财案例',
urls: [
`${OSS_BASE_URL}/cases/CorporateServiceDeliveryCase-GroupandPropertyInsurance.pdf`
],
type: 'showURL',
}
],
3: [
{
id: 'product2',
title: '港险分析',
urls: [
`${OSS_BASE_URL}/products/hk-analysis-20260115.pdf`,
],
type: 'showURL',
landscapeFlag: true
},
{
id: 'product1',
title: '港险明细',
urls: [
`${OSS_BASE_URL}/products/hk-detail-20260115.pdf`,
],
type: 'showURL',
landscapeFlag: true
},
{
id: 'product3',
title: '产品对比',
urls: [],
type: 'showPage'
},
],
4: [
{
id: 'policy1',
title: '个险政策',
urls: [
`${OSS_BASE_URL}/policies/individual-policy.pdf`
],
type: 'showURL'
},
{
id: 'policy2',
title: '家办政策',
urls: [
`${OSS_BASE_URL}/policies/group-policy.pdf`,
],
type: 'showURL'
},
{
id: 'policy3',
title: '介绍费政策',
urls: [
`${OSS_BASE_URL}/policies/commission-policy.pdf`
],
type: 'showURL'
}
]
});
const typeToPermissionKey = ref<Record<number, string>>({
2: 'cases',
3: 'products',
4: 'policies'
});
// ========================== 事件处理 ==========================
const handlePdfLoadComplete = (url : string, pageCount : number) => {
console.log(`PDF加载完成: ${url}, 共 ${pageCount} 页`);
};
const handlePdfLoadError = (url : string, error : Error) => {
console.error(`PDF加载失败: ${url}`, error);
uni.showToast({
title: 'PDF加载失败',
icon: 'none',
duration: 2000
});
};
const handlePageChange = (currentPage : number, totalPages : number) => {
console.log(`页面变化: ${currentPage}/${totalPages}`);
};
// ========================== 辅助方法 ==========================
const getPdfTitle = (url : string) : string => {
if (!url) return '未命名文件';
const fileName = url.split('/').pop() || '';
const title = fileName
.replace(/\.pdf$/i, '')
.replace(/[-_]/g, ' ')
.replace(/([A-Z])/g, ' $1')
.trim();
return title || 'PDF文档';
};
// ========================== 核心方法(简化版) ==========================
const queryUserInfoAndPermission = () => {
const userId = uni.getStorageSync('cffp_userId');
if (!userId) {
uni.setStorageSync('loginType', 'visitor');
initPdfAfterPermission();
return;
}
api.queryInfo({ userId }).then(res => {
if (res.success) {
permissionList.value = res.data.accessPermission || [];
} else {
uni.setStorageSync('loginType', 'visitor');
permissionList.value = [];
}
initPdfAfterPermission();
}).catch(() => {
uni.setStorageSync('loginType', 'visitor');
permissionList.value = [];
initPdfAfterPermission();
});
};
const initPdfAfterPermission = () => {
loading.value = true;
const filteredTabs = filteredCurrentTabs.value;
if (currentType.value >= 2 && currentType.value <= 4) {
if (filteredTabs.length > 0) {
activeTab.value = 0;
currentPdf.value = filteredTabs[0];
} else {
currentPdf.value = { id: '', title: '', urls: [], type: '', landscapeFlag: false };
}
} else {
currentPdf.value = { id: 'company', title: '公司介绍', urls: [`${OSS_BASE_URL}/public/company-intro.pdf`], type: 'showURL', landscapeFlag: false };
}
setTimeout(() => {
loading.value = false;
}, 200);
};
const filteredCurrentTabs = computed(() => {
const originalTabs = rawTabConfig.value[currentType.value] || [];
if (permissionList.value.length === 0) return [];
const targetPermissionKey = typeToPermissionKey.value[currentType.value];
if (!targetPermissionKey) return [];
const targetPermission = permissionList.value.find(
item => item.key === targetPermissionKey
);
if (!targetPermission || targetPermission.rights.length === 0) return [];
const allowedTabIds = new Set(
targetPermission.rights.map(right => right.key)
);
return originalTabs.filter(tab => allowedTabIds.has(tab.id));
});
const switchTab = (index : number) => {
const tabs = filteredCurrentTabs.value;
if (index < 0 || index >= tabs.length || tabs.length === 0) return;
loading.value = true;
setTimeout(() => {
activeTab.value = index;
currentPdf.value = tabs[index];
uni.setStorageSync('tabsIndex', index);
setTimeout(() => {
loading.value = false;
}, 300);
}, 100);
};
const queryInfo = () => {
api.queryInfo({ userId: uni.getStorageSync('cffp_userId') })
.then((res: QueryInfoResponse) => { // 👈 添加类型注解
if (res.success) {
delete res.data?.commonResult;
const cffp_userInfo = {
...res.data
};
// 账号禁用用户
if (res.data?.userIsActive == 2) {
restrictedTipRef.value.open();
uni.setStorageSync('userIsActive', String(res.data.userIsActive));
return;
}
if (res.data?.userIsActive && res.data.userIsActive != 2) {
restrictedTipRef.value.close();
uni.removeStorageSync('userIsActive');
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data?.mobile ?? '');
}
});
};
// ========================== 生命周期 ==========================
onLoad((query) => {
currentType.value = Number(query.type) || 1;
const index = uni.getStorageSync('tabsIndex');
setTimeout(() => {
if (index) {
switchTab(index);
}
}, 300);
queryUserInfoAndPermission();
});
onShow(()=>{
if(uni.getStorageSync('loginType')=='codelogin'){
queryInfo()
}
})
// 监听当前PDF变化
watch(() => currentPdf.value, (newVal) => {
// Tab切换时不需要额外处理,组件会自动处理
});
</script>
<style scoped lang="scss">
/* 样式可以大幅简化,因为PDF查看逻辑都在组件中 */
.module-container {
display: flex;
flex-direction: column;
min-height: 100vh;
background-color: #f5f5f5;
}
.content {
flex: 1;
display: flex;
flex-direction: column;
position: relative;
}
.loading {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #ffffff;
.spinner {
width: 30px;
height: 30px;
border: 3px solid #eeeeee;
border-top-color: #20269B;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 16px;
}
text {
color: #999999;
font-size: 14px;
}
}
.error {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
color: #ef4444;
font-size: 16px;
background-color: #ffffff;
}
.pdf-item-container {
margin-bottom: 24rpx;
background: #ffffff;
border-radius: 8rpx;
overflow: hidden;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.tab-bar {
display: flex;
flex-direction: row;
height: 48px;
background-color: #ffffff;
border-bottom: 1px solid #eeeeee;
overflow-x: auto;
white-space: nowrap;
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
.tab-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0 16px;
height: 100%;
position: relative;
cursor: pointer;
.tab-text {
font-size: 14px;
color: #666666;
transition: color 0.3s;
}
.tab-indicator {
position: absolute;
bottom: 0;
width: 24px;
height: 2px;
background-color: #20269B;
border-radius: 1px;
transition: all 0.3s;
}
&.active {
.tab-text {
color: #20269B;
font-weight: 500;
}
}
}
}
.pdf-tab-content {
width: 100%;
position: absolute;
top: 48px;
bottom: 0;
background-color: #f5f5f5;
overflow-y: auto;
padding: 16rpx;
box-sizing: border-box;
}
.pdf-empty {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #999999;
font-size: 14px;
background-color: #ffffff;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* 样式可以大幅简化,因为PDF查看逻辑都在组件中 */
.module-container {
display: flex;
flex-direction: column;
min-height: 100vh;
background-color: #f5f5f5;
}
.content {
flex: 1;
display: flex;
flex-direction: column;
position: relative;
}
.loading {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #ffffff;
.spinner {
width: 30px;
height: 30px;
border: 3px solid #eeeeee;
border-top-color: #20269B;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 16px;
}
text {
color: #999999;
font-size: 14px;
}
}
.error {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
color: #ef4444;
font-size: 16px;
background-color: #ffffff;
}
.pdf-item-container {
margin-bottom: 24rpx;
background: #ffffff;
border-radius: 8rpx;
overflow: hidden;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.tab-bar {
display: flex;
flex-direction: row;
height: 48px;
background-color: #ffffff;
border-bottom: 1px solid #eeeeee;
overflow-x: auto;
white-space: nowrap;
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
.tab-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0 16px;
height: 100%;
position: relative;
cursor: pointer;
.tab-text {
font-size: 14px;
color: #666666;
transition: color 0.3s;
}
.tab-indicator {
position: absolute;
bottom: 0;
width: 24px;
height: 2px;
background-color: #20269B;
border-radius: 1px;
transition: all 0.3s;
}
&.active {
.tab-text {
color: #20269B;
font-weight: 500;
}
}
}
}
.pdf-tab-content {
width: 100%;
position: absolute;
top: 48px;
bottom: 0;
background-color: #f5f5f5;
overflow-y: auto;
padding: 16rpx;
box-sizing: border-box;
}
.pdf-empty {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #999999;
font-size: 14px;
background-color: #ffffff;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
</style>
\ No newline at end of file
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
......@@ -51,9 +53,14 @@
</template>
<script>
import api from "@/api/api";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
import questionsData from "@/util/questions";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
export default {
components:{
restrictedTip,
},
data() {
return {
tabList:[
......@@ -67,6 +74,9 @@
}
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -81,6 +91,33 @@
}
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
changeTab(item){
this.currentTab = item.id
},
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="myHeader">
<!-- #ifdef APP -->
<view class="backArrow">
......@@ -138,10 +140,12 @@
import api from "@/api/api";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import BootPage from "@/components/bootpage/bootpage.vue";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components: {
CommonTimePicker,
BootPage
BootPage,
restrictedTip,
},
data() {
return {
......@@ -281,6 +285,9 @@
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -288,7 +295,33 @@
// #endif
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
sortswitch(obj) {
this.currentFilterBtn = obj.id
this.CffpOrgInfoReqVO.sortType = obj.sortType
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="myHeader">
<!-- #ifdef APP -->
<view class="backArrow">
......@@ -120,9 +122,11 @@
import dataHandling from "@/util/dataHandling";
import api from "@/api/api";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components: {
CommonTimePicker
CommonTimePicker,
restrictedTip,
},
data() {
return {
......@@ -208,6 +212,9 @@
this.getqueryTeamAchievement()
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -215,6 +222,33 @@
// #endif
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
sortswitch(obj) {
this.currentFilterBtn = obj.id
this.getqueryTeamAchievement()
......
......@@ -850,6 +850,16 @@
// 检查名片状态
this.getBusissedCardStatus(res['data']['businessCardId'])
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
// id=03的权限设置
// 执行处理
......
<template>
<view style="display: flex;flex-direction: column;">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 10rpx;"></text>
<!-- #endif -->
......@@ -15,9 +17,12 @@
<script>
import MenuList from "@/components/menuList/menuList.vue"
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
import api from "@/api/api";
export default {
components:{
MenuList
MenuList,
restrictedTip,
},
data() {
return {
......@@ -50,6 +55,9 @@
}
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
if(this.userInfo.partnerIsActive&&this.userInfo.partnerIsActive==2){
this.minorMenuLists.forEach(item=>{
......@@ -65,6 +73,33 @@
// #endif
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack() {
uni.navigateBack({
delta: 1
......
<template>
<view>
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="personalInfo">
<view class="ulBox">
<view v-for="item in menuList.filter(v=>v.isShow)" :key="item.title" @click="goDetail(item)"
......@@ -20,7 +22,12 @@
<script>
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import api from "@/api/api";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{
restrictedTip,
},
props: {
menuList: {
type: Array
......@@ -30,6 +37,9 @@
return {}
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -43,6 +53,33 @@
uni.hideToast();
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goDetail(item) {
if (item.isShow == true && item.isOpen == true) {
if (item.isTips == true) {
......
<template>
<view style="display: flex;flex-direction: column;">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 10rpx;"></text>
<!-- #endif -->
......@@ -22,8 +24,10 @@
import {companyInfo} from "@/environments/environment";
import dataHandling from "@/util/dataHandling";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import api from "@/api/api";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{ MenuList },
components:{ MenuList,restrictedTip, },
data() {
return {
menuList:null,
......@@ -55,6 +59,9 @@
}
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -75,6 +82,33 @@
uni.hideToast();
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack(){
uni.switchTab({
url: '/pages/personalCenter/personalCenter'
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="userHeader">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text>
......@@ -127,6 +128,7 @@
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import commonSelect from '@/components/commonSelect/commonSelect.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
data() {
return {
......@@ -155,7 +157,8 @@
},
components: {
commonSelect,
PartnerTipPopup
PartnerTipPopup,
restrictedTip,
},
onLoad(options) {
if(this.companyType == '1'){
......@@ -174,6 +177,9 @@
// this.optionForm = this.tempInfo.optionForm = JSON.parse(options.customerBasicInfo)
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -182,6 +188,33 @@
this.getIdType()
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
continueCancel(){
// 使用深拷贝还原数据
this.optionForm = JSON.parse(JSON.stringify(this.tempInfo.optionForm));
......@@ -419,7 +452,7 @@
position: absolute;
bottom: 15%;
left: 14%;
z-index: 99;
z-index: 11;
.add{
position: absolute;
bottom: 2%;
......
<template>
<view class="container" :style="cffpFortuneDateList.length>6?'height:auto':'height:100vh'">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
......@@ -125,6 +127,7 @@
import CustomDatePop from './customDatePop.vue';
import dataHandling from "@/util/dataHandling";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
let nowTime = dataHandling.getMonthRange(dataHandling.getDateParts().year, dataHandling.getDateParts().month)
export default {
data() {
......@@ -170,7 +173,7 @@
showWithdrawal:true
}
},
components: { CustomDatePop },
components: { CustomDatePop,restrictedTip, },
onLoad() {
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
// 经销商职级p3之上的都不给提现
......@@ -183,6 +186,9 @@
this.queryByUserIdFortuneStatistic();
this.getCommissionType()
this.getDetail()
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -360,7 +366,34 @@
url: '/myPackageA/commission/withdrawalRecord'
})
}
}
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
}
}
</script>
......
......@@ -34,6 +34,7 @@
import tabBar from '../../components/tabBar/tabBar.vue';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
import api from '../../api/api';
export default {
data() {
return {
......@@ -78,6 +79,9 @@
restrictedTip
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -121,7 +125,34 @@
} else {
common.errorDialog(2, '该模块正在开发中,敬请期待!', '提示');
}
}
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
}
}
</script>
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view>
<!-- 时间选择 -->
<view class="top">
......@@ -116,11 +118,13 @@
import dataHandling from "@/util/dataHandling";
import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{
courseItem,
CommonTimePicker,
JoinPopup
JoinPopup,
restrictedTip,
},
data() {
return {
......@@ -252,7 +256,35 @@
url:`/pages/pointsExchange/pointsExchange`
})
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
},
onLoad(options) {
if(options.partnerType){
this.partnerType = options.partnerType
......@@ -265,6 +297,9 @@
let app22 = getCurrentPages().length
this.userCourseCount()
this.userCourseList()
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="top">
<!-- #ifdef APP -->
<view class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></view>
......@@ -39,7 +41,11 @@
<script>
import api from '../../api/api';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default{
components:{
restrictedTip,
},
data(){
return{
system_msgs_list:[],
......@@ -49,6 +55,9 @@
this.querySystemMessage();
},
onShow(){
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
this.querySystemMessage();
// #ifdef H5
initJssdkShare(() => {
......@@ -57,6 +66,33 @@
// #endif
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
querySystemMessage() {
api.querySystemMessage({systemType:1,userId:uni.getStorageSync('cffp_userId')}).then(res => {
if (res['success']&&res['data']['dataList']&&res['data']['dataList'].length>0) {
......
<template>
<!-- #ifdef APP -->
<view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text class="commonTitle">消息详情</text>
</view>
<!-- #endif -->
<view class="announcement_detail_wrapper container">
<view class="content">
<view class="title">
{{systemMsgInfo.title}}
</view>
<view class="date">
发布时间:{{systemMsgInfo.createdAt}}
<view class="">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text class="commonTitle">消息详情</text>
</view>
<!-- #endif -->
<view class="announcement_detail_wrapper container">
<view class="content">
<view class="title">
{{systemMsgInfo.title}}
</view>
<view class="date">
发布时间:{{systemMsgInfo.createdAt}}
</view>
<view style="font-size: 25rpx;" v-html="systemMsgInfo.context"></view>
</view>
<view style="font-size: 25rpx;" v-html="systemMsgInfo.context"></view>
</view>
</view>
</template>
<script>
import api from "../../api/api";
import common from '../../common/common';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default{
data(){
return{
......@@ -35,12 +41,15 @@
}
},
name:'system_msg_detail',
components:{},
components:{restrictedTip,},
onLoad(options){
this.id = options.id;
this.getSystemMsgDetail();
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -48,6 +57,33 @@
// #endif
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
getSystemMsgDetail(){
api.querySystemMessageDetail({systemMessageId:this.id}).then((res)=>{
if(res['success']){
......
<template>
<view class="">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="content_wrapper">
<h4 style="font-size: 28rpx;">劳务报酬税缴纳规则</h4>
<view class="content">
......@@ -58,14 +60,21 @@
<script>
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import api from "@/api/api";
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default{
components:{
restrictedTip,
},
data(){
return {
}
},
components:{},
onShow(){
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -73,7 +82,33 @@
// #endif
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
}
}
</script>
......
<template>
<view class="container">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text>
<!-- #endif -->
......@@ -74,7 +76,11 @@
<script>
import api from '../../api/api';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default{
components:{
restrictedTip,
},
data(){
return {
exchangeAmount:null,
......@@ -93,6 +99,9 @@
this.goFortuneWithdrawal()
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -100,6 +109,33 @@
// #endif
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack() {
uni.navigateBack({
delta: 1
......@@ -145,8 +181,9 @@
//支付宝去提现
aliWithdrawal(){
this.readonlyFlag = true;
let aliWithdrawalResVOParam = {}
//#ifdef H5
let aliWithdrawalResVOParam = {
aliWithdrawalResVOParam = {
...this.aliWithdrawalResVO,
dataSource:2,
orderNo:this.partnerTradeNo,
......@@ -155,7 +192,7 @@
}
//#endif
// #ifdef APP-PLUS
let aliWithdrawalResVOParam = {
aliWithdrawalResVOParam = {
...this.aliWithdrawalResVO,
dataSource:2,
orderNo:this.partnerTradeNo,
......
<template>
<view>
<view class="wrapper">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 30rpx;"></text>
<!-- #endif -->
......@@ -173,7 +175,14 @@
import { nanoid } from "nanoid";
import LEchart from '@/uni_modules/lime-echart/components/l-echart/l-echart.vue';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{
commonHead,
foot,
LEchart,
restrictedTip,
},
data() {
return {
accountBalanceEnd:[],
......@@ -206,6 +215,9 @@
}
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -520,7 +532,34 @@
*/
formatFloat(num,digitNum=2,type=1){
return common.formatFloat(num,digitNum=2,type=1)
}
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
},
mounted() {
......@@ -530,11 +569,7 @@
val['educationNo'] = idx + 1;
});
},
components:{
commonHead,
foot,
LEchart
}
}
</script>
......
<template>
<view class="batchDataImportContainer">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="selectStepContainer">
<view class="selectStepContent">
<text>我想测算每隔</text>
......@@ -87,7 +89,11 @@
import api from "../../api/api";
import {reactive,provide} from "vue";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
components:{
restrictedTip,
},
data() {
return {
index:0,
......@@ -110,6 +116,9 @@
this.calcuteData = uni.getStorageSync('calcuteData') ? JSON.parse(uni.getStorageSync('calcuteData')) : null;
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -117,6 +126,33 @@
// #endif
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
// 选择间隔
bindPickerChange(e){
this.index = e.detail.value;
......
<template>
<view class="wrapper">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 30rpx;"></text>
<!-- #endif -->
......@@ -279,7 +281,7 @@
// import Echarts from '../../components/echarts/echarts'
import LEchart from '@/uni_modules/lime-echart/components/l-echart/l-echart.vue';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default{
data(){
return{
......@@ -351,12 +353,16 @@
foot,
commonHead,
// Echarts
LEchart
LEchart,
restrictedTip,
},
onLoad(){
this.provCityQry();
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -364,6 +370,33 @@
// #endif
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
goBack(){
uni.navigateBack({
delta: 1
......
<template>
<div class="mortgageCalculatorContainer">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<view class="tabTitle" v-if="!isReadonly">
<view v-for="item of loanTypeLists">
<text :class="{ actived: item.value===loanType }" @click="selectLoanType(item.value)">{{item.text}}</text>
......@@ -54,6 +56,8 @@
<script>
import { ref,toRefs,reactive } from "vue";
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
import api from "@/api/api";
export default{
props: ['isReadonly','loanType','a','b'],
emits:['getData'],
......@@ -91,9 +95,12 @@
},
name:'loanBalance',
components:{
restrictedTip,
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -126,6 +133,33 @@
}
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
clear(){
this.accumulationFundParams=[
{id:'00',text:'公积金贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
......
<template>
<view class="paramsContainer">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<h5>规划参数<span>(点击参数值即可修改参数)</span></h5>
<view class="ulBox">
<template v-for="item in editParamLists">
......@@ -38,6 +40,7 @@
import api from '../../api/api';
import common from '../../common/common'
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default{
props:['cityInfo','planningParams'],
emits:['getData'],
......@@ -59,9 +62,12 @@
},
name:'planningParameters',
components:{
restrictedTip,
},
onShow(){
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
// #ifdef H5
initJssdkShare(() => {
setWechatShare();
......@@ -77,6 +83,33 @@
return {sendData,cityInfo,planningParams}
},
methods:{
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
onchange(e) {
// const value = e.detail.value;
},
......
<template>
<!-- 已关注公众号用户 -->
<view class="content">
<!-- 禁用弹窗 -->
<restrictedTip ref="restrictedTip"/>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 30rpx;"></text>
<!-- #endif -->
......@@ -206,6 +208,7 @@
import { toRefs, ref } from 'vue';
import commonHead from '../header/header.vue';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import restrictedTip from '@/components/commonPopup/restrictedTip.vue';
export default {
data() {
return {
......@@ -236,7 +239,8 @@
components:{
dataImport,
foot,
commonHead
commonHead,
restrictedTip,
},
onLoad(option) {
if(option.isBack == 1){
......@@ -630,9 +634,39 @@
this.withdrawalType = '1';
this.irrAndSimple = {nyear:undefined,cashValue:undefined};
this.resultShowFlag = false;
}
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
this.$refs.restrictedTip.open()
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
this.$refs.restrictedTip.close()
uni.removeStorageSync('userIsActive')
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
uni.setStorageSync('user_mobile', res.data.mobile)
}
})
},
},
onShow() {
if(uni.getStorageSync('loginType')=='codelogin'){
this.queryInfo()
}
if(uni.getStorageSync('resIrrAndSimpleResInfos')){
this.resIrrAndSimpleResInfos = uni.getStorageSync('resIrrAndSimpleResInfos');
this.calcuteMethod = '2';
......
......@@ -27,10 +27,11 @@ let shareCustomPageList = [
]
export default function initApp() {
let date = Date.now()
uni.addInterceptor('navigateTo', {
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke(e) {
let userInfo = {}
if (uni.getStorageSync('cffp_userInfo')) {
userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
......@@ -81,13 +82,23 @@ export default function initApp() {
const cffp_userInfo = {
...res.data
}
// 账号禁用用户
if(res.data.userIsActive&&res.data.userIsActive==2){
uni.setStorageSync('userIsActive',String(res.data.userIsActive))
return
}
if(res.data.userIsActive&&res.data.userIsActive!=2){
uni.removeStorageSync('userIsActive')
}
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()
......@@ -140,9 +151,14 @@ export default function initApp() {
success(e) {}
})
uni.addInterceptor('switchTab', {
// tabbar页面跳转前进行拦截
invoke(e) {
// 账号禁用用户不让跳转
if(uni.getStorageSync('userIsActive')&&uni.getStorageSync('userIsActive')==2){
return false
}
if (shareCustomPageList.indexOf(e.url) == -1) {
if (dataHandling.h5RuntimeEnv() == 'wechat-miniprogram') {
let shareInfo = {
......@@ -163,27 +179,6 @@ export default function initApp() {
return
}
}
if (uni.getStorageSync('cffp_userId')) {
api.queryInfo({ userId: uni.getStorageSync('cffp_userId') }).then(res => {
// if(!res['success']){
// uni.setStorageSync('loginType','visitor')
// uni.navigateTo({
// url: '/myPackageA/login/login'
// })
// return true
// }
// 保存用户得个人信息
if (res['success']) {
delete res.data.commonResult
const cffp_userInfo = {
...res.data
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
}
})
}
if (date) {
//如果时间戳存在 那么记录此页面的停留时间
dataHandling.pocessTracking(
......@@ -201,6 +196,11 @@ export default function initApp() {
uni.addInterceptor('reLaunch', {
//页面跳转前拦截
invoke(e) {
// 账号禁用用户不让跳转
if(uni.getStorageSync('userIsActive')&&uni.getStorageSync('userIsActive')==2){
return false
}
if (shareCustomPageList.indexOf(e.url) == -1) {
if (dataHandling.h5RuntimeEnv() == 'wechat-miniprogram') {
let shareInfo = {
......
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