Commit 0e6970cd by yuzhenWang

Merge branch 'feature-20250515wyz-修复bug' into 'uat'

Feature 20250515wyz 修复bug

See merge request !2
parents 963ad6ed e4b94a5a
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</view> </view>
<view class="login-code"> <view class="login-code">
<input name="form.code" placeholder="输入验证码" v-model="code" type="number" maxlength="6" /> <input name="form.code" placeholder="输入验证码" v-model="code" type="number" maxlength="6" />
<text style="width: 250rpx;" @click="sendMessage()" :class="{'grey':disabledSendBtn}">{{sendCode}}</text> <text style="width: 200rpx;" @click="sendMessage()" :class="{'grey':disabledSendBtn}">{{sendCode}}</text>
</view> </view>
<view class="agree"> <view class="agree">
<label class="radio" style="padding-right: 10rpx;"> <label class="radio" style="padding-right: 10rpx;">
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.content-box { .content-box {
position: absolute; position: absolute;
// left:50%; // left:50%;
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
</view> </view>
<view class="courseDetailBox"> <view class="courseDetailBox">
<view class="title"> <view class="title">
<text style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{title}}</text> <view style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{title}}</view>
<!-- <text class="detailBtn" @click="viewDetail()" v-if="isNeedViewDetail">订单详情></text> --> <!-- <text class="detailBtn" @click="viewDetail()" v-if="isNeedViewDetail">订单详情></text> -->
</view> </view>
<view class="summaryBox" v-if="summaryBox"> <view class="summaryBox" v-if="summaryBox">
<text>{{summaryBox}}</text> <view class="text-wrap">{{summaryBox}}</view>
</view> </view>
<view class="dataBox" v-if="dataList"> <view class="dataBox" v-if="dataList">
<strong>{{dataList.coursePrice}}</strong> <view class="price" >{{dataList.coursePrice}}</view>
<strong v-if="dataList.coursePrice == 0">免费</strong> <text v-if="dataList.coursePrice == 0">免费</text>
<text v-if="dataList.coursePrice != 0">{{dataList.salesNumber}}人购买</text> <text v-if="dataList.coursePrice != 0">{{dataList.salesNumber}}人购买</text>
</view> </view>
<view class="tagListBox" v-if="tagList || fileLecturerId"> <view class="tagListBox" v-if="tagList || fileLecturerId">
...@@ -101,36 +101,46 @@ ...@@ -101,36 +101,46 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.itemContent { .itemContent {
box-sizing: border-box;
display: flex; display: flex;
justify-content: flex-start;
height: 100%; height: 100%;
width: 100%;
.thumbnailBox { .thumbnailBox {
width: 300rpx; box-sizing: border-box;
flex-basis: 300rpx;
margin-right: 26rpx; margin-right: 26rpx;
align-items: center; align-items: center;
width: 200rpx;
flex: 0 0 auto;
image { image {
max-width: 100%; width: 100%;
height: auto; height: auto;
} }
} }
.courseDetailBox { .courseDetailBox {
width: 100%; flex: 1;
color: #333; color: #333;
height: auto; height: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.title { .title {
// flex: 1;
display: flex; display: flex;
max-width: 260rpx; // max-width: 260rpx;
// justify-content: space-between; // width: 0;
// align-items: center; // flex-basis: 100rpx;
font-size: 32rpx; font-size: 32rpx;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
.detailBtn { .detailBtn {
font-size: 24rpx; font-size: 24rpx;
color: #4A4A4A; color: #4A4A4A;
...@@ -142,19 +152,32 @@ ...@@ -142,19 +152,32 @@
} }
.summaryBox { .summaryBox {
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
width: 100%;
font-size: 24rpx; font-size: 24rpx;
// margin: 10rpx 0; // margin: 10rpx 0;
display: flex;
.text-wrap {
white-space: pre-wrap;
word-break: break-word;
}
text { text {
margin-right: 20rpx; margin-right: 20rpx;
} }
} }
.dataBox { .dataBox {
strong { display: flex;
flex-direction: row;
align-items: center;
.price {
width:150rpx;
color: #F15A1F; color: #F15A1F;
font-size: 30rpx; font-size: 30rpx;
margin: 10rpx 20rpx 10rpx 0; margin: 10rpx 20rpx 10rpx 0;
font-weight: 600;
} }
text { text {
......
<template> <template>
<view class="wrapper"> <view class="wrapper">
<view v-if="loginType=='resetpw'" @click="rpsdlogin()" class="psdlogin"> <view v-if="loginType=='resetpw' || goBack" @click="rpsdlogin()" class="psdlogin">
<image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image> <image style="width: 40rpx;height: 40rpx;" src="../../static/rpsloging.png" mode=""></image>
</view> </view>
<view class="logo"> <view class="logo">
<image :src="imgSrc" alt="logo" srcset="" class="iconBox" mode="widthFix"></image> <image :src="imgSrc" alt="logo" srcset="" class="iconBox" mode="widthFix"></image>
<view>欢迎登录使用{{companyName}}APP</view> <!-- <view>欢迎登录使用{{companyName}}APP</view> -->
<view>欢迎登录使用{{companyName}}</view>
</view> </view>
<view class="content"> <view class="content">
<view class="login_title"> <view class="login_title">
...@@ -67,7 +68,7 @@ ...@@ -67,7 +68,7 @@
</view> </view>
<view class="login_type"> <view class="login_type">
<text @click="loginType='visitor';initForm();loginIn(1)">游客</text> <text @click="loginType='visitor';initForm();loginIn(1)">游客</text>
<text @click="loginType = 'agentlogin';loginTypeName = '管理账号登录';">代理商</text> <!-- <text @click="loginType = 'agentlogin';loginTypeName = '管理账号登录';">代理商</text> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -101,16 +102,59 @@ ...@@ -101,16 +102,59 @@
agreeFlag:false, agreeFlag:false,
userId:null, userId:null,
imgSrc:companyInfo.companyLogo, imgSrc:companyInfo.companyLogo,
fileType:null fileType:null,
goBack:true
} }
}, },
methods: { methods: {
c_agreeFlag(){ c_agreeFlag(){
this.agreeFlag=!this.agreeFlag; this.agreeFlag=!this.agreeFlag;
}, },
rpsdlogin(){ // rpsdlogin(){
this.loginType= 'codelogin' // if(this.loginType== 'resetpw'){
}, // this.loginType= 'codelogin'
// return
// }else {
// // uni.navigateBack({ delta: 1 });
// const pages = getCurrentPages();
// console.log('pages',pages);
// if (pages.length > 1) {
// uni.navigateBack({ delta: 1 });
// }
// }
// },
rpsdlogin() {
if (this.loginType == 'resetpw') {
this.loginType = 'codelogin';
return;
}
// 获取跳转来源(通过路由参数)
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const from = currentPage.options.from; // 获取 url 中的 from 参数
console.log('currentPage',currentPage);
// 从 TabBar 页跳转过来,用 switchTab 返回
if (from === 'index') {
uni.switchTab({
url:'/pages/index/index'
})
} else if (from === 'personalCenter') {
uni.switchTab({
url:'/pages/personalCenter/personalCenter'
})
} else if (pages.length > 1) {
// 从普通页跳转过来,且页面栈中有上一页,直接返回
uni.navigateBack({ delta: 1 });
}else {
// 默认情况(如直接打开登录页),跳转到首页
uni.switchTab({
url: '/pages/index/index'
});
}
},
getFile(type){ getFile(type){
uni.navigateTo({ uni.navigateTo({
url:`/components/clause/clause?type=${type}` url:`/components/clause/clause?type=${type}`
...@@ -344,7 +388,7 @@ ...@@ -344,7 +388,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.psdlogin{ .psdlogin{
margin: 40rpx; margin: 40rpx;
width: 40rpx; width: 40rpx;
...@@ -353,6 +397,7 @@ ...@@ -353,6 +397,7 @@
} }
.wrapper{ .wrapper{
background: #20279B; background: #20279B;
position: relative;
overflow: auto; overflow: auto;
height: 100vh; height: 100vh;
.logo{ .logo{
......
<template> <template>
<view class="search"> <view class="search">
<input class="searchInput" type="text" name="" id="" v-model="queryName" @confirm="searchBtn()"/> <!-- <input
class="searchInput"
type="text"
name=""
id=""
v-model="queryName"
@confirm="searchBtn()"
/> -->
<input
class="searchInput"
type="text"
name=""
id=""
v-model="localQuery"
@confirm="searchBtn()"
@input="handleInput"
/>
<text class="iconfont icon-sousuo" @click="searchBtn()"></text> <text class="iconfont icon-sousuo" @click="searchBtn()"></text>
<text class="iconfont icon-xiaoxi"></text> <text class="iconfont icon-xiaoxi"></text>
<text class="system_msg" @click="jumpToSystemMsg()">{{messageUnreadCount}}</text> <text class="system_msg" @click="jumpToSystemMsg()">{{messageUnreadCount}}</text>
...@@ -11,19 +27,33 @@ ...@@ -11,19 +27,33 @@
import api from "../../api/api"; import api from "../../api/api";
import common from '../../common/common'; import common from '../../common/common';
export default{ export default{
props:['isSearch','userId'], props:['isSearch','userId', 'initialQuery'],
data(){ data(){
return { return {
messageUnreadCount:null, messageUnreadCount:null,
queryName:null queryName:null,
localQuery: this.initialQuery || '',
} }
}, },
name:'search', name:'search',
components:{}, components:{},
onLoad(options){ watch: {
this.queryName = options.queryName; initialQuery: {
immediate: true, // 立即触发
handler(newVal) {
this.localQuery = newVal || ''; // 处理 null/undefined
}
}
}, },
methods:{ methods:{
// 新增方法:允许父组件重置搜索词
resetSearch() {
this.localQuery = '';
},
handleInput(e) {
this.localQuery = e.detail.value;
},
jumpToSystemMsg(){ jumpToSystemMsg(){
if(this.userId){ if(this.userId){
uni.navigateTo({ uni.navigateTo({
...@@ -50,16 +80,31 @@ ...@@ -50,16 +80,31 @@
searchBtn(){ searchBtn(){
if(this.isSearch == 1){ if(this.isSearch == 1){
//掉查询 //掉查询
this.$emit("send",this.queryName) // this.$emit("send",this.queryName)
}else{ this.$emit("send", this.localQuery);
//有参数就掉查询否则直接跳转到课程列表页 }else {
if(this.queryName){ this.$emit("update:initialQuery", this.localQuery); // 新增
uni.setStorageSync('queryName',this.queryName) uni.setStorageSync('queryName', this.localQuery);
}
uni.switchTab({ uni.switchTab({
url:'/pages/courselist/courselist' url: '/pages/courselist/courselist'
}) });
} }
// else{
// //有参数就掉查询否则直接跳转到课程列表页
// if(this.queryName){
// uni.setStorageSync('queryName', this.localQuery);
// // uni.setStorageSync('queryName',this.queryName)
// }
// uni.switchTab({
// url:'/pages/courselist/courselist'
// })
// }
} }
}, },
mounted() { mounted() {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="loginPopupBox"> <view class="loginPopupBox">
<view class="loginPopupTitle"> <view class="loginPopupTitle">
<view> <view>
<text>预约课程</text> <text>产品预约</text>
</view> </view>
<view class="iconGuanbi"> <view class="iconGuanbi">
<text @click="canle" class="iconfont icon-guanbi"></text> <text @click="canle" class="iconfont icon-guanbi"></text>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
}, { }, {
"path": "pages/courseDetail/courseDetail", "path": "pages/courseDetail/courseDetail",
"style": { "style": {
"navigationBarTitleText": "课程详情", "navigationBarTitleText": "产品详情",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"app-plus": { "app-plus": {
"softinputMode": "adjustResize" "softinputMode": "adjustResize"
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
}, { }, {
"path": "pages/saleCourseLists/saleCourseLists", "path": "pages/saleCourseLists/saleCourseLists",
"style": { "style": {
"navigationBarTitleText": "销售课程", "navigationBarTitleText": "销售中心",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { }, {
...@@ -518,7 +518,7 @@ ...@@ -518,7 +518,7 @@
"pagePath": "pages/product/product", // 页面路径,必须在 pages 中先定义 "pagePath": "pages/product/product", // 页面路径,必须在 pages 中先定义
"iconPath": "static/tabbar/sfp.png", // 图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px "iconPath": "static/tabbar/sfp.png", // 图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px
"selectedIconPath": "static/tabbar/sfp_active.png", // 选中时的图片路径 "selectedIconPath": "static/tabbar/sfp_active.png", // 选中时的图片路径
"text": "SFP智能财策" // tab 上按钮文字 "text": "金融工具" // tab 上按钮文字
}, },
{ // 最少2个、最多5 tab { // 最少2个、最多5 tab
"pagePath": "pages/courselist/courselist", // 页面路径,必须在 pages 中先定义 "pagePath": "pages/courselist/courselist", // 页面路径,必须在 pages 中先定义
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
height:100%; height:100%;
.top{ .top{
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
height: 100%; height: 100%;
.top{ .top{
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.top{ .top{
display: flex; display: flex;
height: 80rpx; height: 80rpx;
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.top{ .top{
display: flex; display: flex;
height: 80rpx; height: 80rpx;
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
</view> </view>
<view class="contentItem"> <view class="contentItem">
<text>居住地址</text> <text>居住地址</text>
<view><input type="text" class="form-control" placeholder="请选择" v-model="applyParam.liveAddress" <view><input type="text" class="form-control" placeholder="请输入" v-model="applyParam.liveAddress"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2" /> :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2" />
</view> </view>
</view> </view>
......
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
}); });
}, },
bindPickerChange(e){ bindPickerChange(e){
console.log('执行了');
this.dropIndex = e.detail.value; this.dropIndex = e.detail.value;
}, },
showModal(){ showModal(){
...@@ -206,7 +207,7 @@ ...@@ -206,7 +207,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
padding: 10rpx 20rpx; padding: 10rpx 20rpx;
height: 100%; height: 100%;
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.wrapper{ .wrapper{
padding: 60rpx 30rpx; padding: 60rpx 30rpx;
.content{ .content{
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.others{ .others{
padding:30rpx; padding:30rpx;
margin-top: 30rpx; margin-top: 30rpx;
......
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
// padding-top: 40rpx; // padding-top: 40rpx;
.certifyIntro{ .certifyIntro{
......
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.content { .content {
width: 100vw; width: 100vw;
padding-top: 80rpx; padding-top: 80rpx;
......
...@@ -140,6 +140,6 @@ ...@@ -140,6 +140,6 @@
} }
</script> </script>
<style> <style lang="scss" scoped>
</style> </style>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<!-- 课程详情图 --> <!-- 课程详情图 -->
<view class="courseTitleContent"> <view class="courseTitleContent">
<view class="courseTitle"> <view class="courseTitle">
<view class="" style="width: 70%;"> <view class="" style="width: 100%;">
<h4>{{courseInfo.fileTitle}}</h4> <h4>{{courseInfo.fileTitle}}</h4>
</view> </view>
<view class="shareF"> <view class="shareF">
...@@ -75,12 +75,10 @@ ...@@ -75,12 +75,10 @@
<!-- 课程介绍,相关课程,讲师 --> <!-- 课程介绍,相关课程,讲师 -->
<view class="courseProBox"> <view class="courseProBox">
<!-- tab区域 --> <!-- tab区域 -->
<view class="tab"> <!-- <view class="tab">
<text :class="{'actived': tabType===1}" @click="switchTab(1)">详情</text> <text :class="{'actived': tabType===1}" @click="switchTab(1)">详情</text>
<!-- <text :class="{'actived': tabType===2}" @click="switchTab(2)">相关课程</text> -->
<!-- <text :class="{'actived': tabType===4}" @click="switchTab(4)">服务流程</text> -->
<text :class="{'actived': tabType===3}" @click="switchTab(3)">讲师</text> <text :class="{'actived': tabType===3}" @click="switchTab(3)">讲师</text>
</view> </view> -->
<!-- tabContent区域 --> <!-- tabContent区域 -->
<view class="tabContent"> <view class="tabContent">
<!-- 课程介绍 --> <!-- 课程介绍 -->
...@@ -431,7 +429,8 @@ ...@@ -431,7 +429,8 @@
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' + '&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&", this.userId + '&jumpUrl=' + jumptime + "&",
title: this.courseInfo.fileTitle, title: this.courseInfo.fileTitle,
summary: `加入我们开启学习之旅`, // summary: `加入我们开启学习之旅`,
summary: this.courseInfo.fileSynopsis,
imageUrl: this.courseInfo.displayImage, imageUrl: this.courseInfo.displayImage,
fileId: this.fileId, fileId: this.fileId,
shareCode: shareCode shareCode: shareCode
...@@ -578,6 +577,11 @@ ...@@ -578,6 +577,11 @@
} else { } else {
this.isRenderVideo = true; this.isRenderVideo = true;
} }
// #ifdef H5
const shareCode = nanoid() + this.userId
const jumptime = Date.parse(new Date()) / 1000
this.getshareData2(shareCode, jumptime,0)
// #endif
} }
}) })
}, },
...@@ -780,13 +784,17 @@ ...@@ -780,13 +784,17 @@
} }
}) })
}, },
getshareData2(shareCode,jumptime) { 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 + "&"
: shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.fileId
console.log('this.courseInfo',this.courseInfo);
let data = { let data = {
title: this.courseInfo.fileTitle, title: this.courseInfo.fileTitle,
desc: '加入我们开启学习之旅', // desc: '加入我们开启学习之旅',
link: shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.fileId + desc:this.courseInfo.fileSynopsis,
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' + link: newLink, //分享链接
this.userId + '&jumpUrl=' + jumptime + "&", //分享链接
imgUrl: this.courseInfo.displayImage, //图片 imgUrl: this.courseInfo.displayImage, //图片
} }
//安卓机型获取当前页面路径 //安卓机型获取当前页面路径
...@@ -802,14 +810,19 @@ ...@@ -802,14 +810,19 @@
} }
} }
// let url = window.location.href.split('#')[0] // let url = window.location.href.split('#')[0]
hshare(data, url) hshare(data, url)
this.submitsuessc(shareCode,jumptime) if(type==1){
this.submitsuessc(shareCode,jumptime)
}
}, },
// H5 自定义分享 // H5 自定义分享
getshareData() { getshareData() {
let data = { let data = {
title: this.courseInfo.fileTitle, title: this.courseInfo.fileTitle,
desc: '加入我们开启学习之旅', // desc: '加入我们开启学习之旅',
desc:this.courseInfo.fileSynopsis,
link: window.location.href, //分享链接 link: window.location.href, //分享链接
imgUrl: this.courseInfo.displayImage, //图片 imgUrl: this.courseInfo.displayImage, //图片
} }
...@@ -932,6 +945,7 @@ ...@@ -932,6 +945,7 @@
if(!this.realName){ if(!this.realName){
this.queryInfo(); this.queryInfo();
} }
// this.switchTab(1); // this.switchTab(1);
}, },
onShow() { onShow() {
...@@ -942,6 +956,7 @@ ...@@ -942,6 +956,7 @@
this.tabType = 1; this.tabType = 1;
this.courseDetail(); this.courseDetail();
uni.setStorageSync('entryUrl',window.location.href.split('#')[0]) uni.setStorageSync('entryUrl',window.location.href.split('#')[0])
}, },
mounted() { mounted() {
let _this = this; let _this = this;
...@@ -993,7 +1008,13 @@ ...@@ -993,7 +1008,13 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{
width: 100%;
height: auto;
box-sizing: border-box;
// padding: 20rpx;
}
page { page {
padding: 0; padding: 0;
} }
...@@ -1042,7 +1063,9 @@ ...@@ -1042,7 +1063,9 @@
} }
.courseTitleContent { .courseTitleContent {
height: 150rpx; box-sizing: border-box;
width: 100%;
height: auto;
background-color: #fff; background-color: #fff;
margin-bottom: 10rpx; margin-bottom: 10rpx;
padding: 20rpx 0rpx 20rpx 30rpx; padding: 20rpx 0rpx 20rpx 30rpx;
...@@ -1052,7 +1075,7 @@ ...@@ -1052,7 +1075,7 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 16rpx; margin-bottom: 16rpx;
box-sizing: border-box;
h4 { h4 {
font-size: 40rpx; font-size: 40rpx;
} }
......
<template> <template>
<view class="pad"> <view class="pad">
<!--搜索组件--> <!--搜索组件-->
<search :isSearch="1" :userId = "userId" @send="getCourseList"></search> <search
:isSearch="1"
:userId = "userId"
@send="getCourseList"
:initialQuery="queryName"
></search>
<!--轮播组件--> <!--轮播组件-->
<view class="banner"> <view class="banner">
<view class="uni-margin-wrap"> <view class="uni-margin-wrap">
<carousel :carouselList="fileUploadItemCFFPList"></carousel> <carousel :carouselList="fileUploadItemCFFPList"></carousel>
</view> </view>
</view> </view>
<h4 v-if="cffpCourseInfos.length<=0" class="noListTip">暂无课程列表</h4> <h4 v-if="cffpCourseInfos.length<=0" class="noListTip">暂无产品列表</h4>
<view class="ulBox" v-if="cffpCourseInfos.length>0"> <view class="ulBox" v-if="cffpCourseInfos.length>0">
<view class="liBox" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)"> <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}" :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}"></course-item> <!-- :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}" -->
<course-item
:thumbnailPath="item.displayImage"
:title="item.fileTitle"
:summaryBox="item.fileSynopsis"
:dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}"
></course-item>
</view> </view>
</view> </view>
</view> </view>
...@@ -43,9 +55,14 @@ ...@@ -43,9 +55,14 @@
carousel, carousel,
search search
}, },
onLoad(){
this.queryName = uni.getStorageSync('queryName'); onLoad() {
}, this.queryName = uni.getStorageSync('queryName') || '';
},
onShow() {
this.queryName = uni.getStorageSync('queryName') || '';
this.courseList();
},
methods:{ methods:{
goDetail(item){ goDetail(item){
uni.navigateTo({ uni.navigateTo({
...@@ -53,6 +70,7 @@ ...@@ -53,6 +70,7 @@
}); });
}, },
courseList(){ courseList(){
const param = { const param = {
queryName:this.queryName queryName:this.queryName
} }
...@@ -70,6 +88,7 @@ ...@@ -70,6 +88,7 @@
} }
}, },
getCourseList(res){ getCourseList(res){
console.log('res',res);
this.queryName = res; this.queryName = res;
this.courseList() this.courseList()
}, },
...@@ -97,13 +116,18 @@ ...@@ -97,13 +116,18 @@
} }
this.courseList(); this.courseList();
}, },
onTabItemTap() {
// 通过tabbar切换时清空storage
uni.removeStorageSync('queryName');
},
onHide() { onHide() {
this.queryName = ''
uni.removeStorageSync('queryName') uni.removeStorageSync('queryName')
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.ulBox,.liBox{ .ulBox,.liBox{
padding-bottom: 30rpx; padding-bottom: 30rpx;
display: flex; display: flex;
...@@ -120,11 +144,13 @@ ...@@ -120,11 +144,13 @@
} }
.pad{ .pad{
padding:0 30rpx 20rpx 30rpx; padding:0 30rpx 20rpx 30rpx;
.banner { .banner {
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
margin-bottom: 30rpx;
.swiper{ .swiper{
height: 200rpx; height: 250rpx;
} }
} }
} }
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
height: 100%; height: 100%;
margin-bottom: 20rpx; margin-bottom: 20rpx;
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
height:100%; height:100%;
.top{ .top{
......
...@@ -8,10 +8,22 @@ ...@@ -8,10 +8,22 @@
<text class="iconfont icon-31tishi" @click="getIntroduce('center')"></text> <text class="iconfont icon-31tishi" @click="getIntroduce('center')"></text>
</view> </view>
<!--搜索组件--> <!--搜索组件-->
<search :isSearch="0" :userId="userId"></search> <!-- <search
:isSearch="0"
:userId="userId"
></search> -->
<search
ref="searchRef"
:isSearch="0"
:userId="userId"
:initialQuery.sync="searchQuery"
v-if="showSearch"
></search>
<!--轮播组件--> <!--轮播组件-->
<view class="banner"> <view class="banner">
<view class="uni-margin-wrap"> <view class="uni-margin-wrap">
<carousel :carouselList="cffpUserInfo.fileUploadItemList"></carousel> <carousel :carouselList="cffpUserInfo.fileUploadItemList"></carousel>
</view> </view>
</view> </view>
...@@ -40,16 +52,17 @@ ...@@ -40,16 +52,17 @@
</view> </view>
<view class="course_content"> <view class="course_content">
<view class="tag"> <view class="tag">
<h4>精品课程</h4> <h4>推荐产品</h4>
<view @click="goToCourselist()">更多<text class="iconfont icon-youjiantou"></text></view> <view @click="goToCourselist()">更多<text class="iconfont icon-youjiantou"></text></view>
</view> </view>
<!-- <courselist :onlyShowList="0"></courselist> --> <!-- <courselist :onlyShowList="0"></courselist> -->
<view class="ulBox" v-if="cffpCourseInfos.length>0"> <view class="ulBox" v-if="cffpCourseInfos.length>0">
<view class="liBox" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)"> <view class="liBox" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)">
<!-- :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}" -->
<course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" <course-item :thumbnailPath="item.displayImage" :title="item.fileTitle"
:summaryBox="item.fileSynopsis" :summaryBox="item.fileSynopsis"
:dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}"
:tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}"></course-item> ></course-item>
</view> </view>
</view> </view>
</view> </view>
...@@ -76,7 +89,8 @@ ...@@ -76,7 +89,8 @@
export default { export default {
data() { data() {
return { return {
showSearch: true,
searchQuery: '',
companyFullName : companyInfo.companyFullName, companyFullName : companyInfo.companyFullName,
cffpCourseInfos: [], cffpCourseInfos: [],
x: 0, x: 0,
...@@ -106,13 +120,13 @@ ...@@ -106,13 +120,13 @@
link: '/pages/application-process/basic-info', link: '/pages/application-process/basic-info',
isOpen: true isOpen: true
}, },
{ // {
key: '03', // key: '03',
name: '学习认证', // name: '学习认证',
icon: 'learningCertify', // icon: 'learningCertify',
link: '/pages/learnCertify/learnCertify', // link: '/pages/learnCertify/learnCertify',
isOpen: true // isOpen: true
}, // },
{ {
key: '04', key: '04',
name: '邀请加盟', name: '邀请加盟',
...@@ -121,27 +135,27 @@ ...@@ -121,27 +135,27 @@
isOpen: true, isOpen: true,
isJoin: true isJoin: true
}, },
{ // {
key: '05', // key: '05',
name: '我的分享', // name: '我的分享',
icon: 'share', // icon: 'share',
link: '/pages/myShare/myShare', // link: '/pages/myShare/myShare',
isOpen: true // isOpen: true
}, // },
{ // {
key: '06', // key: '06',
name: '我的团队', // name: '我的团队',
icon: 'team', // icon: 'team',
link: '/pages/personalCenter/myTeam', // link: '/pages/personalCenter/myTeam',
isOpen: true // isOpen: true
}, // },
{ // {
key: '07', // key: '07',
name: '更多功能', // name: '更多功能',
icon: 'more', // icon: 'more',
link: '/pages/personalCenter/personalCenter', // link: '/pages/personalCenter/personalCenter',
isOpen: true // isOpen: true
} // }
], ],
cffpUserInfo: { cffpUserInfo: {
address: '', address: '',
...@@ -159,7 +173,7 @@ ...@@ -159,7 +173,7 @@
shareId: null, shareId: null,
kefu: '../../static/kefu.png', kefu: '../../static/kefu.png',
loginornot: true, loginornot: true,
queryName: '' queryName: '',
} }
}, },
components: { components: {
...@@ -172,8 +186,17 @@ ...@@ -172,8 +186,17 @@
onShow() { onShow() {
this.init(); this.init();
this.showSearch = false;
this.$nextTick(() => {
this.showSearch = true;
this.searchQuery = '';
});
}, },
onLoad() { onLoad(options) {
if(options.clearFlag){
uni.setStorageSync('loginType', 'visitor');
}
//如果用户在其他的地方快捷登录,没有返回到首页,执行此监听方法 //如果用户在其他的地方快捷登录,没有返回到首页,执行此监听方法
uni.$on('loginUpdate',()=>{ uni.$on('loginUpdate',()=>{
this.queryAreaCenterInfo(); this.queryAreaCenterInfo();
...@@ -184,8 +207,13 @@ ...@@ -184,8 +207,13 @@
this.courseList(); this.courseList();
} }
}, },
beforeDestroy() {
// 清除事件监听
uni.$off('loginUpdate', this.queryAreaCenterInfo);
},
methods: { methods: {
init() { init() {
if (uni.getStorageSync('isLogin')) { if (uni.getStorageSync('isLogin')) {
let loginType = uni.getStorageSync('loginType') let loginType = uni.getStorageSync('loginType')
...@@ -254,8 +282,11 @@ ...@@ -254,8 +282,11 @@
icon: 'none' icon: 'none'
}); });
uni.clearStorageSync(); uni.clearStorageSync();
uni.redirectTo({ // uni.redirectTo({
url: '/components/login/login' // url: '/components/login/login'
// })
uni.navigateTo({
url: '/components/login/login?from=index'
}) })
return false return false
} }
...@@ -375,6 +406,10 @@ ...@@ -375,6 +406,10 @@
.banner { .banner {
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
margin-bottom: 30rpx;
.swiper{
height: 250rpx;
}
} }
} }
...@@ -463,6 +498,7 @@ ...@@ -463,6 +498,7 @@
.ulBox { .ulBox {
flex-direction: column; flex-direction: column;
width: 100%;
} }
.liBox { .liBox {
...@@ -470,6 +506,7 @@ ...@@ -470,6 +506,7 @@
border-radius: 20rpx; border-radius: 20rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
padding: 10rpx; padding: 10rpx;
width: 100%;
} }
.description { .description {
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
height: 100vh; height: 100vh;
background: url('../../static/app-plus/registerBg.png') 100% 100%; background: url('../../static/app-plus/registerBg.png') 100% 100%;
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.content { .content {
height: 100vh; height: 100vh;
background: #20279B; background: #20279B;
......
...@@ -368,7 +368,7 @@ ...@@ -368,7 +368,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container { .container {
position: relative; position: relative;
height: 100vh; height: 100vh;
......
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.certify_content { .certify_content {
background: #F1F6FF; background: #F1F6FF;
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx 24rpx 0 0;
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
height: 100%; height: 100%;
.dataCountBox{ .dataCountBox{
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
position: relative; position: relative;
height: 100%; height: 100%;
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
position: relative; position: relative;
height: 100%; height: 100%;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<h4>积分明细</h4> <h4>积分明细</h4>
</view> </view>
<view class="point_content_list"> <view class="point_content_list">
<view>课程大类</view> <view>产品名称</view>
<view>积分来源</view> <view>积分来源</view>
<view>获得积分</view> <view>获得积分</view>
<view>操作</view> <view>操作</view>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
maxDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`, maxDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
navList:[{name:'日积分',timeFlag:'D'},{name:'月积分',timeFlag:'M'},{name:'年积分',timeFlag:'Y'}], navList:[{name:'日积分',timeFlag:'D'},{name:'月积分',timeFlag:'M'},{name:'年积分',timeFlag:'Y'}],
timeFlag:'D', timeFlag:'D',
pointList:[{name:'课程大类',id:1,source:'销售收入',classify:'家组信托',score:100}], // pointList:[{name:'课程大类',id:1,source:'销售收入',classify:'家组信托',score:100}],
sumCommissionAmount:'',//总积分 sumCommissionAmount:'',//总积分
nowSumCommissionAmount:'', //当前(日月年)积分 nowSumCommissionAmount:'', //当前(日月年)积分
prePercent:'',//比前日、上月,上年多或少的百分比数据 prePercent:'',//比前日、上月,上年多或少的百分比数据
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
.top{ .top{
background: linear-gradient(179deg, #F8B588 0%, rgba(255,239,216,0.2) 100%); background: linear-gradient(179deg, #F8B588 0%, rgba(255,239,216,0.2) 100%);
......
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
.top{ .top{
padding: 30rpx; padding: 30rpx;
......
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container { .container {
height: 100%; height: 100%;
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<h3>{{popupTitle}}</h3> <h3>{{popupTitle}}</h3>
<i class="iconfont icon-guanbi" @click="closePopup(1)"></i> <i class="iconfont icon-guanbi" @click="closePopup(1)"></i>
</view> </view>
<view v-if="popupType===1"><text>1积分=1元,积分抵扣如同现金,所有课程均可使用.</text></view> <view v-if="popupType===1"><text>1积分=1元,积分抵扣如同现金,所有产品均可使用.</text></view>
<view v-if="popupType===2"> <view v-if="popupType===2">
<view class="deductionInfoItem" :class="{'actived':isDeduction == 'true'}" @click="selectDeduction(true)"> <view class="deductionInfoItem" :class="{'actived':isDeduction == 'true'}" @click="selectDeduction(true)">
<view style="display: flex;"> <view style="display: flex;">
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
<view class="tips"> <view class="tips">
<!-- <view class="text-center">请点击右上角菜单</view> --> <!-- <view class="text-center">请点击右上角菜单</view> -->
<view style="line-height: 60rpx;">戳这里,点击<text class="iconfont icon-liulanqi"></text> <view style="line-height: 60rpx;">戳这里,点击<text class="iconfont icon-liulanqi"></text>
按钮,使用系统浏览器打开页面完成支付,完成后请返回微信,到【销售课程】下,查看购买订单。</view> 按钮,使用系统浏览器打开页面完成支付,完成后请返回微信,到【销售中心】下,查看购买订单。</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -528,7 +528,7 @@ ...@@ -528,7 +528,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container { .container {
position: relative; position: relative;
height: 95vh; height: 95vh;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<script> <script>
import api from "@/api/api"; import api from "@/api/api";
import common from "@/common/common"; import common from "@/common/common";
import dataHandling from "@/util/dataHandling";
export default { export default {
data() { data() {
return { return {
...@@ -74,14 +75,14 @@ ...@@ -74,14 +75,14 @@
alias: 'userName', alias: 'userName',
pageArea: 1 pageArea: 1
}, },
{ // {
id: 6, // id: 6,
name: '商品讲师', // name: '商品讲师',
value: '/', // value: '/',
type: 'string', // type: 'string',
alias: 'lecturerName', // alias: 'lecturerName',
pageArea: 1 // pageArea: 1
}, // },
{ {
id: 7, id: 7,
name: '订单现价', name: '订单现价',
...@@ -164,12 +165,20 @@ ...@@ -164,12 +165,20 @@
api.userCourseInfo(param).then(res => { api.userCourseInfo(param).then(res => {
if (res['success']) { if (res['success']) {
const data = this.orderDetail = res['data']['orderDetail']; const data = this.orderDetail = res['data']['orderDetail'];
if(this.orderDetail.effectiveEndDate){
this.orderDetail.effectiveEndDate = dataHandling.dateFormat(this.orderDetail.effectiveEndDate)
}
if(this.orderDetail.orderConfirmDate){
this.orderDetail.orderConfirmDate = dataHandling.dateFormat(this.orderDetail.orderConfirmDate)
}
this.fileId = data.fileId; this.fileId = data.fileId;
Object.keys(data).map((key, item) => { Object.keys(data).map((key, item) => {
this.orderInfoList.forEach(val => { this.orderInfoList.forEach(val => {
if (val.alias == key) { if (val.alias == key) {
val.value = data[key]; val.value = data[key];
} }
}) })
}) })
} }
...@@ -206,7 +215,7 @@ ...@@ -206,7 +215,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container { .container {
height: 100%; height: 100%;
......
...@@ -18,13 +18,14 @@ ...@@ -18,13 +18,14 @@
<view class="courlistBox"> <view class="courlistBox">
<view class="course_content"> <view class="course_content">
<view class="tag"> <view class="tag">
<h4>精品课程</h4> <h4>推荐产品</h4>
<view @click="goToCourselist()">更多<text class="iconfont icon-youjiantou"></text></view> <view @click="goToCourselist()">更多<text class="iconfont icon-youjiantou"></text></view>
<!-- <view v-if="this.isRedirect == 1" @click="goToCourselist()">更多<text class="iconfont icon-youjiantou"></text></view> --> <!-- <view v-if="this.isRedirect == 1" @click="goToCourselist()">更多<text class="iconfont icon-youjiantou"></text></view> -->
</view> </view>
<view class="ulBox" v-if="cffpCourseInfos.length>0"> <view class="ulBox" v-if="cffpCourseInfos.length>0">
<view class="liBox" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)"> <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}" :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}"></course-item> <!-- :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}" -->
<course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" ></course-item>
</view> </view>
</view> </view>
</view> </view>
...@@ -124,7 +125,7 @@ ...@@ -124,7 +125,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.ulBox{ .ulBox{
flex-direction: column; flex-direction: column;
} }
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.content{ .content{
width: 100%; width: 100%;
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.top{ .top{
display: flex; display: flex;
height: 80rpx; height: 80rpx;
......
...@@ -22,5 +22,5 @@ ...@@ -22,5 +22,5 @@
} }
</script> </script>
<style> <style lang="scss" scoped>
</style> </style>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
height: 100%; height: 100%;
background: #FFFFFF; background: #FFFFFF;
......
...@@ -107,8 +107,8 @@ ...@@ -107,8 +107,8 @@
}, },
{id:'02',categoryName:'活动管理', {id:'02',categoryName:'活动管理',
children:[ children:[
{title:'我的学习',icon:'myLearning',link:'/pages/myLearning/myLearning',isOpen:true,isShow:true}, // {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:'learningCertify',link:'/pages/learnCertify/learnCertify',isOpen:true,isShow:true,islogin:true},
{title:'我的分享',icon:'share',link:'/pages/myShare/myShare',isOpen:true,isShow:true} {title:'我的分享',icon:'share',link:'/pages/myShare/myShare',isOpen:true,isShow:true}
], ],
}, },
...@@ -126,9 +126,9 @@ ...@@ -126,9 +126,9 @@
} }
], ],
minorMenuLists:[ minorMenuLists:[
{title:'我的邀请码',icon:'shareEcode',link:'',isOpen:true,isShow:true}, // {title:'我的邀请码',icon:'shareEcode',link:'',isOpen:true,isShow:true},
{title:'我的卡包',icon:'card',link:'',isOpen:true,isShow:false}, {title:'我的卡包',icon:'card',link:'',isOpen:true,isShow:false},
{title:'我的认证',icon:'myCertify',link:'/pages/myCertify/myCertify',isOpen:true,isShow:true}, // {title:'我的认证',icon:'myCertify',link:'/pages/myCertify/myCertify',isOpen:true,isShow:true},
{title:'申请修改公司周边',icon:'setting',link:'',isOpen:true,isShow:false}, {title:'申请修改公司周边',icon:'setting',link:'',isOpen:true,isShow:false},
{title:'我的消息',icon:'message',link:'/pages/systemMsg/system_msg',isOpen:true,isShow:true,islogin:true}, {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} {title:'系统设置',icon:'setting',link:'/pages/personalCenter/system/settings',isOpen:true,isShow:true}
...@@ -180,8 +180,11 @@ ...@@ -180,8 +180,11 @@
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}); });
// uni.redirectTo({
// url:'/components/login/login?from=personalCenter'
// })
uni.redirectTo({ uni.redirectTo({
url:'/components/login/login' url: '/components/login/login?from=personalCenter'
}) })
try { try {
uni.clearStorageSync(); uni.clearStorageSync();
...@@ -193,8 +196,12 @@ ...@@ -193,8 +196,12 @@
}, },
// 菜单跳转页面 // 菜单跳转页面
goDetail(item){ goDetail(item){
if(!this.loginornot&& !item.islogin){ if(!this.loginornot&& !item.islogin){
console.log('详情方法',item);
this.isLogin() this.isLogin()
return
} }
if(item.isShow && item.isOpen){ if(item.isShow && item.isOpen){
if(item.title==='我的邀请码'){ if(item.title==='我的邀请码'){
...@@ -219,6 +226,7 @@ ...@@ -219,6 +226,7 @@
url: `${item.link}?levelCode=` + this.customerBasicInfo.levelCode url: `${item.link}?levelCode=` + this.customerBasicInfo.levelCode
}); });
}else{ }else{
item.link = `${item.link}?from=personalCenter`
uni.navigateTo({ uni.navigateTo({
url: item.link url: item.link
}); });
...@@ -278,7 +286,7 @@ ...@@ -278,7 +286,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
// padding-bottom: 160rpx; // padding-bottom: 160rpx;
} }
......
...@@ -60,6 +60,6 @@ ...@@ -60,6 +60,6 @@
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
</style> </style>
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
<text style="font-size: 28rpx;">注销账号后不可恢复,该账号绑定的所有权益、积分、记录等数据也将都被清空且无法恢复,包括:</text> <text style="font-size: 28rpx;">注销账号后不可恢复,该账号绑定的所有权益、积分、记录等数据也将都被清空且无法恢复,包括:</text>
</view> </view>
<ul class="tips"> <ul class="tips">
<li>所有积分权益不可使用</li> <li>所有积分权益不可使用</li>
<li>已购买的课程无法观看</li> <li>所有分享数据被清空;</li>
<li>已获得认证的证书无法查看</li> <li>所有订单数据被清空;</li>
<li>学习数据将被清除</li> <li>其他未列数据被清空且无法恢复</li>
</ul> </ul>
<view class="footer" style=""> <view class="footer" style="">
<view class="footer-submitbtn" style="" @click="sunmit()"> <view class="footer-submitbtn" style="" @click="sunmit()">
...@@ -63,8 +63,10 @@ ...@@ -63,8 +63,10 @@
title: '操作成功', title: '操作成功',
icon: 'none' icon: 'none'
}); });
// 清空全部本地存储
uni.clearStorageSync();
uni.redirectTo({ uni.redirectTo({
url:'/components/login/login' url:'/components/login/login?from=index'
}) })
} }
}) })
...@@ -73,7 +75,7 @@ ...@@ -73,7 +75,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
padding: 0 20rpx; padding: 0 20rpx;
} }
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.personalInfo { .personalInfo {
background: #fff; background: #fff;
width: 95%; width: 95%;
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.content{ .content{
height: 100%; height: 100%;
width: 100vw; width: 100vw;
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.content{ .content{
height: 100%; height: 100%;
width: 100vw; width: 100vw;
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.content{ .content{
height: 100%; height: 100%;
width: 100vw; width: 100vw;
......
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container { .container {
position: relative; position: relative;
height: 100%; height: 100%;
......
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.content { .content {
width: 100vw; width: 100vw;
height: 100%; height: 100%;
......
...@@ -12,8 +12,19 @@ ...@@ -12,8 +12,19 @@
</view> --> </view> -->
<view class="band"> <view class="band">
<view class="contentItem"> <view class="contentItem">
<!-- @keydown="handleKeyDown"
@compositionstart="isComposing = true"
@compositionend="handleCompositionEnd"
@input="handleInput" -->
<text>真实名称</text> <text>真实名称</text>
<input class="user-input" v-model="optionForm.realName" type="text" placeholder="请输入姓名" /> <input
class="user-input"
v-model="optionForm.realName"
type="text"
placeholder="请输入姓名"
maxlength="20"
/>
</view> </view>
<view class="contentItem"> <view class="contentItem">
<text>昵称</text> <text>昵称</text>
...@@ -43,6 +54,9 @@ ...@@ -43,6 +54,9 @@
export default { export default {
data() { data() {
return { return {
isComposing: false,
// 敏感词列表(可扩展)
bannedWords: ["admin", "test", "root", "password"],
companyType : companyInfo.companyType, companyType : companyInfo.companyType,
companyLogo : '../../static/myteam/logo.png', companyLogo : '../../static/myteam/logo.png',
dataForm: { dataForm: {
...@@ -88,6 +102,55 @@ ...@@ -88,6 +102,55 @@
this.optionForm = JSON.parse(options.customerBasicInfo) this.optionForm = JSON.parse(options.customerBasicInfo)
}, },
methods: { methods: {
handleKeyDown(e) {
console.log('this.isComposing',this.isComposing);
const key = e.key;
if (this.isComposing || ["Backspace", "Delete", "ArrowLeft", "ArrowRight"].includes(key)) return;
if (!/^[a-zA-Z0-9\u4e00-\u9fa5]$/.test(key)) {
e.preventDefault();
uni.showToast({ title: "请输入汉字", icon: "none" });
}
},
handleInput(e) {
if (this.isComposing) return; // 正在输入拼音,不处理
let value = e.detail.value;
// 1. 过滤特殊字符(仅允许英文、数字、汉字)
value = value.replace(/[^a-zA-Z0-9\u4e00-\u9fa5]/g, "");
// 2. 检查敏感词
const hasBannedWord = this.bannedWords.some(word =>
value.toLowerCase().includes(word.toLowerCase())
);
if (hasBannedWord) {
uni.showToast({
title: "包含敏感词汇,请修改",
icon: "none"
});
value = value.replace(new RegExp(this.bannedWords.join("|"), "gi"), "");
}
// 3. 限制长度(20字符)
if (value.length > 20) {
value = value.slice(0, 20);
uni.showToast({
title: "最多输入20个字符",
icon: "none"
});
}
// 4. 更新数据
this.optionForm.realName = value;
this.$nextTick(() => this.optionForm.realName = value); // iOS 兼容
},
handleCompositionEnd(e) {
this.isComposing = false;
this.handleInput(e); // 拼音输入结束,检查内容
},
goBack() { goBack() {
let back = getCurrentPages(); let back = getCurrentPages();
if (back && back.length > 1) { if (back && back.length > 1) {
...@@ -111,18 +174,20 @@ ...@@ -111,18 +174,20 @@
return; return;
}else if (!common.nameValid(this.optionForm.realName)) { }else if (!common.nameValid(this.optionForm.realName)) {
let that = this; let that = this;
uni.showModal({ uni.showToast({title: '请填写真实姓名',duration: 2000,icon: 'none'});
content: '真实姓名不合规,是否继续保存', this.optionForm.realName = ''
confirmText: '保存', // uni.showModal({
cancelText: '取消', // content: '真实姓名不合规,是否继续保存',
success: function (res) { // confirmText: '保存',
if (res.confirm) { // cancelText: '取消',
that.saveUserInfo(); // success: function (res) {
}else{ // if (res.confirm) {
return; // that.saveUserInfo();
} // }else{
} // return;
}); // }
// }
// });
}else{ }else{
this.saveUserInfo(); this.saveUserInfo();
} }
...@@ -150,6 +215,11 @@ ...@@ -150,6 +215,11 @@
</script> </script>
<style scoped> <style scoped>
.input-tip {
color: #ff5a5f;
font-size: 12px;
margin-left: 10px;
}
.content { .content {
width: 100vw; width: 100vw;
} }
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
.top{ .top{
width: 100%; width: 100%;
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
.top{ .top{
width: 100%; width: 100%;
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.header { .header {
display: flex; display: flex;
justify-content: center; justify-content: center;
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
<!-- 分享明细 --> <!-- 分享明细 -->
<view class="saleDetailContent"> <view class="saleDetailContent">
<view class="courseTab"> <view class="courseTab">
<text :class="{'actived':tabType===1}" @click="switchTab(1)">我的课程</text> <text :class="{'actived':tabType===1}" @click="switchTab(1)">我的订单</text>
<text :class="{'actived':tabType===2}" @click="switchTab(2)">分享课程</text> <text :class="{'actived':tabType===2}" @click="switchTab(2)">分享订单</text>
</view> </view>
<view class="totalCountBox">合计(单):<text>{{userCourseCountNum}}</text></view> <view class="totalCountBox">合计(单):<text>{{userCourseCountNum}}</text></view>
<h4 class="noListTip" v-if="!userCourses || userCourses.length<=0 && tabType===1">暂无购买记录!</h4> <h4 class="noListTip" v-if="!userCourses || userCourses.length<=0 && tabType===1">暂无购买记录!</h4>
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
</view> </view>
</template> </template>
<template v-if="userCourses && tabType===2"> <template v-if="userCourses && tabType===2">
<view class="orderItemDetailBox" v-for="item in userShareCourseOrders"> <view class="orderItemDetailBox" v-for="item in userShareCourseOrders" :key="index">
<view><text>订单编号</text><text>{{item.orderNo}}</text></view> <view><text>订单编号</text><text>{{item.orderNo}}</text></view>
<view><text>课程名称</text><text>{{item.fileTitle}}</text></view> <view><text>产品名称</text><text>{{item.fileTitle}}</text></view>
<view><text>购买人</text><text>{{item.userName}}</text></view> <view><text>购买人</text><text>{{item.userName}}</text></view>
<view class="orderDetailLine"> <view class="orderDetailLine">
<text></text> <text></text>
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
height: 100%; height: 100%;
.top{ .top{
......
...@@ -14,6 +14,6 @@ ...@@ -14,6 +14,6 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
</style> </style>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.top{ .top{
display: flex; display: flex;
height: 100rpx; height: 100rpx;
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.top{ .top{
display: flex; display: flex;
height: 80rpx; height: 80rpx;
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.content_wrapper{ .content_wrapper{
padding: 30rpx; padding: 30rpx;
h4{ h4{
......
...@@ -320,7 +320,7 @@ ...@@ -320,7 +320,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.top{ .top{
width: 100%; width: 100%;
text-align: center; text-align: center;
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.container{ .container{
height:100%; height:100%;
.top{ .top{
......
...@@ -525,7 +525,7 @@ ...@@ -525,7 +525,7 @@
} }
</script> </script>
<style> <style scoped>
@import '../sfpCommon.css'; @import '../sfpCommon.css';
@import url("childEdu.css"); @import url("childEdu.css");
</style> </style>
...@@ -34,6 +34,7 @@ export default{ ...@@ -34,6 +34,7 @@ export default{
}, },
// 日期格式化 // 日期格式化
dateFormat(val:number,format='yyyy-MM-dd hh:mm:ss'){ dateFormat(val:number,format='yyyy-MM-dd hh:mm:ss'){
console.log('val',val);
if(val){ if(val){
const date = new Date(val); const date = new Date(val);
const year = date.getFullYear(); const year = date.getFullYear();
......
...@@ -35,6 +35,7 @@ export function initJssdkShare(callback, url) { ...@@ -35,6 +35,7 @@ export function initJssdkShare(callback, url) {
} }
// data是穿的参数 url是当前页面的链接 // data是穿的参数 url是当前页面的链接
export function hshare(data,url){ export function hshare(data,url){
console.log('data,url',data,url);
// initJssdkShare(data, url) // initJssdkShare(data, url)
initJssdkShare(function(){ initJssdkShare(function(){
jWeixin.ready(function(){ jWeixin.ready(function(){
......
...@@ -7,31 +7,36 @@ const whiteList = [ ...@@ -7,31 +7,36 @@ const whiteList = [
'/pages/orderDetail/orderDetail', '/pages/orderDetail/orderDetail',
'/pages/courseDetail/courseDetail', '/pages/courseDetail/courseDetail',
'/pages/courselist/courselist', '/pages/courselist/courselist',
'/pages/index/index', '/pages/index/index'
] ]
export default function initApp(){ export default function initApp(){
uni.addInterceptor('navigateTo', { uni.addInterceptor('navigateTo', {
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转 // 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke (e) { invoke (e) {
let whiteArr = ['index','personalCenter','courselist','product']
// 1. 解析 URL 中的 from 参数
const getQueryParam = (url, key) => {
const queryString = url.split('?')[1];
if (!queryString) return null;
const params = new URLSearchParams(queryString);
return params.get(key);
};
const fromParam = getQueryParam(e.url, 'from');
if(!hasPermission(e.url)){ if(!hasPermission(e.url)){
uni.redirectTo({ // 如果 from 参数在 whiteArr 中,说明是tabbar页带着tabbar的标志参数跳转到登录页,以便未登录状态下回到对应的tabbar页
url: '/components/login/login' if (fromParam && whiteArr.includes(fromParam)) {
}) uni.redirectTo({
return false url: `/components/login/login?from=${fromParam}`
} })
return true }else {
}, uni.redirectTo({
success (e) { url: '/components/login/login'
} })
}) }
uni.addInterceptor('switchTab', {
// tabbar页面跳转前进行拦截
invoke (e) {
if(!hasPermission(e.url)){
uni.redirectTo({
url: '/components/login/login'
})
return false return false
} }
return true return true
...@@ -39,11 +44,28 @@ export default function initApp(){ ...@@ -39,11 +44,28 @@ export default function initApp(){
success (e) { 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) { function hasPermission (url) {
let islogin = uni.getStorageSync("isLogin");//在这可以使用token、vuex let islogin = uni.getStorageSync("isLogin");//在这可以使用token、vuex
// islogin = Boolean(Number(islogin));//返回布尔值 // islogin = Boolean(Number(islogin));//返回布尔值
// 在白名单中或有登录判断条件可以直接跳转 // 在白名单中或有登录判断条件可以直接跳转
console.log(whiteList.indexOf(url.slice(0,url.indexOf('?'))) !== -1);
if(whiteList.indexOf(url.slice(0,url.indexOf('?'))) !== -1 || islogin) { if(whiteList.indexOf(url.slice(0,url.indexOf('?'))) !== -1 || islogin) {
return true return true
} }
......
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