Commit e4b94a5a by yuzhenWang

提交修复得520版本得bug,发布生产

parent 20e4495f
...@@ -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">
...@@ -103,34 +103,44 @@ ...@@ -103,34 +103,44 @@
<style lang="scss" scoped> <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="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() {
......
...@@ -35,7 +35,7 @@ const config = { ...@@ -35,7 +35,7 @@ const config = {
stage, stage,
prod prod
} }
let env = 'dev'; let env = 'prod';
let baseURL = config[env].base_url; let baseURL = config[env].base_url;
let apiURL = config[env].api_url; let apiURL = config[env].api_url;
......
...@@ -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>
......
...@@ -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">
...@@ -577,6 +577,11 @@ ...@@ -577,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
} }
}) })
}, },
...@@ -779,14 +784,17 @@ ...@@ -779,14 +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: '加入我们开启学习之旅',
desc:this.courseInfo.fileSynopsis, desc:this.courseInfo.fileSynopsis,
link: shareURL + "/pages/courseDetail/courseDetail?fileId=" + this.fileId + link: newLink, //分享链接
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&", //分享链接
imgUrl: this.courseInfo.displayImage, //图片 imgUrl: this.courseInfo.displayImage, //图片
} }
//安卓机型获取当前页面路径 //安卓机型获取当前页面路径
...@@ -802,8 +810,12 @@ ...@@ -802,8 +810,12 @@
} }
} }
// let url = window.location.href.split('#')[0] // let url = window.location.href.split('#')[0]
hshare(data, url) hshare(data, url)
if(type==1){
this.submitsuessc(shareCode,jumptime) this.submitsuessc(shareCode,jumptime)
}
}, },
// H5 自定义分享 // H5 自定义分享
getshareData() { getshareData() {
...@@ -933,6 +945,7 @@ ...@@ -933,6 +945,7 @@
if(!this.realName){ if(!this.realName){
this.queryInfo(); this.queryInfo();
} }
// this.switchTab(1); // this.switchTab(1);
}, },
onShow() { onShow() {
...@@ -943,6 +956,7 @@ ...@@ -943,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;
...@@ -995,6 +1009,12 @@ ...@@ -995,6 +1009,12 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container{
width: 100%;
height: auto;
box-sizing: border-box;
// padding: 20rpx;
}
page { page {
padding: 0; padding: 0;
} }
...@@ -1043,7 +1063,9 @@ ...@@ -1043,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;
...@@ -1053,7 +1075,7 @@ ...@@ -1053,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">
...@@ -50,8 +55,13 @@ ...@@ -50,8 +55,13 @@
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){
...@@ -60,6 +70,7 @@ ...@@ -60,6 +70,7 @@
}); });
}, },
courseList(){ courseList(){
const param = { const param = {
queryName:this.queryName queryName:this.queryName
} }
...@@ -77,6 +88,7 @@ ...@@ -77,6 +88,7 @@
} }
}, },
getCourseList(res){ getCourseList(res){
console.log('res',res);
this.queryName = res; this.queryName = res;
this.courseList() this.courseList()
}, },
...@@ -104,7 +116,12 @@ ...@@ -104,7 +116,12 @@
} }
this.courseList(); this.courseList();
}, },
onTabItemTap() {
// 通过tabbar切换时清空storage
uni.removeStorageSync('queryName');
},
onHide() { onHide() {
this.queryName = ''
uni.removeStorageSync('queryName') uni.removeStorageSync('queryName')
} }
} }
......
...@@ -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>
...@@ -77,7 +89,8 @@ ...@@ -77,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,
...@@ -160,7 +173,7 @@ ...@@ -160,7 +173,7 @@
shareId: null, shareId: null,
kefu: '../../static/kefu.png', kefu: '../../static/kefu.png',
loginornot: true, loginornot: true,
queryName: '' queryName: '',
} }
}, },
components: { components: {
...@@ -173,8 +186,17 @@ ...@@ -173,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();
...@@ -185,6 +207,11 @@ ...@@ -185,6 +207,11 @@
this.courseList(); this.courseList();
} }
}, },
beforeDestroy() {
// 清除事件监听
uni.$off('loginUpdate', this.queryAreaCenterInfo);
},
methods: { methods: {
init() { init() {
...@@ -471,6 +498,7 @@ ...@@ -471,6 +498,7 @@
.ulBox { .ulBox {
flex-direction: column; flex-direction: column;
width: 100%;
} }
.liBox { .liBox {
...@@ -478,6 +506,7 @@ ...@@ -478,6 +506,7 @@
border-radius: 20rpx; border-radius: 20rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
padding: 10rpx; padding: 10rpx;
width: 100%;
} }
.description { .description {
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
</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>
......
...@@ -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;
} }
......
...@@ -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(){
......
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