Commit 03948d49 by yuzhenWang

完善提现,翻新加盟,增加分享弹窗,修改bug

parent 6f6e8320
<script>
import initApp from "@/util/router.js";
import {interceptor} from "@/util/interceptor";
import {baseURL,apiURL,cffpURL} from "@/environments/environment";
import {baseURL,apiURL,cffpURL,companyInfo} from "@/environments/environment";
import api from './api/api';
export default {
onLaunch: function() {
console.log('App Launch');
if(!uni.getStorageSync('loginType')){
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
}
// 处理外部链接参数
this.handleExternalUrlParams();
// #ifdef APP-PLUS
......@@ -96,8 +100,10 @@
if(pages.length > 0) {
const currentRoute = pages[pages.length - 1].route;
const whiteList = [
'/components/login/login',
'/myPackageA/login/login',
'/pages/invitationRegister/invitationlogin',
'/myPackageA/applyFranchise/applyFranchise',
'/myPackageA/ruleAndContract/clause',
'/pages/courselist/courselist',
'/pages/courseDetail/courseDetail',
'/pages/orderDetail/orderDetail',
......@@ -105,18 +111,26 @@
'/pages/index/index'
] // 根据需要调整
if(!whiteList.includes(currentRoute)) {
uni.redirectTo({
url: '/components/login/login'
uni.navigateTo({
url: '/myPackageA/login/login'
});
}
}
}
if (res['success']) {
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
}
} catch (err) {
console.error('检查用户状态失败:', err);
}
}
},
// 清除登录状态
clearLoginState() {
uni.clearStorageSync();
......@@ -142,6 +156,7 @@
const params = this.parseQueryString(queryString);
this.saveUrlParams(params);
}
},
// 处理App平台的URL参数
......@@ -196,7 +211,6 @@
// 使用uni.setStorageSync存储到本地
try {
if(params.addSystemType){
console.log('进来了');
uni.setStorageSync('addSystemType', params.addSystemType);
}
// // 可以在这里添加事件通知其他页面参数已准备好
......@@ -306,7 +320,7 @@
.uni-popup .uni-popup__wrapper{
/* margin: 30rpx!important; */
border-radius: 30rpx;
}
.richTextContent img{
width: 100% !important;
......
......@@ -2,12 +2,12 @@
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://app.ydhomeoffice.cn/components/clause/clause?type=1&isBack=1\">《服务协议》</a>和<a href=\"https://app.ydhomeoffice.cn/components/clause/clause?type=2&isBack=1\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://app.ydhomeoffice.cn/myPackageA/ruleAndContract/clause?type=1&isBack=1\">《服务协议》</a>和<a href=\"https://app.ydhomeoffice.cn/myPackageA/ruleAndContract/clause?type=2&isBack=1\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"second" : {
"title" : "确认提示",
"message" : "  进入应用前,你需先同意<a href=\"https://app.ydhomeoffice.cn/components/clause/clause?type=1&isBack=1\">《服务协议》</a>和<a href=\"https://app.ydhomeoffice.cn/components/clause/clause?type=2&isBack=1\">《隐私政策》</a>,否则将退出应用。",
"message" : "  进入应用前,你需先同意<a href=\"https://app.ydhomeoffice.cn/myPackageA/ruleAndContract/clause?type=1&isBack=1\">《服务协议》</a>和<a href=\"https://app.ydhomeoffice.cn/myPackageA/ruleAndContract/clause?type=2&isBack=1\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
......
import request from "../util/request";
import {baseURL,apiURL,cffpURL} from "../environments/environment";
import {baseURL,apiURL,cffpURL,sfpUrl} from "../environments/environment";
export default {
//查看token是否已经失效
......@@ -391,5 +391,29 @@ export default {
},
appointment(params) {
return request(`${cffpURL}/course/appointment`, 'POST', params)
}
},
// 申请加盟 等级差统计
partnerStatisticsGrade(params) {
return request(`${apiURL}/cffp/partner/statistics/grade`, 'GET', params)
},
// 申请加盟申请接口
newSaveApplyInfo(params) {
return request(`${cffpURL}/partner/saveApplyInfo/new`, 'POST', params)
},
// 实名认证查询接口
improveInfo(params) {
return request(`${apiURL}/pay/get/improve/info`, 'GET', params)
},
// 实名认证查询接口
submitImproveInfo(params) {
return request(`${apiURL}/pay/improve/info`, 'POST', params)
},
// 解绑实名认证
unbindImproveInfo(params) {
return request(`${cffpURL}/user/realnameauth/unbind`, 'POST', params)
},
//记录用户操作轨迹
pocessTracking(params) {
return request(`${sfpUrl}/sfp/sfpMain/pocessTracking`, 'POST', params)
},
}
......@@ -246,6 +246,37 @@ export default {
return num;
}
},
/**
* 验证支付宝账号(手机号或邮箱)
* @param {string} account 支付宝账号
* @returns {boolean} 是否有效
*/
alipayAccountValid(account) {
if (!account) return false;
// 手机号正则(11位数字,1开头)
const mobileReg = /^1[3-9]\d{9}$/;
// 邮箱正则(简化版)
const emailReg = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
return mobileReg.test(account) || emailReg.test(account);
},
/**
* 获取支付宝账号类型
* @param {string} account 支付宝账号
* @returns {'mobile'|'email'|'invalid'} 账号类型
*/
getAlipayAccountType(account) {
if (!account) return 'invalid';
const mobileReg = /^1[3-9]\d{9}$/;
if (mobileReg.test(account)) return 'mobile';
const emailReg = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
if (emailReg.test(account)) return 'email';
return 'invalid';
}
}
\ No newline at end of file
......@@ -9,20 +9,23 @@
<input style="font-size: 26rpx;" name="form.code" placeholder="输入验证码" v-model="code" type="number" maxlength="6" />
<text style="width: 200rpx;text-align: right;" @click="sendMessage()" :class="{'grey':disabledSendBtn}">{{sendCode}}</text>
</view>
<view class="agree">
<label class="radio" style="padding-right: 10rpx;">
<radio :checked="agreeFlag" @click="agreeFlag=!agreeFlag" />
</label>
<text>已阅读并同意</text>
<text class="file" @click="getFile(1)">服务协议</text>
<text></text>
<text class="file" @click="getFile(2)">隐私政策</text>
<view class="protol">
<view class="empty" v-if="!agreeFlag" @click="agreeFlag=true"></view>
<text v-else class="iconfont icon-icon_duihao-mian" @click="agreeFlag=false"></text>
<text style="color: #666;">已阅读并同意</text>
<text style="color: #20269B;" @click="getFile(1)">服务协议</text>
<text style="color: #666666;"></text>
<text style="color: #20269B;" @click="getFile(2)">隐私条款</text>
</view>
<view class="footer" @click="login()">
<text style="line-height: 80rpx;">{{loginTypeSync=='visitor' ? '购买' : '登录'}}</text>
<view class="footerBox">
<view class="footer" @click="login()">
<text style="line-height: 80rpx;">{{loginTypeSync=='visitor' ? '登录' : '购买'}}</text>
</view>
</view>
</view>
<view class="" style="width: 80rpx;height: 80rpx;margin: auto;" @click="closebootpage()">
<view class="closeBtn" style="width: 80rpx;height: 80rpx;margin: auto;" @click="closebootpage('close')">
<image style="width: 80rpx;height: 80rpx;" src="../../static/Slice3.png" mode=""></image>
</view>
</view>
......@@ -34,7 +37,18 @@
import api from '../../api/api';
import common from '../../common/common';
import {companyInfo} from "@/environments/environment";
import dataHandling from "@/util/dataHandling";
export default {
props:{
wayType:{
type:String,
default:'1' //1代表登录,2代表分享
},
// 哪个地方中用到了这个登录
loginSource:{
type:String,
}
},
data() {
return {
agreeFlag:false,
......@@ -49,11 +63,12 @@
},
mounted() {
this.loginTypeSync = uni.getStorageSync('loginType');
console.log('loginSource',this.loginSource);
},
methods: {
getFile(type){
uni.navigateTo({
url:`/components/clause/clause?type=${type}`
url:`/myPackageA/ruleAndContract/clause?type=${type}`
})
},
sendMessage(){
......@@ -68,9 +83,8 @@
this.delayTime()
}
})
}else{
common.errorDialog(2,'手机号校验错误')
}
},
delayTime() {
this.disabledSendBtn = true;
......@@ -123,12 +137,10 @@
uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', this.userId);
uni.setStorageSync('uni-token', res.data['token']);
// uni.navigateTo({
// url:'/pages/orderConfirm/orderConfirm?userId=' + this.userId
// })
this.loginTypeSync = "codelogin";
this.queryInfo()
uni.$emit('loginUpdate');
this.closebootpage()
}else{
uni.showToast({
title: res['message'],
......@@ -139,8 +151,36 @@
})
},
closebootpage() {
this.$emit('close', this.userId,this.loginTypeSync)
closebootpage(val) {
if(!val){
dataHandling.pocessTracking(
'点击',
`用户在${this.loginSource}模块登录系统`,
'点击',
2,
`${this.loginSource}`,
)
}
// val代表关闭叉号
this.$emit('close', this.userId,this.loginTypeSync,val)
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if (res['success']) {
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
this.closebootpage()
}
})
},
}
}
......@@ -150,14 +190,19 @@
.content-box {
position: absolute;
left:50%;
// left: 10%;
top: 50%;
transform: translate(-50%,-50%);
width: 630rpx;
height: 500rpx;
// height: 500rpx;
background: #FFFFFF;
border-radius: 20rpx;
opacity: 1;
.closeBtn{
position: absolute;
bottom: -30%;
left: 50%;
transform: translateX(-50%);
}
}
.inputItem {
......@@ -172,18 +217,26 @@
color: #20279B;
text-decoration: none;
}
.agree {
font-size: 28rpx;
color: #666;
text-align: center;
margin-top: 40rpx;
a {
color: #20279B;
text-decoration: none;
.protol{
margin-top: 20rpx;
margin-left: 10rpx;
display: flex;
align-items: center;
font-size: 26rpx;
.empty{
width: 30rpx;
height: 30rpx;
border: 1rpx solid #20269B;
border-radius: 50%;
margin-right: 5rpx;
}
.icon-icon_duihao-mian{
font-size: 30rpx;
color: #20269B;
margin-right: 5rpx;
}
}
.login-code {
display: flex;
justify-content: space-between;
......@@ -219,17 +272,20 @@
color: #FFFFFF;
font-size: 36rpx;
}
.footer {
width: 400rpx;
height: 80rpx;
background: #20279B;
border-radius: 80rpx;
opacity: 1;
margin: 60rpx auto;
.footerBox{
width: 100%;
display: flex;
justify-content: center;
color: #FFFFFF;
font-size: 26rpx;
align-items: center;
.footer {
width: 70%;
background: #20279B;
border-radius: 40rpx;
margin-top: 50rpx;
text-align: center;
color: #FFFFFF;
font-size: 26rpx;
}
}
</style>
<!-- /components/JoinPopup.vue -->
<template>
<uni-popup ref="popup" type="center" background-color="#fff">
<view class="join-content">
<view class="join-header">
<view class="iconfont icon-hezuo"></view>
</view>
<view class="join-body">
<view class="title">
{{ title }}
</view>
<view class="subtitle">
{{ subtitle }}
</view>
</view>
<view class="join-footer" @click="handleConfirm">
{{ confirmText }}
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: "JoinPopup",
props: {
// 弹窗标题
title: {
type: String,
default: "您还未加盟为合伙人"
},
// 弹窗副标题
subtitle: {
type: String,
default: "成为合伙人后,分享商品,好友购物得收益"
},
// 确认按钮文字
confirmText: {
type: String,
default: "去加盟拿收益"
}
},
methods: {
// 打开弹窗
open() {
this.$refs.popup.open();
},
// 关闭弹窗
close() {
this.$refs.popup.close();
},
// 确认按钮点击事件
handleConfirm() {
this.$emit("confirm");
this.close();
}
}
};
</script>
<style lang="scss" scoped>
.join-content {
width: 500rpx;
border-radius: 30rpx;
background-color: #fff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
.join-header {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background: rgba(54, 57, 169, 1);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
.icon-hezuo {
font-size: 35rpx;
color: #fff;
}
}
.join-body {
margin-bottom: 20rpx;
text-align: center;
.title {
font-size: 30rpx;
color: rgba(38, 41, 44, 1);
font-weight: 600;
}
.subtitle {
color: rgba(145, 144, 148, 1);
font-size: 26rpx;
margin-top: 10rpx;
}
}
.join-footer {
width: 100%;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 20rpx 0;
background: rgba(54, 57, 169, 1);
border-radius: 60rpx;
font-size: 28rpx;
}
}
</style>
\ No newline at end of file
<template>
<uni-popup ref="popup" type="center" background-color="#fff">
<view class="joinContent">
<view class="title" v-if="title">
{{title}}
</view>
<view class="joinHeader" v-if="tipIcon">
<view class="iconfont icon-exclamation" ></view>
</view>
<view class="joinCon">
<view class="one">
{{ content }}
</view>
</view>
<view class="joinFotter" v-if="btnType == 'vertical'">
<view @click="handleJoin" style="background-color: #FAFAFA;color: #333333;">
{{ joinText }}
</view>
<view @click="handleContinue">
{{ continueText }}
</view>
</view>
<view class="joinFotter horizontal" v-if="btnType == 'horizontal'">
<view @click="handleJoin" style="background-color: #FAFAFA;color: #333333;">
{{ joinText }}
</view>
<view @click="handleContinue">
{{ continueText }}
</view>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: 'PartnerTipPopup',
props: {
title: {
type: String,
},
// vertical垂直排列,horizontal横向排列
btnType: {
type: String,
default: 'vertical'
},
// 弹窗内容
content: {
type: String,
default: '您还未加盟为合伙人,分享后无法拿到收益'
},
// 加盟按钮文字
joinText: {
type: String,
default: '去加盟为合伙人'
},
// 继续按钮文字
continueText: {
type: String,
default: '我已知晓,继续分享'
},
// 是否展示icon
tipIcon: {
type: Boolean,
default: true
}
},
methods: {
// 打开弹窗
open() {
this.$refs.popup.open()
},
// 关闭弹窗
close() {
this.$refs.popup.close()
},
// 点击加盟
handleJoin() {
this.$emit('join')
this.close()
},
// 点击继续
handleContinue() {
this.$emit('continue')
this.close()
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .uni-popup .uni-popup__wrapper{
margin: 0 !important;
border-radius: 30rpx;
}
.joinContent {
width: 500rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
.title{
text-align: center;
width: 100%;
}
.joinHeader {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background: #FFC300;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
.icon-exclamation{
color: #fff;
font-size: 30rpx;
}
}
.joinCon {
padding: 10rpx;
box-sizing: border-box;
.one {
font-size: 28rpx;
color: rgba(38, 41, 44, 1);
text-align: left;
}
.two {
color: rgba(145, 144, 148, 1);
font-size: 26rpx;
text-align: center;
margin-top: 10rpx;
margin-bottom: 20rpx;
}
}
.joinFotter {
width: 100%;
color: #fff;
display: flex;
align-items: center;
flex-direction: column;
box-sizing: border-box;
font-size: 26rpx;
view {
width: 80%;
background: rgba(54, 57, 169, 1);
border-radius: 40rpx;
padding: 20rpx;
text-align: center;
margin-top: 20rpx;
}
}
.horizontal{
flex-direction: row;
justify-content: space-between;
view{
width: auto;
border-radius:15rpx;
}
}
}
</style>
\ No newline at end of file
<template>
<uni-popup
ref="popup"
type="center"
background-color="#fff"
:mask-click="maskClick"
>
<view class="joinContent">
<view class="joinHeader">
<view
class="iconfont commonIcon"
:class="icon"
:style="{fontSize:iconSize}"
>
</view>
</view>
<view class="joinCon">
<view class="one">
{{ content }}
</view>
<view
class="two"
v-if="twoContent"
:style="{color:fontColor}"
>
{{ twoContent }}
</view>
</view>
<view class="joinFotter">
<view @click="handleContinue">
{{ continueText }}
</view>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: 'everyJoinPopup',
props: {
// 弹窗内容
content: {
type: String,
default: '您已加盟为合伙人,无需重复加盟'
},
icon: {
type: String,
default: 'icon-redgantanhao'
},
iconSize: {
type: String,
default: '50rpx'
},
twoContent:{
type: String,
},
// 继续按钮文字
continueText: {
type: String,
default: '前往首页'
},
// 文字颜色
fontColor: {
type: String,
},
// 默认点击蒙层可以关闭弹窗
maskClick: {
type: Boolean,
default: true
}
},
methods: {
// 打开弹窗
open() {
this.$refs.popup.open()
},
// 关闭弹窗
close() {
this.$refs.popup.close()
},
// 点击加盟
handleJoin() {
this.$emit('join')
this.close()
},
// 点击继续
handleContinue() {
this.$emit('continue')
this.close()
}
}
}
</script>
<style lang="scss" scoped>
.joinContent {
width: 500rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
.joinHeader {
// width: 60rpx;
// height: 60rpx;
// border-radius: 50%;
// background: #FFC300;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
.commonIcon{
color: #FFC300;
font-size: 30rpx;
}
}
.joinCon {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.one {
font-size: 29rpx;
color: rgba(38, 41, 44, 1);
font-weight: 500;
}
.two {
font-size: 26rpx;
text-align: left;
margin-top: 10rpx;
margin-bottom: 20rpx;
}
}
.joinFotter {
width: 100%;
color: #fff;
display: flex;
align-items: center;
flex-direction: column;
box-sizing: border-box;
padding: 10rpx 0;
font-size: 26rpx;
view {
width: 90%;
background: rgba(54, 57, 169, 1);
border-radius: 40rpx;
padding:20rpx;
text-align: center;
margin-top: 20rpx;
}
}
}
</style>
\ No newline at end of file
......@@ -77,6 +77,7 @@
visible: {
deep: true,
handler(newVal) {
if(newVal) {
this.$refs.timePopup.open()
// 打开时确保value数组正确
......@@ -87,6 +88,7 @@
showValue: {
immediate: true, // 添加immediate确保初始化时也执行
handler(newVal) {
console.log('newVal',newVal);
if(newVal !== undefined && newVal !== null&&newVal!==-1) {
this.currentValue = newVal
this.value = [newVal] // 同时更新value数组
......@@ -109,6 +111,7 @@
created() {
// 初始化value数组
this.value = [this.currentValue]
console.log('this.showValue',this.showValue);
},
methods: {
bindChange: dataHandling.debounce(function (e) {
......
......@@ -16,7 +16,7 @@
<uni-popup ref="timePopup" type="bottom" :maskClick="false">
<view class="timeBox">
<view class="titleBox">
<view @click="cancle">
<view @click="cancle" style="color:#333;">
取消
</view>
<view style="color:#20279b;" @click="confirm">
......
......@@ -5,26 +5,15 @@
<canvas class="mycanvas" canvas-id="mycanvas" @touchstart="touchstart" @touchmove="touchmove"
@touchend="touchend"></canvas>
<view class="footer">
<!-- <u-button @click="finish" type="primary" :plain="true" :ripple="true" ripple-bg-color="#909399">保存
</u-button> -->
<!-- <u-button @click="clear" type="warning" :plain="true" :ripple="true" ripple-bg-color="#909399">清除
</u-button> -->
<!-- <view class="imgBox" style="margin-top: 20rpx;">
<image src="../../static/clear.png" @click="clear" mode="widthFix"></image>
</view> -->
<!-- <u-button @click="close" type="error" :plain="true" :ripple="true" ripple-bg-color="#909399">关闭
</u-button> -->
<!-- 新增验证提示 -->
<view v-if="showValidationError" class="validation-error">
{{validationError}}
</view>
</view>
</view>
<!-- 签完名后生成的图片 -->
<!-- <view v-show="SignatureImg" class="SignatureImg">
<image :src="SignatureImg" mode=""></image>
</view> -->
<!-- 清除签完名后生成的图片 -->
<!-- <u-button v-show="SignatureImg" @click="obliterate" type="error" :plain="true" :ripple="true"
ripple-bg-color="#909399" size="medium">清除签名</u-button> -->
</view>
</template>
<script>
import { pathToBase64 } from '@/util/jssdk_image_tools.js'
var x = 20;
......@@ -33,18 +22,48 @@
name:'eSignature',
data() {
return {
//绘图图像
ctx: '',
//路径点集合
points: [],
//签名图片
SignatureImg: '',
hasSign: false,
isDrawing: false // 新增绘制状态
isDrawing: false,
showValidationError: false, // 新增验证错误显示状态
validationError: '', // 新增验证错误信息
strokeCount: 0, // 新增笔画计数
lastStrokeTime: null, // 新增最后笔画时间
minSignDuration: 1000, // 最小签名持续时间(毫秒)
signStartTime: null,// 签名开始时间
minStrokes: 5, // 最小笔画数增加到5
minSignDuration: 2000, // 最小签名持续时间增加到2秒
maxSignDuration: 10000, // 最大签名持续时间
minDirectionChanges: 4, // 最小方向变化次数
minSignatureWidth: 100, // 最小签名宽度
minSignatureHeight: 50, // 最小签名高度
strokePoints: [], // 存储所有笔画点用于分析
directionChanges: 0, // 方向变化计数
lastDirection: null, // 上一个方向
boundingBox: { // 签名边界框
minX: Infinity,
minY: Infinity,
maxX: -Infinity,
maxY: -Infinity
}
};
},
props: ['showCanvas'],
emits: ['sendImage','closeCanvas'],
props: {
showCanvas:{
type:Boolean
},
emptyTxt:{
type:String,
default:'签名不能为空'
},
validationTxt: {
type: String,
default: '签名过于简单,请认真签名'
}
},
emits: ['sendImage','closeCanvas', 'validationError'],
methods: {
//清除签名的图片
obliterate() {
......@@ -60,16 +79,20 @@
},
//创建并显示画布
createCanvas() {
this.ctx = uni.createCanvasContext('mycanvas', this); //创建绘图对象
this.ctx = uni.createCanvasContext('mycanvas', this);
this.ctx.setFillStyle('#000000')
this.ctx.fillStyle = '#000000'
//设置画笔样式
this.ctx.lineWidth = 4;
this.ctx.lineCap = 'round';
this.ctx.lineJoin = 'round';
},
// //触摸开始,获取到起点
// touchstart(e) {
// this.isDrawing = true;
// // 记录签名开始时间
// if (!this.signStartTime) {
// this.signStartTime = Date.now();
// }
// let startX = e.changedTouches[0].x;
// let startY = e.changedTouches[0].y;
// let startPoint = {
......@@ -77,74 +100,139 @@
// Y: startY
// };
// this.points.push(startPoint);
// //每次触摸开始,开启新的路径
// this.ctx.beginPath();
// // 笔画计数
// this.strokeCount++;
// this.lastStrokeTime = Date.now();
// e.stopPropagation();
// return false;
// },
// 触摸开始,获取到起点 - 修改后的方法
touchstart(e) {
this.isDrawing = true;
let startX = e.changedTouches[0].x;
let startY = e.changedTouches[0].y;
let startPoint = {
X: startX,
Y: startY
};
this.points.push(startPoint);
this.ctx.beginPath();
// 阻止事件冒泡
e.stopPropagation();
return false;
},
// //触摸移动,获取到路径点
// 修改touchstart方法
touchstart(e) {
this.isDrawing = true;
if (!this.signStartTime) {
this.signStartTime = Date.now();
}
let startX = e.changedTouches[0].x;
let startY = e.changedTouches[0].y;
// 更新边界框
this.updateBoundingBox(startX, startY);
let startPoint = {
X: startX,
Y: startY,
timestamp: Date.now()
};
this.points = [startPoint];
this.strokePoints.push(startPoint);
this.ctx.beginPath();
this.strokeCount++;
this.lastStrokeTime = Date.now();
e.stopPropagation();
return false;
},
// touchmove(e) {
// if (!this.isDrawing) return;
// let moveX = e.changedTouches[0].x;
// let moveY = e.changedTouches[0].y;
// let movePoint = {
// X: moveX,
// Y: moveY
// };
// this.points.push(movePoint); //存点
// this.points.push(movePoint);
// let len = this.points.length;
// if (len >= 2) {
// this.draw(); //绘制路径
// this.draw();
// }
// e.stopPropagation();
// return false;
// },
// 触摸移动,获取到路径点 - 修改后的方法
touchmove(e) {
if (!this.isDrawing) return;
let moveX = e.changedTouches[0].x;
let moveY = e.changedTouches[0].y;
let movePoint = {
X: moveX,
Y: moveY
};
this.points.push(movePoint);
let len = this.points.length;
if (len >= 2) {
this.draw();
}
// 阻止事件冒泡
e.stopPropagation();
return false;
},
// // 触摸结束,将未绘制的点清空防止对后续路径产生干扰
// touchend() {
// this.points = [];
// },
// 触摸结束 - 修改后的方法
touchend() {
this.isDrawing = false;
this.points = [];
// 阻止事件冒泡
if (e) {
e.stopPropagation();
}
return false;
},
// 修改touchmove方法
touchmove(e) {
if (!this.isDrawing) return;
let moveX = e.changedTouches[0].x;
let moveY = e.changedTouches[0].y;
// 更新边界框
this.updateBoundingBox(moveX, moveY);
let movePoint = {
X: moveX,
Y: moveY,
timestamp: Date.now()
};
this.points.push(movePoint);
this.strokePoints.push(movePoint);
// 计算方向变化
if (this.points.length >= 2) {
this.calculateDirectionChanges();
}
let len = this.points.length;
if (len >= 2) {
this.draw();
}
e.stopPropagation();
return false;
},
touchend(e) {
this.isDrawing = false;
this.points = [];
if (e) {
e.stopPropagation();
}
return false;
},
// 新增方法:更新边界框
updateBoundingBox(x, y) {
this.boundingBox.minX = Math.min(this.boundingBox.minX, x);
this.boundingBox.minY = Math.min(this.boundingBox.minY, y);
this.boundingBox.maxX = Math.max(this.boundingBox.maxX, x);
this.boundingBox.maxY = Math.max(this.boundingBox.maxY, y);
},
// 新增方法:计算方向变化
calculateDirectionChanges() {
const points = this.points;
const lastPoint = points[points.length - 2];
const currentPoint = points[points.length - 1];
// 计算方向向量
const dx = currentPoint.X - lastPoint.X;
const dy = currentPoint.Y - lastPoint.Y;
// 忽略微小移动
if (Math.abs(dx) < 2 && Math.abs(dy) < 2) return;
// 计算当前方向
let currentDirection = null;
if (Math.abs(dx) > Math.abs(dy)) {
currentDirection = dx > 0 ? 'right' : 'left';
} else {
currentDirection = dy > 0 ? 'down' : 'up';
}
// 检查方向变化
if (this.lastDirection && this.lastDirection !== currentDirection) {
this.directionChanges++;
}
this.lastDirection = currentDirection;
},
//绘制笔迹
draw() {
let point1 = this.points[0];
......@@ -154,31 +242,177 @@
this.ctx.lineTo(point2.X, point2.Y);
this.ctx.stroke();
this.ctx.draw(true);
this.hasSign = true
this.hasSign = true;
this.showValidationError = false; // 有绘制动作时隐藏错误提示
},
//清空画布
// clear() {
// this.hasSign = false;
// this.strokeCount = 0;
// this.signStartTime = null;
// this.showValidationError = false;
// let that = this;
// uni.getSystemInfo({
// success: function(res) {
// let canvasw = res.windowWidth;
// let canvash = res.windowHeight;
// that.ctx.clearRect(0, 0, canvasw, canvash);
// that.ctx.draw(true);
// }
// });
// },
// 修改clear方法
clear() {
this.hasSign = false
let that = this;
uni.getSystemInfo({
success: function(res) {
let canvasw = res.windowWidth;
let canvash = res.windowHeight;
that.ctx.clearRect(0, 0, canvasw, canvash);
that.ctx.draw(true);
}
});
this.hasSign = false;
this.strokeCount = 0;
this.signStartTime = null;
this.showValidationError = false;
this.strokePoints = [];
this.directionChanges = 0;
this.lastDirection = null;
this.boundingBox = {
minX: Infinity,
minY: Infinity,
maxX: -Infinity,
maxY: -Infinity
};
let that = this;
uni.getSystemInfo({
success: function(res) {
let canvasw = res.windowWidth;
let canvash = res.windowHeight;
that.ctx.clearRect(0, 0, canvasw, canvash);
that.ctx.draw(true);
}
});
},
// 验证签名是否符合要求
// validateSignature() {
// // 1. 检查是否有签名
// if (!this.hasSign) {
// this.showValidationError = true;
// this.validationError = this.emptyTxt;
// this.$emit('validationError', this.emptyTxt);
// return false;
// }
// // 2. 检查笔画数是否足够
// if (this.strokeCount < this.minStrokes) {
// this.showValidationError = true;
// this.validationError = this.validationTxt;
// this.$emit('validationError', this.validationTxt);
// return false;
// }
// // 3. 检查签名时间是否足够
// const signDuration = Date.now() - this.signStartTime;
// if (signDuration < this.minSignDuration) {
// this.showValidationError = true;
// this.validationError = this.validationTxt;
// this.$emit('validationError', this.validationTxt);
// return false;
// }
// // 验证通过
// this.showValidationError = false;
// this.$emit('validationError', '');
// return true;
// },
// 修改validateSignature方法
validateSignature() {
// 1. 检查是否有签名
if (!this.hasSign) {
this.showValidationError = true;
this.validationError = this.emptyTxt;
this.$emit('validationError', this.emptyTxt);
return false;
}
// 2. 检查笔画数是否足够
if (this.strokeCount < this.minStrokes) {
this.showValidationError = true;
this.validationError = '签名笔画太少,请完整书写您的姓名';
this.$emit('validationError', this.validationError);
return false;
}
// 3. 检查签名时间是否足够
const signDuration = Date.now() - this.signStartTime;
if (signDuration < this.minSignDuration) {
this.showValidationError = true;
this.validationError = '签名时间太短,请认真书写';
this.$emit('validationError', this.validationError);
return false;
}
// 4. 检查签名时间是否过长
if (signDuration > this.maxSignDuration) {
this.showValidationError = true;
this.validationError = '签名时间过长,请正常书写您的姓名';
this.$emit('validationError', this.validationError);
return false;
}
// 5. 检查方向变化次数
if (this.directionChanges < this.minDirectionChanges) {
this.showValidationError = true;
this.validationError = '签名过于简单,请完整书写您的姓名';
this.$emit('validationError', this.validationError);
return false;
}
// 6. 检查签名尺寸
const signatureWidth = this.boundingBox.maxX - this.boundingBox.minX;
const signatureHeight = this.boundingBox.maxY - this.boundingBox.minY;
if (signatureWidth < this.minSignatureWidth || signatureHeight < this.minSignatureHeight) {
this.showValidationError = true;
this.validationError = '签名尺寸过小,请放大书写您的姓名';
this.$emit('validationError', this.validationError);
return false;
}
// 7. 检查笔画速度 (防止快速涂鸦)
if (this.strokePoints.length > 10) {
const firstPoint = this.strokePoints[0];
const lastPoint = this.strokePoints[this.strokePoints.length - 1];
const totalDistance = this.calculateTotalDistance();
const totalTime = lastPoint.timestamp - firstPoint.timestamp;
const avgSpeed = totalDistance / totalTime; // 像素/毫秒
if (avgSpeed > 0.5) { // 经验值,可根据实际情况调整
this.showValidationError = true;
this.validationError = '签名速度过快,请认真书写';
this.$emit('validationError', this.validationError);
return false;
}
}
// 验证通过
this.showValidationError = false;
this.$emit('validationError', '');
return true;
},
// 新增方法:计算签名总距离
calculateTotalDistance() {
let totalDistance = 0;
for (let i = 1; i < this.strokePoints.length; i++) {
const prev = this.strokePoints[i - 1];
const curr = this.strokePoints[i];
const dx = curr.X - prev.X;
const dy = curr.Y - prev.Y;
totalDistance += Math.sqrt(dx * dx + dy * dy);
}
return totalDistance;
},
//完成绘画并保存到本地
finish() {
if (!this.hasSign) {
uni.showToast({
title: '签名为空不能保存',
icon: 'none',
duration: 2000
})
return
// 先验证签名
if (!this.validateSignature()) {
return;
}
let that = this;
uni.canvasToTempFilePath({
canvasId: 'mycanvas',
......@@ -188,7 +422,6 @@
that.$emit('sendImage', that.SignatureImg);
that.close();
}else{
//用来解决安卓真机获取到的是canvas图片的临时路径,转成base64格式
pathToBase64(res.tempFilePath).then(re => {
that.SignatureImg = re;
that.$emit('sendImage', that.SignatureImg);
......@@ -202,56 +435,66 @@
},
mounted() {
this.createCanvas();
// 新增代码
// 在组件挂载时添加额外的事件监听
// #ifdef H5
const canvas = document.querySelector('.mycanvas');
if (canvas) {
canvas.addEventListener('touchmove', (e) => {
if (this.isDrawing) {
e.preventDefault();
}
}, { passive: false });
}
// #endif
// #ifdef H5
const canvas = document.querySelector('.mycanvas');
if (canvas) {
canvas.addEventListener('touchmove', (e) => {
if (this.isDrawing) {
e.preventDefault();
}
}, { passive: false });
}
// #endif
}
};
</script>
<style lang="less" scoped>
.signature-box {
display: flex;
flex-direction: column;
align-items: center;
background: #fff;
//签名模块
.signature {
touch-action: none; /* 禁用触摸操作 */
width: 96%;
touch-action: none;
width:100%;
//canvas
.mycanvas {
touch-action: none; /* 禁用触摸操作 */
touch-action: none;
width: 100%;
height: calc(100vh - 600rpx);
height: 500rpx;
background-color: #f9f9f9;
border-radius: 10px 10px 0 0;
border-radius: 5rpx;
border: 2rpx dashed #e8e8e8;
}
//底部按钮
.footer {
display: flex;
justify-content: space-around;
flex-direction: column;
align-items: center;
margin-top: 20rpx;
.validation-error {
color: #f56c6c;
font-size: 24rpx;
margin-top: 10rpx;
text-align: center;
padding: 10rpx 20rpx;
background-color: #fef0f0;
border-radius: 8rpx;
border: 1rpx solid #fbc4c4;
}
}
}
//生成的图片
.SignatureImg {
image {
width: 750rpx;
height: 750rpx;
}
}
.imgBox{
width: 120rpx;
height: 120rpx;
}
}
</style>
</style>
\ No newline at end of file
......@@ -9,9 +9,6 @@
<view>欢迎使用{{companyName}}</view>
</view>
<view class="content">
<!-- <view class="login_title">
{{loginTypeName}}
</view> -->
<form>
<view class="inputItem" v-if="loginType!=='agentlogin'">
<input type="number" class="uni-input" name="mobileNo" placeholder="输入手机号" v-model="form.mobile" maxlength="11"/>
......@@ -39,35 +36,22 @@
</view>
</view>
</form>
<view class="agree" v-if="loginType!='resetpw'">
<label class="radio"><radio @click="c_agreeFlag" :checked="agreeFlag" /></label>
<text>已阅读并同意</text>
<text class="file" @click="getFile(1)">服务协议</text>
<text></text>
<text class="file" @click="getFile(2)">隐私政策</text>
<view class="protol">
<view class="empty" v-if="!agreeFlag" @click="agreeFlag=true"></view>
<text v-else class="iconfont icon-icon_duihao-mian" @click="agreeFlag=false"></text>
<text style="color: #666;">我已阅读并同意</text>
<text style="color: #20269B;" @click="getFile(1)">服务协议</text>
<text style="color: #666666;"></text>
<text style="color: #20269B;" @click="getFile(2)">隐私条款</text>
</view>
<view class="login_btn" @click="loginInCheck()" v-if="loginType!='resetpw'">
<!-- {{loginType=='register'?'注册':'登录'}} -->
登录 / 注册
</view>
<view class="login_btn" v-if="loginType=='resetpw'" @click="loginInCheck()">
保存
</view>
<!-- <view class="login_type" v-if="loginType!='resetpw'">
<text @click="getLoginType()">{{(loginType=='pwlogin' || loginType=='register')?'验证码登录':'密码登录'}}</text>
<text v-if="loginType==='codelogin'" @click="loginType='register';loginTypeName='注册'">立即注册</text>
<text v-if="loginType!=='codelogin'" @click="loginType='resetpw';loginTypeName='重置密码'">忘记密码</text>
</view> -->
<!-- <view v-if="loginType!='resetpw'">
<view class="other_login">
<text class="text_line"></text>
<text style="margin: 0 40rpx;position: relative;top: 10rpx;">其他登录</text>
<text class="text_line"></text>
</view>
<view class="login_type">
<text @click="loginType='visitor';initForm();loginIn(1)">游客</text>
</view>
</view> -->
</view>
</view>
</template>
......@@ -109,42 +93,41 @@
this.agreeFlag=!this.agreeFlag;
},
rpsdlogin() {
if (this.loginType == 'resetpw') {
this.loginType = 'codelogin';
return;
}
this.loginType='visitor'
this.initForm()
// 获取跳转来源(通过路由参数)
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const from = currentPage.options.from; // 获取 url 中的 from 参数
// 从 TabBar 页跳转过来,用 switchTab 返回
if (from === 'index') {
uni.switchTab({
url:'/pages/index/index'
})
} else if (from === 'personalCenter') {
this.loginIn(1,'personalCenter')
// uni.switchTab({
// url:'/pages/personalCenter/personalCenter'
// })
} else if (pages.length > 1) {
// 从普通页跳转过来,且页面栈中有上一页,直接返回
uni.navigateBack({ delta: 1 });
this.loginIn(1,'')
}else {
// 默认情况(如直接打开登录页),跳转到首页
uni.switchTab({
url: '/pages/index/index'
});
}
},
if (this.loginType == 'resetpw') {
this.loginType = 'codelogin';
return;
}
this.loginType = 'visitor';
this.initForm();
// 获取跳转来源
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const from = currentPage.options.from;
// 统一处理tabbar页面的返回
const tabbarPages = ['index', 'personalCenter', 'courselist', 'product'];
if (from && tabbarPages.includes(from)) {
// 从tabbar页面跳转过来,使用switchTab返回
uni.switchTab({
url: `/pages/${from}/${from}`
});
} else if (pages.length > 1) {
// 从普通页面跳转过来,直接返回
uni.navigateBack({ delta: 1 });
} else {
// 默认返回首页
uni.switchTab({
url: '/pages/index/index'
});
}
},
getFile(type){
uni.navigateTo({
url:`/components/clause/clause?type=${type}`
url:`/myPackageA/ruleAndContract/clause?type=${type}`
})
},
getLoginType(){
......@@ -169,7 +152,7 @@
})
}
}else{
common.errorDialog(2,'手机号校验错误')
common.errorDialog(2,'请填写手机号')
}
},
delayTime() {
......@@ -186,8 +169,6 @@
}, 1000);
},
loginIn(loginType,urlType){
console.log('loginType',loginType);
console.log('this.loginType',this.loginType);
uni.showLoading({
title: '加载中...'
});
......@@ -202,6 +183,7 @@
uni.setStorageSync('cffp_userId',this.userId);
uni.setStorageSync('loginType',this.loginType);
uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
if(urlType == 'personalCenter'){
uni.switchTab({
url:'/pages/personalCenter/personalCenter'
......@@ -418,6 +400,25 @@
padding: 40rpx 60rpx;
overflow: hidden;
margin-bottom: 30rpx;
.protol{
// margin-top: 50rpx;
// margin-left: 10rpx;
display: flex;
align-items: center;
font-size: 26rpx;
.empty{
width: 30rpx;
height: 30rpx;
border: 1rpx solid #20269B;
border-radius: 50%;
margin-right: 5rpx;
}
.icon-icon_duihao-mian{
font-size: 30rpx;
color: #20269B;
margin-right: 5rpx;
}
}
// min-height: 65%;
.login_title{
text-align: center;
......@@ -425,6 +426,7 @@
margin-bottom: 60rpx;
}
form{
margin-bottom: 20rpx;
.inputItem{
position: relative;
margin-bottom: 30rpx;
......@@ -461,19 +463,20 @@
}
}
}
.agree{
font-size: 28rpx;
color:#666;
text-align: center;
.radio{
width: 30rpx;
height: 30rpx;
}
.file{
color: #20279B;
text-decoration: none;
}
}
// .agree{
// font-size: 28rpx;
// color:#666;
// text-align: center;
// .radio{
// width: 30rpx;
// height: 30rpx;
// }
// .file{
// color: #20279B;
// text-decoration: none;
// }
// }
.login_btn{
height: 100rpx;
// line-height: 100rpx;
......
......@@ -68,7 +68,7 @@
methods:{
getFile(type){
uni.navigateTo({
url:`/components/clause/clause?type=${type}`
url:`/myPackageA/ruleAndContract/clause?type=${type}`
})
},
confirm() {
......
const dev = {
// base_url:'https://mstage.zuihuibi.cn',
// api_url:'https://mstage.zuihuibi.cn/cffpApi',
// cffp_url:'https://mstage.zuihuibi.cn/cffpApi/cffp',
// share_url:'https://mstage.zuihuibi.cn/cffp',
// api_url:'http://10.0.10.26:8888/cffpApi',
// cffp_url:'http://10.0.10.26:8888/cffpApi/cffp',
base_url:'https://mdev.anjibao.cn',
api_url:'https://mdev.anjibao.cn/cffpApi',
cffp_url:'https://mdev.anjibao.cn/cffpApi/cffp',
share_url:'https://mdev.anjibao.cn/cffp',
sfp_url:'https://mdev.anjibao.cn/sfpApi',
}
const stage = {
base_url:'https://mstage.zuihuibi.cn',
api_url:'https://mstage.zuihuibi.cn/cffpApi',
cffp_url:'https://mstage.zuihuibi.cn/cffpApi/cffp',
share_url:'https://mstage.zuihuibi.cn/cffp',
sfp_url:'https://mstage.zuihuibi.cn/sfpApi'
}
const prod = {
......@@ -20,10 +20,12 @@ const prod = {
api_url:'https://app.ydhomeoffice.cn/appApi',
cffp_url:'https://app.ydhomeoffice.cn/appApi/cffp',
share_url:'https://app.ydhomeoffice.cn/appYdhomeoffice',
sfp_url:'https://hoservice.ydhomeoffice.cn/hoserviceApi'
}
// companyType: '1', cffp
// companyType: '2', appYdhomeoffice
let companyInfo = {
// imgType:'cffp' //因为测试环境用的cffp,生产环境要改成cffp
// companyType: '1',
// appName: 'CFFP财富中心',
// companyName: '赢盾财务顾问',
......@@ -34,24 +36,27 @@ let companyInfo = {
companyName: '银盾家办',
companyFullName: '银盾家办(广州)企业管理咨询有限公司',
companyLogo:'../../static/logo2.png',
systemType: 'NoIOS'
systemType: 'NoIOS',
imgType:'cffp' //因为测试环境用的cffp,生产环境要改成appYdhomeoffice
}
const config = {
dev,
stage,
prod
}
let env = 'prod';
let env = 'dev';
let baseURL = config[env].base_url;
let apiURL = config[env].api_url;
let cffpURL = config[env].cffp_url;
let shareURL = config[env].share_url;
let sfpUrl = config[env].sfp_url;
export{
baseURL,
apiURL,
cffpURL,
companyInfo,
shareURL
shareURL,
sfpUrl,
}
\ No newline at end of file
......@@ -15,6 +15,8 @@
<!-- <link rel="shortcut icon" href="./static/icon.png"> -->
<!--preload-links-->
<!--app-context-->
<!-- 哈希加密算法 -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/js-sha256/0.9.0/sha256.min.js"></script> -->
<script src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<!-- 移动端调试 -->
<!-- <script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script> -->
......
......@@ -138,7 +138,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wx53a601e27aaf7897",
"appid" : "wxb51e1a817e215563",
"setting" : {
"urlCheck" : false,
"es6" : true,
......@@ -184,7 +184,8 @@
"^/api" : ""
}
}
}
},
"disableReload": true // 添加这行禁用自动刷新
},
"uniStatistics" : {
"enable" : false
......
<template>
<view class="container">
<image
class="imgbox"
:src="baseURL + `/${imgType}/static/images/applyBg.png`"
mode="widthFix"
></image>
<view class="wapper">
<view style="flex: 1;">
<view class="header">
<view class="one">
合伙人加盟
</view>
<view class="two">
优质资源,专业服务
</view>
</view>
<view class="applyBox">
<view style="height: 550rpx;">
<view class="inputBox">
<view class="txt">
<text class="require">*</text>昵称 <text class="desTxt">(用于邀请好友及统计业绩显示)</text>
</view>
<view class="">
<input
class="user-input"
maxlength="10"
type="text"
placeholder="请输入2~10个字符"
v-model="form.nickName"
:disabled="editNickName"
/>
</view>
</view>
<view class="inputBox">
<view class="txt">
<text class="require">*</text>手机号码 <text class="desTxt">(账号唯一标识)</text>
</view>
<view class="codeBox">
<input
type="number"
class="user-input"
name="mobileNo"
placeholder="请输入手机号"
v-model="form.mobile"
maxlength="11"
:disabled="editMobile"
/>
<view
:class="{'grey':disabledSendBtn}"
@click="sendMessage()"
v-if="loginType=== 'visitor'"
>
{{sendCodeHtml}}
</view>
</view>
</view>
<view class="inputBox" v-if="loginType=== 'visitor'">
<view class="txt">
<text class="require">*</text>验证码
</view>
<view class="">
<input
type="number"
class="user-input"
name="mobileNo"
placeholder="请输入短信验证码"
v-model="form.code"
maxlength="6"
/>
</view>
</view>
<view class="protol">
<view class="empty" v-if="!agreeFlag" @click="agreeFlag=true"></view>
<text v-else class="iconfont icon-icon_duihao-mian" @click="agreeFlag=false"></text>
<text style="color: #666;">我已阅读并同意</text>
<text style="color: #20269B;" @click="getFile(1)">服务协议</text>
<text style="color: #666666;"></text>
<text style="color: #20269B;" @click="getFile(2)">隐私条款</text>
</view>
</view>
<view class="btnBox" @click="gotoApply">
{{loginType=='codelogin'?'确认加盟':'注册并加盟'}}
</view>
</view>
</view>
<view class="footer">
银盾家族办公室
</view>
</view>
<!-- 已加盟为合伙人提示弹窗组件 -->
<everyJoinPopup
ref="everyJoinPopup"
@continue="jumpPage"
/>
<!-- 成功加盟为合伙人提示弹窗组件 -->
<everyJoinPopup
ref="successJoinPopup"
@continue="jumpPage()"
content="您已加盟为银盾家办合伙人"
twoContent='购买一单"YD家庭财务法律卡"即可升级为新锐合伙人,享受组织利益'
continueText="前往购买"
fontColor="#20279B"
:maskClick="false"
icon="icon-dianzan"
iconSize='80rpx'
/>
</view>
</template>
<script>
import everyJoinPopup from "@/components/commonPopup/everyJoinPopup.vue";
import api from '@/api/api';
import * as environment from "@/environments/environment";
import common from '@/common/common';
import dataHandling from "@/util/dataHandling";
export default {
components:{
everyJoinPopup
},
data() {
return {
companyInfo:environment.companyInfo,
imgType:environment.companyInfo.imgType,
baseURL:environment.baseURL,
form:{
mobile:'',
nickName:'',
code:''
},
agreeFlag:false,
sendCodeHtml:'发送验证码',
disabledSendBtn:false,
timer:null,
remainTimes:60,
loginType:uni.getStorageSync('loginType'),
userInfo:{},
userId: uni.getStorageSync('cffp_userId'),//本人id,
InviteeUserId:'',//被邀请人id
inviteUserId:'',//邀请人id,
editNickName:false,
editMobile:false,
shareId:'',//邀请人分享得id
invitationCode:'',//邀请码
}
},
onLoad(options){
this.inviteUserId = ''
if(options.inviteUserId){
this.inviteUserId = options.inviteUserId
}
if(options.invitationCode){
this.invitationCode = options.invitationCode
}
// 邀请链接进来的统一走注册加盟
if(options.shareId){
this.shareId = options.shareId
this.getqueryById(options.shareId)
uni.clearStorageSync()
uni.setStorageSync('loginType', 'visitor')
}
},
onShow(){
if(uni.getStorageSync('loginType')){
this.loginType = uni.getStorageSync('loginType')
}
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
if(uni.getStorageSync('cffp_userId')){
this.userId = uni.getStorageSync('cffp_userId')
}
if(!uni.getStorageSync('loginType')){
this.loginType = 'visitor'
}
// 非邀请状态
if(!this.inviteUserId&&this.loginType == 'codelogin'&&this.userInfo.mobile){
this.form.mobile = this.userInfo.mobile
this.editMobile = true
}
// 非邀请状态
if(!this.inviteUserId&&this.loginType == 'codelogin'&&!this.form.nickName){
this.queryInfo()
}
// 邀请状态
// if(this.inviteUserId){
// this.getqueryById(this.shareId)
// }
},
methods: {
getqueryById(shareId){
api.queryById({id:shareId}).then(res =>{
this.form.nickName = res.data.data.name
this.form.mobile = res.data.data.mobileNumber
this.editNickName = this.editMobile = true
})
},
jumpPage(){
uni.switchTab({
url:'/pages/index/index'
})
this.$refs.successJoinPopup.close()
this.$refs.everyJoinPopup.close()
},
getFile(type){
let typeName = type==1?'服务协议':type==2?'隐私条款':''
dataHandling.pocessTracking(
'查看协议',
`查看${typeName}`,
'点击',
2,
'申请加盟',
'pages/saleCourseLists/saleCourseLists'
)
uni.navigateTo({
url:`/myPackageA/ruleAndContract/clause?type=${type}`
})
},
c_agreeFlag(){
this.agreeFlag=!this.agreeFlag;
},
delayTime() {
this.disabledSendBtn = true;
this.timer = setInterval(() => {
this.remainTimes--;
this.sendCodeHtml = `${this.remainTimes}(S)`;
if (this.remainTimes <= 0) {
this.sendCodeHtml = '获取验证码';
this.remainTimes = 60;
this.disabledSendBtn = false;
clearInterval(this.timer);
}
}, 1000);
},
sendMessage(){
const params = {
mobileNo:this.form.mobile,
type:"1",
source: "cffp"
}
if(common.mobileNoValid(this.form.mobile)){
if(!this.disabledSendBtn){
api.verificationCode(params).then((res)=>{
if(res['success']){
this.delayTime()
}else{
common.errorDialog(2,res['message'])
}
})
}
}else{
common.errorDialog(2,'请填写手机号')
}
},
gotoApply(){
if(!this.form.nickName){
common.errorDialog(1,'请输入昵称');
return false;
}
if(this.form.nickName&&this.form.nickName.length<2){
common.errorDialog(1,'昵称长度为2~10个字符');
return
}
if(!this.form.mobile){
common.errorDialog(1,'请输入手机号');
return false;
}
if(!common.mobileNoValid(this.form.mobile)){
common.errorDialog(2,'手机号格式填写错误');
return false;
}
if(!this.loginType || this.loginType=== 'visitor'){
if(!this.form.code){
common.errorDialog(1,'请输入验证码');
return false;
}
}
if(!this.agreeFlag){
uni.showToast({
title: '请阅读并勾选'+`${this.companyInfo.companyFullName}`+'服务协议和隐私条款',
duration: 3000,
icon: 'none'
})
return false;
}
const params = {
loginType:'3',
...this.form
}
if(this.loginType == 'codelogin'){
this.getApply()
return
}
if(!this.loginType || this.loginType == 'visitor'){
api.loginVerification(params).then((res)=>{
if(res['success']){
this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', this.userId);
uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
this.queryInfo()
// 是合伙人就不让在加盟
if(res.data.isPartner){
this.$refs.everyJoinPopup.open()
return
}
// 不是合伙人就加盟
if(!res.data.isPartner){
this.getApply()
}
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
this.form.nickName = res['data']['nickName']
if(this.form.nickName){
this.editNickName = true
}else {
this.editNickName = false
}
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
}else {
uni.setStorageSync('loginType', 'visitor')
}
})
},
// 申请加盟
getApply(){
let params = {}
if(this.inviteUserId){
params = {
applyType:'1',
applyUserId:this.userId,
applyMobile:this.form.mobile,
inviteUserId:this.inviteUserId,
nickName:this.form.nickName,
inviterInvitationCode:this.invitationCode,
shareId:this.shareId
}
// return
}else {
params = {
applyType:'2',
applyUserId:this.userId,
applyMobile:this.form.mobile,
nickName:this.form.nickName
}
}
api.newSaveApplyInfo(params).then((res)=>{
if(res['success']){
// 是合伙人就不让在加盟
if(res.data.isPartner){
this.$refs.everyJoinPopup.open()
return
}
dataHandling.pocessTracking(
'加盟',
`已成功加盟为合伙人`,
'点击',
2,
'申请加盟',
'pages/saleCourseLists/saleCourseLists'
)
this.$refs.successJoinPopup.open()
// uni.showToast({
// title: '您已加盟成功',
// duration: 1000,
// icon: 'none'
// })
// uni.switchTab({
// url:'/pages/index/index'
// })
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
},
}
</script>
<style lang="scss" scoped>
::v-deep .uni-radio-input{
// background-color: #20279B !important;
// border-color: #20279B !important;
}
.container{
position: relative;
box-sizing: border-box;
.imgbox{
display: block;
}
.wapper{
// background-color: pink;
box-sizing: border-box;
display: flex;
flex-direction: column;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
padding: 0 50rpx;
.header{
color: #333333;
margin-top: 140rpx;
.one{
font-size: 60rpx;
font-weight: 700;
}
.two{
font-size: 30rpx;
font-weight: 500;
}
}
.applyBox{
background-color: #fff;
padding: 30rpx;
border-radius: 20rpx;
margin-top: 100rpx;
box-sizing: border-box;
.inputBox{
margin-bottom: 20rpx;
padding-bottom: 10rpx;
border-bottom: 1rpx solid #E8E8E8;
.require{
font-size: 24rpx;
color: red;
}
.desTxt{
font-size: 24rpx;
color: #333333;
}
.user-input{
color: black;
font-size: 26rpx;
margin-top: 15rpx;
}
.codeBox{
display: flex;
align-items: center;
justify-content: space-between;
color: #20279B;
font-size: 26rpx;
.grey{
color: rgba(32, 39, 155, 0.5); /* 50% 透明 */
}
}
}
.agreeBox{
padding-top: 20rpx;
font-size: 26rpx;
color:#20279B ;
}
.protol{
display: flex;
align-items: center;
font-size: 26rpx;
.empty{
width: 30rpx;
height: 30rpx;
border: 1rpx solid #20269B;
border-radius: 50%;
margin-right: 5rpx;
}
.icon-icon_duihao-mian{
font-size: 30rpx;
color: #20269B;
margin-right: 5rpx;
}
}
.btnBox{
box-sizing: border-box;
width: 80%;
text-align: center;
padding: 20rpx;
border-radius: 50rpx;
background-color: #20279B;
color: #fff;
font-size: 28rpx;
margin: 0rpx 50rpx 30rpx 50rpx;
}
}
.footer{
font-size: 28rpx;
color: rgba(0, 0, 0, .5);
width: 100%;
text-align: center;
margin-bottom: 20rpx;
margin-top: auto;
letter-spacing: 8rpx;
}
}
}
</style>
<template>
<view class="container">
<view style="flex: 1;">
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
<text style="font-size: 30rpx;">实名认证</text>
</view>
<!-- #endif -->
<view class="wapper" >
<view class="itemBox">
<view class="title">
实名信息
</view>
<view class="subTit">
<text class="iconfont icon-circleDuiHao"></text>
<text>您提供的身份信息只用于实名制签约和税务申报</text>
</view>
<view class="tips">
姓名和证件号码必须和证件信息相同
</view>
<view class="formBox">
<view class="formItem">
<view class="left">
<text class="require">*</text>
<text>姓名</text>
</view>
<input
class="user-input"
maxlength="10"
type="text"
placeholder="请输入"
v-model="realInfo.shiming.realName"
@blur="getInfo('1')"
/>
</view>
<view class="formItem" @click="openSelsect('1')">
<view class="left">
<text class="require">*</text>
<text>证件类型</text>
</view>
<commonSelect
:dataList="idTypesList"
:visible="showIdType"
:showValue="idTypeIdx"
@confirm="changeIdTypeSelect"
@close="showIdType=false"
v-if="idTypesList.length>1"
/>
</view>
<view class="formItem">
<view class="left">
<text class="require">*</text>
<text>证件号码</text>
</view>
<input
class="user-input"
maxlength="18"
type="number"
placeholder="请输入"
v-model="realInfo.shiming.idNumber"
@blur="getInfo('2')"
/>
</view>
</view>
</view>
<view class="itemBox">
<view class="title">
<text v-if="paymentMethod=='2'">绑定支付宝账号</text>
<text v-if="paymentMethod=='1'">绑定微信账号</text>
</view>
<view class="subTit">
<text class="iconfont icon-circleDuiHao"></text>
<text>信息仅用于转账使用</text>
</view>
<view class="formBox">
<view class="formItem" v-if="paymentMethod=='1'">
<view class="left">
<text class="require">*</text>
<text>真实姓名</text>
</view>
<input
class="user-input"
maxlength="10"
type="text"
placeholder="请输入"
v-model="realInfo.wx.wxPayName"
/>
<!-- <text class="error-tip" v-if="errors.wxPayName">{{errors.wxPayName}}</text> -->
</view>
<view class="" v-if="paymentMethod=='2'">
<view class="formItem">
<view class="left">
<text class="require">*</text>
<text>支付宝姓名</text>
</view>
<input
class="user-input"
maxlength="10"
type="text"
placeholder="请输入"
v-model="realInfo.zhifubao.aliPayName"
/>
</view>
<view class="formItem">
<view class="left">
<text class="require">*</text>
<text>支付宝账号</text>
</view>
<input
class="user-input"
maxlength="20"
placeholder="请输入"
v-model="realInfo.zhifubao.aliPayAccount"
/>
</view>
<view class="formItem" @click="openSelsect('2')">
<view class="left">
<text class="require">*</text>
<text>证件类型</text>
</view>
<commonSelect
:dataList="idTypesList"
:visible="showZhifubaoIdType"
:showValue="idZhifubaoTypeIdx"
@confirm="changeZhifubaoIdTypeSelect"
@close="showZhifubaoIdType=false"
v-if="idTypesList.length>1"
/>
</view>
<view class="formItem">
<view class="left">
<text class="require">*</text>
<text>证件号码</text>
</view>
<input
class="user-input"
maxlength="18"
type="number"
placeholder="请输入"
v-model="realInfo.zhifubao.aliPayIdNumber"
/>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="btnBox">
<view
class="one"
@click="$refs.unbindTipPopup.open()"
v-if="showUnbind"
>
解绑实名信息
</view>
<view class="two" @click="confirmSubmit()">
确认提交
</view>
</view>
<!-- 解绑实名提示 -->
<partner-tip-popup
ref="unbindTipPopup"
content="解绑后将无法提现,确认解绑?"
title="解绑提示"
joinText="确认解绑"
continueText="暂不解绑"
btnType="horizontal"
:tipIcon="false"
@join="continueBind()"
@continue="$refs.unbindTipPopup.close()"
/>
</view>
</template>
<script>
import api from '../../api/api';
import commonSelect from '@/components/commonSelect/commonSelect.vue';
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import common from '@/common/common.ts';
import dataHandling from "@/util/dataHandling";
export default{
components: {
commonSelect,
PartnerTipPopup
},
data(){
return {
paymentMethod:'',//提现方式 1.微信 2.支付宝
showIdType:false,//证件类型下拉框
idTypeIdx: null,//证件默认值
showZhifubaoIdType:false,//支付宝证件类型下拉框
idZhifubaoTypeIdx:null,//证件默认值
idTypesList: [{id:null,name:'请选择'}],
// 错误信息
errors: {
realName: '',
idType: '',
idNumber: '',
wxPayName: '',
aliPayName: '',
aliPayAccount: '',
aliPayIdType: '',
aliPayIdNumber: ''
},
//实名信息
realInfo:{
shiming:{},//实名信息
wx:{},// 微信信息
zhifubao:{}//支付宝信息
},
showUnbind:false
}
},
onLoad(options){
if(options.paymentMethod){
this.paymentMethod = options.paymentMethod
}
},
onShow(){
this.getIdType()
},
methods:{
continueBind(){
let params = {
userId:uni.getStorageSync('cffp_userId'),
oprType:this.paymentMethod
}
api.unbindImproveInfo(params).then((res)=>{
if(res['success']){
dataHandling.pocessTracking(
'解绑实名',
`成功解绑提现实名`,
'点击',
2,
'积分提现实名',
'myPackageA/integralExchange/authenticaInfo'
)
uni.navigateTo({
url:`/myPackageA/integralExchange/exchange?paymentMethod=${this.paymentMethod}`
})
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
getInfo(type){
switch (type){
case '1':
if(this.paymentMethod =='2'){
this.realInfo.zhifubao.aliPayName = this.realInfo.shiming.realName
}else if(this.paymentMethod =='1'){
this.realInfo.wx. wxPayName= this.realInfo.shiming.realName
}
break;
case '2':
this.realInfo.zhifubao.aliPayIdNumber = this.realInfo.shiming.idNumber
break;
default:
break;
}
},
// 修改后的确认提交方法
confirmSubmit(){
const validateResult = this.validateForm();
if(!validateResult.isValid) {
let message = '请完善以下信息:\n';
validateResult.emptyFields.forEach((field, index) => {
message += `${index + 1}. ${field}\n`;
});
uni.showModal({
title: '提示',
content: message,
showCancel: false,
confirmText: '我知道了'
});
return;
}
if (!common.nameValid(this.realInfo.shiming.realName)) {
uni.showToast({title: '请填写真实姓名',duration: 2000,icon: 'none'});
this.realInfo.shiming.realName = ''
return
}
if(this.realInfo.shiming.idType == 'IDENTITY_CARD'&&this.realInfo.shiming.idNumber.length<18 ){
uni.showToast({title: '请输入18位实名身份证号',duration: 2000,icon: 'none'});
return
}
if(this.realInfo.shiming.idType == 'IDENTITY_CARD' ){
let obj = common.IdCodeValid(this.realInfo.shiming.idNumber)
if(!obj.pass){
uni.showToast({title: '请输入有效的实名身份证号',duration: 2000,icon: 'none'});
return
}
}
if(this.paymentMethod == '1'){
if (!common.nameValid(this.realInfo.wx.wxPayName)) {
uni.showToast({title: '请填写微信真实姓名',duration: 2000,icon: 'none'});
this.realInfo.wx.wxPayName = ''
return
}
}
if(this.paymentMethod == '2'){
if (!common.nameValid(this.realInfo.zhifubao.aliPayName)) {
uni.showToast({title: '请填写真实支付宝姓名',duration: 2000,icon: 'none'});
this.realInfo.zhifubao.aliPayName = ''
return
}
if (!common.alipayAccountValid(this.realInfo.zhifubao.aliPayAccount)) {
uni.showToast({title: '请输入有效的手机号或邮箱',duration: 2000,icon: 'none'});
return ;
}
if(this.realInfo.zhifubao.aliPayIdType == 'IDENTITY_CARD'&&this.realInfo.zhifubao.aliPayIdNumber.length<18 ){
uni.showToast({title: '请输入18位支付宝身份证号',duration: 2000,icon: 'none'});
return
}
if(this.realInfo.zhifubao.aliPayIdType == 'IDENTITY_CARD'&&this.realInfo.zhifubao.aliPayIdNumber.length<18 ){
let obj = common.IdCodeValid(this.realInfo.zhifubao.aliPayIdNumber)
if(!obj.pass){
uni.showToast({title:'请输入有效的支付宝证件号码',duration: 2000,icon: 'none'});
return
}
}
}
let params = {
realNameAuthRequest : {...this.realInfo.shiming},
userId: uni.getStorageSync('cffp_userId'),
oprType:this.paymentMethod
}
if(this.paymentMethod == '1'){
params.bindAgCffpWxPayAccountRequest = {...this.realInfo.wx}
}else if(this.paymentMethod == '2'){
params.bindAgCffpAliPayAccountRequest = {...this.realInfo.zhifubao}
}
// 校验通过,继续提交逻辑
// console.log('params',params);
// return
api.submitImproveInfo(params).then((res)=>{
if(res['success']){
dataHandling.pocessTracking(
'实名认证成功',
`提现已完成实名认证`,
'点击',
2,
'积分提现实名',
'myPackageA/integralExchange/authenticaInfo'
)
uni.navigateTo({
url:`/myPackageA/integralExchange/exchange?paymentMethod=${this.paymentMethod}`
})
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
// 修改后的表单校验方法
validateForm() {
const emptyFields = [];
// 实名信息校验
if(!this.realInfo.shiming.realName || this.realInfo.shiming.realName.trim() === '') {
emptyFields.push('姓名');
}
if(!this.realInfo.shiming.idType) {
emptyFields.push('证件类型');
}
if(!this.realInfo.shiming.idNumber || this.realInfo.shiming.idNumber.trim() === '') {
emptyFields.push('证件号码');
}
// 根据支付方式校验不同字段
if(this.paymentMethod === '1') {
// 微信支付校验
if(!this.realInfo.wx.wxPayName || this.realInfo.wx.wxPayName.trim() === '') {
emptyFields.push('微信真实姓名');
}
} else if(this.paymentMethod === '2') {
// 支付宝支付校验
if(!this.realInfo.zhifubao.aliPayName || this.realInfo.zhifubao.aliPayName.trim() === '') {
emptyFields.push('支付宝姓名');
}
if(!this.realInfo.zhifubao.aliPayAccount || this.realInfo.zhifubao.aliPayAccount.trim() === '') {
emptyFields.push('支付宝账号');
}
if(!this.realInfo.zhifubao.aliPayIdType) {
emptyFields.push('支付宝证件类型');
}
if(!this.realInfo.zhifubao.aliPayIdNumber || this.realInfo.zhifubao.aliPayIdNumber.trim() === '') {
emptyFields.push('支付宝证件号码');
}
}
return {
isValid: emptyFields.length === 0,
emptyFields
};
},
// 查询实名信息
getImproveInfo(){
this.showUnbind = false
let params = {
userId:uni.getStorageSync('cffp_userId'),
oprType:this.paymentMethod
}
api.improveInfo(params).then((res)=>{
if(res['success']){
let result = res['data']
for (let key in result) {
if(key!='userId'&&!result[key]){
result[key] = {}
}
}
if(JSON.stringify( result.realNameAuthResponse)!='{}'){
this.realInfo.shiming = result.realNameAuthResponse
}
if(this.paymentMethod=='1' &&JSON.stringify( result.bindAgCffpWxPayAccountResponse)!='{}'){
this.realInfo.wx = result.bindAgCffpWxPayAccountResponse
}else if(this.paymentMethod=='2'&&JSON.stringify( result.bindAgCffpAliPayAccountResponse)!='{}'){
this.realInfo.zhifubao = result.bindAgCffpAliPayAccountResponse
}
if(JSON.stringify(this.realInfo.shiming)!='{}'&&((this.paymentMethod == '1'&&JSON.stringify(this.realInfo.wx)!='{}') || (this.paymentMethod == '2'&&JSON.stringify(this.realInfo.zhifubao)!='{}'))){
this.showUnbind = true
}else {
this.showUnbind = false
}
this.$nextTick(()=>{
if(JSON.stringify(this.realInfo.shiming) != '{}'){
console.log(' this.idTypesList', this.idTypesList);
let index = this.idTypesList.findIndex(item=>item.id==this.realInfo.shiming.idType)
if(index !== -1){
this.idTypeIdx = index
}
}
if(JSON.stringify(this.realInfo.zhifubao) != '{}'){
let index = this.idTypesList.findIndex(item=>item.id==this.realInfo.zhifubao.aliPayIdType)
if(index !== -1){
this.idZhifubaoTypeIdx = index
}
}
})
// console.log('this.realInfo',this.realInfo);
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
goBack() {
uni.navigateBack({
delta: 1
});
},
openSelsect(type){
if(type == '1'){
this.showIdType = true
return
}
if(type == '2'){
this.showZhifubaoIdType = true
}
},
// 改变实名证件类型
changeIdTypeSelect(value){
this.idTypeIdx=this.idZhifubaoTypeIdx = value;
this.realInfo['shiming'].idType=this.realInfo['zhifubao'].aliPayIdType = this.idTypesList[value].id
this.showIdType = false
},
changeZhifubaoIdTypeSelect(value){
this.idZhifubaoTypeIdx = value;
this.realInfo['zhifubao'].aliPayIdType = this.idTypesList[value].id
this.showZhifubaoIdType = false
},
getIdType(){
api.dropOptionsQuery({code:'SYS_ID_TYPE'}).then((res)=>{
if(res['success']&&res['data']['dropMasterInfoList'][0]['dropOptionsInfoList'].length>0){
const result = res['data']['dropMasterInfoList'][0]['dropOptionsInfoList']
result.forEach(item=>{
this.idTypesList.push({name:item.dropOptionName,id:item.dropOptionCode})
})
this.getImproveInfo()
}
})
},
}
}
</script>
<style lang="scss" scoped>
.container{
color: #333333;
display: flex;
flex-direction: column;
.backArrow{
background-color: #fff;
box-sizing: border-box;
display: flex;
height: 100rpx;
justify-content: space-between;
align-items: center;
position: relative;
width: 100%;
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
.wapper{
padding: 20rpx;
box-sizing: border-box;
.itemBox{
background-color: #fff;
padding: 15rpx 30rpx;
border-radius: 10rpx;
margin-bottom: 20rpx;
font-size: 28rpx;
.title{
font-size: 32rpx;
font-weight: 500;
}
.subTit{
color: #666666;
font-size: 24rpx;
display: flex;
align-items: center;
padding-bottom: 10rpx;
border-bottom: 1rpx solid #EFEFEF;
margin-top: 10rpx;
.icon-circleDuiHao{
font-size: 26rpx;
color: #666666;
margin-right: 5rpx;
}
}
.tips{
color: #F43530;
margin: 15rpx 0;
}
.formBox{
.formItem{
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #E8E8E8;
height: 100rpx;
position: relative;
.left{
font-size: 26rpx;
}
.require{
color: #F43530;
}
.user-input{
color: black;
font-size: 26rpx;
text-align: right;
}
.error-tip{
position: absolute;
right: 0;
bottom: -30rpx;
color: #F43530;
font-size: 22rpx;
}
}
}
}
}
.btnBox{
width: 100%;
font-size: 30rpx;
display: flex;
align-items: center;
flex-direction: column;
margin-top: auto;
margin-bottom: 20rpx;
.one{
width: 50%;
text-align: center;
border: 1rpx solid #20269B;
color: #20269B;
padding: 20rpx 0;
border-radius: 40rpx;
margin-bottom: 20rpx;
}
.two{
width: 50%;
text-align: center;
background-color:#20269B ;
color: #fff;
padding: 20rpx 0;
border-radius: 40rpx;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="container">
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
<text style="font-size: 30rpx;">积分提现</text>
</view>
<!-- #endif -->
<view style="padding: 20rpx;">
<view class="top">
<view class="one">
<view style="font-size: 28rpx;font-weight: 500;">
提现金额:
</view>
<view class="middle">
{{queryResult.yesExchangeFortune || '0.00'}}
</view>
<view class="">
当前待结算积分:{{queryResult.notExchangeFortune || '0.00'}}
</view>
</view>
<view class="two">
<view class="">
提现说明
</view>
<view class="">
1、金额低于1元时无法提现;
</view>
<view style="margin: 10rpx 0;">
<view class="">
2、当前可提金额是您的税前收入,具体计税规则可参考
</view>
<view style="color: #20269B;">
<text class="rule" @click="gotoRule()">《劳务报酬税缴纳规则》</text>
<!-- <navigator url="/myPackageA/ruleAndContract/taxRules">《劳务报酬税缴纳规则》;</navigator> -->
</view>
</view>
<view class="" @click="consult()">
3、如需帮助,请 <text style="color: #20269B;">点击此处</text> 联系客服
</view>
</view>
</view>
</view>
<view style="padding: 0 20rpx;">
<view class="content_wrapper tixian">
<h4>提现方式</h4>
<view class="paymentBox" >
<view
class="paymentItem"
:class="{active:paymentMethod === '2' }"
@click="selectPaymentMethod('2')"
>
<view>
<i class="iconfont icon-zhifubao2"></i>
<text style="font-size: 28rpx;">支付宝</text>
</view>
<view class="selectRadio" :class="{'actived':paymentMethod==='2'}">
<i class="iconfont icon-duihao" style="font-size: 28rpx;"></i>
</view>
</view>
<!-- 微信提现暂未开发 暂时隐藏微信提现入口-->
<!-- <view
class="paymentItem"
@click="selectPaymentMethod('1')"
:class="{active:paymentMethod === '1' }"
>
<view>
<i class="iconfont icon-weixin"></i>
<text>微信</text>
</view>
<view class="selectRadio" :class="{'actived':paymentMethod==='1'}">
<i class="iconfont icon-duihao"></i>
</view>
</view> -->
</view>
<view
class="warn"
@click="realName()"
v-if="showUnbind"
>
<view class="">
<text class="iconfont icon-point oneIcon"></text>
<text style="color: #999;">账户信息待完善,认证通过后即可提现</text>
</view>
<view style="color: #20269B;">
<text>去完善</text>
<text class="iconfont icon-jiantou2"></text>
</view>
</view>
<view
v-else
@click="realName()"
style="color: #20269B;font-size: 28rpx;text-align: right;margin-top: 10rpx;"
>
<text>去查看认证信息</text>
<text class="iconfont icon-jiantou2"></text>
</view>
<view style="display: flex;align-items: center;justify-content: center;">
<view class="bottomBtn" @click="confirmWithdrawal()" :class="{'gray':readonlyFlag}" >
确认提现
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import api from '../../api/api';
import dataHandling from "@/util/dataHandling";
export default{
data(){
return {
exchangeAmount:null,
partnerTradeNo:null,
taxAmount:null,
noTaxAmount:null,
paymentMethod:'2',//2初始化支付宝提现 1微信提现
aliWithdrawalResVO:null,
wxWithdrawalResVO:null,
readonlyFlag:false,
queryResult:{},
realInfo:{
bindAgCffpAliPayAccountResponse:null
},//实名信息
showUnbind:false,
}
},
onLoad(options){
if(options.paymentMethod){
this.paymentMethod = options.paymentMethod
}
},
onShow(){
this.queryByUserIdFortuneStatistic()
this.getImproveInfo()
},
methods:{
gotoRule(){
dataHandling.pocessTracking(
'查看',
`查看劳务报酬税缴纳规则`,
'点击',
2,
'积分提现',
'myPackageA/integralExchange/authenticaInfo'
)
uni.navigateTo({
url:'/myPackageA/ruleAndContract/taxRules'
})
},
// 查询实名信息
getImproveInfo(){
let params = {
userId:uni.getStorageSync('cffp_userId'),
oprType:this.paymentMethod
}
api.improveInfo(params).then((res)=>{
if(res['success']){
this.realInfo.realNameAuthResponse = res['data']['realNameAuthResponse']
if(this.paymentMethod=='2'&&res['data']['bindAgCffpAliPayAccountResponse']){
this.realInfo.bindAgCffpAliPayAccountResponse = res['data']['bindAgCffpAliPayAccountResponse']
}else if(this.paymentMethod=='1'&&res['data']['bindAgCffpWxPayAccountResponse']){
this.realInfo.bindAgCffpWxPayAccountResponse = res['data']['bindAgCffpWxPayAccountResponse']
}
if(!this.realInfo.realNameAuthResponse||((this.paymentMethod == '1'&&!this.realInfo.bindAgCffpWxPayAccountResponse) || (this.paymentMethod == '2'&&!this.realInfo.bindAgCffpAliPayAccountResponse))){
this.showUnbind = true
}else {
this.showUnbind = false
}
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
// 查询兑换得钱数和待结算得积分
queryByUserIdFortuneStatistic(){
api.queryByUserIdFortuneStatistic({userId:uni.getStorageSync('cffp_userId')}).then((res)=>{
if(res['success']){
this.queryResult = res['data']
if(this.queryResult.yesExchangeFortune){
this.queryResult.yesExchangeFortune = Number(this.queryResult.yesExchangeFortune).toFixed(2)
}
if(this.queryResult.notExchangeFortune){
this.queryResult.notExchangeFortune = Number(this.queryResult.notExchangeFortune).toFixed(2)
}
this.goFortuneWithdrawal()
}
})
},
realName(){
dataHandling.pocessTracking(
`${this.showUnbind?'认证':'查看'}`,
`${this.showUnbind?'认证实名信息':'查看实名信息'}`,
'点击',
2,
'积分提现',
'myPackageA/integralExchange/exchange'
)
uni.navigateTo({
url:`/myPackageA/integralExchange/authenticaInfo?paymentMethod=${this.paymentMethod}`
})
},
//联系客服
consult(){
dataHandling.pocessTracking(
'联系客服',
`用户点击联系客服`,
'点击',
2,
'积分提现',
'myPackageA/integralExchange/exchange'
)
// 现在还没转化成小程序,暂时放在这
// #ifdef MP-WEIXIN
uni.openCustomerServiceChat({
extInfo: {
url: 'https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e'
},
corpId: 'ww43cac1cf9dd6a3d0', // 客服会话按钮打开后,在微信客服会话按钮处理的事件类型
showMessageCard: true,
sendMessageTitle: (uni.getStorageSync('hoservice_mobileNo')?(uni.getStorageSync('hoservice_mobileNo')+",") :"" ) + "进入个人中心-->咨询客服",
sendMessagePath: `/pages/index/mySelf.html`,
//sendMessageImg: cardItem.value['list'][0]['itemImg']
});
// #endif
// #ifndef MP-WEIXIN
window.open('https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e')
// #endif
},
goBack() {
uni.navigateBack({
delta: 1
});
},
goFortuneWithdrawal(){
const param = {
userId:uni.getStorageSync('cffp_userId'),
exchangeAmount:this.queryResult.yesExchangeFortune,
partnerTradeNo:this.partnerTradeNo?this.partnerTradeNo:null
}
api.goFortuneWithdrawal(param).then((res)=>{
if(res['success']){
const data = res['data']
this.exchangeAmount = data.exchangeAmount;
this.partnerTradeNo = data.partnerTradeNo;
this.taxAmount = data.taxAmount;
this.noTaxAmount = data.noTaxAmount;
this.aliWithdrawalResVO = data['aliWithdrawalResVO'];
this.wxWithdrawalResVO = data['wxWithdrawalResVO'];
}else{
this.exchangeAmount = 0;
this.partnerTradeNo = null;
this.taxAmount = 0;
this.noTaxAmount = 0;
uni.showModal({
content: res['message'],
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
})
},
selectPaymentMethod(value){
this.paymentMethod = value;
this.getImproveInfo()
},
//支付宝去提现
aliWithdrawal(){
this.readonlyFlag = true;
//#ifdef H5
let aliWithdrawalResVOParam = {
...this.aliWithdrawalResVO,
dataSource:2,
orderNo:this.partnerTradeNo,
amount:this.exchangeAmount,
userId:uni.getStorageSync('cffp_userId'),
}
//#endif
// #ifdef APP-PLUS
let aliWithdrawalResVOParam = {
...this.aliWithdrawalResVO,
dataSource:2,
orderNo:this.partnerTradeNo,
amount:this.exchangeAmount,
userId:uni.getStorageSync('cffp_userId'),
}
//#endif
api.aliWithdrawal(aliWithdrawalResVOParam).then((res)=>{
this.readonlyFlag = false;
if(res['success']){
uni.showModal({
content: '提现成功!',
showCancel: false, // 不显示取消按钮
success: function (res) {
if (res.confirm) {
uni.switchTab({
url:'pages/personalCenter/personalCenter'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}else{
dataHandling.pocessTracking(
'提现提交审核',
`提现提交审核`,
'点击',
2,
'积分提现',
'myPackageA/integralExchange/exchange'
)
uni.showModal({
content: res['message'],
showCancel: false, // 不显示取消按钮
success: function (res) {
if (res.confirm) {
uni.switchTab({
url:'/pages/personalCenter/personalCenter'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
})
},
//微信去提现
wxWithdrawal(){
// APP:
// #ifdef APP-PLUS
uni.login({
provider: 'weixin',
success: function (loginRes) {
// 登录成功
// alert(JSON.stringify(loginRes))
uni.getUserInfo({
provider: 'weixin',
success: function(info) {
// 获取用户信息成功, info.authResult保存用户信息
console.log(info)
this.wxWithdrawalResVO.openId=info.openId;
const wxWithdrawalResVO = {
...this.wxWithdrawalResVO,
userId:uni.getStorageSync('cffp_userId'),
}
api.wxWithdrawal(wxWithdrawalResVO).then((res)=>{
console.log(res)
})
}
})
},
fail: function (err) {
// 登录授权失败
// err.code是错误码
}
})
// #endif
},
confirmWithdrawal(){
if(!!this.showUnbind){
uni.showModal({
content: '账户信息待完善,认证通过后即可提现',
showCancel: false,
confirmText: '我知道了'
});
return
}
// return
// 原先的提现逻辑
if(!this.queryResult.yesExchangeFortune || this.queryResult.yesExchangeFortune<1){
uni.showModal({
title: '提示',
content: '金额低于1元时无法提现',
showCancel: false,
confirmText: '我知道了'
});
return false;
}
//#ifdef H5
this.aliWithdrawal();
//#endif
// #ifdef APP-PLUS
if(!this.readonlyFlag){
this.readonlyFlag = true;
this.aliWithdrawalResVO = {
...this.aliWithdrawalResVO,
orderNo:this.partnerTradeNo,
amount:this.exchangeAmount,
userId:uni.getStorageSync('cffp_userId'),
}
api.isAuth(this.aliWithdrawalResVO).then((res)=>{
this.readonlyFlag = false;
if(res['success']){
this.aliWithdrawalResVO.aliUserId = res['data']['aliUserId'];
if(res['data']['isAuth'] == 1){
if(this.paymentMethod == 1){
this.wxWithdrawal();
}
if(this.paymentMethod == 2){
this.aliWithdrawalResVO.aliAuthUrl=res['data']['aliAuthUrl'];
// APP:
// #ifdef APP-PLUS
let urls= this.aliWithdrawalResVO.aliAuthUrl;
urls=encodeURIComponent(urls);
// 判断平台
if (plus.os.name == 'Android') {
plus.runtime.openURL(
'alipays://platformapi/startapp?appId=20000067&url=' + urls,
res => {
//这里写打开URL地址失败后的处理
console.log(res);
uni.showModal({
content: '本机未检测到对应客户端,是否打开浏览器访问页面?',
success: function (res) {
if (res.confirm) {
//plus.runtime.openURL();
}
}
});
},
'com.eg.android.AlipayGphone'
);
} else if (plus.os.name == 'iOS') {
plus.runtime.openURL(
'alipay://platformapi/startapp?appId=20000067&url=' + urls,
res => {
console.log(res);
uni.showModal({
content: '本机未检测到对应客户端,是否打开浏览器访问页面?',
success: function (res) {
if (res.confirm) {
//plus.runtime.openURL(url);
}
}
});
},
'com.eg.android.AlipayGphone'
);
}
// #endif
}
}else{
if(this.paymentMethod == 1){
this.wxWithdrawal();
}
if(this.paymentMethod == 2){
this.aliWithdrawal();
}
}
}else{
uni.showModal({
content: res['message'],
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
}
// #endif
}
}
}
</script>
<style lang="scss" scoped>
.container{
box-sizing: border-box;
color: #333333;
.backArrow{
background-color: #fff;
box-sizing: border-box;
display: flex;
height: 100rpx;
justify-content: space-between;
align-items: center;
position: relative;
width: 100%;
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
}
.top{
width: 100%;
padding: 20rpx;
background-color: #fff;
border-radius: 10rpx;
font-size: 26rpx;
box-sizing: border-box;
.one{
.middle{
font-size: 40rpx;
color: #0A2F99;
margin: 10rpx 0;
border-bottom: 1rpx solid #EFEFEF;
padding-bottom: 10rpx;
}
}
.two{
margin-top: 20rpx;
background-color: #FAFAFA;
padding: 10rpx;
border-radius: 10rpx;
font-size: 26rpx;
box-sizing: border-box;
}
}
.content_wrapper{
border-radius: 10rpx;
background: #fff;
padding:0 30rpx;
.item{
display: flex;
padding: 20rpx 0;
border-bottom: 2rpx solid #F2F2F2;
justify-content: space-between;
font-size: 28rpx;
}
h4{
font-size: 32rpx;
margin-bottom: 20rpx;
}
.paymentBox{
display: flex;
align-items: center;
justify-content: space-between;
.paymentItem{
width: 46%;
padding: 20rpx;
border-radius: 10rpx;
border: 1rpx solid #FAFAFA;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10rpx;
&.active{
background-color: #FAFAFA;
}
view{
display: flex;
align-items: center;
}
.icon-zhifubao2{
color: #5A9EF7;
font-size: 60rpx;
margin-right: 20rpx;
}
.icon-weixin{
color: #09BB07;
font-size: 60rpx;
margin-right: 20rpx;
}
.selectRadio{
width: 40rpx;
height: 40rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
border: 1px solid #D8D8D8;
color: transparent;
&.actived{
background-color: #0A2F99;
color: #fff;
}
}
}
}
.warn{
margin-top: 10rpx;
display: flex;
align-items: center;
font-size: 28rpx;
justify-content: space-between;
.oneIcon{
background-color: #F43530;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
color: #fff;
padding: 5rpx;
font-size: 24rpx;
margin-right: 5rpx;
}
}
.bottomBtn{
padding: 20rpx;
margin-top: 50rpx;
margin-bottom: 10rpx;
width: 60%;
background-color: #3639A9;
text-align: center;
font-size: 30rpx;
color: #fff;
font-weight: 500;
border-radius: 50rpx;
}
.bottomBtn.gray{
background: #666;
}
.withdrawal_content{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
margin-bottom: 20rpx;
.icon-py_weixinzhifu{
color:#09BB07;
font-size: 80rpx;
margin-right: 30rpx;
}
.icon-gou{
font-size: 48rpx;
color: #2A36AD;
}
}
.tips_wrapper{
font-size: 26rpx;
view{
color: #666666;
margin-bottom: 10rpx;
}
.rule{
color: #2A36AD
}
}
}
.tixian{
padding: 20rpx;
}
</style>
\ No newline at end of file
<template>
<view class="wrapper">
<view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin">
<view class="iconfont icon-youjiantou zuojiantou" style="top:18rpx;color: #fff;"></view>
<!-- <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> -->
</view>
<view class="logo">
<image :src="imgSrc" alt="logo" srcset="" class="iconBox" mode="widthFix"></image>
<view>欢迎使用{{companyName}}</view>
</view>
<view class="content">
<form>
<view class="inputItem" v-if="loginType!=='agentlogin'">
<input type="number" class="uni-input" name="mobileNo" placeholder="输入手机号" v-model="form.mobile" maxlength="11"/>
</view>
<view class="inputItem" v-if="loginType==='agentlogin'">
<input class="uni-input" name="mobileNo" placeholder="输入账号" v-model="form.account" maxlength="11"/>
</view>
<view class="inputItem" v-if="loginType === 'codelogin' || loginType==='register' || loginType === 'resetpw'">
<input class="uni-input codeBtn" name="code" placeholder="输入验证码" v-model="form.code" type="number" maxlength="6"/>
<text style="font-size: 28rpx;" @click="sendMessage()" :class="{'grey':disabledSendBtn}">{{sendCodeHtml}}</text>
</view>
<view class="inputItem" v-if="loginType === 'pwlogin' || loginType==='register' || loginType==='agentlogin'">
<input class="uni-input" type="text" name="password" placeholder="输入密码" v-if="!passwordFlag" v-model="form.password"/>
<input class="uni-input" type="text" password name="password" placeholder="输入密码" v-if="passwordFlag" v-model="form.password"/>
<text v-if="!passwordFlag" @click="passwordFlag=true">显示密码</text>
<text v-if="passwordFlag" @click="passwordFlag=false">不显示密码</text>
</view>
<!--重置密码-->
<view v-if="loginType === 'resetpw'">
<view class="inputItem" >
<input class="uni-input" type="text" password name="password" placeholder="密码(6-20位字母数字组合)" v-model="form.password"/>
</view>
<view class="inputItem" >
<input class="uni-input" type="text" password name="password" placeholder="再次确认密码" v-model="doublePassword"/>
</view>
</view>
</form>
<view class="protol">
<view class="empty" v-if="!agreeFlag" @click="agreeFlag=true"></view>
<text v-else class="iconfont icon-icon_duihao-mian" @click="agreeFlag=false"></text>
<text style="color: #666;">我已阅读并同意</text>
<text style="color: #20269B;" @click="getFile(1)">服务协议</text>
<text style="color: #666666;"></text>
<text style="color: #20269B;" @click="getFile(2)">隐私条款</text>
</view>
<view class="login_btn" @click="loginInCheck()" v-if="loginType!='resetpw'">
登录 / 注册
</view>
<view class="login_btn" v-if="loginType=='resetpw'" @click="loginInCheck()">
保存
</view>
</view>
</view>
</template>
<script>
import api from '../../api/api';
import common from '../../common/common';
import {companyInfo} from "@/environments/environment";
export default {
data() {
return {
companyType : companyInfo.companyType,
companyName : companyInfo.appName,
loginType: 'codelogin',
passwordFlag:false,
loginTypeName:'验证码登录',
remainTimes:60,
sendCodeHtml:'获取验证码',
//用户输入信息
form:{
mobile:null,
// code:'250106',
code:null,
password:null,
},
disabledSendBtn:false,
invitation_code:null,
account:null,
doublePassword:null,
agreeFlag:false,
userId:null,
imgSrc:companyInfo.companyLogo,
fileType:null,
goBack:true
}
},
methods: {
c_agreeFlag(){
this.agreeFlag=!this.agreeFlag;
},
rpsdlogin() {
if (this.loginType == 'resetpw') {
this.loginType = 'codelogin';
return;
}
this.loginType = 'visitor';
this.initForm();
// 获取跳转来源
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const from = currentPage.options.from;
// 统一处理tabbar页面的返回
const tabbarPages = ['index', 'personalCenter', 'courselist', 'product'];
if (from && tabbarPages.includes(from)) {
// 从tabbar页面跳转过来,使用switchTab返回
uni.switchTab({
url: `/pages/${from}/${from}`
});
} else if (pages.length > 1) {
// 从普通页面跳转过来,直接返回
uni.navigateBack({ delta: 1 });
} else {
// 默认返回首页
uni.switchTab({
url: '/pages/index/index'
});
}
},
getFile(type){
uni.navigateTo({
url:`/myPackageA/ruleAndContract/clause?type=${type}`
})
},
getLoginType(){
this.loginType==='codelogin'?this.loginType='pwlogin':this.loginType='codelogin';
this.loginTypeName = this.loginType =='codelogin'?'验证码登录':'密码登录';
this.loginType==='codelogin'?this.form.password=null:this.form.code=null;
},
sendMessage(){
const params = {
mobileNo:this.form.mobile,
type:"1",
source: "cffp"
}
if(common.mobileNoValid(this.form.mobile)){
if(!this.disabledSendBtn){
api.verificationCode(params).then((res)=>{
if(res['success']){
this.delayTime()
}else{
common.errorDialog(2,res['message'])
}
})
}
}else{
common.errorDialog(2,'请填写手机号')
}
},
delayTime() {
this.disabledSendBtn = true;
this.timer = setInterval(() => {
this.remainTimes--;
this.sendCodeHtml = `${this.remainTimes}(S)`;
if (this.remainTimes <= 0) {
this.sendCodeHtml = '获取验证码';
this.remainTimes = 60;
this.disabledSendBtn = false;
clearInterval(this.timer);
}
}, 1000);
},
loginIn(loginType,urlType){
uni.showLoading({
title: '加载中...'
});
const params = {
loginType:loginType,
...this.form
}
api.loginVerification(params).then((res)=>{
if(res['success']){
this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1');
uni.setStorageSync('cffp_userId',this.userId);
uni.setStorageSync('loginType',this.loginType);
uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
if(urlType == 'personalCenter'){
uni.switchTab({
url:'/pages/personalCenter/personalCenter'
})
}else {
uni.switchTab({
url:'/pages/index/index'
})
}
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
uni.hideLoading()
})
},
registerIn(){
const params = {
inviterInvitationCode:this.invitation_code,
...this.form
}
api.register(params).then((res)=>{
if(res['success']){
this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1')
uni.setStorageSync('cffp_userId',this.userId);
uni.setStorageSync('uni-token', res.data['token']);
uni.switchTab({
url:'/pages/index/index'
})
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
resetPassword(){
const params = {
...this.form
}
api.resetPassword(params).then((res)=>{
if(res['success']){
uni.showToast({
title: '密码重置成功,请重新登录',
duration: 5000,
icon: 'none'
})
//重置密码后需要密码登录
this.loginType = 'pwlogin';
this.loginTypeName = '密码登录';
this.form = {
mobile:null,
code:null,
password:null,
}
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
loginInCheck(){
//只有代理商登录不需要填写手机号
if(this.loginType !== 'agentlogin'){
if(!this.form.mobile){
common.errorDialog(1,'请输入手机号');
return false;
}
if(!common.mobileNoValid(this.form.mobile)){
common.errorDialog(2,'手机号格式填写错误');
return false;
}
if(this.loginType === 'codelogin' || this.loginType === 'register' || this.loginType ==='resetpw'){
if(!this.form.code){
common.errorDialog(1,'请输入验证码');
return false;
}
}
if(this.loginType === 'pwlogin' || this.loginType === 'register' || this.loginType ==='resetpw'){
if(!this.form.password){
common.errorDialog(1,'请输入密码');
return false;
}
if(!common.passwordValid(this.form.password)){
common.errorDialog(2,'密码为6-12位数字字母组合');
return false;
}
}
if(this.loginType ==='resetpw'){
if(this.form.password !== this.doublePassword){
common.errorDialog(2,'两次密码不一致');
return false;
}
}
}else{
if(!this.form.account){
common.errorDialog(1,'请输入账号');
return false;
}
if(!common.passwordValid(this.form.account)){
common.errorDialog(2,'账号为6-12位数字字母组合');
return false;
}
if(!this.agreeFlag){
uni.showToast({
title: '请阅读并勾选'+`${companyInfo.companyFullName}`+'服务协议和隐私条款',
duration: 5000,
icon: 'none'
})
return false;
}
if(!this.form.password){
common.errorDialog(1,'请输入密码');
return false;
}else if(!common.passwordValid(this.form.password)){
common.errorDialog(2,'密码为6-12位数字字母组合');
return false;
}
//代理商登录
this.loginIn(4)
}
if(!this.agreeFlag && this.loginType !='resetpw'){
uni.showToast({
title: '请阅读并勾选'+`${companyInfo.companyFullName}`+'服务协议和隐私条款',
duration: 5000,
icon: 'none'
})
return false;
}
if(this.loginType === 'codelogin'){
//验证码登录
this.loginIn(3)
}else if(this.loginType === 'pwlogin'){
//密码登录
this.loginIn(2)
}else if(this.loginType === 'register'){
//注册
this.registerIn()
}else if(this.loginType === 'resetpw'){
//重置密码
this.resetPassword()
}
},
initForm(){
this.form = {
mobile:null,
code:null,
password:null,
}
},
checkToken(){
api.checkToken().then(res=>{
if(res['success']){}else{
api.obtainToken().then(res=>{
if(res.success){
uni.setStorageSync('uni-token',res.data['token']);
}
})
}
})
},
},
onShow() {
this.checkToken();
},
destroyed() {
uni.hideToast();
}
}
</script>
<style lang="scss" scoped>
.psdlogin{
margin: 40rpx;
width: 40rpx;
height: 40rpx;
}
.wrapper{
background: #20279B;
position: relative;
overflow: auto;
height:100vh;
padding-top: 50rpx;
box-sizing: border-box;
.logo{
text-align: center;
color: #fff;
padding: 60rpx 0;
view{
margin-top: 40rpx;
font-size: 40rpx;
}
.iconBox{
border-radius: 15rpx;
width: 20% !important;
}
}
.content{
background-color: #fff;
margin:0 20rpx;
border-radius: 30rpx;
padding: 40rpx 60rpx;
overflow: hidden;
margin-bottom: 30rpx;
.protol{
// margin-top: 50rpx;
// margin-left: 10rpx;
display: flex;
align-items: center;
font-size: 26rpx;
.empty{
width: 30rpx;
height: 30rpx;
border: 1rpx solid #20269B;
border-radius: 50%;
margin-right: 5rpx;
}
.icon-icon_duihao-mian{
font-size: 30rpx;
color: #20269B;
margin-right: 5rpx;
}
}
// min-height: 65%;
.login_title{
text-align: center;
font-size: 40rpx;
margin-bottom: 60rpx;
}
form{
margin-bottom: 20rpx;
.inputItem{
position: relative;
margin-bottom: 30rpx;
font-size: 28rpx;
.codeBtn{
width: 70%;
}
.uni-input{
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
}
.uni-input:after{
content: " ";
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 1px;
border-bottom: 1px solid rgba(0,0,0,.1);
color: #CECECE;
transform-origin: 0 100%;
transform: scaleY(.5);
z-index: 2;
}
text{
position: absolute;
right: 0;
top: 20rpx;
color: #20279B;
}
.grey{
color: #CECECE;
}
}
}
// .agree{
// font-size: 28rpx;
// color:#666;
// text-align: center;
// .radio{
// width: 30rpx;
// height: 30rpx;
// }
// .file{
// color: #20279B;
// text-decoration: none;
// }
// }
.login_btn{
height: 100rpx;
// line-height: 100rpx;
// text-align: center;
display: flex;
align-items: center;
justify-content: center;
margin: 40rpx auto;
color: #fff;
background: #20279B;
border-radius: 80rpx;
font-size: 28rpx;
}
.login_type{
display: flex;
justify-content: space-between;
margin: 30rpx;
font-size: 28rpx;
}
.other_login{
text-align: center;
color: #20279B;
position: relative;
font-size: 28rpx;
.text_line{
display: inline-block;
height: 1px;
background: #20279B;
width: 30%;
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="account-cancel-protocol">
<view class="header">
<text class="title">账号注销协议</text>
</view>
<view class="content">
<view class="section">
<text class="text">
请您在注销银盾家族办公室分销系统(以下简称家办分销)账号前,充分阅读、理解并同意下列内容:(如您不同意下列任一内容,或无法准确理解任何条款的含义,请不要进行账号注销操作。您通过网络页面确认申请注销,视为您同意本协议项下所有权利义务。如您对本协议有任何疑问,可通过银盾家族办公室分销系统-我的-咨询客服,联系在线客服)
</text>
</view>
<view class="section">
<text class="section-title">1、注销须知</text>
<text class="text">
如果您申请注销家办分销账号,请在提交申请前确认以下信息,以保证您的账号和资产安全:
</text>
<view class="subsection">
<text class="subsection-text">1.1您申请注销的家办分销账号应当是您本人注册并使用的账号。该账号应处于正常状态,即非被盗、被封禁(禁言、停用)、其他账号异常情形等;</text>
</view>
<view class="subsection">
<text class="subsection-text">1.2 账号内资产已处理完毕。包括但不限于:您的家办分销账户佣金、红包、优惠券、权益、积分、兑换码等资产,可用款项已全部提现,或者通过兑换、消费等途径支用完毕。您的账户内没有未使用完毕的会员权益或您已购买但未使用完的其他权益类、资格类产品和订单。同时,您也有权选择放弃该账号内的资产。</text>
</view>
<view class="subsection">
<text class="subsection-text">1.3 账号已解除与第三方产品的绑定关系或授权登录关系。</text>
</view>
<view class="subsection">
<text class="subsection-text">1.4 账号未涉及任何争议纠纷。</text>
</view>
<view class="subsection">
<text class="subsection-text">1.5 实名账号已解除实名信息。</text>
</view>
<view class="subsection">
<text class="subsection-text">1.6 账号注销成功后,包括但不限于《家办分销用户协议》、《隐私政策》等项下所有权利义务终止。</text>
</view>
</view>
<view class="section">
<text class="section-title">2、特别提醒</text>
<view class="subsection">
<text class="subsection-text">2.1您的家办分销账号一旦被注销成功将不可恢复,您将无法再使用本账号或找回任何本账号内容或信息(即使您使用相同的手机号再次注册并使用家办分销系统),包括但不限于:</text>
<view class="sub-subsection">
<text class="sub-subsection-text">2.1.1您账号下的个人资料(头像、昵称、用户名、身份认证信息等)、与账号有关的信息和数据(团队、交易记录、积分记录、分享数据、浏览记录等),都将无法找回。请您务必在注销之前自行备份与账号相关的前述所有内容或信息。您理解并同意,家办分销也无法协助您恢复前述内容或信息,且针对该账号注销的申请一经提交,您不会以任何理由要求家办分销平台予以撤销。</text>
</view>
<view class="sub-subsection">
<text class="sub-subsection-text">2.1.2 您理解并同意,您在注销前确认放弃的家办分销账户佣金、红包、优惠券、权益、积分、兑换码、资产性权益、资格类产品等,在您注销账号后将无法继续使用,历史交易无法通过该账号进行退款或售后,即使您使用相同的手机号再次注册并使用家办分销的,家办分销也无法协助您重新恢复前述权益。</text>
</view>
</view>
<view class="subsection">
<text class="subsection-text">2.3 您申请注销的家办分销账号所对应的其他账号应当不存在任何由于该账号被注销而导致的未了结的合同关系与其他基于该账号的存在而产生或维持的权利义务,及本公司认为注销该账号会由此产生未了结的权利义务而产生纠纷的情况。</text>
</view>
<view class="subsection">
<text class="subsection-text">2.4 在您的账号注销期间,如您的家办分销账号被他人举报、被投诉、被国家机关调查或正处于诉讼、仲裁程序中,家办分销有权自行终止您的家办分销账号注销流程而无需另行获得您的同意。</text>
</view>
<view class="subsection">
<text class="subsection-text">2.5 注销家办分销账号并不代表账号注销前的行为和相关责任得到任何形式的豁免或减轻。</text>
</view>
</view>
<view class="section">
<text class="section-title">3、争议解决</text>
<view class="subsection">
<text class="subsection-text">3.1凡因本协议引起的或与本协议有关的任何争议,均应提交上海仲裁委员会按照该会仲裁规则进行仲裁。仲裁裁决是终局的,对双方当事人均有约束力。</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style lang="scss">
.account-cancel-protocol {
padding: 20rpx 30rpx;
background-color: #fff;
.header {
margin-bottom: 30rpx;
text-align: center;
.title {
font-size: 36rpx;
font-weight: bold;
color: #333;
}
}
.content {
.section {
margin-bottom: 30rpx;
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
display: block;
margin-bottom: 15rpx;
}
.text {
font-size: 28rpx;
color: #333;
line-height: 1.6;
display: block;
margin-bottom: 20rpx;
}
.subsection {
margin-bottom: 15rpx;
.subsection-text {
font-size: 28rpx;
color: #333;
line-height: 1.6;
display: block;
}
}
.sub-subsection {
margin-left: 30rpx;
margin-top: 10rpx;
.sub-subsection-text {
font-size: 28rpx;
color: #333;
line-height: 1.6;
display: block;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="container" >
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;" v-if="isBack !=1"></text>
<!-- #endif -->
<view class="content" v-if="type == 1" :style="{'margin-top': isBack!=1 ? '60rpx' : '0'}">
<view class="agreement-container">
<!-- <scroll-view scroll-y="true" class="scroll-content"> -->
<view class="section">
<view>银 盾 家 办 ( 广 州 ) 企 业 管 理 咨 询 有 限 公
司(以下简称银盾家办)<text class="emphasis">在此特别提醒您(用户)在注册成为用户之前,请认真阅读本《用户协议》(以下简称“协议”),确保您充分理解本协议中各条款(特别是以下划线标注的内容)。</text> </view>
<view>请您审慎阅读并选择接受或不接受本协议。除非您接受本协议所有条款,否则您无权注册、登录、授权或使用本协议所涉服务。您的注册、登录、授权、使用等行为将视为对本协议的接受,<text class="emphasis">并同意接受本协议的全部约定内容以及与本服务协议有关的已经发布或将来可能发布的各项协议、规则、说明、用户须知、页面展示、操作流程、公告或通知。</text>
</view>
<view>如您在本公司提供的移动应用、软件、公众号、小程序或网页应用(以下简称“平台”)上访问或使用我们的产品服务,便视为您完全接受本服务协议项下的全部内容。</view>
</view>
<view class="section">
<view class="section-header">一、用户须知</view>
<view class="clause">
<view class="clause-title">1.1 用户资格</view>
<view>用户(以下简称“您”)确认,<text class="emphasis">在自愿完成注册程序成为平台用户以及使用本公司服务时,您应当是具备完全民事行为能力的自然人。若您不具备前述主体资格,则您及您的监护人应承担因此而导致的一切后果</text></view>
</view>
<view class="clause-title">1.2 用户信息</view>
<view>
<view class="">
<text class="emphasis">(1)在您注册、授权、激活或验证流程时,您应当按照相应页面的提示提供您真实有效的身份信息及相关资料,以使之真实、及时、完整和准确。当您的身份信息及资料发生变化时,您应当及时更新并准确提供您的身份信息及资料。您承诺将承担因提供身份信息及相关资料不准确、不真实、不及时和不完整而引发的一切责任。\n</text>
</view>
<view class="">
<text class="emphasis">(2)如本公司须您按照法律法规的要求取得相关资质时,您应及时向本公司提供相关资质证明文件及相关资料。当您的资质证明文件及相关资料发生变化时,您应当及时更新并准确提供您的资质证明文件及相关资料。您承诺将承担因提供资质证明文件及相关资料不准确、不真实、不及时和不完整而引发的一切责任。\n</text>
</view>
<view>(3)您每次使用前须确认已充分了解与本公司系统相关的各项使用说明、所有条款。</view>
<view><text class="emphasis">(4)银盾家办的服务仅向注册用户提供,您应对注册获得的账号项下的一切行为承担全部责任。平台不建议您将账号与他人共享使用,由此造成的任何损失风险和法律责任都将由您本人承担。</text></view>
</view>
<view class="clause-title">1.3 账户安全</view>
<view>您了解并同意:<text class="emphasis">如发现任何人未经授权使用您的账号或发生其他任何安全问题,您应当立即通知本平台,授权平台经过必要身份识别措施后作出其他应对措施。但平台不会对因您未能遵守本款规定而发生的任何损失负责。</text></view>
<view class="clause-title">1.4 账户管理</view>
<view>您同意并授权平台:<text class="emphasis">采取各种必要手段,包括但不限于通过您的第三方支付机构、银行或者我们认可的其他方式对您身份进行验证。</text>除非有法律规定或司法裁判,否则您的账号和密码及账号所绑定的任何平台权益不得以任何方式转让、赠与或继承。</view>
<view class="clause-title">1.5 退款</view>
<view>在开通会员之后的一周内,无激活任何权益的可以申请退款,银盾家办会退还本次支付的100%。本公司有权扣回该笔订单对应的所有奖励。如付费超过一周后申请退款,银盾家办将部分退费。银盾家办不支持任何将会员时间折算为费用的退费申请。</view>
<view class="clause-title">1.6 账户封禁</view>
<view>凡以任何方式抓取平台数据的,银盾家办都将予以账户封禁处理。</view>
<view>凡以任何非官方手段获取会员权益的,银盾家办有权对会员权益进行收回。</view>
</view>
<view class="section">
<view class="section-header">二、用户的权利和义务</view>
<view class="clause-title">2.1 在遵守本服务协议的前提下,您将享有本公司提供的用户服务,并将收到本公司最新的产品信息,活动资讯和平台的相关信息及通知。</view>
<view class="clause-title">2.2 在平台上使用本公司服务过程中,您承诺遵守以下约定:</view>
<view>(1)在使用本公司服务过程中所有行为<text class="emphasis">均遵守国家法律、法规等规范性文件,不违背社会公共利益或公共道德,不损害他人合法权益,不违反本服务协议;</text></view>
<view>(2)在使用本公司服务过程中,<text class="emphasis">不得从事恶意投诉、侵害利益相关方,诈骗等违法违规行为。如经查实您从事相关行为的,本公司有权取消并扣回已经给予您的相应奖励,并视情节严重可禁止您登录账户,中止或注销您的账号,同时您必须承担由此给本公司带来的所有损失。您应自行承担因违法从事产品经营行为而产生的所有民事、行政、刑事等一切法律责任。</text></view>
<view>(3)平台包括公司运营的移动应用、软件、公众号、小程序或网页应用以及内含的文字、图片、视频、音频等元素,本公司对提供上述服务享有知识产权。<text class="emphasis">您承诺将不以任何形式侵犯本公司的知识产权。</text></view>
<view class="clause-title">2.3 您了解并同意:</view>
<view>(1)对于您在平台上发布的涉嫌违法或涉嫌侵犯他人合法权利或违反本服务协议的信息,<text class="emphasis">本公司有权不经通知您即予以删除,并且保留您因不合法行为导致本公司或平台可能发生的名誉、经济等各项损失的法律追究权利;</text></view>
<view>(2)对于您涉嫌违反承诺的行为对任意第三方造成损害的,<text class="emphasis">您均应当以自己的名义独立承担所有的法律责任。</text></view>
<view>(3)平台涉及到互联网及移动通讯等服务,可能会受到各个环节不稳定因素等影响,若由此出现的系统差错、故障或其他原因导致您不当获利等情形的,您同意本公司可以采取更正差错、扣划款项、暂停服务等适当纠正措施。</view>
<view class="clause-title">2.4 在参与平台上的活动时,您了解并同意:</view>
<view>
<view>(1)平台将依据您完成的服务成果向您支付相应奖励,并视为您已了解及认可您在进行引流时的规则及政策。</view>
<view><text class="emphasis">(2)奖励的计算和支付:奖励按照平台发布的奖励方案进行发放,平台有权利对奖励方案随时更新。</text></view>
</view>
<view class="clause-title">2.5 在平台上传的自定义内容,您了解并同意:</view>
<view>(1)用户在银盾家办分销系统上传的自定义内容是指经由银盾家办提供的服务,以上传、张贴或任何其他方式传送或传播的任何资讯、资料、文字、符号、表情、照片、图片、图形、或其他资料。无论系公开还是私下传送(以下简称“内容”),内容提供者、上传者应对其提供、上传的内容承担全部责任,如果给银盾家办造成损失的,还应向银盾家办承担赔偿责任。</view>
<view>(2)您在银盾家办分销系统上传或发布的内容,您保证对其享有合法的著作权或相应授权。</view>
</view>
<view class="section">
<view class="section-header">三、用户行为规范</view>
<view class="clause-title">3.1 用户在使用银盾家办服务的过程中,应遵守以下法律法规:</view>
<view>
<view>(1) 《中华人民共和国保守国家秘密法》;</view>
<view>(2) 《中华人民共和国个人信息保护法》;</view>
<view>(3) 《中华人民共和国数据安全法》;</view>
<view>(4) 《中华人民共和国未成年人保护法》;</view>
<view>(5) 《中华人民共和国网络安全法》;</view>
<view>(6) 《中华人民共和国著作权法》;</view>
<view>(7) 《计算机软件保护条例》;</view>
<view>(8) 《信息网络传播权保护条例》;</view>
<view>(9) 《中华人民共和国计算机信息系统安全保护条例》;</view>
<view>(10) 《计算机信息网络国际联网安全保护管理办法》;</view>
<view>(11) 《互联网用户账号信息管理规定》;</view>
<view>(12) 《网络信息内容生态治理规定》;</view>
<view>(13) 《互联网跟帖评论服务管理规定》;</view>
<view>(14) 《互联网用户公众账号信息服务管理规定》;</view>
<view>(15) 《网络音视频信息服务管理规定》;</view>
<view>(16) 其他法律、法规、规章、条例等具有法律效力的规范。</view>
<view
class="clause-title">3.2 银盾家办鼓励用户从事以下行为,在制作、上传、复制、传送、传播含有下列内容的信息(包括但不限于资讯、资料、文字、符号、表情、照片、图片、图形、信息或其他资料,下同):</view>
<view>
<view>(1) 宣传习近平新时代中国特色社会主义思想,全面准确生动解读中国特色社会主义道路、理论、制度、文化的;</view>
<view>(2) 宣传党的理论路线方针政策和中央重大决策部署的;</view>
<view>(3) 展示经济社会发展亮点,反映人民群众伟大奋斗和火热生活的;</view>
<view>(4) 弘扬社会主义核心价值观,宣传优秀道德文化和时代精神,充分展现中华民族昂扬向上精神风貌的;</view>
<view>(5) 有效宣传金融知识,对国家、社会、家庭、个人积极作用的文字。</view></view>
<view class="clause-title">3.3 银盾家办禁止用户从事以下违法行为或在银盾家办平台制作、上传、复制、传送、传播含有下列内容的违法信息:</view>
<view>
<view>(1) 反对宪法所确定的基本原则的;</view>
<view>(2) 危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;</view>
<view>(3) 损害国家荣誉和利益的;</view>
<view>(4) 歪曲、丑化、亵渎、否定英雄烈士事迹和精神,以侮辱、诽谤或者其他方式侵害英雄烈士的姓名、肖像、名誉、荣誉的;</view>
<view>(5) 宣扬恐怖主义、极端主义或者煽动实施恐怖活动、极端主义活动的;</view>
<view>(6) 煽动民族仇恨、民族歧视,破坏民族团结的;</view>
<view>(7) 破坏国家宗教政策,宣扬邪教和封建迷信的;</view>
<view>(8) 散布谣言,扰乱经济秩序和社会秩序的;</view>
<view>(9) 散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪、引诱自杀的;</view>
<view>(10) 侮辱或者诽谤他人,侵害他人名誉、隐私和其他合法权益的;</view>
<view>(11) 侵害未成年人合法权益或可能危害未成年人身心健康的;</view>
<view>(12) 违反金融监管行业要求的内容。</view>
<view>(13) 法律、行政法规禁止的其他行为或内容。</view></view>
<view class="clause-title">3.4 银盾家办有权限制用户从事以下不良行为或在银盾家办平台制作、上传、复制、传送、传播含有下列内容的不良信息。</view>
<view>(1) 使用夸张标题,内容与标题严重不符的;</view>
<view>(2) 炒作绯闻、丑闻、劣迹等的;</view>
<view>(3) 不当评述自然灾害、重大事故等灾难的;</view>
<view>(4) 带有性暗示、性挑逗等易使人产生性联想的;</view>
<view>(5) 展现血腥、惊悚、残忍、自杀/自残等致人身心不适的;</view>
<view>(6) 煽动人群歧视、地域歧视等的;</view>
<view>(7) 宣扬低俗、庸俗、媚俗内容的;</view>
<view>(8) 可能引发未成年人模仿不安全行为和违反社会公德行为、诱导未成年人不良嗜好等可能影响未成年人身心健康的;</view>
<view>(9) 对网络生态造成不良影响的其他行为或内容。</view>
<view>(10)任何对产品销售中有误导客户的内容。</view>
<view class="clause-title">3.5 银盾家办有权限制用户从事以下违规行为或在银盾家办平台制作、上传、复制、传送、传播含有下列内容的违规信息:</view>
<view>(1) 冒充任何人或机构,或以虚伪不实的方式谎称或使人误认为与任何人或任何机构有关;</view>
<view>(2) 伪造标题或以其他方式操控识别资料,使人误认为该内容为本平台所传送;</view>
<view>(3) 将无权传送的内容(例如内部资料、机密资料)进行上载、张贴、发送电子邮件或以其他方式传送;</view>
<view>(4) 将侵犯任何人的专利、商标、著作权、商业秘密等知识产权的内容加以上载、张贴、发送电子邮件或以其他方式传送;</view>
<view>(5) 将广告函件、促销资料、“垃圾邮件”等,加以上载、张贴、发送电子邮件或以其他方式传送;</view>
<view>(6) 跟踪或以其他方式骚扰他人;</view>
</view>
<view class="section">
<view class="section-header">四、隐私声明</view>
<view>4.1 您在注册成为平台的用户、使用平台提供的各类产品资料和服务时,<text class="emphasis">代表您在知情和同意的情况下,自愿向本公司提供您的个人信息,例如姓名、证件类型、证件号码、证件有效期限、手机号、邮箱、联系地址、第三方支付账户等(以下简称“个人信息”)。</text></view>
<view><text class="emphasis">4.2 在必要情形下第三方可能接触并使用您的个人信息,包括得到授权的本公司员工、执行与我们的业务、营销活动和数据整理有关的工作人员,以及与业务相关的公司、机构以及第三方支付机构。</text>所有此类人员及公司均需遵守相关保密协议,同时也需遵守国家关于个人信息保护有关法律法规,以确保您的个人信息随时得到保护。</view>
</view>
<view class="section">
<view class="section-header">五、免责声明及第三方责任</view>
<view>5.1 您了解并同意,您接受或购买的本公司的产品或服务协议内容中约定的免责范围,以及约定的责任范围之外的损失,本公司不对上述情况而导致您的任何损害承担责任。</view>
<view>5.2 在相关特殊情况下,<text class="emphasis">本公司均不对由于信息网络正常的设备维护,信息网络连接故障,电脑、通讯或其他系统的故障,电力故障,罢工,暴乱,起义,骚乱,火灾,洪水,风暴,爆炸,战争,政府行为,司法行政机关的命令或第三方的不作为等平台无法预测或控制的原因,而造成的服务中断、延误、取消或终止的风险,由此给您带来的损失本公司不承担赔偿责任。</text></view>
<view>5.3 为了提高服务质量,本公司可能暂停服务以调整或升级系统。在相关特殊情况下,本公司无须为暂停用户服务承担违约责任。</view>
<view>5.4 在任何情况下,对于您使用本公司服务过程中涉及由第三方提供相关服务的责任由该第三方承担,<text class="emphasis">本公司不承担该等责任。本公司不承担责任的情形包括但不限于:</text></view>
<view>(1)因各公司、机构以及第三方支付机构等第三方未按照您和/或本公司指令进行操作引起的任何损失或责任;</view>
<view>(2)因各公司、机构以及第三方支付机构等第三方原因导致资金未能及时到账或未能到账引起的任何损失或责任;</view>
<view>(3)因各公司、机构以及第三方支付机构等第三方对交易限额或次数等方面的限制而引起的任何损失或责任;</view>
<view>(4)因其他第三方的行为或原因导致的任何损失或责任。</view></view>
<view>5.5 因您自身的原因导致的任何损失或责任,由您自行负责,本公司不承担责任。<text class="emphasis">本公司不承担责任的情形包括但不限于:</text></view>
<view>(1)您未按照本服务协议或平台不时公布的任何规则进行操作导致的任何损失或责任;</view>
<view>(2)您向本公司发送的指令信息不明确、或存在歧义、不完整等导致的任何损失或责任;</view>
<view>(3)您未按照本服务协议或平台不时公布的任何规则发布或上传的内容所导致的任何损失或责任。</view>
<view>(4)其他因您原因导致的任何损失或责任。</view>
</view>
<view class="section">
<view class="section-header">六、本服务协议的修改</view>
<view>6.1 您了解并同意:<text class="emphasis">本公司在法律环境变化或业务发展需要时可能对本服务协议所做的修改,或者与本服务协议有关的各项协议、规则、说明、用户须知、页面展示、操作流程、公告或通知,本公司将在平台上公示变动或更新内容。若您在相关内容公告后继续使用的,表示您已充分阅读、理解并接受变动或更新公告的内容,也将遵循变动或更新公告内容进行使用;若您不同意变动或更新公告内容的,应停止使用相关服务。</text></view>
</view>
<view class="section">
<view class="section-header">七、保密</view>
<view class="emphasis">您在使用本公司时获得的所有用户名单,包括但不限于用户姓名、用户手机号、注册用户数量等,无论该内容是否是您自行取得或构思的,均不得以任何目的为由对外公开,更不得以任何商业目的、竞争为目的、或出于私利、或为第三人谋利、或为故意加害于本公司,擅自披露、使用商业秘密;不得直接或间接地向无关人员泄露;不得向不承担保密义务的任何第三人披露本公司的商业秘密;不得允许(出借、赠与、出租、转让等处分本公司商业秘密的行为皆属于“允许”)或协助不承担保密义务的任何第三人使用本公司的商业秘密;不得复制或公开包含本公司商业秘密的文件或文件副本</view>
</view>
<view class="section">
<view class="section-header">八、违约行为及责任</view>
<view class="clause-title">8.1.本公司严禁您通过以下行为非法获得奖励,一经发现,本公司有权取消并扣回已经给予您的相应奖励,并视情节严重可禁止您登录账户,中止或注销您的账号,同时您必须承担由此给本公司带来的所有损失:</view>
<view class="emphasis">
<view>(1)就本公司发布的平台活动,如您利用该平台活动规则不当获利的;</view>
<view>(2)您存在恶意投诉行为,鼓动、怂恿等类似行为而促使客户进行投诉的,即出现业务问题或其他问题时未与平台沟通协商处理而直接向微信平台、本公司或有关监管机构投诉的;</view>
<view>(3)您为您的客户代为购买且造成客户损失的,包括但不限于未按规定如实履行告知说明义务、非依据客户本人购买意愿等;</view>
<view>(4)您在客户购买产品过程中存在误导客户、阻碍您的客户如实履行告知义务或诱导、虚张夸大产品责任和利益的;</view>
<view>(5)您以任何方式收取费用导致客户利益受损的,包括但不限于超过产品费用收取额外费用等的;</view>
<view>(6)其它违反法律法规或违反诚实信用、公平原则等本公司认为应当取消并扣回相应奖励及禁止您登录账户的情况。</view></view>
<view class="clause-title emphasis">8.2.本公司有权对您是否违反上述禁止行为做出单方认定,并根据单方认定结果适用规则予以处理,这无须征得您的同意。</view>
<view
class="clause-title emphasis">8.3.您同意,出现以下情况时,本公司有权对您是否存在下述情况进行单方认定且基于具体适用规则不经事先通知地中止、终止向您提供部分或全部本公司的会员服务,并永久停用您的账户(本公司会员资格),且无须为此向您承担任何责任,如本公司因此遭受损失的您应予以全部承担:</view>
<view>
<view>(1)您在使用本公司服务期间存在违法行为或违反本服务协议和/或规则的行为的;</view>
<view>(2)您提供的个人身份信息虚假或不真实或不完整或过期无效的;</view>
<view>(3)经证实用户为政府部门发布的恐怖分子或被列入其他黑名单;</view>
<view>(4)存在其他违反诚实信用或欺诈行为的;</view>
<view>(5)本服务协议变更时,您明示并通知本公司不愿接受新的服务协议的;</view>
<view>(6)如您连续三年未登录过本公司,您的本公司会员资格可能被注销;</view>
<view>(7)其他本公司认为应当终止服务的情况。</view></view>
<view class="clause-title emphasis">8.4.您的会员服务被中止、终止或者账户被永久停用后,本公司仍有权继续保存您在本公司服务期间的所有信息。</view>
<view class="clause-title emphasis">8.5.本公司中止或终止向您提供本公司服务或永久停用您的账户后,对于您在服务中止或终止之前接受或购买的本公司的产品和服务,本公司将不再按产品或服务所对应具体协议或约定履行,包括但不限于中止或终止给予您相应奖励。</view>
<view class="clause-title emphasis">8.6.如您以任何不正当方式非法取得平台奖励的,本公司有权立即追回,并要求您承担相应的法律责任。</view>
</view>
<view class="section">
<view class="section-header">九、法律适用、管辖与其他</view>
<view class="clause-title">9.1.本服务协议适用中华人民共和国大陆地区法律。</view>
<view class="clause-title emphasis">9.2.您和本公司之间一切有关本服务协议项下的争议应通过友好协商进行解决。协商不成,可向银盾家办所在地人民法院起诉。</view>
<view
class="clause-title">9.3.除本服务协议或者您和本公司另有约定外,任何一方违反本服务协议项下任何约定导致本服务协议部分或全部不能履行的,守约方有权要求违约一方承担违约责任,且违约方应就守约方遭受的全部损失承担赔偿责任。</view>
<view
class="clause-title">9.4.本服务协议包含了您成为本公司会员所需要了解并遵守的协议条款,您在购买或接受本公司某产品或服务时还需要了解并签署该特定产品或服务的条款或具体约定(请参见您接受该产品或服务时签署的其他协议)。如本服务协议与具体产品或服务协议有不一致之处,以具体产品或服务的协议为准。</view>
</view>
<!-- </scroll-view> -->
</view>
</view>
<view v-if="type == 2" class="content" :style="{'margin-top': isBack!=1 ? '60rpx' : '0'}">
<view class="privacy-policy">
<!-- <scroll-view scroll-y="true" class="scroll-content"> -->
<!-- 顶部标题栏 -->
<view class="header">
<view class="title">隐私政策说明</view>
</view>
<!-- 正文内容 -->
<view class="content">
<view class="section">
为了保护您的隐私和更好地为您提供财务咨询服务,银盾家办(广州)企业管理咨询有限公司(以下简称"我们")按照合法合理、正当、必要、诚信的原则,依据《个人信息保护法》及相关法律法规要求,合理的收集、保存、使用和共享您的个人信息。本政策适用于我们旗下所有自营网络平台(含网站,微信公众号,微信小程序,H5页面,APP)的产品和服务。如果您有任何疑问、意见或建议,请通过以下方式与我们联系:
</view>
<view class="contact">
<view class="phone" @click="callCustomerService">客服热线: <text style="color:rgba(54, 57, 169, 1)">400-921-9290</text> </view>
<view>邮箱: cs@ydinsurance.cn</view>
</view>
<!-- 1. 适用范围 -->
<view class="section-title">1. 适用范围</view>
<view class="section">
<view>(a) 在您注册本应用帐号时,您根据本应用要求提供的个人注册信息;</view>
<view>(b) 在您使用本应用网络服务,或访问本应用平台网页时,本应用自动接收并记录的您的浏览器和计算机上的信息,包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据;</view>
<view>(c) 本应用通过合法途径从商业伙伴处取得的用户个人数据。</view>
</view>
<view class="section">
您了解并同意,以下信息不适用本隐私权政策:
</view>
<view class="subsection">
<view>(a) 您在使用本应用平台提供的搜索服务时输入的关键字信息;</view>
<view>(b) 本应用收集到的您在本应用发布的有关信息数据,包括但不限于参与活动、成交信息及评价详情;</view>
<view>(c) 违反法律规定或违反本应用规则行为及本应用已对您采取的措施。</view>
</view>
<!-- 2. 信息使用 -->
<view class="section-title">2. 信息使用</view>
<view class="section">
<view>(a) 本应用不会向任何无关第三方提供、出售、出租、分享或交易您的个人信息,除非事先得到您的许可,或该第三方和本应用(含本应用关联公司)单独或共同为您提供服务,且在该服务结束后,其将被禁止访问包括其以前能够访问的所有这些资料。</view>
<view>(b) 本应用亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播您的个人信息。任何本应用平台用户如从事上述活动,一经发现,本应用有权立即终止与该用户的服务协议。</view>
<view>(c) 为服务用户的目的,本应用可能通过使用您的个人信息,向您提供您感兴趣的信息,包括但不限于向您发出产品和服务信息,或者与本应用合作伙伴共享信息以便他们向您发送有关其产品和服务的信息(后者需要您的事先同意)。</view>
</view>
<!-- 3. 信息披露 -->
<view class="section-title">3. 信息披露</view>
<view class="section">
在如下情况下,本应用将依据您的个人意愿或法律的规定全部或部分的披露您的个人信息:
</view>
<view class="subsection">
<view>(a) 经您事先同意,向第三方披露;</view>
<view>(b) 为提供您所要求的产品和服务,而必须和第三方分享您的个人信息;</view>
<view>(c) 根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露;</view>
<view>(d) 如您出现违反中国有关法律、法规或者本应用服务协议或相关规则的情况,需要向第三方披露;</view>
<view>(e) 如您是适格的知识产权投诉人并已提起投诉,应被投诉人要求,向被投诉人披露,以便双方处理可能的权利纠纷;</view>
<view>(f) 在本应用平台上创建的某一交易中,如交易任何一方履行或部分履行了交易义务并提出信息披露请求的,本应用有权决定向该用户提供其交易对方的联络方式等必要信息,以促成交易的完成或纠纷的解决。</view>
<view>(g) 其它本应用根据法律、法规或者网站政策认为合适的披露。</view>
</view>
<!-- 4. 信息存储和交换 -->
<view class="section-title">4. 信息存储和交换</view>
<view class="section">
本应用收集的有关您的信息和资料将保存在本应用及(或)其关联公司的服务器上,这些信息和资料可能传送至您所在国家、地区或本应用收集信息和资料所在地的境外并在境外被访问、存储和展示。
</view>
<!-- 5. Cookie的使用 -->
<view class="section-title">5. Cookie的使用</view>
<view class="section">
<view>(a) 在您未拒绝接受cookies的情况下,本应用会在您的计算机上设定或取用cookies,以便您能登录或使用依赖于cookies的本应用平台服务或功能。本应用使用cookies可为您提供更加周到的个性化服务,包括推广服务。</view>
<view>(b) 您有权选择接受或拒绝接受cookies。您可以通过修改浏览器设置的方式拒绝接受cookies。但如果您选择拒绝接受cookies,则您可能无法登录或使用依赖于cookies的本应用网络服务或功能。</view>
<view>(c) 通过本应用所设cookies所取得的有关信息,将适用本政策。</view>
</view>
<!-- 6. 信息安全 -->
<view class="section-title">6. 信息安全</view>
<view class="section">
<view>(a) 本应用帐号均有安全保护功能,请妥善保管您的用户名及密码信息。本应用将通过对用户密码进行加密等安全措施确保您的信息不丢失,不被滥用和变造。尽管有前述安全措施,但同时也请您注意在信息网络上不存在"完善的安全措施"。</view>
<view>(b) 在使用本应用网络服务进行网上交易时,您不可避免的要向交易对方或潜在的交易对方披露自己的个人信息,如联络方式或者邮政地址。请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,尤其是本应用用户名及密码发生泄露,请您立即联络本应用客服,以便本应用采取相应措施。</view>
</view>
<!-- 7. 本隐私政策的更改 -->
<view class="section-title">7. 本隐私政策的更改</view>
<view class="section">
<view>(a) 如果决定更改隐私政策,我们会在本政策中、本公司网站中以及我们认为适当的位置发布这些更改,以便您了解我们如何收集、使用您的个人信息,哪些人可以访问这些信息,以及在什么情况下我们会透露这些信息。</view>
<view>(b) 我们保留随时修改本政策的权利,因此请经常查看。如对本政策作出重大更改,本公司会通过网站通知的形式告知。</view>
</view>
</view>
<!-- </scroll-view> -->
</view>
</view>
</view>
</template>
<script>
import {companyInfo} from "@/environments/environment";
export default{
data(){
return {
companyFullName : companyInfo.companyFullName,
type:null,
isBack:null
}
},
components:{},
onLoad(options) {
this.type = options.type;
this.isBack = options.isBack
},
// onLoad(options){
// },
methods:{
callCustomerService() {
const phoneNumber = '400-921-9290';
// 判断是否在uni-app环境
if (typeof uni !== 'undefined' && uni.makePhoneCall) {
uni.makePhoneCall({ phoneNumber });
}
// 普通H5环境
else {
window.location.href = `tel:${phoneNumber}`;
}
},
goBack() {
uni.navigateBack({
delta: 1
});
}
}
}
</script>
<style lang="scss" scoped>
.container{
padding: 30rpx;
background-color: #f7f7f7;
}
.privacy-policy {
padding: 20rpx 30rpx;
color: #333;
line-height: 1.6;
font-size: 28rpx;
// height: 100vh;
margin-bottom: 50rpx;
.header {
margin-bottom: 30rpx;
text-align: center;
.title {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 10rpx;
}
.subtitle {
font-size: 26rpx;
color: #666;
}
}
.content {
.section {
margin-bottom: 30rpx;
text-align: justify;
}
.section-title {
font-weight: bold;
margin: 40rpx 0 20rpx;
font-size: 32rpx;
}
.subsection {
margin-left: 30rpx;
margin-bottom: 30rpx;
}
.contact {
margin: 20rpx 0 30rpx;
padding: 20rpx;
background-color: #f5f5f5;
border-radius: 8rpx;
.phone{
text-decoration: none; /* 移除下划线 */
}
view {
margin-bottom: 10rpx;
&:last-child {
margin-bottom: 0;
}
}
}
}
}
.agreement-container {
padding: 20rpx;
margin-bottom: 50rpx;
}
.scroll-content {
height: 100%;
}
.section {
margin-bottom: 30rpx;
}
.section-header {
font-weight: bold;
font-size: 36rpx;
margin: 20rpx 0;
color: #333;
}
.clause {
margin: 15rpx 0;
}
.clause-title {
font-weight: 600;
display: block;
margin: 10rpx 0;
}
.emphasis {
font-weight: 500;
text-decoration: underline;
}
.acceptance {
text-align: center;
margin-top: 40rpx;
font-weight: bold;
}
</style>
<template>
<view class="">
<view class="content_wrapper">
<h4 style="font-size: 28rpx;">劳务报酬税缴纳规则</h4>
<view class="content">
根据国家相关法律法规,提现将由银盾家办公司代缴个税后(按劳务报酬税率计算),付款到用户的微信钱包/支付宝账户/银行卡内。 根据规则,将实行按月累计扣税,若在当月发起多次提现,本次扣税基数将累计当月全部的提现金额。以下内容供参考,详细内容可在国家税务局查询。
</view>
<h4 style="text-align: center;font-size: 28rpx;">劳务报酬所得预扣率表</h4>
<view style="color:#666;text-align: center;margin-bottom: 20rpx;font-size: 22rpx;">
(居民个人劳务报酬所得预扣预缴适用)
</view>
<view style="margin-bottom: 20rpx;">
<view class="list">
<view class="list_item title">级数</view>
<view class="list_item title">预扣预缴应纳税所得额</view>
<view class="list_item title">预扣率(%)</view>
<view class="list_item title">速算扣除数</view>
</view>
<view class="list">
<view class="list_item">1</view>
<view class="list_item">不超过20000元的</view>
<view class="list_item">20</view>
<view class="list_item">0</view>
</view>
<view class="list" style="background: #D0D3FF;">
<view class="list_item">2</view>
<view class="list_item">不超过20000元至50000元的</view>
<view class="list_item">30</view>
<view class="list_item">2000</view>
</view>
<view class="list">
<view class="list_item">3</view>
<view class="list_item">不超过50000元的</view>
<view class="list_item">40</view>
<view class="list_item">7000</view>
</view>
</view>
<view style="color: #666666;font-size: 24rpx;">
<view class="">
应纳税所得额=劳务报酬所得 - 减除费用,即:
</view>
<view class="">
当劳务报酬所得不超过4000元: 应纳税所得额=劳务报酬所得 - 800;
</view>
<view class="">
当劳务报酬所得超过4000元: 应纳税所得额=劳务报酬所得 ×(1-20%);
</view>
<view class="">
预扣预缴税额=应纳税所得额×预扣率-速算扣除数。
</view>
</view>
<navigator class="btn" delta="1" open-type="navigateBack">知道了</navigator>
</view>
</view>
</template>
<script>
export default{
data(){
return {
}
},
components:{},
onLoad(){
},
methods:{
}
}
</script>
<style lang="scss" scoped>
.content_wrapper{
padding: 30rpx;
h4{
margin: 20rpx auto;
}
.btn{
background-color: #2A36AD;
font-size: 28rpx;
margin-bottom: 20rpx;
}
.content{
color: #666666;
font-size: 24rpx;
background: #fff;
}
.list:nth-of-type(even) .list_item{
border-right:1px solid #2A36AD;
}
.list:nth-of-type(odd) .list_item{
border-right:1px solid #fff;
}
.list{
display: flex;
justify-content: space-between;
align-items: center;
font-size: 24rpx;
border: 2rpx #2A36AD solid;
border-bottom: 0;
.list_item{
width: 20%;
height: 70rpx;
line-height: 70rpx;
text-align: center;
}
.list_item:nth-child(1){
width: 10%;
}
.list_item:nth-child(2){
width: 50%;
}
.title{
background: #2A36AD;
color: #fff;
}
.list_item:nth-child(4){
border-right: 0;
}
}
.list:last-child{
border-bottom:2rpx #2A36AD solid;
}
}
</style>
\ No newline at end of file
<template>
<view class="container">
<view class="wapper">
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
<text style="font-size: 30rpx;">注销账号</text>
</view>
<!-- #endif -->
<view class="wapperBox">
<view class="warn">
<text class="iconfont icon-redgantanhao"></text>
<text>注销后,您将无法使用当前账号</text>
<text>相关数据也将被删除无法找回</text>
</view>
<view class="cancelBox">
<view class="title">
注销账号
</view>
<view class="phone">
{{mobile}}
</view>
</view>
<view class="signatureBox">
<view class="txt">
<text style="font-size: 30rpx;font-weight: 500;">签字确认</text>
<text style="font-size: 26rpx;">(请在虚线框内签字)</text>
</view>
<view class="signatureContent" v-show="!applyParam.personalSignOssPath">
<e-signature
:showCanvas="showCanvas"
ref="signatureComponent"
@sendImage="getImage"
@validationError="handleValidationError"
:emptyTxt="'请先签名'"
:validationTxt="'签名过于简单,请认真书写您的姓名'"
></e-signature>
<view class="clearBox">
<view class="imgBox">
<image src="@/static/clear.png" @click="clearImg" mode="widthFix"></image>
</view>
</view>
</view>
<image :src="applyParam.personalSignOssPath" mode="widthFix" v-if="applyParam.personalSignOssPath"></image>
</view>
</view>
</view>
<view class="btnBox">
<view class="protol">
<view class="empty" v-if="!isTick" @click="isTick=true"></view>
<text v-else class="iconfont icon-icon_duihao-mian" @click="isTick=false"></text>
<text style="color: #666;">我已阅读并同意</text>
<text style="color: #20269B;" @click="jump()">《账号注销协议》</text>
</view>
<view
class="bottomBtn"
:style="{opacity:isTick?'1':'.5'}"
@click="applyCancel()"
>
申请注销
</view>
</view>
<everyJoinPopup
ref="successCancelPopup"
content="注销成功"
:maskClick="false"
@continue="jumpPage"
/>
</view>
</template>
<script>
import sha256 from 'js-sha256'
import api from "@/api/api";
import everyJoinPopup from "@/components/commonPopup/everyJoinPopup.vue";
import eSignature from '@/components/eSignature/eSignature.vue';
import dataHandling from "@/util/dataHandling";
export default {
components:{eSignature,everyJoinPopup},
data() {
return {
mobile:'',
userId: uni.getStorageSync('cffp_userId'),
showCanvas: true,
completionSignPath: '',
applyParam:{
personalSignOssPath:'',
approvalStatus:''
},
touchMoveHandler:null,
isScrollLocked: false,
isTick:false,
signatureError: '' // 新增签名错误信息
}
},
onLoad() {
let dataForm = uni.getStorageSync('userinfodataForm')
this.mobile = dataForm.mobile
},
onShow(){
this.lockScroll()
},
beforeDestroy() {
console.log('组件销毁');
this.releaseScroll();
},
onHide() {
this.releaseScroll();
},
onUnload() {
this.releaseScroll();
},
destroyed() {
uni.hideToast();
},
methods: {
// 处理签名验证错误
handleValidationError(error) {
this.signatureError = error;
if (error) {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
}
},
jumpPage(){
dataHandling.pocessTracking(
'注销',
`用户注销账号`,
'点击',
2,
'注销账号',
'/myPackageA/setting/logOff'
)
uni.switchTab({
url:'/pages/index/index'
})
this.$refs.successCancelPopup.close()
},
lockScroll() {
if (this.isScrollLocked) return;
// #ifdef H5
this.touchMoveHandler = (e) => {
const signatureArea = document.querySelector('.signatureContent');
if (signatureArea && signatureArea.contains(e.target)) {
e.preventDefault();
}
};
document.body.addEventListener('touchmove', this.touchMoveHandler, { passive: false });
// #endif
// #ifdef APP-PLUS
const pages = getCurrentPages();
const page = pages[pages.length - 1];
const webview = page.$getAppWebview();
webview.setStyle({
scrollIndicator: 'none',
scrollsToTop: false,
bounce: 'none'
});
// #endif
this.isScrollLocked = true;
},
releaseScroll() {
if (!this.isScrollLocked) return;
// #ifdef H5
if (this.touchMoveHandler) {
document.body.removeEventListener('touchmove', this.touchMoveHandler);
this.touchMoveHandler = null;
}
// #endif
// #ifdef APP-PLUS
const pages = getCurrentPages();
const page = pages[pages.length - 1];
const webview = page.$getAppWebview();
webview.setStyle({
scrollIndicator: 'auto',
scrollsToTop: true,
bounce: 'vertical'
});
// #endif
this.isScrollLocked = false;
},
jump(){
dataHandling.pocessTracking(
'查看',
`用户点击了账户注销协议`,
'点击',
2,
'注销账号',
'/myPackageA/setting/logOff'
)
uni.navigateTo({
url:'/myPackageA/ruleAndContract/cancelProtocol'
})
},
applyCancel(){
if(!this.isTick){
uni.showToast({
title: '请阅读并勾选《账号注销协议》',
duration: 3000,
icon: 'none'
})
return
}
// 先验证签名
this.$nextTick(() => {
const signatureValid = this.$refs.signatureComponent.validateSignature();
if (!signatureValid) {
return;
}
// 如果验证通过,再执行完成签名
this.$refs.signatureComponent.finish();
});
},
clearImg(){
this.applyParam.personalSignOssPath = null;
this.$refs.signatureComponent.clear();
this.signatureError = '';
},
getImage(e){
api.saveDigitalSignatures({imgStr:e}).then((res)=>{
if(res['success']){
this.applyParam.personalSignOssPath = res['data']['filePath'];
const userId = uni.getStorageSync('cffp_userId')
const timestamp = Date.now()
const signatureSecret = "ajb_signature_secret_123!@#"
const hasText = `${userId}|${timestamp}|${signatureSecret}`
const hashResult = sha256(hasText);
let params = {
"userId":uni.getStorageSync('cffp_userId'),
"signatureData":this.applyParam.personalSignOssPath,
"signatureHash":hashResult,
"timestamp":timestamp,
}
console.log('注销参数',params);
api.cancellation(params).then(res =>{
if(res['success']){
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
this.$refs.successCancelPopup.open()
}else{
uni.showToast({
title: res['message'],
icon: 'none'
});
}
})
this.releaseScroll()
}
})
},
goBack() {
uni.navigateBack({
delta: 1
});
},
cancel(){
uni.navigateBack({delta:1})
},
sunmit(){
api.cancellation({userId: this.userId}).then(res =>{
if(res['success']){
uni.showToast({
title: '操作成功',
icon: 'none'
});
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
uni.redirectTo({
url:'/myPackageA/login/login?from=index'
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
.container{
display: flex;
flex-direction: column;
background-color: #fff;
color: #333;
.wapper{
flex: 1;
.backArrow{
background-color: #fff;
box-sizing: border-box;
display: flex;
height: 100rpx;
justify-content: space-between;
align-items: center;
position: relative;
width: 100%;
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
.wapperBox{
margin-top: 20rpx;
padding: 20rpx;
.warn{
display: flex;
align-items: center;
justify-content: center;
width: 100%;
box-sizing: border-box;
flex-direction: column;
font-size: 26rpx;
.icon-redgantanhao{
color: #F43530;
font-size: 50rpx;
margin-bottom: 20rpx;
}
}
.cancelBox{
margin: 20rpx 0;
border-radius: 10rpx;
padding: 30rpx;
background-color: #FAFAFA;
.title{
font-size: 30rpx;
font-weight: 500;
}
.phone{
text-align: center;
color: #20269B;
font-size: 40rpx;
}
}
.signatureBox{
border-radius: 10rpx;
padding: 30rpx;
background-color: #FAFAFA;
.txt{
margin-bottom: 20rpx;
}
.signatureContent{
margin-top: 20rpx;
height: auto;
position: relative;
touch-action: none;
.clearBox{
display: flex;
align-items: center;
justify-content: center;
.imgBox{
display: flex;
align-items: center;
width: 120rpx;
height: 120rpx;
}
}
}
}
}
}
.btnBox{
margin-bottom: 20rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.protol{
display: flex;
align-items: center;
.empty{
width: 30rpx;
height: 30rpx;
border: 1rpx solid #20269B;
border-radius: 50%;
margin-right: 5rpx;
}
.icon-icon_duihao-mian{
font-size: 30rpx;
color: #20269B;
margin-right: 5rpx;
}
}
.bottomBtn{
margin-top: 20rpx;
width: 65%;
padding: 20rpx;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
text-align: center;
background-color: #20269B;
}
}
}
</style>
\ No newline at end of file
{
"name": "验证码输入框",
"version": "2.0",
"lockfileVersion": 1,
"lockfileVersion": 3,
"requires": true,
"dependencies": {
"dayjs": {
"packages": {
"": {
"name": "验证码输入框",
"version": "2.0",
"dependencies": {
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
"echarts": "^5.4.1",
"js-sha256": "^0.11.1",
"nanoid": "^4.0.0"
}
},
"node_modules/crypto-js": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
},
"node_modules/dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
},
"echarts": {
"node_modules/echarts": {
"version": "5.6.0",
"requires": {
"integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==",
"dependencies": {
"tslib": "2.3.0",
"zrender": "5.6.1"
},
}
},
"node_modules/echarts/node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"node_modules/echarts/node_modules/zrender": {
"version": "5.6.1",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
"integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
"dependencies": {
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"zrender": {
"version": "5.6.1",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
"integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
"requires": {
"tslib": "2.3.0"
}
}
"tslib": "2.3.0"
}
},
"nanoid": {
"version": "4.0.2"
"node_modules/js-sha256": {
"version": "0.11.1",
"resolved": "https://registry.npmmirror.com/js-sha256/-/js-sha256-0.11.1.tgz",
"integrity": "sha512-o6WSo/LUvY2uC4j7mO50a2ms7E/EAdbP0swigLV+nzHKTTaYnaLIWJ02VdXrsJX0vGedDESQnLsOekr94ryfjg=="
},
"node_modules/nanoid": {
"version": "4.0.2",
"integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"bin": {
"nanoid": "bin/nanoid.js"
},
"engines": {
"node": "^14 || ^16 || >=18"
}
}
}
}
......@@ -15,8 +15,10 @@
]
},
"dependencies": {
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
"echarts": "^5.4.1",
"js-sha256": "^0.11.1",
"nanoid": "^4.0.0"
}
}
......@@ -441,13 +441,6 @@
}
},
{
"path": "components/clause/clause",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "components/clause/clauseIOS",
"style": {
"navigationBarTitleText": "",
......@@ -505,7 +498,54 @@
"style": {
"navigationBarTitleText": "微信登录"
}
}]
},{
"path": "applyFranchise/applyFranchise",
"style": {
"navigationBarTitleText": "申请加盟",
"h5": {
"reload": false // 禁用自动重新加载
}
}
},{
"path": "integralExchange/exchange",
"style": {
"navigationBarTitleText": "积分提现"
}
},{
"path": "ruleAndContract/taxRules",
"style": {
"navigationBarTitleText": "纳税规则"
}
},{
"path": "integralExchange/authenticaInfo",
"style": {
"navigationBarTitleText": "实名认证"
}
},{
"path": "setting/logOff",
"style": {
"navigationBarTitleText": "注销账号"
}
},{
"path": "ruleAndContract/cancelProtocol",
"style": {
"navigationBarTitleText": "注销账号协议"
}
}, {
"path": "login/login",
"style": {
"navigationBarTitleText": "银盾家办"
}
},{
"path": "ruleAndContract/clause",
"style": {
"navigationBarTitleText": "协议",
"h5": {
"reload": false // 禁用自动重新加载
}
}
}
]
},{
"root": "officialWebsite",
"pages": [{
......
......@@ -77,6 +77,7 @@
<script>
import courseItem from "@/components/courseItem/courseItem.vue";
import api from "@/api/api";
import dataHandling from "@/util/dataHandling";
export default {
components:{courseItem},
data() {
......@@ -101,6 +102,14 @@
})
},
goDetail(){
dataHandling.pocessTracking(
'到账说明',
`点击到账说明按钮,查看到账说明详情`,
'点击',
2,
'我的售后',
'pages/afterSaleDetail/afterSaleDetail'
)
uni.navigateTo({
url:'/pages/receiptCycleDesc/receiptCycleDesc'
})
......
......@@ -23,6 +23,7 @@
</template>
<script>
import dataHandling from "@/util/dataHandling";
import api from "@/api/api";
import courseItem from "@/components/courseItem/courseItem.vue";
export default {
......@@ -43,6 +44,14 @@
})
},
goDetail(item){
dataHandling.pocessTracking(
'查看退款订单',
`点击订单详情,查看退款订单详情`,
'点击',
2,
'我的售后',
'pages/afterSales/afterSales'
)
uni.navigateTo({
url:`/pages/afterSaleDetail/afterSaleDetail?orderNo=${item.orderNo}&afterSalesFlag=${this.afterSalesFlag}`
})
......
......@@ -41,9 +41,7 @@
</view>
<image :src="applyParam.personalSignOssPath" mode="widthFix" v-if="applyParam.personalSignOssPath"></image>
<!-- <view class="imgBox" style="margin-top: 20rpx;">
<image src="../../static/clear.png" @click="clearImg" mode="widthFix"></image>
</view> -->
<view class="fixed" url="bank-card" @click="save()">
{{(this.applyParam.approvalStatus== 0 || this.applyParam.approvalStatus == 2)?'我自愿签订合伙人合同书':'下一步'}}
</view>
......@@ -100,22 +98,6 @@
this.releaseScroll();
},
methods: {
// // 锁定滚动
// lockScroll() {
// // #ifdef H5
// if (this.touchMoveHandler) return; // 避免重复绑定
// this.touchMoveHandler = (e) => {
// e.preventDefault();
// };
// document.body.addEventListener(
// 'touchmove',
// this.touchMoveHandler,
// { passive: false }
// );
// // #endif
// },
// 锁定滚动 - 修改后的方法
lockScroll() {
if (this.isScrollLocked) return;
......@@ -147,18 +129,7 @@
this.isScrollLocked = true;
},
// // 释放滚动
// releaseScroll() {
// // #ifdef H5
// if (this.touchMoveHandler) {
// document.body.removeEventListener(
// 'touchmove',
// this.touchMoveHandler
// );
// this.touchMoveHandler = null;
// }
// // #endif
// },
// 释放滚动 - 修改后的方法
releaseScroll() {
if (!this.isScrollLocked) return;
......
......@@ -85,6 +85,7 @@
import api from "@/api/api";
import courseItem from "@/components/courseItem/courseItem.vue";
import commonSelect from '@/components/commonSelect/commonSelect.vue';
import dataHandling from "@/util/dataHandling";
export default {
components:{
courseItem,
......@@ -169,6 +170,14 @@
// return
api.unifiedRefund(param).then(res=>{
if(res['success']){
dataHandling.pocessTracking(
'退款',
`已提交退款申请`,
'点击',
2,
'申请退款',
'pages/applyDropClass/applyDropClass'
)
uni.navigateTo({
url:`/pages/afterSaleDetail/afterSaleDetail?orderNo=${this.dropInfo.orderNo}&afterSalesFlag=3`
})
......
......@@ -122,10 +122,11 @@
if(this.status != 1 && this.status != 3 &&this.status !== null){
if(uni.getStorageSync('loginType')=='visitor'){
uni.redirectTo({
url:'/components/login/login'
url:'/myPackageA/login/login'
})
try {
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
} catch (e) {
// error
}
......
<template>
<view class="container">
<!-- -->
<view class="shareheader" style="" v-if="coursesharing != 1 || deviceType==3">
<!-- #ifdef APP -->
<view class="iconfont icon-youjiantou" style="margin-left: 30rpx;" @click="goBack()"></view>
......@@ -13,7 +14,8 @@
<uni-popup-share @select="sharechange"></uni-popup-share>
</uni-popup>
</view>
<view v-if="isWxH5" class="" style="width: 40rpx;height: 40rpx;padding-right: 20rpx;">
<!-- v-if="isWxH5" -->
<view v-if="isWxH5" style="width: 40rpx;height: 40rpx;padding-right: 20rpx;">
<image class="image" @click="reinvite" src="../../static/fastentry/Slice122.png" mode=""></image>
</view>
<view class="" style="width: 40rpx;height: 40rpx; ">
......@@ -130,7 +132,13 @@
</view>
</view>
<boot-page v-if="sharelogin" ref="sharelogin" @close="close"></boot-page>
<boot-page
loginSource="产品详情"
v-if="sharelogin"
:wayType="wayType"
ref="sharelogin"
@close="close"
></boot-page>
<uni-share-wx ref="sharewx"></uni-share-wx>
<view class="markBox" @click="shareTipsFlag=false" v-if="shareTipsFlag">
<view class="guideImgBox">
......@@ -165,11 +173,17 @@
</view>
</view>
</uni-popup>
<partner-tip-popup
ref="partnerTipPopup"
@join="gotoJoinPartner"
@continue="continueShare"
/>
</view>
</template>
<script>
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import api from "../../api/api";
import BootPage from "@/components/bootpage/bootpage.vue";
import LoginPopup from "@/components/unipopup/loginPopup.vue";
......@@ -186,10 +200,14 @@
UniShareWx,
BootPage,
LoginPopup,
VerifyPopup
VerifyPopup,
PartnerTipPopup
},
data() {
return {
userInfo: {},
wayType:'1', //登陆的类型
partnerType:'',//是否是合伙人
addSystemType:'', //因为会从其他公众号跳转过来所以接受一下公众号的类型
systemType:companyInfo.systemType,
showName:'购买',
......@@ -253,6 +271,86 @@
};
},
methods: {
gotoJoinPartner(){
dataHandling.pocessTracking(
'加盟',
`用户在产品详情未加盟时点击了加盟按钮`,
'点击',
2,
'产品详情',
'pages/courseDetail/courseDetail'
)
uni.navigateTo({
url: '/myPackageA/applyFranchise/applyFranchise'
})
this.$refs.partnerTipPopup.close()
},
// 打开微信分享啊
reinvite() {
// 未登录去登录
if(!uni.getStorageSync('loginType') ||uni.getStorageSync('loginType') == 'visitor'){
dataHandling.pocessTracking(
'分享',
`用户在产品详情未登录时点击产品分享按钮`,
'点击',
2,
'产品详情',
'pages/courseDetail/courseDetail'
)
this.sharelogin = true,
this.wayType = '2'
return
}
// 已登录,未成为合伙人
if(this.userInfo&&!this.userInfo['partnerType']) {
dataHandling.pocessTracking(
'分享',
`用户在产品详情未加盟时点击产品分享按钮`,
'点击',
2,
'产品详情',
'pages/courseDetail/courseDetail'
)
this.$refs.partnerTipPopup.open()
return
}
this.continueShare()
},
continueShare(){
const shareCode = nanoid() + this.userId
const jumptime = Date.parse(new Date()) / 1000
//app分享
// #ifdef APP-PLUS
let dataWXform = {
href: shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.fileId +
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&",
title: this.courseInfo.fileTitle,
// summary: `加入我们开启学习之旅`,
summary: this.courseInfo.fileSynopsis,
imageUrl: this.courseInfo.displayImage,
fileId: this.fileId,
shareCode: shareCode
}
this.$refs.sharewx.open(dataWXform)
dataHandling.pocessTracking(
'分享',
`用户在产品详情点击分享按钮,分享${this.courseInfo.fileTitle}`,
'点击',
2,
'产品详情',
'pages/courseDetail/courseDetail'
)
// #endif
//#ifdef H5
this.shareTipsFlag = true;
this.getshareData2(shareCode,jumptime)
// #endif
this.$refs.partnerTipPopup.close()
this.wayType = '1'
},
canleLogin(){
this.show=false;
},
......@@ -290,14 +388,32 @@
//登录完成之后 弹出预约弹窗
this.$refs.verifyPopupCom.open();
},
close(val,loginTypeSync) {
//关闭登录
close(val,loginTypeSync,type) {
// 直接点击了关闭登录的叉号
if(type){
this.sharelogin = false
return
}
if (val) {
this.sharelogin = false
this.userId = val;
this.loginType = loginTypeSync;
uni.setStorageSync('cffp_userId', this.userId);
this.courseDetail();
if(loginTypeSync == 'codelogin'){
if(JSON.parse(uni.getStorageSync('cffp_userInfo'))){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
if(this.wayType == '2' && !this.userInfo['partnerType']){
this.$refs.partnerTipPopup.open()
return
}
if(this.wayType == '2' && this.userInfo['partnerType']){
this.continueShare()
return
}
if(loginTypeSync == 'codelogin'&&this.wayType=='1'){
setTimeout(() => {
if(this.courseInfo.status == 1){
this.jumppurchase();
......@@ -312,16 +428,13 @@
}
} else {
this.sharelogin = false
this.wayType = '1'
}
},
isWx_Miniprogram(){
// 判断是否在微信内
// const ua = navigator.userAgent.toLowerCase();
// if (ua.includes('micromessenger') && window.__wxjs_environment === 'miniprogram') {
// this.isWxH5 = true;
// } else {
// this.isWxH5 = false;
// }
// #ifdef APP-PLUS
this.isWxH5 = true;
// #endif
......@@ -340,68 +453,7 @@
isWeiXin() {
return /micromessenger/i.test(navigator.userAgent.toLowerCase()) || typeof navigator.wxuserAgent !== 'undefined'
},
// openApp(url, callback) {
// let {isAndroid, isIOS, isIOS9} = judgePhoneType();
// if(this.isWeiXin()){
// alert("请您在浏览器中打开,即可下载") ;
// return ;
// }
// if (isAndroid || isIOS) {
// let hasApp = true, t = 1000,
// t1 = Date.now(),
// ifr = document.createElement("iframe");
// setTimeout(function () {
// if (!hasApp) {
// callback && callback()
// }
// document.body.removeChild(ifr);
// }, 2000);
// ifr.setAttribute('src', url);
// ifr.setAttribute('style', 'display:none');
// document.body.appendChild(ifr);
// setTimeout(function () { //启动app时间较长处理
// let t2 = Date.now();
// if (t2 - t1 < t + 100) {
// hasApp = false;
// }
// }, t);
// }
// if (isIOS9) {
// location.href = url;
// setTimeout(function () {
// callback && callback()
// }, 250);
// setTimeout(function () {
// location.reload();
// }, 1000);
// }
// },
/**
* 超时跳转h5页面
* */
// goConfirmAddr() {
// let { isAndroid } = judgePhoneType();
// window.location.href = !isAndroid ? CONFIG.ios : CONFIG.android ;
// },
jumpapp() {
let platform = uni.getSystemInfoSync().platform
if (platform == 'ios') {
window.location.href = "https://mcffp.anjibao.cn/app/";
// window.setTimeout(function() { //如果没有安装app,便会执行setTimeout跳转下载页
// var timeOutDateTime = new Date();
// if (timeOutDateTime - loadDateTime < 500) {
// window.location.href = "https://mcffp.anjibao.cn/app/";
// } else {
// window.location.href = "www.baidu.com"; //ios下载地址
// }
// }, 500);
} else if (platform == 'android') {
// window.location.href = "cffpapp://";
}
},
goBack() {
uni.navigateBack({
delta: 1
......@@ -411,32 +463,7 @@
maskClick(val) {
this.sliceshare = val.show
},
// 打开微信分享啊
reinvite() {
const shareCode = nanoid() + this.userId
const jumptime = Date.parse(new Date()) / 1000
//app分享
// #ifdef APP-PLUS
let dataWXform = {
href: shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.fileId +
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&",
title: this.courseInfo.fileTitle,
// summary: `加入我们开启学习之旅`,
summary: this.courseInfo.fileSynopsis,
imageUrl: this.courseInfo.displayImage,
fileId: this.fileId,
shareCode: shareCode
}
this.$refs.sharewx.open(dataWXform)
// #endif
//#ifdef H5
this.shareTipsFlag = true;
this.getshareData2(shareCode,jumptime)
// #endif
},
shareToggle() {
this.sliceshare = true
this.$refs.share.open()
......@@ -457,6 +484,7 @@
saveOrder() {
this.loginType = uni.getStorageSync('loginType');
if (this.loginType === 'visitor') {
this.wayType = '1'
if(this.systemType == 'IOS'){
this.$refs.loginPopupCom.open();
this.show=true;
......@@ -495,7 +523,34 @@
}
},
jumppurchase() {
let orderPlatform = ''
// 不同得公司主题不同得购买平台
// #ifdef APP
if(companyInfo.companyType=='1'){
orderPlatform = 'JS-FX-APP'
}
if(companyInfo.companyType=='2'){
orderPlatform = 'YDFO-FX-APP'
}
// #endif
// #ifdef H5
if(companyInfo.companyType=='1'){
orderPlatform = 'JS-FX-H5'
}
if(companyInfo.companyType=='2'){
orderPlatform = 'YDFO-FX-H5'
}
// #endif
// #ifdef MP-WEIXIN
if(companyInfo.companyType=='1'){
orderPlatform = 'JS-FX-MP'
}
if(companyInfo.companyType=='2'){
orderPlatform = 'YDFO-FX-MP'
}
// #endif
const param = {
orderPlatform,
productType: '1',
productId: this.courseInfo.fileId,
userId: uni.getStorageSync('cffp_userId'),
......@@ -504,12 +559,22 @@
shareCode: this.shareCode,
dataSource: this.coursesharing == 1 ? '2' : this.dataSource
}
console.log('param',param);
// return
api.saveOrder(param).then(res => {
if (res['success']) {
this.orderId = res['data']['id'];
if (this.coursesharing == '1') {
this.userId = uni.getStorageSync('cffp_userId')
}
dataHandling.pocessTracking(
'购买',
`用户在产品中心点击购买按钮,购买${this.courseInfo.fileTitle}`,
'点击',
2,
'产品详情',
'pages/courseDetail/courseDetail'
)
uni.navigateTo({
url: `/pages/orderConfirm/orderConfirm?fileId=${this.fileId}&orderId=${this.orderId}&userId=${this.userId}`
})
......@@ -781,9 +846,9 @@
getshareData2(shareCode,jumptime,type=1) {
let newLink = type==1?shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.fileId +
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&"
this.userId + '&jumpUrl=' + jumptime + "&"
: shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.fileId
console.log('this.courseInfo',this.courseInfo);
let data = {
title: this.courseInfo.fileTitle,
// desc: '加入我们开启学习之旅',
......@@ -791,6 +856,7 @@
link: newLink, //分享链接
imgUrl: this.courseInfo.displayImage, //图片
}
console.log('data',data);
//安卓机型获取当前页面路径
let url = window.location.href.split('#')[0];
......@@ -803,12 +869,20 @@
url = window.sessionStorage.getItem('firstEntryUrl').split('#')[0];
}
}
// let url = window.location.href.split('#')[0]
hshare(data, url)
if(type==1){
this.submitsuessc(shareCode,jumptime)
}
if(type == 1){
dataHandling.pocessTracking(
'点击',
`用户在产品中心点击分享按钮,分享${this.courseInfo.fileTitle}`,
'点击',
2,
'产品详情',
'pages/courseDetail/courseDetail'
)
}
},
// H5 自定义分享
......@@ -856,7 +930,7 @@
businessId: this.fileId, // 课程Id
shareUrl: shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.fileId +
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&", // 分享链接
this.userId + '&jumpUrl=' + jumptime + "&", // 分享链接
shareType: '2', // 分享类型(1:图片分享; 2:链接分享)
shareToWhere: 3, //分享到哪儿(1好友 2朋友圈)
shareCode: shareCode
......@@ -908,6 +982,7 @@
}
},
onLoad(option) {
if(option.addSystemType){
this.addSystemType = option.addSystemType
}
......@@ -929,11 +1004,7 @@
this.getuserRead()
let endTime = Date.parse(new Date()) / 1000;
let startTime = uni.getStorageSync('h5_startTime')
// if (endTime - startTime > 3600 * 24) {
// uni.setStorageSync('cffp_userId', '')
// uni.setStorageSync('isLogin','')
// uni.setStorageSync('loginType','')
// }
uni.setStorageSync('h5_coursesharing', this.coursesharing);
this.getshareData()
}
......@@ -951,8 +1022,12 @@
this.init();
this.isWx_Miniprogram();
this.tabType = 1;
this.wayType = '1'
this.courseDetail();
uni.setStorageSync('entryUrl',window.location.href.split('#')[0])
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
},
mounted() {
......
......@@ -55,6 +55,13 @@
</view>
</view>
</view>
<BootPage
loginSource="产品中心"
ref="sharelogin"
v-if="sharelogin"
@close="closeLogin"
>
</BootPage>
<uni-popup ref="popup" type="center" background-color="#fff">
<view class="descriptionBox">
<view class="imageBox">
......@@ -72,6 +79,12 @@
</view>
</uni-popup>
<!-- 添加合伙人提示弹窗组件 -->
<partner-tip-popup
ref="partnerTipPopup"
@join="gotoJoinPartner"
@continue="continueShare"
/>
<uni-share-wx ref="sharewx"></uni-share-wx>
<view class="markBox" @click="shareTipsFlag=false" v-if="shareTipsFlag">
<view class="guideImgBox">
......@@ -88,6 +101,8 @@
</template>
<script>
import BootPage from "@/components/bootpage/bootpage.vue";
import PartnerTipPopup from "@/components/commonPopup/PartnerTipPopup.vue";
import api from "../../api/api";
import courseItem from "@/components/courseItem/courseItem.vue";
import tabBar from '../../components/tabBar/tabBar.vue';
......@@ -99,9 +114,15 @@
import UniShareWx from "@/uni_modules/uni-share-wx/index.vue";
import {nanoid} from 'nanoid';
export default{
props:['tagIds'],
components: {
name:'courselist',
components:{
courseItem,
tabBar,
carousel,
search,
UniShareWx,
BootPage,
PartnerTipPopup
},
data(){
return{
......@@ -110,19 +131,16 @@
fileUploadItemCFFPList:[],
queryName:null,
userId: uni.getStorageSync('cffp_userId'),
userInfo:{},
runEnv:dataHandling.getRuntimeEnv(), //运行的环境 browser、app、h5
shareTipsFlag:false,
sourceType:'1',//根据来源展示二维码 默认是cffp,
env:dataHandling.getRuntimeEnv2()
env:dataHandling.getRuntimeEnv2(),
shareItem:{},//分享的产品
sharelogin: false,
}
},
name:'courselist',
components:{
courseItem,
tabBar,
carousel,
search
},
onLoad() {
this.queryName = uni.getStorageSync('queryName') || '';
......@@ -132,6 +150,10 @@
this.queryName = uni.getStorageSync('queryName') || '';
this.courseList();
this.sourceType = uni.getStorageSync('addSystemType') || '1';
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
},
computed:{
marginTop(){
......@@ -143,36 +165,85 @@
}
},
methods:{
gotoJoinPartner(){
dataHandling.pocessTracking(
'点击',
`用户在产品中心未加盟时点击了加盟按钮`,
'点击',
2,
'产品中心',
'pages/courselist/courselist'
)
uni.navigateTo({
url: '/myPackageA/applyFranchise/applyFranchise'
})
this.$refs.partnerTipPopup.close()
},
gotoShare(item){
if(this.runEnv == 'browser'){
this.$refs.popup.open()
this.shareItem = JSON.parse(JSON.stringify(item))
// 未登录去登录
if(uni.getStorageSync('loginType')!=='codelogin'){
dataHandling.pocessTracking(
'点击',
`用户在产品中心未登录时点击产品分享按钮`,
'点击',
2,
'产品中心',
'pages/courselist/courselist'
)
this.sharelogin = true
return
}
// 已登录,未成为合伙人
if(this.userInfo&&!this.userInfo['partnerType']) {
dataHandling.pocessTracking(
'点击',
`用户在产品中心未加盟时点击产品分享按钮`,
'点击',
2,
'产品中心',
'pages/courselist/courselist'
)
this.$refs.partnerTipPopup.open()
return
}else if(this.runEnv == 'app' || this.runEnv == 'wechat-h5'){
const shareCode = nanoid() + this.userId
const jumptime = Date.parse(new Date()) / 1000
//app分享
// #ifdef APP-PLUS
let dataWXform = {
href: shareURL + "/pages/courseDetail/courseDetail?fileId=" + item.fileId +
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&",
title: item.fileTitle,
// summary: `加入我们开启学习之旅`,
summary: item.fileSynopsis,
imageUrl: item.displayImage,
fileId: item.fileId,
shareCode: shareCode
}
this.$refs.sharewx.open(dataWXform)
// #endif
//#ifdef H5
this.shareTipsFlag = true;
this.getshareData2(shareCode,jumptime,item)
// #endif
}
this.continueShare()
},
continueShare(){
console.log('this.shareItem',this.shareItem);
const shareCode = nanoid() + this.userId
const jumptime = Date.parse(new Date()) / 1000
//app分享
// #ifdef APP-PLUS
let dataWXform = {
href: shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.shareItem.fileId +
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&",
title: this.shareItem.fileTitle,
summary: this.shareItem.fileSynopsis,
imageUrl: this.shareItem.displayImage,
fileId: this.shareItem.fileId,
shareCode: shareCode
}
this.$refs.sharewx.open(dataWXform)
dataHandling.pocessTracking(
'点击',
`用户在产品中心点击分享按钮,分享${this.shareItem.fileTitle}`,
'点击',
2,
'产品中心',
'pages/courselist/courselist'
)
// #endif
//#ifdef H5
this.shareTipsFlag = true;
this.getshareData2(shareCode,jumptime, this.shareItem)
// #endif
this.$refs.partnerTipPopup.close()
},
getshareData2(shareCode,jumptime,item) {
let data = {
title: item.fileTitle,
......@@ -195,11 +266,17 @@
url = window.sessionStorage.getItem('firstEntryUrl').split('#')[0];
}
}
// let url = window.location.href.split('#')[0]
hshare(data, url)
this.submitsuessc(shareCode,jumptime,item)
this.submitsuessc(shareCode,jumptime,item)
dataHandling.pocessTracking(
'点击',
`用户在产品中心点击分享按钮,分享${item.fileTitle}`,
'点击',
2,
'产品中心',
'pages/courselist/courselist'
)
},
submitsuessc(shareCode,jumptime,item){
......@@ -225,13 +302,56 @@
}
})
},
closeLogin(val1,val2,val3){
if(val3){
this.sharelogin=false
return
}
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
this.sharelogin=false
if(this.runEnv == 'browser'){
dataHandling.pocessTracking(
'点击',
`用户在产品中心浏览器端点击产品分享按钮`,
'点击',
2,
'产品中心',
'pages/courselist/courselist'
)
this.$refs.popup.open()
return
}else{
// 已登录,未成为合伙人
if(!this.userInfo['partnerType']) {
dataHandling.pocessTracking(
'点击',
`用户在产品中心未加盟时点击产品分享按钮`,
'点击',
2,
'产品中心',
'pages/courselist/courselist')
this.$refs.partnerTipPopup.open()
return
}
this.continueShare()
}
},
goDetail(item){
dataHandling.pocessTracking(
'点击',
`用户在产品中心点击${item.fileTitle},查看产品详情`,
'点击',
2,
'产品中心',
'pages/courselist/courselist'
)
uni.navigateTo({
url: `/pages/courseDetail/courseDetail?fileId=${item.fileId}`
});
},
courseList(){
const param = {
queryName:this.queryName
}
......@@ -241,18 +361,7 @@
}
})
},
tagConcat(val,v2){
if(val.indexOf(',') > 0){
return [].concat(v2,val.split(','))
}else{
return [].concat(v2,val)
}
},
getCourseList(res){
console.log('res',res);
this.queryName = res;
this.courseList()
},
queryAreaCenterInfo() {
api.queryAreaCenterInfo({
userId: uni.getStorageSync('cffp_userId'),
......@@ -262,7 +371,8 @@
uni.setStorageSync('fileUploadItemCFFPList', res['data']['fileUploadItemCFFPList'])
const cffp_userInfo = {
name: res['data']['userReName'],
mobile: res['data']['mobile']
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType']
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
this.fileUploadItemCFFPList = uni.getStorageSync('fileUploadItemCFFPList');
......@@ -275,7 +385,7 @@
if(!this.fileUploadItemCFFPList){
this.queryAreaCenterInfo();
}
this.courseList();
// this.courseList();
},
onTabItemTap() {
// 通过tabbar切换时清空storage
......@@ -289,14 +399,13 @@
</script>
<style lang="scss" scoped>
::v-deep .uni-popup .uni-popup__wrapper{
margin: 0 !important;
border-radius: 30rpx;
}
.container{
background-color: rgba(235, 239, 247, 1);
display: flex;
flex-direction: column;
width: 100%;
height: auto;
box-sizing: border-box;
.homeHeader{
box-sizing: border-box;
width: 100%;
......@@ -503,31 +612,57 @@
padding: 0 30px;
}
}
}
.ulBox,.liBox{
padding-bottom: 30rpx;
display: flex;
}
.ulBox{
flex-direction: column;
}
.liBox{
background-color: #fff;
border-radius: 20rpx;
margin-bottom: 10rpx;
padding: 10rpx;
}
.pad{
padding:0 30rpx 20rpx 30rpx;
.banner {
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 30rpx;
.swiper{
height: 250rpx;
.joinContent{
width: 600rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
.joinHeader{
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background: rgba(54, 57, 169, 1);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
}
.joinCon{
margin-bottom: 20rpx;
.one{
font-size: 28rpx;
color: rgba(38, 41, 44, 1);
text-align: center;
}
.two{
color: rgba(145, 144, 148, 1);
font-size: 26rpx;
text-align: center;
margin-top: 10rpx;
margin-bottom: 20rpx;
}
}
.joinFotter{
width: 100%;
color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 10rpx 0;
font-size: 24rpx;
view{
background: rgba(54, 57, 169, 1);
border-radius: 10rpx;
padding: 10rpx;
}
}
}
}
</style>
\ No newline at end of file
......@@ -87,83 +87,12 @@
暂无数据
</view>
</view>
<uni-popup ref="joinPopup" type="center" background-color="#fff">
<view class="joinContent">
<view class="joinHeader">
<view class="iconfont icon-hezuo" style="font-size: 35rpx;color: #fff;"></view>
</view>
<view class="joinCon">
<view class="one">
您还未加盟为合伙人
</view>
<view class="two">
成为合伙人后,分享商品,好友购物得收益
</view>
</view>
<view class="joinFotter" @click="gotoApply">
去加盟拿收益
</view>
</view>
</uni-popup>
<!-- 以前的代码 -->
<view class="top">
<!-- <view class="compony">
<image src="@/static/logo1.png" mode="widthFix" style="width: 120rpx !important;"></image>
<text class="name">{{cffpUserInfo.name}}</text>
<text class="iconfont icon-31tishi" @click="getIntroduce('center')"></text>
</view> -->
<!-- <search
ref="searchRef"
:isSearch="0"
:userId="userId"
:initialQuery.sync="searchQuery"
v-if="showSearch"
></search> -->
<!--轮播组件-->
<!-- <view class="banner" style="overflow: none;">
<view class="uni-margin-wrap">
<carousel :carouselList="cffpUserInfo.fileUploadItemList" ></carousel>
</view>
</view> -->
</view>
<!-- <view class="message" @click="jumpToAnnouncement()">
<view style="display: flex;align-items: center;">
<text class="iconfont icon-gonggao"></text>
<text style="font-size: 27rpx;">{{announcementInfo}}</text>
</view>
<text class="iconfont icon-youjiantou iconStyle"></text>
</view> -->
<!-- <view class="content">
<view class="featureContent">
<view class="nav_wrapper">
<view class="nav_content" v-for="featureItem in featureLists" :key="featureItem.key"
@click="featureSelect(featureItem)">
<view class="imgbox">
<view class="iconfont iconSize" :class="`${featureItem.icon}`"></view>
</view>
<view style="font-size: 26rpx;">{{featureItem.name}}</view>
</view>
</view>
</view>
</view> -->
<!-- <view class="course_content">
<view class="tag">
<h4>推荐产品</h4>
<view @click="goToCourselist()" style="font-size: 30rpx;">更多<text class="iconfont icon-youjiantou iconStyle"></text></view>
</view>
<view class="ulBox" v-if="cffpCourseInfos.length>0">
<view class="liBox" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)">
<course-item :thumbnailPath="item.displayImage" :title="item.fileTitle"
:summaryBox="item.fileSynopsis"
:dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}"
></course-item>
</view>
</view>
</view> -->
<!-- <view class="" style="text-align: center;color: #666666;font-size: 24rpx;margin-top: 20rpx;">
{{companyFullName}}提供
</view> -->
<!-- 使用封装后的弹窗组件 -->
<join-popup
ref="joinPopup"
@confirm="gotoApply"
></join-popup>
<!-- <tabBar :currentPage="currentPage"></tabBar> -->
</view>
<uni-popup ref="popup" type="top" background-color="#fff">
......@@ -180,9 +109,63 @@
</view>
</uni-popup>
<uni-popup ref="applyPopup" type="center" background-color="#fff">
<view class="applyBox">
<view style="text-align: right;" @click="$refs.applyPopup.close()">
<view class="iconfont icon-chahao" ></view>
</view>
<view class="applyCon">
<view style="text-align: center;" >
<view class="iconfont icon-dianzan" ></view>
</view>
<view class="title">
您已加盟为银盾家办合伙人
</view>
<view class="applycontent">
<view class="subtit">
晋升下一级目标
</view>
<view class="" v-if="partnerStatistic.reachPeopleNum>0">
<view class="">
<text class="iconfont icon-a-tuandui3 leftIcon" ></text>
<text>团队有效人数</text>
<text class="iconfont icon-weiwancheng rightIcon" ></text>
</view>
<view class="num">
<text >{{partnerStatistic.totalPeopleNum}} / {{partnerStatistic.reachPeopleNum}}</text>
<text v-if="partnerStatistic.peopleNum>0">(相差{{partnerStatistic.peopleNum}}人)</text>
</view>
</view>
<view class="">
<text class="iconfont icon-xiaoshoue leftIcon" ></text>
<text>个人标准销售累计金额</text>
<text class="iconfont icon-duihao2 rightIcon" ></text>
</view>
<view class="num">
<text >{{partnerStatistic.totalSingeSaleNum}}元 / {{partnerStatistic.reachSingeSaleNum}}</text>
</view>
<view class="" v-if="partnerStatistic.reachSaleNum>0">
<view class="">
<text class="iconfont icon-ddailirenshu leftIcon" ></text>
<text>团队标准销售累计金额</text>
<text class="iconfont icon-weiwancheng rightIcon" ></text>
</view>
<view class="num">
<text >{{partnerStatistic.totalSaleNum}}元 / {{partnerStatistic.reachSaleNum}}</text>
<text v-if="partnerStatistic.saleNum>0">(相差{{partnerStatistic.saleNum}}元)</text>
</view>
</view>
</view>
</view>
</view>
</uni-popup>
</template>
<script>
import dataHandling from "@/util/dataHandling";
import courselist from '@/pages/courselist/courselist.vue';
import api from "../../api/api";
import tabBar from '../../components/tabBar/tabBar.vue';
......@@ -190,10 +173,11 @@
import search from '@/components/search/search.vue';
import courseItem from "@/components/courseItem/courseItem.vue";
import {companyInfo} from "@/environments/environment";
import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
export default {
data() {
return {
partnerStatistic:{}, //申请加盟统计
showSearch: true,
searchQuery: '',
companyFullName : companyInfo.companyFullName,
......@@ -224,16 +208,11 @@
key: '02',
name: '申请加盟',
icon: 'icon-hezuo',
link: '/pages/application-process/basic-info',
isOpen: true
link: '/myPackageA/applyFranchise/applyFranchise',
isOpen: true,
isApply:true,
},
// {
// key: '03',
// name: '学习认证',
// icon: 'learningCertify',
// link: '/pages/learnCertify/learnCertify',
// isOpen: true
// },
{
key: '04',
name: '邀请加盟',
......@@ -242,27 +221,7 @@
isOpen: true,
isJoin: true
},
// {
// key: '05',
// name: '我的分享',
// icon: 'share',
// link: '/pages/myShare/myShare',
// isOpen: true
// },
// {
// key: '06',
// name: '我的团队',
// icon: 'team',
// link: '/pages/personalCenter/myTeam',
// isOpen: true
// },
// {
// key: '07',
// name: '更多功能',
// icon: 'more',
// link: '/pages/personalCenter/personalCenter',
// isOpen: true
// }
],
cffpUserInfo: {
address: '',
......@@ -281,6 +240,8 @@
kefu: '../../static/kefu.png',
loginornot: true,
queryName: '',
loginType : uni.getStorageSync('loginType'),
userInfo:{} //用户信息
}
},
components: {
......@@ -288,22 +249,27 @@
tabBar,
carousel,
search,
courseItem
courseItem,
JoinPopup
},
onShow() {
this.loginType = uni.getStorageSync('loginType')
this.init();
this.showSearch = false;
this.$nextTick(() => {
this.showSearch = true;
this.searchQuery = '';
});
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
if(uni.getStorageSync('cffp_userId')){
this.userInfo = uni.getStorageSync('cffp_userId')
}
},
onLoad(options) {
if(options.clearFlag){
uni.setStorageSync('loginType', 'visitor');
}
//如果用户在其他的地方快捷登录,没有返回到首页,执行此监听方法
uni.$on('loginUpdate',()=>{
......@@ -321,9 +287,56 @@
uni.$off('loginUpdate', this.queryAreaCenterInfo);
},
methods: {
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
}
})
},
getPartnerStatistic(){
if(this.userId){
api.partnerStatisticsGrade({userId:uni.getStorageSync('cffp_userId')}).then((res)=>{
if(res['success']){
this.partnerStatistic = res['data']
for (let key in this.partnerStatistic) {
if(key!='peopleNum' && key!='reachPeopleNum'&& key!='totalPeopleNum'){
if(key){
this.partnerStatistic[key] = this.partnerStatistic[key].toFixed(2)
}
}
}
this.$refs.applyPopup.open()
}else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
},
gotoApply(){
uni.navigateTo({
url: '/pages/application-process/basic-info'
dataHandling.pocessTracking(
'点击',
`用户点击了首页“去加盟为合伙人”弹窗按钮`,
'点击',
2,
'首页',
'pages/index/index'
)
uni.navigateTo({
url: '/myPackageA/applyFranchise/applyFranchise'
})
this.$refs.joinPopup.close()
......@@ -343,6 +356,7 @@
let loginType = uni.getStorageSync('loginType')
if(loginType == 'codelogin'){
this.querySystemMessage()
this.queryInfo()
}else {
uni.removeTabBarBadge({ index: 3 });
}
......@@ -387,7 +401,6 @@
return item.isRead == 0
})
if(total.length>0){
console.log('index',total.length);
uni.setTabBarBadge({
index: 3,
text: total.length.toString()
......@@ -402,14 +415,29 @@
});
},
goDetail(item) {
dataHandling.pocessTracking(
'点击',
`用户查看首页产品详情`,
'点击',
2,
'首页',
'pages/index/index'
)
uni.navigateTo({
url: `/pages/courseDetail/courseDetail?fileId=${item.fileId}`
url: `/pages/courseDetail/courseDetail?fileId=${item.fileId}&partnerType=${this.cffpUserInfo.partnerType}`
});
},
getCourseList(res){
console.log('res',res);
this.queryName = res;
this.queryName = res.trim();
this.courseList()
dataHandling.pocessTracking(
'搜索',
`用户搜索产品`,
'点击',
2,
'首页',
'pages/index/index'
)
},
courseList() {
const param = {
......@@ -439,17 +467,52 @@
// #endif
},
featureSelect(featureItem) {
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
if(featureItem.isApply && (!this.loginType||this.loginType=='visitor')){
dataHandling.pocessTracking(
'点击',
`用户未登录状态下在首页点击申请加盟`,
'点击',
2,
'首页',
'pages/index/index'
)
uni.navigateTo({
url: `${featureItem.link}`
});
return
}
if(featureItem.isApply&& this.userInfo.partnerType){
dataHandling.pocessTracking(
'点击',
`用户在首页点击申请加盟查看团队等级差`,
'点击',
2,
'首页',
'pages/index/index'
)
this.getPartnerStatistic()
return
}
if (this.loginornot == false && featureItem.name != "学习认证" && featureItem.name != "更多功能") {
uni.showToast({
title: "请登陆个人账户使用该功能",
duration: 2000,
icon: 'none'
});
dataHandling.pocessTracking(
'点击',
`用户在首页未登录时点击${featureItem.name}`,
'点击',
2,
'首页',
'pages/index/index'
)
uni.clearStorageSync();
uni.navigateTo({
url: '/components/login/login?from=index'
uni.setStorageSync('loginType','visitor');
uni.redirectTo({
url: '/myPackageA/login/login?from=index'
})
return false
return
}
if (featureItem.key == '02') {
if (this.cffpUserInfo.levelCode == 'C1' || this.cffpUserInfo.levelCode == 'C2' || this.cffpUserInfo
......@@ -462,9 +525,16 @@
return false
}
}
if (this.cffpUserInfo.partnerType == null && featureItem.isJoin) {
if ( this.userInfo.partnerType == null && featureItem.isJoin) {
dataHandling.pocessTracking(
'点击',
`用户在首页未加盟时点击${featureItem.name}`,
'点击',
2,
'首页',
'pages/index/index'
)
this.$refs.joinPopup.open()
return false
} else if (featureItem.isOpen && featureItem.link) {
if (featureItem.key == '07') {
......@@ -493,13 +563,8 @@
}).then((res) => {
if (res['success']) {
this.cffpUserInfo = res['data'];
// this.cffpUserInfo.logo = res['logo'];
uni.setStorageSync('fileUploadItemCFFPList', this.cffpUserInfo['fileUploadItemCFFPList'])
const cffp_userInfo = {
name: this.cffpUserInfo['userReName'],
mobile: this.cffpUserInfo['mobile']
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
}
})
},
......@@ -516,6 +581,14 @@
this.type = type;
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
this.$refs.popup.open(type)
dataHandling.pocessTracking(
'查看',
`用户查看了公司简介`,
'点击',
2,
'首页',
'pages/index/index'
)
},
jumpToAnnouncement() {
uni.navigateTo({
......@@ -523,6 +596,14 @@
})
},
goToCourselist() {
dataHandling.pocessTracking(
'点击',
`用户查看更多产品`,
'点击',
2,
'首页',
'pages/index/index'
)
uni.switchTab({
url: '../../pages/courselist/courselist'
})
......@@ -546,6 +627,7 @@
overflow-y: auto; /* 关键属性 */
-webkit-overflow-scrolling: touch; /* 优化移动端滚动 */
background-color: rgba(235, 239, 247, 1);
.homeHeader{
box-sizing: border-box;
width: 100%;
......@@ -947,6 +1029,59 @@
}
}
}
.applyBox{
width: 500rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
.icon-chahao{
color: #272536;
font-size: 28rpx;
}
.applyCon{
display: flex;
// align-items: center;
flex-direction: column;
.icon-dianzan{
color: #FF8D1A;
font-size: 60rpx;
}
.title{
font-size: 35rpx;
font-weight: 600;
margin: 20rpx 0;
}
.applycontent{
color: #20269B;
font-size: 28rpx;
.subtit{
font-size: 30rpx;
margin-bottom: 10rpx;
}
.num{
font-size: 26rpx;
color: #333333;
margin: 10rpx 0;
}
.leftIcon{
color: #20269B;
font-size: 26rpx;
margin-right: 5rpx;
}
.rightIcon{
margin-left: 5rpx;
font-size: 26rpx;
color: #F43530;
}
.icon-duihao2{
color: #41C740;
}
}
}
}
.descriptionBox {
width: 550rpx;
padding: 40rpx;
......
......@@ -94,12 +94,12 @@
})
}
}else{
common.errorDialog(2,'手机号校验错误')
common.errorDialog(2,'请填写手机号')
}
},
getFile(type){
uni.navigateTo({
url:`/components/clause/clause?type=${type}`
url:`/myPackageA/ruleAndContract/clause?type=${type}`
})
},
delayTime() {
......
......@@ -15,13 +15,13 @@
<view v-if="tabType===1">
<view class="ulBox">
<view class="liBox">
<text>姓名</text>
<text>昵称</text>
<text>
<input
v-model="dataForm.name"
class="uni-input"
maxlength="10"
placeholder="姓名"
placeholder="昵称"
/>
</text>
</view>
......@@ -151,6 +151,7 @@
</template>
<script>
import dataHandling from "@/util/dataHandling";
import api from "@/api/api"
import common from '../../common/common';
import {hshare } from '@/util/fiveshare';
......@@ -200,7 +201,7 @@
this.ydLogoShare = `${shareURL}/static/logo2.png`;
}
let dataForm = uni.getStorageSync('userinfodataForm')
this.realName = dataForm.realName;
this.realName = dataForm.realName || dataForm.nickName;
this.invitationCode = dataForm.invitationCode
if(!this.realName){
this.queryInfo();
......@@ -216,7 +217,7 @@
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if(res['success']){
uni.setStorageSync('userinfodataForm', res.data);
this.realName = res.data.realName;
this.realName = res.data.realName ||res.data.nickName ;
this.invitationCode = res.data.invitationCode;
}
})
......@@ -268,6 +269,7 @@
this.dataForm.partnerLevel = 'P1'
this.dataForm.hasCrossDistrict = this.isCross == true ? '1' : '0'
this.dataForm.userId = this.userId
this.dataForm.inviteUserId = this.userId
// this.dataForm.areaId = this.isCross == true ? null : this.queryList[this.index].areaId
// this.dataForm.areaName = this.isCross == false ? this.queryList[this.index].areaName : this.dataForm.areaName
this.dataForm.areaId = 1;
......@@ -280,11 +282,11 @@
});
return false
}
if(!common.nameValid(this.dataForm.name)){
uni.showToast({title: '请填写真实姓名',duration: 2000,icon: 'none'})
this.dataForm.name = ''
return
}
// if(!common.nameValid(this.dataForm.name)){
// uni.showToast({title: '请填写真实姓名',duration: 2000,icon: 'none'})
// this.dataForm.name = ''
// return
// }
if (common.mobileNoValid(this.dataForm.mobileNumber)) {
api.saveApplyInfo(this.dataForm).then(res => {
if (res['success']) {
......@@ -318,8 +320,8 @@
//desc: `我是家庭财务策划师${this.realName}正在使用银盾家办,点击即刻加入!`,
desc: `${this.realName}邀您加入【家庭财策师联盟】,资源+伙伴,共赢未来!`,
link: shareURL +
"/pages/invitationRegister/invitationRegister?shareId=" +
this.shareId + '&invitationCode=' + this.invitationCode, //分享链接
"/myPackageA/applyFranchise/applyFranchise?shareId=" +
this.shareId + '&invitationCode=' + this.invitationCode+ '&inviteUserId=' + this.userId, //分享链接
imgUrl: this.ydLogoShare, //图片
//imgUrl: `${baseURL}/static/cffp_logo.jpg`, //图片
}
......@@ -336,6 +338,14 @@
}
}
hshare(data, url)
dataHandling.pocessTracking(
'邀请',
`发出邀请`,
'点击',
2,
'邀请加盟',
'pages/inviteJoin/inviteJoin'
)
},
closeShare() {
this.$refs.share.close()
......@@ -355,11 +365,21 @@
if(!this.realName){
this.realName = ""
}
let typeName = type == 1?'微信好友':'朋友圈'
dataHandling.pocessTracking(
'邀请',
`向${typeName}发出邀请`,
'点击',
2,
'邀请加盟',
'pages/inviteJoin/inviteJoin'
)
uni.share({
provider: "weixin",
scene: type === 1 ? "WXSceneSession" : "WXSceneTimeline",
type: 0,
href: `${shareURL}/pages/invitationRegister/invitationRegister?shareId=${this.shareId}&invitationCode=${this.invitationCode}`,
href: `${shareURL}/myPackageA/applyFranchise/applyFranchise?shareId=${this.shareId}&invitationCode=${this.invitationCode}&inviteUserId=${this.userId}`,
// href: `${shareURL}/pages/invitationRegister/invitationRegister?shareId=${this.shareId}&invitationCode=${this.invitationCode}&inviteUserId=${this.userId}`,
title: "银盾家办家庭财务策划师联盟邀您加入",
//summary: `我是家庭财务策划师${this.realName}正在使用银盾家办,点击下载即刻加入!`,
summary: `${this.realName}邀您加入【家庭财策师联盟】,资源+伙伴,共赢未来!`,
......
......@@ -80,24 +80,12 @@
</view>
</view>
<uni-popup ref="joinPopup" type="center" background-color="#fff">
<view class="joinContent">
<view class="joinHeader">
<view class="iconfont icon-hezuo" style="font-size: 35rpx;color: #fff;"></view>
</view>
<view class="joinCon">
<view class="one">
您还未加盟为合伙人
</view>
<view class="two">
成为合伙人后,分享商品,好友购物得收益
</view>
</view>
<view class="joinFotter" @click="gotoApply">
去加盟拿收益
</view>
</view>
</uni-popup>
<!-- 使用封装后的弹窗组件 -->
<join-popup
ref="joinPopup"
@confirm="gotoApply"
></join-popup>
</view>
</template>
......@@ -106,13 +94,15 @@
import courseItem from "@/components/courseItem/courseItem.vue";
import dataHandling from "@/util/dataHandling";
import CommonTimePicker from '@/components/commonTimePicker/commonTimePicker.vue';
import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
import {
fmdata
} from '@/util/currentDate.js'
export default {
components: {
courseItem,
CommonTimePicker
CommonTimePicker,
JoinPopup
},
data() {
return {
......@@ -136,8 +126,16 @@
methods: {
// 去加盟
gotoApply(){
dataHandling.pocessTracking(
'加盟',
`点击加盟按钮去加盟`,
'点击',
2,
'分享数据',
'pages/myShare/myShare'
)
uni.navigateTo({
url: '/pages/application-process/basic-info'
url: '/myPackageA/applyFranchise/applyFranchise'
})
this.$refs.joinPopup.close()
......@@ -195,6 +193,15 @@
},
// 查看详情
goDetail(val, type) {
let typeName = type==1?'分享':type==2?"阅读":type==3?"购买":''
dataHandling.pocessTracking(
`${typeName}`,
`点击${typeName}按钮,查看${typeName}数据`,
'点击',
2,
'分享数据',
'pages/myShare/myShare'
)
uni.navigateTo({
url: `/pages/commonDetail/commonDetail?fileId=${val}&type=${type}&queryDate=${this.queryDate}`
})
......@@ -205,6 +212,14 @@
this.$refs.joinPopup.open()
return
}
dataHandling.pocessTracking(
'积分',
`点击积分查看佣金`,
'点击',
2,
'分享数据',
'pages/myShare/myShare'
)
uni.navigateTo({
url:`/pages/pointsExchange/pointsExchange`
})
......
......@@ -210,6 +210,14 @@
})
},
dropClasses() {
dataHandling.pocessTracking(
'退款',
`用户申请退款`,
'点击',
2,
'订单详情',
'pages/orderDetail/orderDetail'
)
uni.navigateTo({
url: `/pages/applyDropClass/applyDropClass?id=${this.orderId}&fileId=${this.fileId}`
})
......
......@@ -74,7 +74,7 @@
},
getFile(type){
uni.navigateTo({
url:`/components/clause/clause?type=${type}`
url:`/myPackageA/ruleAndContract/clause?type=${type}`
})
},
latestversion(){
......
......@@ -59,7 +59,7 @@
})
uni.removeStorageSync('isLogin')
uni.redirectTo({
url:'/components/login/login'
url:'/myPackageA/login/login'
})
//重置密码后需要密码登录
this.form = {
......
......@@ -300,6 +300,12 @@
this.totalOrder = res.data.totalOrder ? res.data.totalOrder : '0';
this.totalCoursePrice = res.data.totalCoursePrice ? Number(res.data.totalCoursePrice).toFixed(2) : '0.00';
this.monthStandardSales = res.data.monthStandardSales ? Number(res.data.monthStandardSales).toFixed(2) : '0.00';
}else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
......@@ -322,6 +328,12 @@
if(data.directList && data.directList.length != 0 && data.directList != null){
this.myTeamList.push( ...data['directList'])
}
}else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
......
......@@ -258,6 +258,12 @@
this.totalCoursePrice = res.data.totalCoursePrice ? Number(res.data.totalCoursePrice).toFixed(2) : '0.00';
this.monthStandardSales = res.data.monthStandardSales ? Number(res.data.monthStandardSales).toFixed(2) : '0.00';
}else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
......@@ -277,7 +283,12 @@
item.raiseTime = dataHandling.dateFormat2(item.raiseTime,'yyyy-MM-dd')
})
}
console.log('this.myTeamList',this.myTeamList);
}else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
......
......@@ -19,11 +19,6 @@
{{customerBasicInfo.partnerType}}
</view>
</view>
<!-- <view class="nickName">
<text v-if="loginornot && customerBasicInfo.nickName">昵称:{{customerBasicInfo.nickName}}</text>
<text v-if="!loginornot">昵称:游客</text>
</view> -->
</view>
</view>
......@@ -66,34 +61,76 @@
</view>
</view>
</view>
<uni-popup ref="joinPopup" type="center" background-color="#fff">
<view class="joinContent">
<view class="joinHeader">
<view class="iconfont icon-hezuo" style="font-size: 35rpx;color: #fff;"></view>
<!-- 使用封装后的弹窗组件 -->
<join-popup
ref="joinPopup"
@confirm="gotoApply"
></join-popup>
<uni-popup ref="applyPopup" type="center" background-color="#fff">
<view class="applyBox">
<view style="text-align: right;" @click="$refs.applyPopup.close()">
<view class="iconfont icon-chahao" ></view>
</view>
<view class="joinCon">
<view class="one">
您还未加盟为合伙人
<view class="applyCon">
<view style="text-align: center;" >
<view class="iconfont icon-dianzan" ></view>
</view>
<view class="two">
成为合伙人后,分享商品,好友购物得收益
<view class="title">
您已加盟为银盾家办合伙人
</view>
</view>
<view class="joinFotter" @click="gotoApply">
去加盟拿收益
<view class="applycontent">
<view class="subtit">
晋升下一级目标
</view>
<view class="" v-if="partnerStatistic.reachPeopleNum>0">
<view class="">
<text class="iconfont icon-a-tuandui3 leftIcon" ></text>
<text>团队有效人数</text>
<text class="iconfont icon-weiwancheng rightIcon" ></text>
</view>
<view class="num">
<text >{{partnerStatistic.totalPeopleNum}} / {{partnerStatistic.reachPeopleNum}}</text>
<text v-if="partnerStatistic.peopleNum>0">(相差{{partnerStatistic.peopleNum}}人)</text>
</view>
</view>
<view class="">
<text class="iconfont icon-xiaoshoue leftIcon" ></text>
<text>个人标准销售累计金额</text>
<text class="iconfont icon-duihao2 rightIcon" ></text>
</view>
<view class="num">
<text >{{partnerStatistic.totalSingeSaleNum}}元 / {{partnerStatistic.reachSingeSaleNum}}</text>
</view>
<view class="" v-if="partnerStatistic.reachSaleNum>0">
<view class="">
<text class="iconfont icon-ddailirenshu leftIcon" ></text>
<text>团队标准销售累计金额</text>
<text class="iconfont icon-weiwancheng rightIcon" ></text>
</view>
<view class="num">
<text >{{partnerStatistic.totalSaleNum}}元 / {{partnerStatistic.reachSaleNum}}</text>
<text v-if="partnerStatistic.saleNum>0">(相差{{partnerStatistic.saleNum}}元)</text>
</view>
</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import dataHandling from "@/util/dataHandling";
import common from "../../common/common";
import tabBar from '../../components/tabBar/tabBar.vue';
import api from "@/api/api";
import {companyInfo} from "@/environments/environment";
import FloatingButton from '@/components/FloatingButton/FloatingButton.vue';
import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
export default {
data() {
return {
......@@ -109,41 +146,7 @@
customerBasicInfo:{},
loginornot: true,
settingItem:{title:'系统设置',icon:'setting',link:'/pages/personalCenter/system/settings',isOpen:true,isShow:true},
// 原本的菜单数据项
// mainMenuLists:[
// {id:'00',categoryName:'销售管理',
// children:[
// {title:'销售中心',icon:'salesCourse',link:'/pages/saleCourseLists/saleCourseLists',isOpen:true,isShow:true},
// {title:'销售保单',icon:'salesOrder',link:'',isOpen:true,isShow:false},
// {title:'我的售后',icon:'afterSales',link:'/pages/afterSales/afterSales',isOpen:true,isShow:true}
// ],
// },
// {id:'01',categoryName:'积分管理',
// children:[
// {title:'我的积分',icon:'integral',link:'/pages/myPoints/myPoints',isOpen:true,isShow:true},
// {title:'积分兑换',icon:'integralShopping',link:'/pages/pointsExchange/pointsExchange',isOpen:true,isShow:true}
// ],
// },
// {id:'02',categoryName:'活动管理',
// children:[
// // {title:'我的学习',icon:'myLearning',link:'/pages/myLearning/myLearning',isOpen:true,isShow:true},
// // {title:'学习认证',icon:'learningCertify',link:'/pages/learnCertify/learnCertify',isOpen:true,isShow:true,islogin:true},
// {title:'我的分享',icon:'share',link:'/pages/myShare/myShare',isOpen:true,isShow:true}
// ],
// },
// {id:'03',categoryName:'人员管理',
// children:[
// {title:'成交客户',icon:'dealCustomer',link:'',isOpen:true,isShow:false},
// {title:'申请加盟',icon:'applyJoin',link:'/pages/application-process/basic-info',isOpen:true,isShow:true}
// ],
// },
// {id:'04',categoryName:'团队管理',
// children:[
// {title:'我的团队',icon:'team',link:'/pages/personalCenter/myTeam',isOpen:true,isShow:true},
// {title:'邀请加盟',icon:'shareJoin',link:'/pages/inviteJoin/inviteJoin',isOpen:true,isShow:true,identity: true}
// ],
// }
// ],
mainMenuLists:[
{id:'00',categoryName:'交易',
children:[
......@@ -155,7 +158,7 @@
},
{id:'01',categoryName:'团队',
children:[
{title:'申请加盟',icon:'icon-hezuo',link:'/pages/application-process/basic-info',isOpen:true,isShow:true},
{title:'申请加盟',icon:'icon-hezuo',link:'/myPackageA/applyFranchise/applyFranchise?',isOpen:true,isShow:true,isApply:true},
{title:'邀请加盟',icon:'icon-yaoqing',link:'/pages/inviteJoin/inviteJoin',isOpen:true,isShow:true,identity: true},
{title:'我的团队',icon:'icon-tuandui',link:'/pages/personalCenter/myTeam',isOpen:true,isShow:true,identity: true},
{title:'育成团队',icon:'icon-yuchengguanxi',link:'/pages/personalCenter/myTeamIncubate',isOpen:true,isShow:true,identity: true},
......@@ -175,12 +178,13 @@
{title:'申请修改公司周边',icon:'setting',link:'',isOpen:true,isShow:false},
{title:'我的消息',icon:'message',link:'/pages/systemMsg/system_msg',isOpen:true,isShow:true,islogin:true},
{title:'系统设置',icon:'setting',link:'/pages/personalCenter/system/settings',isOpen:true,isShow:true}
]
],
partnerStatistic:{} //申请加盟统计
}
},
components:{
tabBar,
JoinPopup
},
onShow() {
this.loginType = uni.getStorageSync('loginType')
......@@ -190,9 +194,9 @@
this.companyLogo='../../static/logo2.png';
}
if(this.loginType == "visitor" ){
if(!this.loginType|| this.loginType == "visitor"){
this.loginornot = false
this.messageInfo = []
}else{
this.loginornot = true;
}
......@@ -200,15 +204,18 @@
this.querySystemMessage()
this.queryInfo();
}else {
this.messageInfo = []
uni.removeTabBarBadge({ index: 3 });
this.msgTotal = 0
this.customerBasicInfo = {}
}
uni.$on("handClick", res => {
this.customerBasicInfo = res.data
if(this.customerBasicInfo?.realName && this.customerBasicInfo?.realName.length>5){
this.showMyName = this.customerBasicInfo?.realName.substring(0, 5) + '...'
let name = this.customerBasicInfo.realName || this.customerBasicInfo.nickName
if(name && name.length>5){
this.showMyName =name.substring(0, 5) + '...'
}else {
this.showMyName = this.customerBasicInfo.realName
this.showMyName = name
}
// 移除监听事件
uni.$off('handClick');
......@@ -216,9 +223,32 @@
},
methods: {
getPartnerStatistic(){
if(this.userId){
api.partnerStatisticsGrade({userId:uni.getStorageSync('cffp_userId')}).then((res)=>{
if(res['success']){
this.partnerStatistic = res['data']
for (let key in this.partnerStatistic) {
if(key!='peopleNum' && key!='reachPeopleNum'&& key!='totalPeopleNum'){
if(key){
this.partnerStatistic[key] = this.partnerStatistic[key].toFixed(2)
}
}
}
this.$refs.applyPopup.open()
}else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
},
gotoApply(){
uni.navigateTo({
url: '/pages/application-process/basic-info'
url: '/myPackageA/applyFranchise/applyFranchise'
})
this.$refs.joinPopup.close()
......@@ -248,40 +278,66 @@
}
},
jumpToSystemMsg(){
if(this.userId&& this.messageInfo.length>0){
uni.navigateTo({
url:'../systemMsg/system_msg'
})
}
dataHandling.pocessTracking(
'查看',
`用户查看个人消息`,
'点击',
2,
'我的',
'pages/personalCenter/personalCenter'
)
uni.navigateTo({
url:'../systemMsg/system_msg'
})
// if(this.userId&& this.messageInfo.length>0){
// uni.navigateTo({
// url:'../systemMsg/system_msg'
// })
// }
},
close(){
this.bootpage = false
},
isLogin(){
uni.showToast({
title: "请登陆个人账户使用该功能",
duration: 2000,
icon: 'none'
});
// uni.redirectTo({
// url:'/components/login/login?from=personalCenter'
// })
uni.redirectTo({
url: '/components/login/login?from=personalCenter'
uni.navigateTo({
url: '/myPackageA/login/login?from=personalCenter'
})
try {
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
} catch (e) {
// console.log(e)
// error
}
return false
},
// 菜单跳转页面
goDetail(item){
if(item.isApply&&(!uni.getStorageSync('loginType')||uni.getStorageSync('loginType')=='visitor')){
dataHandling.pocessTracking(
'申请加盟',
`用户在未登录时点击了申请加盟`,
'点击',
2,
'我的',
'pages/personalCenter/personalCenter'
)
uni.navigateTo({
url: `${item.link}`
});
return
}
if(item.kefu){
// 现在还没转化成小程序,暂时放在这
// #ifdef MP-WEIXIN
dataHandling.pocessTracking(
'咨询客服',
`用户咨询客服`,
'点击',
2,
'我的',
'pages/personalCenter/personalCenter'
)
uni.openCustomerServiceChat({
extInfo: {
url: 'https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e'
......@@ -294,12 +350,43 @@
});
// #endif
// #ifndef MP-WEIXIN
dataHandling.pocessTracking(
'咨询客服',
`用户咨询客服`,
'点击',
2,
'我的',
'pages/personalCenter/personalCenter'
)
window.open('https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e')
// #endif
return
}
if(item.isApply&&this.customerBasicInfo.partnerType){
dataHandling.pocessTracking(
'申请加盟',
`用户已成为合伙人查看了团队统计差`,
'点击',
2,
'我的',
'pages/personalCenter/personalCenter'
)
this.getPartnerStatistic()
return
}
// 说明不需要登录就可以进
if(item.isLogin){
dataHandling.pocessTracking(
'查看',
`用户点击了${item.title}模块`,
'点击',
2,
'我的',
'pages/personalCenter/personalCenter'
)
uni.navigateTo({
url: `${item.link}`
});
......@@ -321,6 +408,14 @@
},
ckidentity(item){
if(item.identity == true && this.customerBasicInfo.partnerType ==null){
dataHandling.pocessTracking(
'查看',
`用户在未加盟时点击了${item.title}模块`,
'点击',
2,
'我的',
'pages/personalCenter/personalCenter'
)
this.$refs.joinPopup.open()
return false
}else if(item.title == '邀请加盟'){
......@@ -345,17 +440,20 @@
userinfo(){
if(this.loginornot === true){
dataHandling.pocessTracking(
'个人信息',
`用户在我的点击个人资料`,
'点击',
2,
'我的',
'pages/personalCenter/personalCenter'
)
uni.navigateTo({
url:`/pages/personalCenter/user-information?customerBasicInfo=` + JSON.stringify(this.customerBasicInfo)
})
}else {
this.isLogin()
// uni.showToast({
// title: "游客不可进行修改",
// duration: 2000,
// icon: 'none'
// });
// return false
}
},
// 弹窗
......@@ -379,10 +477,12 @@
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if(res['success']){
this.customerBasicInfo = res['data'];
if(this.customerBasicInfo?.realName && this.customerBasicInfo?.realName.length>5){
this.showMyName = this.customerBasicInfo?.realName.substring(0, 5) + '...'
let name = this.customerBasicInfo.realName || this.customerBasicInfo.nickName
console.log('name',name);
if(name && name.length>5){
this.showMyName = name.substring(0, 5) + '...'
}else {
this.showMyName = this.customerBasicInfo.realName
this.showMyName = name
}
this.inviteEqrode = this.customerBasicInfo.invitationCode;
......@@ -390,10 +490,6 @@
uni.setStorageSync('userinfodataForm', res.data)
}else {
// uni.showToast({
// title: res['message'],
// duration: 2000
// });
// 清空全部本地存储
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor')
......@@ -405,11 +501,8 @@
})
}
},
onLoad() {
},
mounted() {
}
}
</script>
......@@ -584,7 +677,6 @@
}
.joinContent{
width: 500rpx;
// height: 300rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
......@@ -618,6 +710,15 @@
margin-bottom: 20rpx;
}
}
.desBox{
display: flex;
flex-direction: column;
margin-bottom: 20rpx;
view{
font-size: 28rpx;
margin-bottom: 10rpx;
}
}
.joinFotter{
width: 100%;
color: #fff;
......@@ -631,6 +732,59 @@
font-size: 28rpx;
}
}
.applyBox{
width: 500rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
.icon-chahao{
color: #272536;
font-size: 28rpx;
}
.applyCon{
display: flex;
// align-items: center;
flex-direction: column;
.icon-dianzan{
color: #FF8D1A;
font-size: 60rpx;
}
.title{
font-size: 35rpx;
font-weight: 600;
margin: 20rpx 0;
}
.applycontent{
color: #20269B;
font-size: 28rpx;
.subtit{
font-size: 30rpx;
margin-bottom: 10rpx;
}
.num{
font-size: 26rpx;
color: #333333;
margin: 10rpx 0;
}
.leftIcon{
color: #20269B;
font-size: 26rpx;
margin-right: 5rpx;
}
.rightIcon{
margin-left: 5rpx;
font-size: 26rpx;
color: #F43530;
}
.icon-duihao2{
color: #41C740;
}
}
}
}
}
</style>
......@@ -44,7 +44,7 @@
{
title: '注销账号',
icon: '',
link: '/pages/personalCenter/system/cancellation',
link: '/myPackageA/setting/logOff',
isOpen: true,
isShow: true,
isTips: false,
......
......@@ -68,8 +68,9 @@
});
// 清空全部本地存储
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
uni.redirectTo({
url:'/components/login/login?from=index'
url:'/myPackageA/login/login?from=index'
})
}
})
......
......@@ -20,6 +20,7 @@
<script>
import MenuList from "@/components/menuList/menuList.vue"
import {companyInfo} from "@/environments/environment";
import dataHandling from "@/util/dataHandling";
export default {
components:{ MenuList },
data() {
......@@ -68,11 +69,20 @@
showCancel: true,
success: function(res) {
if (res.confirm) {
dataHandling.pocessTracking(
'退出登录',
`用户退出系统`,
'点击',
2,
'设置',
'pages/personalCenter/system/settings'
)
uni.redirectTo({
url:'/components/login/login'
url:'/myPackageA/login/login'
})
try {
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor');
} catch (e) {
console.log(e)
// error
......
......@@ -14,7 +14,7 @@
</view> -->
<view class="band">
<view class="contentItem">
<text class="left">真实名称</text>
<text class="left">姓名</text>
<input
class="user-input"
v-model="optionForm.realName"
......@@ -27,7 +27,7 @@
<view class="contentItem">
<text class="left">昵称</text>
<input class="user-input" v-model="optionForm.nickName" maxlength="10" type="text"
placeholder="请输入3~10个字符" />
placeholder="请输入2~10个字符" />
</view>
<!-- <view class="contentItem">
<text>个人简介</text>
......@@ -49,6 +49,7 @@
import api from "@/api/api";
import common from '../../common/common';
import {companyInfo} from "@/environments/environment";
import dataHandling from "@/util/dataHandling";
export default {
data() {
return {
......@@ -174,6 +175,10 @@
let that = this;
uni.showToast({title: '请填写真实姓名',duration: 2000,icon: 'none'});
this.optionForm.realName = ''
return
}else if (this.optionForm.nickName&&this.optionForm.nickName.length<2) {
uni.showToast({title: '昵称为2~10个字符',duration: 2000,icon: 'none'});
return
}else{
this.saveUserInfo();
}
......@@ -189,6 +194,14 @@
api.updateinfo(UserRequestVO).then(res => {
if (res.success) {
uni.showToast({title: '修改成功',duration: 2000,icon: 'none'});
dataHandling.pocessTracking(
'个人资料',
`成功修改个人资料`,
'点击',
2,
'个人资料',
'pages/personalCenter/user-information'
)
uni.$emit("handClick", {data: this.optionForm});
setTimeout(() => {
uni.navigateBack({delta: 1});
......
......@@ -142,7 +142,7 @@
returnFortune:'',
totalFortune:'',
scoreList:[
{name:'总积分',value:'0.00',id:'1',position:'bottom',content:'包含已兑换+待结算+兑换中的积分'},
{name:'总积分',value:'0.00',id:'1',position:'bottom',content:'包含已兑换+待结算+可兑换+兑换中的积分'},
{name:'已兑换',value:'0.00',id:'2',position:'bottom',content:'已经提取入账的积分'},
{name:'待结算',value:'0.00',id:'3',position:'left',content:'订单成交后需等待7天结算期'},
{name:'兑换中',value:'0.00',id:'4',position:'left',content:'正在审核中的积分'},
......@@ -176,13 +176,25 @@
},
components:{CustomDatePop},
onLoad(){
},
onShow(){
this.queryByUserIdFortuneStatistic();
this.getCommissionType()
this.getDetail()
console.log(11111);
},
methods:{
// 查看订单详情
viewDetail(item){
dataHandling.pocessTracking(
'查看订单详情',
`点击查看订单详情`,
'点击',
2,
'佣金',
'pages/pointsExchange/pointsExchange'
)
uni.navigateTo({
url:`/pages/orderDetail/orderDetail?id=${item.orderId}&commissionType=${item.commissionType}&type=drop`
})
......@@ -282,17 +294,7 @@
if(res['success']){
// //可兑换
this.yesExchangeFortune = res['data']['yesExchangeFortune'] || '0.00';
console.log('this.yesExchangeFortune',this.yesExchangeFortune);
// //待结算
// this.notExchangeFortune = res['data']['notExchangeFortune'];
// //兑换中
// this.inExchangeFortune = res['data']['inExchangeFortune'];
// //已兑换
// this.alreadyExchangeFortune = res['data']['alreadyExchangeFortune'];
// //已退款
// this.returnFortune = res['data']['returnFortune'];
// //总积分
// this.totalFortune = res['data']['totalFortune'];
//总积分
this.scoreList[0].value = res['data']['totalFortune'] || '0.00';
//兑换中
......@@ -318,8 +320,19 @@
}
});
}else{
// uni.navigateTo({
// url:`/pages/withdrawal/withdrawal?exchangeAmount=${this.yesExchangeFortune}`
// })
dataHandling.pocessTracking(
'提现',
`点击提现按钮`,
'点击',
2,
'佣金',
'pages/pointsExchange/pointsExchange'
)
uni.navigateTo({
url:`/pages/withdrawal/withdrawal?exchangeAmount=${this.yesExchangeFortune}`
url:`/myPackageA/integralExchange/exchange`
})
}
},
......
......@@ -23,32 +23,12 @@
</view>
</view>
<!-- <view class="header">
<view class="" style="width: 60rpx;height: 60rpx;">
<image style="width: 60rpx;height: 60rpx;" src="../../static/tabbar/sfp_active.png" mode=""></image>
</view>
<text>SFP</text>
</view> -->
<!-- <view class="content-box">
<view class="content" v-for="(item,index) in remList" :key="index" style="width: 50%;justify-content: center;">
<view class="">
<view class="content-box-item" @click="gotobach(item)">
<view class="" style="width: 60rpx;height: 60rpx;text-align: center;padding-bottom: 10rpx;">
<image style="width: 60rpx;height: 60rpx;" :src="item.icon" mode=""></image>
</view>
<text>{{item.text}}</text>
</view>
</view>
</view>
</view> -->
<!-- <tabBar :currentPage="currentPage" ></tabBar> -->
</view>
</template>
<script>
import dataHandling from "@/util/dataHandling";
import tabBar from '../../components/tabBar/tabBar.vue';
import courseItem from "@/components/courseItem/courseItem.vue";
export default {
......@@ -92,19 +72,6 @@
}
},
methods:{
gotobach(item){
if(item.link == ''){
uni.showToast({
title: '此功能暂未开放!',
duration: 2000,
icon: 'none'
});
return false
}
uni.navigateTo({
url:item.link
})
},
goDetail(item) {
if (item.isShow == true && item.isOpen == true) {
if (item.isTips == true) {
......@@ -124,6 +91,14 @@
}
});
} else if (item.link != null) {
dataHandling.pocessTracking(
'点击',
`用户在金融工具模块点击${item.title}`,
'点击',
2,
'金融工具模块',
'pages/product/product'
)
uni.navigateTo({
url: item.link
});
......
<template>
<view class="container">
<view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text style="font-size: 30rpx;">到账说明</text>
</view>
<!-- #ifdef APP -->
<view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text style="font-size: 30rpx;">到账说明</text>
</view>
<!-- #endif -->
<view class="returnDetailContainer">
<h4>根据交易方式不同,退款处理时间不同,请在对应的时间内注意查看到账情况:</h4>
<view class="returnInfoContent">
......@@ -77,6 +80,7 @@
}
}
.returnDetailContainer{
background-color: #fff;
padding: 20rpx 40rpx;
margin: 10rpx auto;
......
......@@ -90,24 +90,12 @@
</view>
</template>
</view>
<uni-popup ref="joinPopup" type="center" background-color="#fff">
<view class="joinContent">
<view class="joinHeader">
<view class="iconfont icon-hezuo" style="font-size: 35rpx;color: #fff;"></view>
</view>
<view class="joinCon">
<view class="one">
您还未加盟为合伙人
</view>
<view class="two">
成为合伙人后,分享商品,好友购物得收益
</view>
</view>
<view class="joinFotter" @click="gotoApply">
去加盟拿收益
</view>
</view>
</uni-popup>
<!-- 使用封装后的弹窗组件 -->
<join-popup
ref="joinPopup"
@confirm="gotoApply"
></join-popup>
</view>
</template>
......@@ -117,10 +105,12 @@
import {fmdata} from '@/util/currentDate.js'
import CommonTimePicker from '@/components/commonTimePicker/commonTimePicker.vue';
import dataHandling from "@/util/dataHandling";
import JoinPopup from '@/components/commonPopup/JoinPopup.vue';
export default {
components:{
courseItem,
CommonTimePicker
CommonTimePicker,
JoinPopup
},
data() {
return {
......@@ -141,8 +131,16 @@
methods: {
// 去加盟
gotoApply(){
dataHandling.pocessTracking(
'加盟',
`点击加盟按钮去加盟`,
'点击',
2,
'成交单数',
'pages/saleCourseLists/saleCourseLists'
)
uni.navigateTo({
url: '/pages/application-process/basic-info'
url: '/myPackageA/applyFranchise/applyFranchise'
})
this.$refs.joinPopup.close()
......@@ -160,6 +158,14 @@
});
},
curriculumDetail(item){
dataHandling.pocessTracking(
'查看产品详情',
`点击产品,查看${item.fileTitle}详情`,
'点击',
2,
'成交单数',
'pages/saleCourseLists/saleCourseLists'
)
uni.navigateTo({
url:`/pages/courseDetail/courseDetail?fileId=${item.fileId}`
})
......@@ -167,6 +173,14 @@
// 查看订单详情
viewDetail(item){
let type = this.tabType == 1 ? 'drop': ''
dataHandling.pocessTracking(
'查看订单详情',
`点击订单详情,查看订单`,
'点击',
2,
'成交单数',
'pages/saleCourseLists/saleCourseLists'
)
uni.navigateTo({
url:`/pages/orderDetail/orderDetail?id=${item.orderId}&type=${type}&Withdrawal=1`
})
......@@ -216,6 +230,14 @@
this.$refs.joinPopup.open()
return
}
dataHandling.pocessTracking(
'积分/单数',
`点击积分/单数查看佣金`,
'点击',
2,
'成交单数',
'pages/saleCourseLists/saleCourseLists'
)
uni.navigateTo({
url:`/pages/pointsExchange/pointsExchange`
})
......
......@@ -38,7 +38,7 @@
</view>
</view>
<!-- <view class="paymentItem" @click="selectPaymentMethod(1)">
<view class="paymentItem" @click="selectPaymentMethod(1)">
<view>
<i class="iconfont icon-py_weixinzhifu"></i>
<text>微信钱包</text>
......@@ -46,7 +46,7 @@
<view class="selectRadio" :class="{'actived':paymentMethod===1}">
<i class="iconfont icon-duihao"></i>
</view>
</view> -->
</view>
<view class="tips_wrapper">
<view class="">
提示:
......@@ -307,13 +307,6 @@
}else{
uni.showModal({
content: res['message'],
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
......
......@@ -55,6 +55,114 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe300;</span>
<div class="name">icon_对号-面</div>
<div class="code-name">&amp;#xe300;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe229;</span>
<div class="name">感叹号</div>
<div class="code-name">&amp;#xe229;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe228;</span>
<div class="name">对号</div>
<div class="code-name">&amp;#xe228;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe226;</span>
<div class="name">微信</div>
<div class="code-name">&amp;#xe226;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe227;</span>
<div class="name">支付宝</div>
<div class="code-name">&amp;#xe227;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe663;</span>
<div class="name">未完成</div>
<div class="code-name">&amp;#xe663;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe9dc;</span>
<div class="name">销售额</div>
<div class="code-name">&amp;#xe9dc;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe128;</span>
<div class="name"></div>
<div class="code-name">&amp;#xe128;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe127;</span>
<div class="name">转发</div>
<div class="code-name">&amp;#xe127;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe126;</span>
<div class="name">垃圾桶</div>
<div class="code-name">&amp;#xe126;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe125;</span>
<div class="name">叉号</div>
<div class="code-name">&amp;#xe125;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe118;</span>
<div class="name">d代理人数</div>
<div class="code-name">&amp;#xe118;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe119;</span>
<div class="name">感叹号</div>
<div class="code-name">&amp;#xe119;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe120;</span>
<div class="name">点赞 (2)</div>
<div class="code-name">&amp;#xe120;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe121;</span>
<div class="name">对号</div>
<div class="code-name">&amp;#xe121;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe123;</span>
<div class="name">团队 (3)</div>
<div class="code-name">&amp;#xe123;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe124;</span>
<div class="name">感叹号</div>
<div class="code-name">&amp;#xe124;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe639;</span>
<div class="name">工具箱</div>
<div class="code-name">&amp;#xe639;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe117;</span>
<div class="name">育成关系</div>
<div class="code-name">&amp;#xe117;</div>
......@@ -67,12 +175,6 @@
</li>
<li class="dib">
<span class="icon iconfont">&#xe116;</span>
<div class="name">客服</div>
<div class="code-name">&amp;#xe116;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xecc0;</span>
<div class="name">双右箭头</div>
<div class="code-name">&amp;#xecc0;</div>
......@@ -193,9 +295,9 @@
</li>
<li class="dib">
<span class="icon iconfont">&#xe602;</span>
<span class="icon iconfont">&#xe225;</span>
<div class="name">箭头 左 小</div>
<div class="code-name">&amp;#xe602;</div>
<div class="code-name">&amp;#xe225;</div>
</li>
<li class="dib">
......@@ -282,9 +384,9 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1750822970160') format('woff2'),
url('iconfont.woff?t=1750822970160') format('woff'),
url('iconfont.ttf?t=1750822970160') format('truetype');
src: url('iconfont.woff2?t=1751592106397') format('woff2'),
url('iconfont.woff?t=1751592106397') format('woff'),
url('iconfont.ttf?t=1751592106397') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
......@@ -311,29 +413,182 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-yuchengguanxi"></span>
<span class="icon iconfont icon-icon_duihao-mian"></span>
<div class="name">
育成关系
icon_对号-面
</div>
<div class="code-name">.icon-yuchengguanxi
<div class="code-name">.icon-icon_duihao-mian
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-kefu1"></span>
<span class="icon iconfont icon-redgantanhao"></span>
<div class="name">
客服
感叹号
</div>
<div class="code-name">.icon-kefu1
<div class="code-name">.icon-redgantanhao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-circleDuiHao"></span>
<div class="name">
对号
</div>
<div class="code-name">.icon-circleDuiHao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-weixin"></span>
<div class="name">
微信
</div>
<div class="code-name">.icon-weixin
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-zhifubao2"></span>
<div class="name">
支付宝
</div>
<div class="code-name">.icon-zhifubao2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-weiwancheng"></span>
<div class="name">
未完成
</div>
<div class="code-name">.icon-weiwancheng
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-kefu"></span>
<span class="icon iconfont icon-xiaoshoue"></span>
<div class="name">
销售额
</div>
<div class="code-name">.icon-xiaoshoue
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jia"></span>
<div class="name">
</div>
<div class="code-name">.icon-jia
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-zhuanfa"></span>
<div class="name">
转发
</div>
<div class="code-name">.icon-zhuanfa
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-lajitong"></span>
<div class="name">
垃圾桶
</div>
<div class="code-name">.icon-lajitong
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-chahao"></span>
<div class="name">
叉号
</div>
<div class="code-name">.icon-chahao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-ddailirenshu"></span>
<div class="name">
d代理人数
</div>
<div class="code-name">.icon-ddailirenshu
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-point"></span>
<div class="name">
感叹号
</div>
<div class="code-name">.icon-point
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-dianzan"></span>
<div class="name">
点赞 (2)
</div>
<div class="code-name">.icon-dianzan
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-duihao2"></span>
<div class="name">
对号
</div>
<div class="code-name">.icon-duihao2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-a-tuandui3"></span>
<div class="name">
团队 (3)
</div>
<div class="code-name">.icon-a-tuandui3
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-exclamation"></span>
<div class="name">
感叹号
</div>
<div class="code-name">.icon-exclamation
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-gongjuxiang1"></span>
<div class="name">
工具箱
</div>
<div class="code-name">.icon-gongjuxiang1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-yuchengguanxi"></span>
<div class="name">
育成关系
</div>
<div class="code-name">.icon-yuchengguanxi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-kefu1"></span>
<div class="name">
客服
</div>
<div class="code-name">.icon-kefu
<div class="code-name">.icon-kefu1
</div>
</li>
......@@ -654,26 +909,162 @@
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-yuchengguanxi"></use>
<use xlink:href="#icon-icon_duihao-mian"></use>
</svg>
<div class="name">育成关系</div>
<div class="code-name">#icon-yuchengguanxi</div>
<div class="name">icon_对号-面</div>
<div class="code-name">#icon-icon_duihao-mian</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-kefu1"></use>
<use xlink:href="#icon-redgantanhao"></use>
</svg>
<div class="name">客服</div>
<div class="code-name">#icon-kefu1</div>
<div class="name">感叹号</div>
<div class="code-name">#icon-redgantanhao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-kefu"></use>
<use xlink:href="#icon-circleDuiHao"></use>
</svg>
<div class="name">对号</div>
<div class="code-name">#icon-circleDuiHao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-weixin"></use>
</svg>
<div class="name">微信</div>
<div class="code-name">#icon-weixin</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-zhifubao2"></use>
</svg>
<div class="name">支付宝</div>
<div class="code-name">#icon-zhifubao2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-weiwancheng"></use>
</svg>
<div class="name">未完成</div>
<div class="code-name">#icon-weiwancheng</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xiaoshoue"></use>
</svg>
<div class="name">销售额</div>
<div class="code-name">#icon-xiaoshoue</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jia"></use>
</svg>
<div class="name"></div>
<div class="code-name">#icon-jia</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-zhuanfa"></use>
</svg>
<div class="name">转发</div>
<div class="code-name">#icon-zhuanfa</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-lajitong"></use>
</svg>
<div class="name">垃圾桶</div>
<div class="code-name">#icon-lajitong</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-chahao"></use>
</svg>
<div class="name">叉号</div>
<div class="code-name">#icon-chahao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-ddailirenshu"></use>
</svg>
<div class="name">d代理人数</div>
<div class="code-name">#icon-ddailirenshu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-point"></use>
</svg>
<div class="name">感叹号</div>
<div class="code-name">#icon-point</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-dianzan"></use>
</svg>
<div class="name">点赞 (2)</div>
<div class="code-name">#icon-dianzan</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-duihao2"></use>
</svg>
<div class="name">对号</div>
<div class="code-name">#icon-duihao2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-a-tuandui3"></use>
</svg>
<div class="name">团队 (3)</div>
<div class="code-name">#icon-a-tuandui3</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-exclamation"></use>
</svg>
<div class="name">感叹号</div>
<div class="code-name">#icon-exclamation</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-gongjuxiang1"></use>
</svg>
<div class="name">工具箱</div>
<div class="code-name">#icon-gongjuxiang1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-yuchengguanxi"></use>
</svg>
<div class="name">育成关系</div>
<div class="code-name">#icon-yuchengguanxi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-kefu1"></use>
</svg>
<div class="name">客服</div>
<div class="code-name">#icon-kefu</div>
<div class="code-name">#icon-kefu1</div>
</li>
<li class="dib">
......
@font-face {
font-family: "iconfont"; /* Project id 4933433 */
src: url('iconfont.woff2?t=1750822970160') format('woff2'),
url('iconfont.woff?t=1750822970160') format('woff'),
url('iconfont.ttf?t=1750822970160') format('truetype');
src: url('iconfont.woff2?t=1751592106397') format('woff2'),
url('iconfont.woff?t=1751592106397') format('woff'),
url('iconfont.ttf?t=1751592106397') format('truetype');
}
.iconfont {
......@@ -13,6 +13,78 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-icon_duihao-mian:before {
content: "\e300";
}
.icon-redgantanhao:before {
content: "\e229";
}
.icon-circleDuiHao:before {
content: "\e228";
}
.icon-weixin:before {
content: "\e226";
}
.icon-zhifubao2:before {
content: "\e227";
}
.icon-weiwancheng:before {
content: "\e663";
}
.icon-xiaoshoue:before {
content: "\e9dc";
}
.icon-jia:before {
content: "\e128";
}
.icon-zhuanfa:before {
content: "\e127";
}
.icon-lajitong:before {
content: "\e126";
}
.icon-chahao:before {
content: "\e125";
}
.icon-ddailirenshu:before {
content: "\e118";
}
.icon-point:before {
content: "\e119";
}
.icon-dianzan:before {
content: "\e120";
}
.icon-duihao2:before {
content: "\e121";
}
.icon-a-tuandui3:before {
content: "\e123";
}
.icon-exclamation:before {
content: "\e124";
}
.icon-gongjuxiang1:before {
content: "\e639";
}
.icon-yuchengguanxi:before {
content: "\e117";
}
......@@ -21,10 +93,6 @@
content: "\e645";
}
.icon-kefu:before {
content: "\e116";
}
.icon-shuangyoujiantou:before {
content: "\ecc0";
}
......@@ -106,7 +174,7 @@
}
.icon-jiantou2:before {
content: "\e602";
content: "\e225";
}
.icon-hezuo:before {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,6 +6,132 @@
"description": "",
"glyphs": [
{
"icon_id": "4735289",
"name": "icon_对号-面",
"font_class": "icon_duihao-mian",
"unicode": "e300",
"unicode_decimal": 58112
},
{
"icon_id": "9974757",
"name": "感叹号",
"font_class": "redgantanhao",
"unicode": "e229",
"unicode_decimal": 57897
},
{
"icon_id": "15346589",
"name": "对号",
"font_class": "circleDuiHao",
"unicode": "e228",
"unicode_decimal": 57896
},
{
"icon_id": "925499",
"name": "微信",
"font_class": "weixin",
"unicode": "e226",
"unicode_decimal": 57894
},
{
"icon_id": "8875680",
"name": "支付宝",
"font_class": "zhifubao2",
"unicode": "e227",
"unicode_decimal": 57895
},
{
"icon_id": "5306518",
"name": "未完成",
"font_class": "weiwancheng",
"unicode": "e663",
"unicode_decimal": 58979
},
{
"icon_id": "21528511",
"name": "销售额",
"font_class": "xiaoshoue",
"unicode": "e9dc",
"unicode_decimal": 59868
},
{
"icon_id": "1302",
"name": "加",
"font_class": "jia",
"unicode": "e128",
"unicode_decimal": 57640
},
{
"icon_id": "13569992",
"name": "转发",
"font_class": "zhuanfa",
"unicode": "e127",
"unicode_decimal": 57639
},
{
"icon_id": "19117427",
"name": "垃圾桶",
"font_class": "lajitong",
"unicode": "e126",
"unicode_decimal": 57638
},
{
"icon_id": "6536737",
"name": "叉号",
"font_class": "chahao",
"unicode": "e125",
"unicode_decimal": 57637
},
{
"icon_id": "1320017",
"name": "d代理人数",
"font_class": "ddailirenshu",
"unicode": "e118",
"unicode_decimal": 57624
},
{
"icon_id": "3526773",
"name": "感叹号",
"font_class": "point",
"unicode": "e119",
"unicode_decimal": 57625
},
{
"icon_id": "6737518",
"name": "点赞 (2)",
"font_class": "dianzan",
"unicode": "e120",
"unicode_decimal": 57632
},
{
"icon_id": "16270796",
"name": "对号",
"font_class": "duihao2",
"unicode": "e121",
"unicode_decimal": 57633
},
{
"icon_id": "35566568",
"name": "团队 (3)",
"font_class": "a-tuandui3",
"unicode": "e123",
"unicode_decimal": 57635
},
{
"icon_id": "25017368",
"name": "感叹号",
"font_class": "exclamation",
"unicode": "e124",
"unicode_decimal": 57636
},
{
"icon_id": "6193800",
"name": "工具箱",
"font_class": "gongjuxiang1",
"unicode": "e639",
"unicode_decimal": 58937
},
{
"icon_id": "6835940",
"name": "育成关系",
"font_class": "yuchengguanxi",
......@@ -20,13 +146,6 @@
"unicode_decimal": 58949
},
{
"icon_id": "518189",
"name": "客服",
"font_class": "kefu",
"unicode": "e116",
"unicode_decimal": 57622
},
{
"icon_id": "6999657",
"name": "双右箭头",
"font_class": "shuangyoujiantou",
......@@ -170,8 +289,8 @@
"icon_id": "15852687",
"name": "箭头 左 小",
"font_class": "jiantou2",
"unicode": "e602",
"unicode_decimal": 58882
"unicode": "e225",
"unicode_decimal": 57893
},
{
"icon_id": "649319",
......
// utils/crypto.js
import CryptoJS from 'crypto-js'
/**
* 生成SHA-256签名
* @param {string} userId 用户ID
* @param {string|number} timestamp 时间戳
* @param {string} signatureSecret 签名密钥
* @returns {string} SHA-256加密后的16进制字符串
*/
export function generateSignature(userId, timestamp, signatureSecret) {
// 拼接需要加密的字符串
const content = `${userId}${timestamp}${signatureSecret}`
// 使用SHA-256加密
const hash = CryptoJS.SHA256(content)
// 转换为16进制字符串
return hash.toString(CryptoJS.enc.Hex)
}
\ No newline at end of file
import dayjs from 'dayjs';
import api from '@/api/api'
export default{
// 获取url的参数
getQueryString(name){
......@@ -206,6 +207,8 @@ export default{
return 'unknown';
}
},
/**
* 判断当前运行环境
* @returns {Object} 包含环境信息的对象
......@@ -272,5 +275,93 @@ export default{
// 原始系统信息
systemInfo,
}
}
},
/**
* @function 记录用户操作轨迹
* @param familyMemberId 客户ID
* @param eventName 事件名称
* @param eventDesc 事件说明
* @param triggerCondi 触发条件
* @param modelType 模块
* @param modelPage 模块页面
* @param pageUrl 当前页面
*/
pocessTracking(
// familyMemberId = '',
eventName = '',
eventDesc = '',
triggerCondi = '',
isScreenshots = '',
modelType = '',
modelPage = '',
pageUrl = ''
) {
// console.log('eventName',eventName);
// console.log('eventDesc',eventDesc);
// console.log('triggerCondi',triggerCondi);
// console.log('isScreenshots',isScreenshots);
// console.log('modelType',modelType);
// console.log('modelPage',modelPage);
// console.log('pageUrl',pageUrl);
// 0:登录, 1.购买页面, 2.KYC客户采集页面
//获取系统信息
let uniPlatform = uni.getSystemInfoSync()
//获取当前路由信息
let pages = getCurrentPages()
uni.getNetworkType({
success(e) {
let obj = {
//主表id
sfpMainId: '',
//用户id
userId: uni.getStorageSync('cffp_userId'),
//家庭成员id
// familyMemberId: familyMemberId,
//
modelType: modelType ? modelType : pages[pages.length - 1]?.$page?.options?.modelType,
//模块页面
// modelPage: modelPage?modelPage:pages[pages.length - 1]?.$page?.options?.modelPage,
modelPage: '',
//当前页面
pageUrl: pageUrl ? pageUrl : pages[pages.length - 1]?.route,
//事件名称
eventName: eventName,
//事件说明
eventDesc: eventDesc,
//触发条件
triggerCondi: triggerCondi,
//身份证
// idNo: '',
//微信号
// wxNo: '',
//地理位置
// geographicLocation: '',
//设备类型
deviceType: uniPlatform.deviceType,
//设备品牌
deviceBrand: uniPlatform.deviceBrand,
//设备型号
deviceModel: uniPlatform.deviceModel,
//设备方向
deviceDirection: uniPlatform.deviceOrientation,
//运行平台
platform: uniPlatform.uniPlatform,
//操作系统版本
systemVersion: uniPlatform.osVersion,
//操作系统语言
systemLanguage: uniPlatform.osLanguage,
//网络状态
netWorkStatus: e.networkType,
//用户来源
// userFrom: '',
//是否截屏 1是 2否
isScreenshots: isScreenshots,
//实例
// example: '',
systemType: 'cffp'
}
api.pocessTracking(obj).then(res => {})
}
})
},
}
\ No newline at end of file
......@@ -36,13 +36,15 @@ export function initJssdkShare(callback, url) {
// data是穿的参数 url是当前页面的链接
export function hshare(data,url){
console.log('data,url',data,url);
// 确保分享的链接不包含时间戳
const cleanLink = data.link.split('&t_reload=')[0];
// initJssdkShare(data, url)
initJssdkShare(function(){
jWeixin.ready(function(){
var sharedata={
title: data.title, //标题
desc: data.desc, //描述
link: data.link ,//分享链接
link: cleanLink ,//分享链接
imgUrl:data.imgUrl, //图片
success:(res=>{
})
......
import api from "@/api/api";
import dataHandling from './dataHandling'
//只要是未登录状态,想要跳转到名单内的路径时,直接跳到登录页
// 页面白名单,不受拦截
const whiteList = [
'/components/login/login',
'/myPackageA/login/login',
'/pages/invitationRegister/invitationlogin',
'/components/clause/clause',
'/myPackageA/applyFranchise/applyFranchise',
'/myPackageA/ruleAndContract/clause',
'/pages/orderDetail/orderDetail',
'/pages/courseDetail/courseDetail',
'/pages/courselist/courselist',
......@@ -12,14 +14,25 @@ const whiteList = [
'/pages/index/index'
]
export default function initApp(){
let date = Date.now()
uni.addInterceptor('navigateTo', {
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke (e) {
// 移除URL中的t_reload参数
let url = e.url;
if(url.includes('t_reload=')) {
url = url.split('?')[0] + (url.includes('?') ? '?' : '') +
url.split('?')[1].split('&').filter(param => !param.startsWith('t_reload=')).join('&');
}
let pages = getCurrentPages()
let pagesLength = pages.length
if(!uni.getStorageSync('loginType')){
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor')
uni.redirectTo({
url: '/components/login/login'
uni.navigateTo({
url: '/myPackageA/login/login'
})
}
if(uni.getStorageSync('cffp_userId')){
......@@ -28,12 +41,21 @@ export default function initApp(){
// 清空全部本地存储
uni.clearStorageSync();
uni.setStorageSync('loginType','visitor')
uni.redirectTo({
url: '/components/login/login'
uni.navigateTo({
url: '/myPackageA/login/login'
})
return
}
// 保存用户得个人信息
if (res['success']) {
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
}
})
}
......@@ -46,43 +68,78 @@ export default function initApp(){
return params.get(key);
};
const fromParam = getQueryParam(e.url, 'from');
if(!hasPermission(e.url)){
const fromParam = getQueryParam(url, 'from');
if(!hasPermission(url)){
// 如果 from 参数在 whiteArr 中,说明是tabbar页带着tabbar的标志参数跳转到登录页,以便未登录状态下回到对应的tabbar页
if (fromParam && whiteArr.includes(fromParam)) {
uni.redirectTo({
url: `/components/login/login?from=${fromParam}`
url: `/myPackageA/login/login?from=${fromParam}`
})
}else {
uni.redirectTo({
url: '/components/login/login'
url: '/myPackageA/login/login'
})
}
return false
}
//当页面栈的个数大于10个时,不入页面栈
if (pagesLength >= 10) {
//临时处理,跟换调整方式
uni.redirectTo({
url: e.url
})
} else {
if (date) {
//如果时间戳存在 那么记录此页面的停留时间
dataHandling.pocessTracking(
'停留',
`用户在此页面停留${(Date.now() - date) / 1000}秒`,
'进入页面后离开页面',
2
)
}
date = Date.now()
}
return true
},
success (e) {
success (e) {}
})
uni.addInterceptor('switchTab', {
// tabbar页面跳转前进行拦截
invoke(e) {
if (date) {
//如果时间戳存在 那么记录此页面的停留时间
dataHandling.pocessTracking(
'停留',
`用户在此页面停留${(Date.now() - date) / 1000}秒`,
'进入页面后离开页面',
2
)
}
date = Date.now()
return true
},
success(e) {}
})
uni.addInterceptor('reLaunch', {
//页面跳转前拦截
invoke(e) {
if (date) {
//如果时间戳存在 那么记录此页面的停留时间
dataHandling.pocessTracking(
'停留',
`用户在此页面停留${(Date.now() - date) / 1000}秒`,
'进入页面后离开页面',
2
)
}
date = Date.now()
return true
},
//页面跳转后缓存当前页路由
success(e) {}
})
//最新 修改 tabbar页面跳转前不进行拦截
// uni.addInterceptor('switchTab', {
//
// invoke (e) {
// console.log('!hasPermission(e.url)',e.url);
// if(!hasPermission(e.url)){
// uni.redirectTo({
// url: '/components/login/login'
// })
// return false
// }
// return true
// },
// success (e) {
// }
// })
}
function hasPermission (url) {
let islogin = uni.getStorageSync("isLogin");//在这可以使用token、vuex
......
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