Commit 0a2029eb by yuzhenWang

Merge branch 'feature-20250614-首页菜单优化' into 'uat'

Feature 20250614 首页菜单优化

See merge request !48
parents 74a52224 89bdd2d4
......@@ -4,6 +4,11 @@
import {baseURL,apiURL,cffpURL,companyInfo} from "@/environments/environment";
import api from './api/api';
export default {
data() {
return {
invitationHandled: false // 在data中明确定义
}
},
onLaunch: function() {
console.log('App Launch');
if(!uni.getStorageSync('loginType')){
......@@ -99,10 +104,12 @@
const pages = getCurrentPages();
if(pages.length > 0) {
const currentRoute = pages[pages.length - 1].route;
console.log('currentRoute',currentRoute);
const whiteList = [
'/myPackageA/login/login',
'/pages/invitationRegister/invitationlogin',
'/myPackageA/applyFranchise/applyFranchise',
'/pages/applyFranchise/applyFranchise',
'/myPackageA/ruleAndContract/clause',
'/pages/courselist/courselist',
'/pages/courseDetail/courseDetail',
......@@ -284,7 +291,7 @@
} */
/* iPad横屏 */
@media (orientation: landscape) {
@media (orientation: landscape) {
.container {
max-width: 1024px;
display: flex;
......
......@@ -53,12 +53,12 @@ export default {
// 加盟按钮文字
joinText: {
type: String,
default: '去加盟为合伙人'
default: '我已知晓,继续分享'
},
// 继续按钮文字
continueText: {
type: String,
default: '我已知晓,继续分享'
default: '去加盟为合伙人'
},
// 是否展示icon
tipIcon: {
......@@ -75,14 +75,14 @@ export default {
close() {
this.$refs.popup.close()
},
// 点击加盟
// 点击继续
handleJoin() {
this.$emit('join')
this.$emit('continue')
this.close()
},
// 点击继续
// 点击加盟
handleContinue() {
this.$emit('continue')
this.$emit('join')
this.close()
}
}
......
......@@ -27,9 +27,16 @@
</view>
</view>
<view class="joinFotter">
<view @click="handleContinue">
{{ continueText }}
</view>
<view
v-if="showCanel"
@click="handleCancel"
style="background-color: #FAFAFA;color: #333333;"
>
{{ cancelText }}
</view>
<view @click="handleContinue">
{{ continueText }}
</view>
</view>
</view>
</uni-popup>
......@@ -60,6 +67,11 @@ export default {
type: String,
default: '前往首页'
},
// 暂不操作按钮文字
cancelText: {
type: String,
default: '暂不操作,继续浏览'
},
// 文字颜色
fontColor: {
type: String,
......@@ -68,6 +80,10 @@ export default {
maskClick: {
type: Boolean,
default: true
},
showCanel: {
type: Boolean,
default: false
}
},
methods: {
......@@ -86,9 +102,14 @@ export default {
},
// 点击继续
handleContinue() {
this.$emit('continue')
this.$emit('continue',1)
this.close()
}
},
// 继续浏览
handleCancel(){
this.$emit('continue',2)
this.close()
}
}
}
</script>
......
......@@ -450,7 +450,7 @@
};
</script>
<style lang="less" scoped>
<style lang="scss" scoped>
.signature-box {
display: flex;
flex-direction: column;
......
<template>
<view class="applyBox">
<view style="height: 550rpx;">
<view class="inputBox">
<view class="txt">
<text class="require">*</text>昵称 <text class="desTxt">(用于邀请好友及统计业绩显示)</text>
</view>
<view class="">
<input
class="user-input"
maxlength="10"
type="text"
placeholder="请输入2~10个字符"
v-model="form.nickName"
:disabled="editNickName"
/>
</view>
</view>
<view class="inputBox">
<view class="txt">
<text class="require">*</text>手机号码 <text class="desTxt">(账号唯一标识)</text>
</view>
<view class="codeBox">
<input
type="number"
class="user-input"
name="mobileNo"
placeholder="请输入手机号"
v-model="form.mobile"
maxlength="11"
:disabled="editMobile"
/>
<text
:class="{'grey':disabledSendBtn}"
@click.stop="sendMessage()"
v-if="loginType=== 'visitor'"
>
{{sendCodeHtml}}
</text>
</view>
</view>
<view class="inputBox" v-if="loginType=== 'visitor'">
<view class="txt">
<text class="require">*</text>验证码
</view>
<view class="">
<input
type="number"
class="user-input"
name="mobileNo"
placeholder="请输入短信验证码"
v-model="form.code"
maxlength="6"
/>
</view>
</view>
<view class="protol">
<view class="empty" v-if="!agreeFlag" @click="agreeFlag=true"></view>
<text v-else class="iconfont icon-icon_duihao-mian" @click="agreeFlag=false"></text>
<text style="color: #666;">我已阅读并同意</text>
<text style="color: #20269B;" @click="getFile(1)">服务协议</text>
<text style="color: #666666;"></text>
<text style="color: #20269B;" @click="getFile(2)">隐私条款</text>
</view>
</view>
<view class="btnBox" @click="$emit('apply')">
{{loginType=='codelogin'?'确认加盟':'注册并加盟'}}
</view>
</view>
</template>
<script>
import api from '@/api/api';
import * as environment from "@/environments/environment";
import common from '@/common/common';
import dataHandling from "@/util/dataHandling";
export default {
props: {
// 弹窗内容
form: {
type: Object,
},
editNickName: {
type: Boolean,
default:false,
},
editMobile: {
type: Boolean,
default:false,
},
},
data() {
return {
companyInfo:environment.companyInfo,
imgType:environment.companyInfo.imgType,
baseURL:environment.baseURL,
agreeFlag:false,
sendCodeHtml:'发送验证码',
disabledSendBtn:false,
timer:null,
remainTimes:60,
loginType:uni.getStorageSync('loginType'),
}
},
onLoad(options){
this.loginType=uni.getStorageSync('loginType')
},
onShow(){
if(uni.getStorageSync('loginType')){
this.loginType = uni.getStorageSync('loginType')
}
},
methods: {
getqueryById(shareId){
api.queryById({id:shareId}).then(res =>{
this.form.nickName = res.data.data.name
this.form.mobile = res.data.data.mobileNumber
this.editNickName = this.editMobile = true
})
},
jumpPage(){
uni.switchTab({
url:'/pages/index/index'
})
this.$refs.successJoinPopup.close()
this.$refs.everyJoinPopup.close()
},
getFile(type){
let typeName = type==1?'服务协议':type==2?'隐私条款':''
// dataHandling.pocessTracking(
// '查看协议',
// `查看${typeName}`,
// '点击',
// 2,
// '申请加盟',
// 'pages/saleCourseLists/saleCourseLists'
// )
uni.navigateTo({
url:`/myPackageA/ruleAndContract/clause?type=${type}`
})
},
c_agreeFlag(){
this.agreeFlag=!this.agreeFlag;
},
delayTime() {
this.disabledSendBtn = true;
this.timer = setInterval(() => {
this.remainTimes--;
this.sendCodeHtml = `${this.remainTimes}(S)`;
if (this.remainTimes <= 0) {
this.sendCodeHtml = '获取验证码';
this.remainTimes = 60;
this.disabledSendBtn = false;
clearInterval(this.timer);
}
}, 1000);
},
sendMessage(){
const params = {
mobileNo:this.form.mobile,
type:"1",
source: "cffp"
}
if(common.mobileNoValid(this.form.mobile)){
if(!this.disabledSendBtn){
api.verificationCode(params).then((res)=>{
if(res['success']){
this.delayTime()
}else{
common.errorDialog(2,res['message'])
}
})
}
}else{
common.errorDialog(2,'请填写手机号')
}
},
gotoApply(){
if(!this.form.nickName){
common.errorDialog(1,'请输入昵称');
return false;
}
if(this.form.nickName&&this.form.nickName.length<2){
common.errorDialog(1,'昵称长度为2~10个字符');
return
}
if(!this.form.mobile){
common.errorDialog(1,'请输入手机号');
return false;
}
if(!common.mobileNoValid(this.form.mobile)){
common.errorDialog(2,'手机号格式填写错误');
return false;
}
if(!this.loginType || this.loginType=== 'visitor'){
if(!this.form.code){
common.errorDialog(1,'请输入验证码');
return false;
}
}
if(!this.agreeFlag){
uni.showToast({
title: '请阅读并勾选'+`${this.companyInfo.companyFullName}`+'服务协议和隐私条款',
duration: 3000,
icon: 'none'
})
return false;
}
const params = {
loginType:'3',
...this.form
}
if(this.loginType == 'codelogin'){
this.getApply()
return
}
if(!this.loginType || this.loginType == 'visitor'){
api.loginVerification(params).then((res)=>{
if(res['success']){
this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1');
uni.setStorageSync('loginType','codelogin');
uni.setStorageSync('cffp_userId', this.userId);
uni.setStorageSync('uni-token', res.data['token']);
uni.setStorageSync('isPartner', res.data['isPartner']); //是否是合伙人
this.queryInfo()
// 是合伙人就不让在加盟
if(res.data.isPartner){
this.$refs.everyJoinPopup.open()
return
}
// 不是合伙人就加盟
if(!res.data.isPartner){
this.getApply()
}
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
},
queryInfo() {
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
// 保存用户得个人信息
if (res['success']) {
this.form.nickName = res['data']['nickName']
if(this.form.nickName){
this.editNickName = true
}else {
this.editNickName = false
}
const cffp_userInfo = {
name: res['data']['realName'],
mobile: res['data']['mobile'],
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
}else {
uni.setStorageSync('loginType', 'visitor')
}
})
},
// 申请加盟
getApply(){
let params = {}
if(this.inviteUserId){
params = {
applyType:'1',
applyUserId:this.userId,
applyMobile:this.form.mobile,
inviteUserId:this.inviteUserId,
nickName:this.form.nickName,
inviterInvitationCode:this.invitationCode,
shareId:this.shareId
}
// return
}else {
params = {
applyType:'2',
applyUserId:this.userId,
applyMobile:this.form.mobile,
nickName:this.form.nickName
}
}
api.newSaveApplyInfo(params).then((res)=>{
if(res['success']){
// 是合伙人就不让在加盟
if(res.data.isPartner){
this.$refs.everyJoinPopup.open()
return
}
dataHandling.pocessTracking(
'加盟',
`已成功加盟为合伙人`,
'点击',
2,
'申请加盟',
'pages/saleCourseLists/saleCourseLists'
)
this.$refs.successJoinPopup.open()
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
}
},
}
</script>
<style lang="scss" scoped>
.applyBox{
background-color: #fff;
padding: 30rpx;
border-radius: 20rpx;
margin-top: 100rpx;
box-sizing: border-box;
.inputBox{
margin-bottom: 20rpx;
padding-bottom: 10rpx;
border-bottom: 1rpx solid #E8E8E8;
.require{
font-size: 24rpx;
color: red;
}
.desTxt{
font-size: 24rpx;
color: #333333;
}
.user-input{
color: black;
font-size: 26rpx;
margin-top: 15rpx;
}
.codeBox{
display: flex;
align-items: center;
justify-content: space-between;
color: #20279B;
font-size: 26rpx;
.grey{
color: rgba(32, 39, 155, 0.5); /* 50% 透明 */
}
}
}
.agreeBox{
padding-top: 20rpx;
font-size: 26rpx;
color:#20279B ;
}
.protol{
display: flex;
align-items: center;
font-size: 26rpx;
.empty{
width: 30rpx;
height: 30rpx;
border: 1rpx solid #20269B;
border-radius: 50%;
margin-right: 5rpx;
}
.icon-icon_duihao-mian{
font-size: 30rpx;
color: #20269B;
margin-right: 5rpx;
}
}
.btnBox{
box-sizing: border-box;
width: 80%;
text-align: center;
padding: 20rpx;
border-radius: 50rpx;
background-color: #20279B;
color: #fff;
font-size: 28rpx;
margin: 0rpx 50rpx 30rpx 50rpx;
}
}
</style>
\ No newline at end of file
......@@ -15,6 +15,7 @@
优质资源,专业服务
</view>
</view>
<view class="applyBox">
<view style="height: 550rpx;">
<view class="inputBox">
......@@ -92,18 +93,21 @@
<everyJoinPopup
ref="everyJoinPopup"
@continue="jumpPage"
:showCanel="false"
/>
<!-- 成功加盟为合伙人提示弹窗组件 -->
<everyJoinPopup
ref="successJoinPopup"
@continue="jumpPage()"
@continue="jumpPage(e)"
content="您已加盟为银盾家办合伙人"
twoContent='购买一单"YD家庭财务法律卡"即可升级为新锐合伙人,享受组织利益'
continueText="前往购买"
cancelText="暂不购买,继续浏览"
fontColor="#20279B"
:maskClick="false"
icon="icon-dianzan"
iconSize='80rpx'
:showCanel="true"
/>
</view>
</template>
......@@ -116,7 +120,7 @@
import dataHandling from "@/util/dataHandling";
export default {
components:{
everyJoinPopup
everyJoinPopup,
},
data() {
return {
......@@ -159,7 +163,9 @@
uni.clearStorageSync()
uni.setStorageSync('loginType', 'visitor')
}
},
onShow(){
if(uni.getStorageSync('loginType')){
......@@ -183,10 +189,7 @@
if(!this.inviteUserId&&this.loginType == 'codelogin'&&!this.form.nickName){
this.queryInfo()
}
// 邀请状态
// if(this.inviteUserId){
// this.getqueryById(this.shareId)
// }
},
methods: {
getqueryById(shareId){
......@@ -194,10 +197,13 @@
this.form.nickName = res.data.data.name
this.form.mobile = res.data.data.mobileNumber
this.editNickName = this.editMobile = true
if(res.data.data.isPartner){
this.$refs.successJoinPopup.open()
}
})
},
jumpPage(){
jumpPage(e){
// e===1时,前往购买;e===2暂不购买;目前全部跳转到首页,不进行判断
uni.switchTab({
url:'/pages/index/index'
})
......@@ -221,6 +227,7 @@
c_agreeFlag(){
this.agreeFlag=!this.agreeFlag;
},
delayTime() {
this.disabledSendBtn = true;
this.timer = setInterval(() => {
......@@ -233,27 +240,27 @@
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,'请填写手机号')
}
},
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,'请输入昵称');
......
......@@ -390,7 +390,7 @@
}
.iconBox{
border-radius: 15rpx;
width: 20% !important;
width: 400rpx !important;
}
}
.content{
......
......@@ -13,46 +13,168 @@
"echarts": "^5.4.1",
"js-sha256": "^0.11.1",
"nanoid": "^4.0.0"
},
"devDependencies": {
"less": "^4.3.0"
}
},
"node_modules/copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-what": "^3.14.1"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
}
},
"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=="
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==",
"license": "MIT"
},
"node_modules/dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
"license": "MIT"
},
"node_modules/echarts": {
"version": "5.6.0",
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
"integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==",
"license": "Apache-2.0",
"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/errno": {
"version": "0.1.8",
"resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"prr": "~1.0.1"
},
"bin": {
"errno": "cli.js"
}
},
"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==",
"node_modules/graceful-fs": {
"version": "4.2.11",
"resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true,
"license": "ISC",
"optional": true
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"tslib": "2.3.0"
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmmirror.com/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==",
"dev": true,
"license": "MIT",
"optional": true,
"bin": {
"image-size": "bin/image-size.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true,
"license": "MIT"
},
"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=="
"integrity": "sha512-o6WSo/LUvY2uC4j7mO50a2ms7E/EAdbP0swigLV+nzHKTTaYnaLIWJ02VdXrsJX0vGedDESQnLsOekr94ryfjg==",
"license": "MIT"
},
"node_modules/less": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/less/-/less-4.3.0.tgz",
"integrity": "sha512-X9RyH9fvemArzfdP8Pi3irr7lor2Ok4rOttDXBhlwDg+wKQsXOXgHWduAJE1EsF7JJx0w0bcO6BC6tCKKYnXKA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"copy-anything": "^2.0.1",
"parse-node-version": "^1.0.1",
"tslib": "^2.3.0"
},
"bin": {
"lessc": "bin/lessc"
},
"engines": {
"node": ">=14"
},
"optionalDependencies": {
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"needle": "^3.1.0",
"source-map": "~0.6.0"
}
},
"node_modules/make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"pify": "^4.0.1",
"semver": "^5.6.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"license": "MIT",
"optional": true,
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/nanoid": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-4.0.2.tgz",
"integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==",
"funding": [
{
......@@ -60,12 +182,113 @@
"url": "https://github.com/sponsors/ai"
}
],
"license": "MIT",
"bin": {
"nanoid": "bin/nanoid.js"
},
"engines": {
"node": "^14 || ^16 || >=18"
}
},
"node_modules/needle": {
"version": "3.3.1",
"resolved": "https://registry.npmmirror.com/needle/-/needle-3.3.1.tgz",
"integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"iconv-lite": "^0.6.3",
"sax": "^1.2.4"
},
"bin": {
"needle": "bin/needle"
},
"engines": {
"node": ">= 4.4.x"
}
},
"node_modules/parse-node-version": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/parse-node-version/-/parse-node-version-1.0.1.tgz",
"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/pify": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true,
"license": "MIT",
"optional": true,
"engines": {
"node": ">=6"
}
},
"node_modules/prr": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz",
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"dev": true,
"license": "MIT",
"optional": true
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true,
"license": "MIT",
"optional": true
},
"node_modules/sax": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/sax/-/sax-1.4.1.tgz",
"integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==",
"dev": true,
"license": "ISC",
"optional": true
},
"node_modules/semver": {
"version": "5.7.2",
"resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"license": "ISC",
"optional": true,
"bin": {
"semver": "bin/semver"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==",
"license": "0BSD"
},
"node_modules/zrender": {
"version": "5.6.1",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
"integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
"license": "BSD-3-Clause",
"dependencies": {
"tslib": "2.3.0"
}
}
}
}
......@@ -20,5 +20,8 @@
"echarts": "^5.4.1",
"js-sha256": "^0.11.1",
"nanoid": "^4.0.0"
},
"devDependencies": {
"less": "^4.3.0"
}
}
......@@ -27,7 +27,7 @@
"softinputMode": "adjustResize"
}
}
}, {
}, {
"path": "pages/product/product",
"style": {
"navigationBarTitleText": "SFP",
......@@ -502,10 +502,7 @@
},{
"path": "applyFranchise/applyFranchise",
"style": {
"navigationBarTitleText": "申请加盟",
"h5": {
"reload": false // 禁用自动重新加载
}
"navigationBarTitleText": "申请加盟"
}
},{
"path": "integralExchange/exchange",
......@@ -540,12 +537,9 @@
},{
"path": "ruleAndContract/clause",
"style": {
"navigationBarTitleText": "协议",
"h5": {
"reload": false // 禁用自动重新加载
}
"navigationBarTitleText": "协议"
}
}
},
]
},{
"root": "officialWebsite",
......
<template>
<view class="container">
<view class="homeHeader">
<!-- :style="{paddingTop: showFlag ? '0' : '60rpx'}" -->
<view class="container" >
<view class="homeHeader" v-if="showFlag">
<view class="one">
<text style="font-size: 80rpx;">01</text>
<view class="titleTxt">
......@@ -25,7 +26,7 @@
</view>
<view class="productBox">
<view class="productList" :style="{marginTop}">
<view class="productItem" v-for="item in cffpCourseInfos" :key="item.fileId" >
<view class="productItem" v-for="item in localCourseInfos" :key="item.fileId" >
<view class="top" @click="goDetail(item)">
<view class="left">
<image class="productImg" :src="item.displayImage" alt="" mode="widthFix"></image>
......@@ -115,6 +116,16 @@
import {nanoid} from 'nanoid';
export default{
name:'courselist',
props:{
showFlag:{
type:Boolean,
default:true
},
cffpCourseInfos: {
type: Array,
default: () => []
}
},
components:{
courseItem,
tabBar,
......@@ -124,9 +135,18 @@
BootPage,
PartnerTipPopup
},
watch: {
// 监听 prop 变化,更新本地副本
cffpCourseInfos: {
immediate: true, // 立即执行一次
handler(newVal) {
this.localCourseInfos = [...newVal]; // 深拷贝(如果是简单数组,浅拷贝也行)
},
},
},
data(){
return{
cffpCourseInfos:[],
localCourseInfos: [], // 本地副本
currentPage:'courselist',
fileUploadItemCFFPList:[],
queryName:null,
......@@ -155,6 +175,16 @@
}
},
created(){
this.queryName = uni.getStorageSync('queryName') || '';
this.courseList();
// 初始化本地副本
this.localCourseInfos = [...this.cffpCourseInfos];
this.sourceType = uni.getStorageSync('addSystemType') || '1';
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
},
computed:{
marginTop(){
if(this.env.device.isMobile){
......@@ -357,7 +387,7 @@
}
api.courseList(param).then(res=>{
if(res['success']){
this.cffpCourseInfos = res['data']['data'];
this.localCourseInfos = res['data']['data']; // 修改本地副本
}
})
},
......@@ -457,7 +487,6 @@
.productList{
width: 100%;
box-sizing: border-box;
// margin-top: -2%;
background-color: #fff;
padding: 20rpx;
border-radius: 10rpx;
......@@ -543,6 +572,12 @@
border: none;
}
}
/* 电脑端 */
@media (min-width: 768px) {
.productList{
// padding-top: 60rpx;
}
}
}
.descriptionBox {
width: 510rpx;
......@@ -664,5 +699,46 @@
}
}
}
.container {
padding-top: 60rpx;
.homeHeader {
padding-bottom: 100rpx;
position: relative;
z-index: 1;
}
.productBox {
position: relative;
z-index: 2;
.productList {
padding-top: 30rpx; // 改用padding-top
margin-top: 0;
.productItem {
&:first-child {
margin-top: 0;
}
}
}
}
}
/* iPad横屏特定适配 */
@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (orientation: landscape) {
.container {
.homeHeader {
padding-bottom: 120rpx;
}
.productBox {
.productList {
padding-top: 50rpx;
}
}
}
}
</style>
\ No newline at end of file
......@@ -19,6 +19,7 @@
<view class="bottom">
<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)">
......@@ -55,23 +56,29 @@
</view> -->
<!-- 产品区域 -->
<view class="productBox">
<view class="productTitle">
<view class="productContainer">
<!-- <view class="productTitle">
<view class="titleTxt">
<text style="font-size: 30rpx;font-weight: 500;">推荐产品</text>
<text class="more" @click="goToCourselist()">更多 <text class="iconfont icon-youjiantou"></text> </text>
</view>
</view>
</view> -->
<view class="productList" v-if="cffpCourseInfos.length>0">
<courselist :showFlag="false" :cffpCourseInfos="cffpCourseInfos"></courselist>
<view class="productListBox">
<view class="productListItem" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)">
<view class="top">
<image class="productImg" :src="item.displayImage" alt="" mode="widthFix"></image>
<!-- <view class="productListItem" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)"> -->
<!-- <view class="top"> -->
<!-- <view class="shareBtn" @click.stop="shareProduct"> -->
<!-- 分享按钮 -->
<!-- <text class="iconfont icon-zhuanfa"></text><text>分享赚钱</text>
</view> -->
<!-- <image class="productImg" :src="item.displayImage" alt="" mode="widthFix"></image>
<view class="productDesBox">
{{item.fileSynopsis}}
</view>
</view>
<view class="bottom" style="text-align: left !important;">
</view> -->
<!-- </view> -->
<!-- <view class="bottom" style="text-align: left !important;">
<view class="one">
{{item.fileTitle}}
</view>
......@@ -79,8 +86,8 @@
<text class="price" style="">{{item.coursePrice}}</text>
<text v-if="Number(item.salesNumber)>0" class="num" >已售{{item.salesNumber}}</text>
</view>
</view>
</view>
</view> -->
<!-- </view> -->
</view>
</view>
<view class="productEmpty" v-else>
......@@ -215,29 +222,21 @@
x: 0,
y: 0
},
featureLists: [{
key: '00',
name: '成交订单',
icon:'icon-dingdan',
link: '/pages/saleCourseLists/saleCourseLists',
isOpen: true,
enName:'order'
},
{
key: '01',
name: '佣金',
icon: 'icon-yongjin',
link: '/pages/pointsExchange/pointsExchange',
isOpen: true,
isJoin: true
},
featureLists: [
{
key: '02',
name: '申请加盟',
icon: 'icon-hezuo',
link: '/myPackageA/applyFranchise/applyFranchise',
isOpen: true,
isApply:true,
isApply:true
},
{
key: '07',
name: '分享产品',
icon: 'icon-zhuanfa',
link: '/pages/courselist/courselist',
isOpen: true,
},
{
......@@ -325,7 +324,13 @@
partnerType:res['data']['partnerType'],
nickName:res['data']['nickName'],
}
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo))
uni.setStorageSync('cffp_userInfo', JSON.stringify(cffp_userInfo));
if(cffp_userInfo.partnerType){
this.featureLists = [{key: '00',name: '成交订单',icon:'icon-dingdan',link: '/pages/saleCourseLists/saleCourseLists',isOpen: true,enName:'order'},
{key: '01',name: '佣金',icon: 'icon-yongjin',link: '/pages/pointsExchange/pointsExchange',isOpen: true,isJoin: true},
{key: '07',name: '分享产品',icon: 'icon-zhuanfa',link: '/pages/courselist/courselist',isOpen: true},
{key: '04',name: '邀请加盟',icon: 'icon-yaoqing',link: '/pages/inviteJoin/inviteJoin',isOpen: true,isJoin: true}];
}
}
})
......@@ -493,6 +498,7 @@
window.location.href = url;
// #endif
},
// 顶部菜单跳转
featureSelect(featureItem) {
if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
......@@ -506,9 +512,8 @@
'首页',
'pages/index/index'
)
uni.navigateTo({
url: `${featureItem.link}`
});
uni.navigateTo({url: `${featureItem.link}`});
return
}
......@@ -743,7 +748,7 @@
}
}
.productBox {
.productContainer {
background-color: #fff;
margin-top: 15rpx;
box-sizing: border-box;
......@@ -813,7 +818,22 @@
object-fit: cover;
display: block;
}
.shareBtn{
position: absolute;
right: 0;
top: 0;
height: 50rpx;
color: red;
z-index: 1;
background-color: #F43530;
border-radius: 6rpx;
padding: 0 10rpx;
color: #fff;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.productDesBox {
box-sizing: border-box;
position: absolute;
......
......@@ -535,9 +535,10 @@
.sendInvite {
position: absolute;
left: 20vw;
left: 0;
top: 80%;
width: 60vw;
width: 60%;
transform: translateX(30%);
border-radius: 80rpx;
background-color: #20269B;
color: #fff;
......
import {apiURL,cffpURL} from "../environments/environment";
import {apiURL,cffpURL,sfpUrl} from "../environments/environment";
import api from "@/api/api";
// 白名单,不需要携带token就允许被访问的接口
const whiteApiList = [`${apiURL}/authorize/obtainToken`, `${apiURL}/authorize/checkToken`, `${cffpURL}/user/loginVerification`,`${apiURL}/appVersion/checkIsUpdate`,
`${cffpURL}/accessLog/accessLogSave`,`${cffpURL}/user/powerQuery`,`${cffpURL}/user/wxLogin`,`${cffpURL}/certificate/officialWebsiteDetail`];
const whiteApiList = [`${apiURL}/authorize/obtainToken`,
`${apiURL}/authorize/checkToken`,
`${cffpURL}/user/loginVerification`,
`${apiURL}/appVersion/checkIsUpdate`,
`${cffpURL}/accessLog/accessLogSave`,
`${cffpURL}/user/powerQuery`,`${cffpURL}/user/wxLogin`,
`${cffpURL}/certificate/officialWebsiteDetail`,
`${apiURL}/verificationCode`,
`${sfpUrl}/sfp/sfpMain/pocessTracking`,
`${cffpURL}/partner/queryById`,
];
export const interceptor = () => {
uni.addInterceptor('request', {
// 请求拦截器
......
......@@ -6,6 +6,7 @@ const whiteList = [
'/myPackageA/login/login',
'/pages/invitationRegister/invitationlogin',
'/myPackageA/applyFranchise/applyFranchise',
'/pages/applyFranchise/applyFranchise',
'/myPackageA/ruleAndContract/clause',
'/pages/orderDetail/orderDetail',
'/pages/courseDetail/courseDetail',
......@@ -16,15 +17,11 @@ const whiteList = [
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('&');
}
console.log(e);
let pages = getCurrentPages()
let pagesLength = pages.length
......@@ -44,7 +41,7 @@ export default function initApp(){
uni.navigateTo({
url: '/myPackageA/login/login'
})
return
return true
}
// 保存用户得个人信息
if (res['success']) {
......@@ -68,8 +65,8 @@ export default function initApp(){
return params.get(key);
};
const fromParam = getQueryParam(url, 'from');
if(!hasPermission(url)){
const fromParam = getQueryParam(e.url, 'from');
if(!hasPermission(e.url)){
// 如果 from 参数在 whiteArr 中,说明是tabbar页带着tabbar的标志参数跳转到登录页,以便未登录状态下回到对应的tabbar页
if (fromParam && whiteArr.includes(fromParam)) {
uni.redirectTo({
......
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