Commit 7e2ce587 by yuzhenWang

合并代码,已发布生产

parents 17a9e6a2 270fef94
...@@ -202,12 +202,81 @@ ...@@ -202,12 +202,81 @@
image{ image{
width: 100%!important; width: 100%!important;
} }
.container{ /* .container{
background-color: #FBFBFB; background-color: rgba(235, 239, 247, 1);
min-height: 100vh; /* 使用视口高度 */ min-height: 100vh;
height: auto !important; height: auto !important;
height: 100vh; height: 100vh;
} */
/* 全局基础样式 - 移动端优先 */
.container {
background-color: rgba(235, 239, 247, 1);
min-height: 100vh;
height: auto !important;
height: 100vh;
width: 100%;
max-width: 100%;
margin: 0 auto;
padding: 0;
box-sizing: border-box;
font-size: 28rpx;
} }
/* 手机端默认样式 (小于768px) */
/* @media (max-width: 767px) {
.container {
}
} */
/* 平板设备 (768px-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
.container {
/* max-width: 100%; */
}
/* iPad竖屏*/
/* @media (orientation: portrait) {
.container {
max-width: 650px;
}
} */
/* iPad横屏 */
@media (orientation: landscape) {
.container {
max-width: 1024px;
display: flex;
align-items: center;
flex-direction: column;
}
}
}
/* 小桌面设备 (1024px-1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
.container {
max-width: 1000px;
}
}
/* 大桌面设备 (1280px以上) */
@media (min-width: 1280px) {
.container {
max-width: 1200px;
}
}
/* 特殊iPad Pro尺寸适配 */
/* @media only screen
and (min-device-width: 1024px)
and (max-device-width: 1366px)
and (-webkit-min-device-pixel-ratio: 2) {
.container {
max-width: 1100px;
}
} */
.uni-popup .uni-popup__wrapper{ .uni-popup .uni-popup__wrapper{
/* margin: 30rpx!important; */ /* margin: 30rpx!important; */
} }
......
<template>
<!-- 悬浮按钮 -->
<view
class="floating-button"
:style="{ right: buttonRight + 'rpx', bottom: buttonBottom + 'rpx' }"
@touchstart="handleTouchStart"
@touchmove="handleTouchMove"
@touchend="handleTouchEnd"
@click="handleClick"
>
<!-- 默认内容 -->
<slot>
<view class="consultBtn">
<view class="iconfont icon-kefu"></view>
<view>咨询客服</view>
</view>
</slot>
</view>
</template>
<script>
export default {
name: 'FloatingButton',
data() {
return {
buttonRight: 10, // 初始位置,单位rpx
buttonBottom: 200, // 初始位置,单位rpx
startX: 0,
startY: 0,
isDragging: false,
windowWidth: 0,
windowHeight: 0,
buttonWidth: 140, // 按钮宽度,单位rpx
buttonHeight: 140 // 按钮高度,单位rpx
}
},
mounted() {
this.updateWindowSize();
// 监听窗口变化
uni.onWindowResize(() => {
this.updateWindowSize();
});
},
methods: {
// 更新窗口尺寸
updateWindowSize() {
const systemInfo = uni.getSystemInfoSync();
this.windowWidth = systemInfo.windowWidth;
this.windowHeight = systemInfo.windowHeight;
},
// 触摸开始事件
handleTouchStart(event) {
const touch = event.touches[0];
// 记录触摸点相对于按钮右下角的偏移量
this.startX = touch.clientX - (this.windowWidth - this.rpxToPx(this.buttonRight));
this.startY = touch.clientY - (this.windowHeight - this.rpxToPx(this.buttonBottom));
this.isDragging = false;
},
// 触摸移动事件
handleTouchMove(event) {
event.preventDefault(); // 阻止默认滚动行为
const touch = event.touches[0];
// 计算新的right和bottom值(像素单位)
let newRight = this.windowWidth - touch.clientX + this.startX;
let newBottom = this.windowHeight - touch.clientY + this.startY;
// 转换为rpx单位
this.buttonRight = this.pxToRpx(newRight);
this.buttonBottom = this.pxToRpx(newBottom);
this.isDragging = true;
// 限制按钮不超出屏幕(rpx单位)
const maxRight = this.windowWidth - this.rpxToPx(this.buttonWidth);
const maxBottom = this.windowHeight - this.rpxToPx(this.buttonHeight);
if (newRight < 0) {
this.buttonRight = this.pxToRpx(0);
} else if (newRight > maxRight) {
this.buttonRight = this.pxToRpx(maxRight);
}
if (newBottom < 0) {
this.buttonBottom = this.pxToRpx(0);
} else if (newBottom > maxBottom) {
this.buttonBottom = this.pxToRpx(maxBottom);
}
},
// 触摸结束事件
handleTouchEnd() {
if (!this.isDragging) {
this.handleClick();
}
},
// 点击事件
handleClick() {
// 现在还没转化成小程序,暂时放在这
// #ifdef MP-WEIXIN
uni.openCustomerServiceChat({
extInfo: {
url: 'https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e'
},
corpId: 'ww43cac1cf9dd6a3d0', // 客服会话按钮打开后,在微信客服会话按钮处理的事件类型
showMessageCard: true,
sendMessageTitle: (uni.getStorageSync('hoservice_mobileNo')?(uni.getStorageSync('hoservice_mobileNo')+",") :"" ) + "进入个人中心-->咨询客服",
sendMessagePath: `/pages/index/mySelf.html`,
//sendMessageImg: cardItem.value['list'][0]['itemImg']
});
// #endif
// #ifndef MP-WEIXIN
window.open('https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e')
// #endif
},
// rpx转px
rpxToPx(rpx) {
return rpx / 750 * this.windowWidth;
},
// px转rpx
pxToRpx(px) {
return px * 750 / this.windowWidth;
}
}
}
</script>
<style scoped lang="scss">
.floating-button {
position: fixed;
width: 140rpx;
height: 140rpx;
color: white;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 14px;
cursor: pointer;
user-select: none;
z-index: 9999;
.consultBtn{
display: flex;
align-items: center;
flex-direction: column;
color: #20279B;
font-size: 28rpx;
.icon-kefu{
font-size: 60rpx;
}
}
}
</style>
\ No newline at end of file
<template> <template>
<view class="container" > <view class="container" >
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;" v-if="isBack !=1"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;" v-if="isBack !=1"></text>
<!-- #endif -->
<view class="content" v-if="type == 1" :style="{'margin-top': isBack!=1 ? '60rpx' : '0'}"> <view class="content" v-if="type == 1" :style="{'margin-top': isBack!=1 ? '60rpx' : '0'}">
<view class="agreement-container"> <view class="agreement-container">
<!-- <scroll-view scroll-y="true" class="scroll-content"> --> <!-- <scroll-view scroll-y="true" class="scroll-content"> -->
...@@ -322,10 +325,7 @@ ...@@ -322,10 +325,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container{
padding: 30rpx; padding: 30rpx;
// padding-top: 40rpx; background-color: #f7f7f7;
letter-spacing: 1px;
background-color:#fff;
margin-bottom: 50rpx;
} }
.privacy-policy { .privacy-policy {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
...@@ -387,8 +387,6 @@ ...@@ -387,8 +387,6 @@
} }
.agreement-container { .agreement-container {
padding: 20rpx; padding: 20rpx;
background-color: #fff;
// height: 100vh;
margin-bottom: 50rpx; margin-bottom: 50rpx;
} }
...@@ -444,4 +442,4 @@ ...@@ -444,4 +442,4 @@
// height: 100%; // scroll-view 高度填满父容器 // height: 100%; // scroll-view 高度填满父容器
// overflow-y: auto; // 允许内部滚动 // overflow-y: auto; // 允许内部滚动
// } // }
</style> </style>
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="timeTitle"> <view class="timeTitle">
<view class="" v-if="initDate"> <view class="" v-if="initDate">
<text style="font-size: 30rpx;">{{initDate}}</text> <text style="font-size: 30rpx;">{{initDate}}</text>
<text v-if="iconDirection== 'down'" class="iconfont icon-xiajiantou iconStyle"></text> <text v-if="iconDirection== 'down'" class="iconfont icon-xiajiantou iconStyle" :style="{color:iconColor?iconColor:''}"></text>
<text v-if="iconDirection== 'right'" class="iconfont icon-youjiantou iconStyle"></text> <text v-if="iconDirection== 'right'" class="iconfont icon-youjiantou iconStyle"></text>
</view> </view>
<view class="emptyTxt" v-else> <view class="emptyTxt" v-else>
...@@ -64,6 +64,10 @@ ...@@ -64,6 +64,10 @@
type: String, type: String,
default: 'down' default: 'down'
}, },
iconColor:{
type: String,
default: '#000'
},
visible: { //显示组件 visible: { //显示组件
type: Boolean, type: Boolean,
default: false default: false
......
<template> <template>
<view class="itemContent"> <view class="itemContent">
<view class="thumbnailBox"> <view class="thumbnailBox">
<image :src="thumbnailPath" alt="" mode="widthFix"></image> <image :src="thumbnailPath" alt="" mode="widthFix" ></image>
</view> </view>
<view class="courseDetailBox"> <view class="courseDetailBox">
<view class="title"> <view class="title">
<view style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{title}}</view> <view style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{title}}</view>
<!-- <text class="detailBtn" @click="viewDetail()" v-if="isNeedViewDetail">订单详情></text> --> <!-- <text class="iconfont icon-youjiantou " v-if="showDetail"></text> -->
</view> </view>
<view class="summaryBox" v-if="summaryBox"> <view class="summaryBox" v-if="summaryBox">
<view class="text-wrap">{{summaryBox}}</view> <view class="text-wrap">{{summaryBox}}</view>
</view> </view>
<view class="dataBox" v-if="dataList"> <view class="dataBox" v-if="dataList">
<view class="price" v-if="dataList.coursePrice != 0" >{{dataList.coursePrice}}</view> <view class="price" v-if="dataList.coursePrice != 0" >{{Number(dataList.coursePrice).toFixed(2)}}</view>
<!-- <text v-if="dataList.coursePrice == 0">免费</text> --> <text v-if="dataList.coursePrice != 0 && dataList.salesNumber">{{dataList.salesNumber}}人购买</text>
<text v-if="dataList.coursePrice != 0">{{dataList.salesNumber}}人购买</text>
</view> </view>
<!-- <view class="tagListBox" v-if="tagList || fileLecturerId">
<template v-if="tagList">
<view class="tagItem" v-for="tagItem in tagConcat(tagList.v1,tagList.v2)">{{tagItem}}</view>
</template>
<template v-else-if="_tagList">
<view class="tagItem" v-for="tagItem in tagConcat(_tagList.v1,_tagList.v2)">{{tagItem}}</view>
</template>
</view> -->
</view> </view>
</view> </view>
</template> </template>
...@@ -61,7 +51,11 @@ ...@@ -61,7 +51,11 @@
}, },
fileId: { fileId: {
type: Number type: Number
} },
showDetail: { //展示详情箭头
type: Boolean,
default:false
},
}, },
data() { data() {
return { return {
...@@ -134,6 +128,8 @@ ...@@ -134,6 +128,8 @@
.title { .title {
// flex: 1; // flex: 1;
display: flex; display: flex;
align-items: center;
justify-content: space-between;
// max-width: 260rpx; // max-width: 260rpx;
// width: 0; // width: 0;
// flex-basis: 100rpx; // flex-basis: 100rpx;
......
...@@ -115,7 +115,6 @@ ...@@ -115,7 +115,6 @@
} }
this.loginType='visitor' this.loginType='visitor'
this.initForm() this.initForm()
uni.removeTabBarBadge({ index: 3 });
// 获取跳转来源(通过路由参数) // 获取跳转来源(通过路由参数)
const pages = getCurrentPages(); const pages = getCurrentPages();
const currentPage = pages[pages.length - 1]; const currentPage = pages[pages.length - 1];
......
...@@ -18,40 +18,7 @@ ...@@ -18,40 +18,7 @@
<view class="d-td"> <view class="d-td">
<view class="" style="display: flex;text-align: center;"> <view class="" style="display: flex;text-align: center;">
<!-- <view class="d-td" v-if="item.levelCode == 'B1'&& item.itemType == '1'"
@click="open(item, i)" :style="{'margin-left':(item.level * 20)+'rpx'}">
<view class="" style="display: flex;">
<text>{{item.areaCenterName}}</text>
<view class="" style="width: 36rpx;height: 36rpx;margin-left: 5rpx; ">
<image style="width: 36rpx;height: 36rpx;" src="../../static/Group1665.png"
mode="widthFix"></image>
</view>
</view>
</view> -->
<!-- <view class="d-td" @click="open(item, i)"
v-else-if="item.levelCode == 'C3'&& item.itemType == '1'"
:style="{'margin-left':(item.level * 20)+'rpx'}">
<view class="" style="display: flex;">
<text>{{item.areaCenterName}}</text>
<view class="" style="width: 36rpx;height: 36rpx;margin-left: 5rpx; ">
<image style="width: 36rpx;height: 36rpx;" src="../../static/Group1665.png"
mode="widthFix"></image>
</view>
</view>
</view> -->
<!-- <view class="d-td" @click="open(item, i)"
v-else-if="item.levelCode == 'C2'&& item.itemType == '1'"
:style="{'margin-left':(item.level * 20)+'rpx'}">
<view class="" style="display: flex;">
<text>{{item.areaCenterName}}</text>
<view class="" style="width: 36rpx;height: 36rpx;margin-left: 5rpx;">
<image style="width: 36rpx;height: 36rpx;" src="../../static/Group1665.png"
mode="widthFix"></image>
</view>
</view>
</view> -->
<!-- @click="open(item, i)" -->
<view class="d-td" :style="{'margin-left':(item.level * 20)+'rpx'}"> <view class="d-td" :style="{'margin-left':(item.level * 20)+'rpx'}">
<text v-if="dataShowType == 1">{{item.parentName}}</text> <text v-if="dataShowType == 1">{{item.parentName}}</text>
<view v-if="dataShowType == 2" style="text-align:center;"> <view v-if="dataShowType == 2" style="text-align:center;">
......
<template> <template>
<view class="search"> <view class="search">
<text class="iconfont icon-sousuo" @click="searchBtn()"></text>
<input <input
class="searchInput" class="searchInput"
type="text" type="text"
...@@ -9,9 +10,6 @@ ...@@ -9,9 +10,6 @@
@confirm="searchBtn()" @confirm="searchBtn()"
@input="handleInput" @input="handleInput"
/> />
<text class="iconfont icon-sousuo" @click="searchBtn()"></text>
<!-- <text class="iconfont icon-xiaoxi"></text>
<text class="system_msg" @click="jumpToSystemMsg()">{{messageUnreadCount}}</text> -->
</view> </view>
</template> </template>
...@@ -105,23 +103,25 @@ ...@@ -105,23 +103,25 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.search{ .search{
display: flex; display: flex;
margin: 30rpx auto; margin: 30rpx auto;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background: linear-gradient(to right,#E6F5FC,#FDE9F2); background-color: rgba(255, 255, 255, 0.5);
border-radius: 60rpx; border-radius: 15rpx;
padding: 0 15rpx;
.searchInput{ .searchInput{
margin-right: 20rpx; margin-left: 20rpx;
width: 85%; width: 100%;
padding: 15rpx; padding: 15rpx;
color: #fff;
font-size: 26rpx;
} }
.icon-sousuo{ .icon-sousuo{
font-size: 50rpx; font-size: 50rpx;
margin-right: 10rpx; color: #fff;
opacity: .7;
} }
.icon-xiaoxi{ .icon-xiaoxi{
font-size: 50rpx; font-size: 50rpx;
......
...@@ -33,7 +33,7 @@ let companyInfo = { ...@@ -33,7 +33,7 @@ let companyInfo = {
appName: '银盾家办', appName: '银盾家办',
companyName: '银盾家办', companyName: '银盾家办',
companyFullName: '银盾家办(广州)企业管理咨询有限公司', companyFullName: '银盾家办(广州)企业管理咨询有限公司',
companyLogo:'../../static/yd_Logo.png', companyLogo:'../../static/logo2.png',
systemType: 'NoIOS' systemType: 'NoIOS'
} }
const config = { const config = {
......
...@@ -21,4 +21,4 @@ export function createApp() { ...@@ -21,4 +21,4 @@ export function createApp() {
//#ifdef H5 //#ifdef H5
window.sessionStorage.setItem('firstEntryUrl',window.location.href.split('#')[0]) window.sessionStorage.setItem('firstEntryUrl',window.location.href.split('#')[0])
// #endif // #endif
\ No newline at end of file
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
}, { }, {
"path": "pages/application-process/basic-info", "path": "pages/application-process/basic-info",
"style": { "style": {
"navigationBarTitleText": "基本资料", "navigationBarTitleText": "申请加盟-基本资料",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"app-plus": { "app-plus": {
"softinputMode": "adjustPan" "softinputMode": "adjustPan"
...@@ -145,6 +145,22 @@ ...@@ -145,6 +145,22 @@
}, },
{ {
"path": "pages/personalCenter/myTeamIncubate",
"style": {
"navigationBarTitleText": "育成团队",
"enablePullDownRefresh": false
}
},
{
"path": "pages/personalCenter/helpCenter",
"style": {
"navigationBarTitleText": "帮助中心",
"enablePullDownRefresh": false
}
},
{
"path": "pages/myShare/myShare", "path": "pages/myShare/myShare",
"style": { "style": {
"navigationBarTitleText": "分享数据", "navigationBarTitleText": "分享数据",
...@@ -235,7 +251,7 @@ ...@@ -235,7 +251,7 @@
}, { }, {
"path": "pages/applyDropClass/applyDropClass", "path": "pages/applyDropClass/applyDropClass",
"style": { "style": {
"navigationBarTitleText": "申请退", "navigationBarTitleText": "申请退",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { }, {
......
<template> <template>
<view class="container"> <view class="container">
<!-- #ifdef APP -->
<view class="top"> <view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text style="font-size: 30rpx;">退单详情</text> <text style="font-size: 30rpx;">退单详情</text>
</view> </view>
<view class="returnCountsContainer"> <!-- #endif -->
<view class="left"> <view class="conentBox">
<h3 style="font-size: 40rpx;">{{courseInfoItem.orderStatusName}}</h3> <view class="returnCountsContainer">
<text style="font-size: 26rpx;">{{courseInfoItem.refundTime}}</text> <view class="left">
</view> <h3 style="font-size: 40rpx;">{{courseInfoItem.orderStatusName}}</h3>
<view class="right"> <text style="font-size: 26rpx;">{{courseInfoItem.refundTime}}</text>
<h3>{{courseInfoItem.refundAmount}}</h3> </view>
<text style="font-size: 26rpx;" @click="goDetail()">到账说明</text> <view class="right">
<h3>{{courseInfoItem.refundAmount}}</h3>
<text style="font-size: 26rpx;" @click="goDetail()">到账说明</text>
</view>
</view> </view>
</view> <!-- 退款进度 -->
<!-- 退款进度 --> <view class="returnProcessContainer">
<view class="returnProcessContainer"> <h4>退款进度</h4>
<h4>退款进度</h4> <view class="stepContainer">
<view class="stepContainer"> <view class="iconContainer">
<view class="iconContainer"> <view v-for="(item,index) in options" :key="index" :class="{'actived':index===processIndex}">
<view v-for="(item,index) in options" :key="index" :class="{'actived':index===processIndex}"> <view class="icon"></view>
<view class="icon"></view> <view class="line"></view>
<view class="line"></view> </view>
</view> </view>
</view> <view class="stepProcessContainer">
<view class="stepProcessContainer"> <view v-for="(item,index) in options" :key="index">
<view v-for="(item,index) in options" :key="index"> <text class="steps__column-title">{{item.title}}</text>
<text class="steps__column-title">{{item.title}}</text> <text class="steps__column-desc">{{item.desc}}</text>
<text class="steps__column-desc">{{item.desc}}</text> <text class="steps__column-desc">{{item.time}}</text>
<text class="steps__column-desc">{{item.time}}</text> </view>
</view> </view>
</view> </view>
</view> </view>
</view> <!-- 退款详情 -->
<!-- 退款详情 --> <view class="returnDetailContainer">
<view class="returnDetailContainer"> <h4>退款详情</h4>
<h4>退款详情</h4> <template v-if="courseInfoItem">
<template v-if="courseInfoItem"> <course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :fileLecturerId="courseInfoItem.fileLecturerId"></course-item>
<course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :fileLecturerId="courseInfoItem.fileLecturerId"></course-item> </template>
</template> <view class="returnInfoContent">
<view class="returnInfoContent"> <view>
<view> <text>退款单号:</text>
<text>退款单号:</text> <text>{{courseInfoItem.orderNo}}</text>
<text>{{courseInfoItem.orderNo}}</text> </view>
</view> <view>
<view> <text>申请时间:</text>
<text>申请时间:</text> <text>{{courseInfoItem.applyRefundTime}}</text>
<text>{{courseInfoItem.applyRefundTime}}</text> </view>
</view> <view>
<view> <text>退款金额:</text>
<text>退款金额:</text> <text>¥{{courseInfoItem.refundAmount}}</text>
<text>¥{{courseInfoItem.refundAmount}}</text> </view>
</view> <view>
<view> <text>支付违约金:</text>
<text>支付违约金:</text> <text>{{courseInfoItem.breachCommission?'¥':''}}{{courseInfoItem.breachCommission}}</text>
<text>{{courseInfoItem.breachCommission?'¥':''}}{{courseInfoItem.breachCommission}}</text> </view>
</view> <view>
<view> <text>退还积分:</text>
<text>退还积分:</text> <text>{{courseInfoItem.refundIntegralExchange}}</text>
<text>{{courseInfoItem.refundIntegralExchange}}</text> </view>
</view> <view v-if="courseInfoItem.orderRemark">
<view v-if="courseInfoItem.orderRemark"> <text >退款原因:</text>
<text >退款原因:</text> <text>{{courseInfoItem.orderRemark}}</text>
<text>{{courseInfoItem.orderRemark}}</text> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
...@@ -142,6 +147,11 @@ ...@@ -142,6 +147,11 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container{
height:100%; height:100%;
box-sizing: border-box;
.conentBox{
padding: 20rpx;
box-sizing: border-box;
}
.top{ .top{
display: flex; display: flex;
height: 80rpx; height: 80rpx;
...@@ -160,7 +170,8 @@ ...@@ -160,7 +170,8 @@
.returnCountsContainer,.returnProcessContainer,.returnDetailContainer{ .returnCountsContainer,.returnProcessContainer,.returnDetailContainer{
background-color: #fff; background-color: #fff;
padding: 20rpx 40rpx; padding: 20rpx 40rpx;
margin: 10rpx auto; margin-bottom: 20rpx;
border-radius: 10rpx;
h4{ h4{
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
......
<template> <template>
<view class="container"> <view class="container">
<view class="top"> <!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <view class="top">
<text style="font-size: 30rpx;">我的售后</text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
</view> <text style="font-size: 30rpx;">我的售后</text>
</view>
<!-- #endif -->
<h4 class="noListTip" v-if="userCourses.length <=0 ">暂无售后</h4> <h4 class="noListTip" v-if="userCourses.length <=0 ">暂无售后</h4>
<view class="ulBox" v-if="userCourses.length > 0"> <view class="ulBox" v-if="userCourses.length > 0">
<view class="conent">
<view class="liBox" v-for="item in userCourses" :key="item.orderId"> <view class="liBox" v-for="item in userCourses" :key="item.orderId">
<course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :fileLecturerId="item.fileLecturerId"></course-item> <course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :fileLecturerId="item.fileLecturerId"></course-item>
<view class="statusBox"> <view class="statusBox">
<text>{{item.orderStatusName}}</text> <text>{{item.orderStatusName}}</text>
<text @click="goDetail(item)">查看详情></text> <text @click="goDetail(item)">查看详情</text>
</view> </view>
</view> </view>
</view> </view>
</view>
</view> </view>
</template> </template>
...@@ -62,7 +67,14 @@ ...@@ -62,7 +67,14 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container{
height: 100%; .noListTip{
display: flex;
align-items: center;
justify-content: center;
width: 100%;
margin-top: 0%;
padding-top: 20%;
}
.top{ .top{
display: flex; display: flex;
height: 80rpx; height: 80rpx;
...@@ -79,19 +91,28 @@ ...@@ -79,19 +91,28 @@
} }
} }
.ulBox{ .ulBox{
margin-top: 20rpx; box-sizing: border-box;
padding: 20rpx 20rpx 5rpx 20rpx;
.conent{
border-radius: 10rpx;
}
.liBox{ .liBox{
background-color: #fff; background-color: #fff;
margin-bottom: 20rpx; margin-bottom: 20rpx;
padding: 36rpx 30rpx; padding: 36rpx 30rpx;
border-radius: 10rpx;
.statusBox{ .statusBox{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
text{ text{
color: #333; color: #333;
font-size: 32rpx; font-size: 32rpx;
&:last-child{ &:last-child{
color: #666; background-color: #2A36AD;
padding: 10rpx 20rpx;
border-radius: 40rpx;
color: #fff;
font-size: 28rpx; font-size: 28rpx;
} }
} }
......
.container { .container {
font-size: 36rpx; font-size: 36rpx;
// background: #fff;
// min-height: 100%;
overflow: auto; overflow: auto;
// padding-bottom: 80rpx;
.wrapper{ .wrapper{
background: #fff; background: #fff;
} }
......
<template> <template>
<view class="container" style="height: 1000rpx;"> <view class="container" style="height: 1000rpx;">
<view > <view >
<!-- #ifdef APP -->
<view class="top"> <view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>申请加盟</text> <text>申请加盟</text>
</view> </view>
<!-- #endif -->
<view class="page"> <view class="page">
<text class="num actived pass">1</text> <text class="num actived pass">1</text>
<text class="line line_pass"></text> <text class="line line_pass"></text>
......
<template> <template>
<view class="container"> <view class="container">
<!-- #ifdef APP -->
<view class="top"> <view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>申请加盟</text> <text>申请加盟</text>
</view> </view>
<!-- #endif -->
<view class="page"> <view class="page">
<text class="num actived">1</text> <text class="num actived">1</text>
<text class="line"></text> <text class="line"></text>
...@@ -121,7 +124,7 @@ ...@@ -121,7 +124,7 @@
/> />
</view> </view>
<view class="contentItem"> <view class="contentItem">
<text>居住地址</text> <text style="margin-left: 12rpx;">居住地址</text>
<view> <view>
<input <input
maxlength="50" maxlength="50"
......
<template> <template>
<view class="container"> <view class="container">
<!-- #ifdef APP -->
<view class="top"> <view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>申请加盟</text> <text>申请加盟</text>
</view> </view>
<!-- #endif -->
<view class="page"> <view class="page">
<text class="num actived pass">1</text> <text class="num actived pass">1</text>
<text class="line line_pass"></text> <text class="line line_pass"></text>
......
<template> <template>
<view class="container"> <view class="container">
<!-- #ifdef APP -->
<view class="top"> <view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>申请加盟</text> <text>申请加盟</text>
</view> </view>
<!-- #endif -->
<view class="page"> <view class="page">
<text class="num actived pass">1</text> <text class="num actived pass">1</text>
<text class="line line_pass"></text> <text class="line line_pass"></text>
...@@ -18,8 +21,6 @@ ...@@ -18,8 +21,6 @@
<text class="num">6</text> <text class="num">6</text>
<text class="line"></text> <text class="line"></text>
<text class="num">7</text> <text class="num">7</text>
<!-- <text class="line"></text>
<text class="num">8</text> -->
</view> </view>
<view class="wrapper"> <view class="wrapper">
<view class="title"> <view class="title">
...@@ -239,7 +240,7 @@ ...@@ -239,7 +240,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
@import 'applyCommon.scss'; @import 'applyCommon.scss';
.content_wrapper { .content_wrapper {
display: flex; display: flex;
justify-content: center; justify-content: center;
......
<template> <template>
<view class="container"> <view class="container">
<!-- #ifdef APP -->
<view class="top"> <view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>申请加盟</text> <text>申请加盟</text>
</view> </view>
<!-- #endif -->
<view class="page"> <view class="page">
<text class="num actived pass">1</text> <text class="num actived pass">1</text>
<text class="line line_pass"></text> <text class="line line_pass"></text>
......
<template class="sign"> <template class="sign">
<view class="container" style="margin-bottom: 0;" > <view class="container" style="margin-bottom: 0;" >
<!-- #ifdef APP -->
<view class="top"> <view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>申请加盟</text> <text>申请加盟</text>
</view> </view>
<view class="page"> <!-- #endif -->
<view class="page" >
<text class="num actived pass">1</text> <text class="num actived pass">1</text>
<text class="line line_pass"></text> <text class="line line_pass"></text>
<text class="num actived pass">2</text> <text class="num actived pass">2</text>
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
<view class="container"> <view class="container">
<view style="flex: 1;"> <view style="flex: 1;">
<view class="classInfo" style="padding-top:80rpx"> <view class="classInfo" style="padding-top:80rpx">
<view class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top:18rpx"> <!-- #ifdef APP -->
</view> <view class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top:18rpx"></view>
<!-- #endif -->
<course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :fileLecturerId="courseInfoItem.fileLecturerId"></course-item> <course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" :summaryBox="courseInfoItem.fileSynopsis" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :fileLecturerId="courseInfoItem.fileLecturerId"></course-item>
</view> </view>
<!-- 订单支付明细 --> <!-- 订单支付明细 -->
...@@ -218,7 +220,7 @@ ...@@ -218,7 +220,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container{
padding: 10rpx 20rpx; // padding: 10rpx 0;
height: 100%; height: 100%;
position: relative; position: relative;
.commonTitle{ .commonTitle{
...@@ -235,7 +237,7 @@ ...@@ -235,7 +237,7 @@
padding: 30rpx 14rpx 14rpx 20rpx; padding: 30rpx 14rpx 14rpx 20rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
background-color: #fff; background-color: #fff;
border-radius: 10rpx; // border-radius: 10rpx;
view{ view{
margin-top: 22rpx; margin-top: 22rpx;
display: flex; display: flex;
...@@ -251,9 +253,6 @@ ...@@ -251,9 +253,6 @@
} }
.submitApply{ .submitApply{
margin-top: 30rpx; margin-top: 30rpx;
// position: fixed;
// bottom: 0rpx;
// left: 0;
width: 100%; width: 100%;
text{ text{
display: flex; display: flex;
...@@ -295,7 +294,7 @@ ...@@ -295,7 +294,7 @@
align-items: baseline; align-items: baseline;
background-color: #fff; background-color: #fff;
padding: 20rpx; padding: 20rpx;
border-radius: 10rpx; // border-radius: 10rpx;
box-sizing: border-box; box-sizing: border-box;
.pickerBox{ .pickerBox{
display: flex; display: flex;
......
<template> <template>
<view> <view>
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" style="top: 20rpx;" @click="goBack()" ></text> <text class="iconfont icon-youjiantou zuojiantou" style="top: 20rpx;" @click="goBack()" ></text>
<!-- #endif -->
<template v-if="title"> <template v-if="title">
<view style="padding-top: 50rpx;"><my-list-item :title="title" :lists="lists"></my-list-item></view> <view style="padding-top: 50rpx;"><my-list-item :title="title" :lists="lists"></my-list-item></view>
<view v-if="lists.length<=0" style="text-align: center;margin-top: 40rpx;">暂无{{typeName}}记录</view> <view v-if="lists.length<=0" style="text-align: center;margin-top: 40rpx;">暂无{{typeName}}记录</view>
......
<template> <template>
<view class="container"> <view class="container">
<view class="shareheader" style="" v-if="coursesharing != 1 || deviceType==3"> <view class="shareheader" style="" v-if="coursesharing != 1 || deviceType==3">
<view class="iconfont icon-youjiantou" style="margin-left: 30rpx;" @click="goBack()"> <!-- #ifdef APP -->
</view> <view class="iconfont icon-youjiantou" style="margin-left: 30rpx;" @click="goBack()"></view>
<!-- #endif -->
<view class="share-entrance"> <view class="share-entrance">
<view style="z-index: 99999;"> <view style="z-index: 99999;">
<uni-popup ref="share" type="top" safeArea backgroundColor="#F4F2F3" :maskClick='true' <uni-popup ref="share" type="top" safeArea backgroundColor="#F4F2F3" :maskClick='true'
...@@ -51,25 +54,11 @@ ...@@ -51,25 +54,11 @@
<view class="" style="width: 100%;"> <view class="" style="width: 100%;">
<h4>{{courseInfo.fileTitle}}</h4> <h4>{{courseInfo.fileTitle}}</h4>
</view> </view>
<view class="shareF">
<!-- <view class="awakenApp" @click="jumpapp()" v-if="coursesharing == 1">
<view class="" style="width: 50rpx; height: 50rpx;">
<image style="width: 50rpx; height: 50rpx;" src="../../static/Slice117.png" mode=""></image>
</view>
<text>唤醒App</text>
</view> -->
<!-- v-if="isWeixin == true" -->
<strong>
</strong>
</view>
</view> </view>
<view class="dataBox"> <view class="dataBox">
<strong v-if="(courseInfo.status==1 || courseInfo.status==2 )&& courseInfo.coursePrice !== 0">{{Number(courseInfo.coursePrice).toFixed(2)}}</strong> <strong v-if="(courseInfo.status==1 || courseInfo.status==2 )&& courseInfo.coursePrice !== 0">{{Number(courseInfo.coursePrice).toFixed(2)}}</strong>
<!-- <strong v-if="(courseInfo.status==1 || courseInfo.status==2 )&& courseInfo.coursePrice == 0">免费</strong> -->
<!-- <text v-if="courseInfo.status==2" style="color: #F15A1F;margin-right: 20rpx;"><i
class="iconfont icon-yifukuan"></i>已购</text> -->
<text v-if="courseInfo.coursePrice != 0">{{courseInfo.salesNumber}}{{showName}}</text> <text v-if="courseInfo.coursePrice != 0">{{courseInfo.salesNumber}}{{showName}}</text>
</view> </view>
...@@ -124,7 +113,7 @@ ...@@ -124,7 +113,7 @@
<view> <view>
<p><text class="lecturerName">{{lecturerInfo.lecturerName}}</text></p> <p><text class="lecturerName">{{lecturerInfo.lecturerName}}</text></p>
<template v-if="lecturerInfo?.lecturerRankNames"> <template v-if="lecturerInfo?.lecturerRankNames">
<p v-for="item in lecturerInfo.lecturerRankNames.split(',')" class="lecturerTitle"> <p v-for="(item,index) in lecturerInfo.lecturerRankNames.split(',')" :key="index" class="lecturerTitle">
<text>{{item}}</text> <text>{{item}}</text>
</p> </p>
</template> </template>
...@@ -414,7 +403,6 @@ ...@@ -414,7 +403,6 @@
} }
}, },
goBack() { goBack() {
console.log('返回');
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
...@@ -454,13 +442,14 @@ ...@@ -454,13 +442,14 @@
this.$refs.share.open() this.$refs.share.open()
}, },
sharechange(val) { sharechange(val) {
if(val.index != 3){ if(val.tabbar){
uni.switchTab({ uni.switchTab({
url: val.item.link url: val.link
}) })
return
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url: val.item.link url: val.link
}) })
} }
}, },
...@@ -1018,10 +1007,10 @@ ...@@ -1018,10 +1007,10 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container{
// background-color: #f7f7f7;
width: 100%; width: 100%;
height: auto; height: auto;
box-sizing: border-box; box-sizing: border-box;
// padding: 20rpx;
} }
page { page {
padding: 0; padding: 0;
...@@ -1043,11 +1032,6 @@ ...@@ -1043,11 +1032,6 @@
} }
.swiperBox { .swiperBox {
height: 930rpx; height: 930rpx;
image {
border-radius: 12rpx;
}
padding: 0 40rpx;
margin-top: 0rpx;
} }
.swiper-box { .swiper-box {
height: 930rpx; height: 930rpx;
...@@ -1108,18 +1092,22 @@ ...@@ -1108,18 +1092,22 @@
align-items: center; align-items: center;
border-top-left-radius: 30rpx; border-top-left-radius: 30rpx;
border-bottom-left-radius: 30rpx; border-bottom-left-radius: 30rpx;
// padding-left: 10rpx;
color: #fff; color: #fff;
height: 60rpx; height: 60rpx;
background: #20269B; background: #20269B;
} }
.shareheader { .shareheader {
// padding-top: 60rpx; background-color: #fff;
display: flex; display: flex;
/* #ifdef H5 */
justify-content: flex-end;
/* #endif */
/* #ifdef APP */
justify-content: space-between; justify-content: space-between;
/* #endif */
align-items: center; align-items: center;
height: 80rpx; height: 100rpx;
.icon-youjiantou { .icon-youjiantou {
display: inline-block; display: inline-block;
......
<template> <template>
<view class="pad"> <view class="container">
<!--搜索组件--> <view class="homeHeader">
<search <view class="one">
:isSearch="1" <text style="font-size: 80rpx;">01</text>
:userId = "userId" <view class="titleTxt">
@send="getCourseList" <text >分享商品</text>
:initialQuery="queryName" <text class="iconfont icon-shuangyoujiantou iconOne" ></text>
></search> </view>
<!--轮播组件--> </view>
<view class="banner"> <view class="two">
<view class="uni-margin-wrap"> <text>02</text>
<carousel :carouselList="fileUploadItemCFFPList"></carousel> <view class="titleTxt">
<text >好友购买</text>
<text class="iconfont icon-shuangyoujiantou iconOne" ></text>
</view>
</view>
<view class="three">
<text>03</text>
<view class="titleTxt lastTxt">
<text>首页佣金</text>
<text>查看收益</text>
</view>
</view> </view>
</view> </view>
<h4 v-if="cffpCourseInfos.length<=0" class="noListTip">暂无产品列表</h4> <view class="productBox">
<view class="ulBox" v-if="cffpCourseInfos.length>0"> <view class="productList" :style="{marginTop}">
<view class="liBox" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)"> <view class="productItem" v-for="item in cffpCourseInfos" :key="item.fileId" >
<!-- :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}" --> <view class="top" @click="goDetail(item)">
<course-item <view class="left">
:thumbnailPath="item.displayImage" <image class="productImg" :src="item.displayImage" alt="" mode="widthFix"></image>
:title="item.fileTitle" </view>
:summaryBox="item.fileSynopsis" <view class="right">
:dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" <view class="one">
{{item.fileTitle}}
></course-item> </view>
<view class="two">
{{item.fileSynopsis}}
</view>
<view class="three">
<text style="font-size: 28rpx;color: rgba(32, 39, 155, 1);">{{Number(item.coursePrice).toFixed(2)}}</text>
</view>
</view>
</view>
<view class="bottom">
<view class="bottomCon">
<view class="left" >
最高可赚¥{{item.income || '0.00'}}
</view>
<view class="right" @click="gotoShare(item)">
去分享
</view>
</view>
</view>
</view>
</view> </view>
</view> </view>
<uni-popup ref="popup" type="center" background-color="#fff">
<view class="descriptionBox">
<view class="imageBox">
<text>关注公众号</text>
<text class="subTit">通知实时提醒,及时接收下单和提现通知</text>
</view>
<view class="codeBox">
<image v-if="sourceType == '1'" src="@/static/cffpCode.jpg" mode="widthFix" style="width:250rpx !important;"></image>
<image v-if="sourceType == '4'" src="@/static/ydCode.jpg" mode="widthFix" style="width:250rpx !important;"></image>
<image v-if="sourceType == '3'" src="@/static/ydHomeOfficeCode.jpg" mode="widthFix" style="width:250rpx !important;"></image>
</view>
<view class="description">
扫一扫,关注公众号
</view>
</view>
</uni-popup>
<uni-share-wx ref="sharewx"></uni-share-wx>
<view class="markBox" @click="shareTipsFlag=false" v-if="shareTipsFlag">
<view class="guideImgBox">
<image src="../../static/Group132.png" mode="widthFix"></image>
<view class="tips">
<view style="margin-bottom:30rpx">请点击右上角菜单</view>
<view>分享给朋友</view>
</view>
</view>
</view>
</view> </view>
<!-- <tabBar :currentPage="currentPage" v-if="onlyShowList!=0"></tabBar> --> <!-- <tabBar :currentPage="currentPage" v-if="onlyShowList!=0"></tabBar> -->
</template> </template>
...@@ -36,9 +93,16 @@ ...@@ -36,9 +93,16 @@
import tabBar from '../../components/tabBar/tabBar.vue'; import tabBar from '../../components/tabBar/tabBar.vue';
import carousel from '@/components/carousel/carousel.vue'; import carousel from '@/components/carousel/carousel.vue';
import search from '@/components/search/search.vue'; import search from '@/components/search/search.vue';
import {companyInfo} from "@/environments/environment"; import {baseURL,apiURL,cffpURL,companyInfo,shareURL} from "@/environments/environment";
import dataHandling from "@/util/dataHandling";
import {hshare} from '@/util/fiveshare';
import UniShareWx from "@/uni_modules/uni-share-wx/index.vue";
import {nanoid} from 'nanoid';
export default{ export default{
props:['tagIds'], props:['tagIds'],
components: {
UniShareWx,
},
data(){ data(){
return{ return{
cffpCourseInfos:[], cffpCourseInfos:[],
...@@ -46,6 +110,10 @@ ...@@ -46,6 +110,10 @@
fileUploadItemCFFPList:[], fileUploadItemCFFPList:[],
queryName:null, queryName:null,
userId: uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
runEnv:dataHandling.getRuntimeEnv(), //运行的环境 browser、app、h5
shareTipsFlag:false,
sourceType:'1',//根据来源展示二维码 默认是cffp,
env:dataHandling.getRuntimeEnv2()
} }
}, },
name:'courselist', name:'courselist',
...@@ -58,12 +126,105 @@ ...@@ -58,12 +126,105 @@
onLoad() { onLoad() {
this.queryName = uni.getStorageSync('queryName') || ''; this.queryName = uni.getStorageSync('queryName') || '';
this.sourceType = uni.getStorageSync('addSystemType') || '1';
}, },
onShow() { onShow() {
this.queryName = uni.getStorageSync('queryName') || ''; this.queryName = uni.getStorageSync('queryName') || '';
this.courseList(); this.courseList();
this.sourceType = uni.getStorageSync('addSystemType') || '1';
},
computed:{
marginTop(){
if(this.env.device.isMobile){
return '-5%'
}else {
return '-1.5%'
}
}
}, },
methods:{ methods:{
gotoShare(item){
if(this.runEnv == 'browser'){
this.$refs.popup.open()
return
}else if(this.runEnv == 'app' || this.runEnv == 'wechat-h5'){
const shareCode = nanoid() + this.userId
const jumptime = Date.parse(new Date()) / 1000
//app分享
// #ifdef APP-PLUS
let dataWXform = {
href: shareURL + "/pages/courseDetail/courseDetail?fileId=" + item.fileId +
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&",
title: item.fileTitle,
// summary: `加入我们开启学习之旅`,
summary: item.fileSynopsis,
imageUrl: item.displayImage,
fileId: item.fileId,
shareCode: shareCode
}
this.$refs.sharewx.open(dataWXform)
// #endif
//#ifdef H5
this.shareTipsFlag = true;
this.getshareData2(shareCode,jumptime,item)
// #endif
}
},
getshareData2(shareCode,jumptime,item) {
let data = {
title: item.fileTitle,
// desc: '加入我们开启学习之旅',
desc:item.fileSynopsis,
link: shareURL + "/pages/courseDetail/courseDetail?fileId=" + item.fileId +
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime+ "&", //分享链接
imgUrl: item.displayImage, //图片
}
//安卓机型获取当前页面路径
let url = window.location.href.split('#')[0];
//ios机型获取当前页面路径
let ua = navigator.userAgent.toLowerCase();
let isWeixin = ua.indexOf('micromessenger') !== -1;
if (isWeixin) {
let isiOS = /(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent); //ios终端
if (isiOS && window.sessionStorage.getItem('firstEntryUrl')) {
url = window.sessionStorage.getItem('firstEntryUrl').split('#')[0];
}
}
// let url = window.location.href.split('#')[0]
hshare(data, url)
this.submitsuessc(shareCode,jumptime,item)
},
submitsuessc(shareCode,jumptime,item){
let platform = uni.getSystemInfoSync().platform
let UserShareRequestVO = {
systemType: platform == 'ios'? '1': '0',
userId: uni.getStorageSync('cffp_userId'),
businessType: '1', // 分享类型
businessId:item.fileId, // 课程Id
shareUrl: shareURL + "/pages/courseDetail/courseDetail?fileId=" + item.fileId +
'&coursesharing=1' + '&serialsNo=' + nanoid() + '&shareCode=' + shareCode + '&shareUserId=' +
this.userId + '&jumpUrl=' + jumptime + "&", // 分享链接
shareType: '2', // 分享类型(1:图片分享; 2:链接分享)
shareToWhere: 3, //分享到哪儿(1好友 2朋友圈)
shareCode: shareCode
}
api.userShare(UserShareRequestVO).then(res => {
if (res['success']) {
// uni.showToast({
// title: '分享成功',
// duration: 2000
// });
}
})
},
goDetail(item){ goDetail(item){
uni.navigateTo({ uni.navigateTo({
url: `/pages/courseDetail/courseDetail?fileId=${item.fileId}` url: `/pages/courseDetail/courseDetail?fileId=${item.fileId}`
...@@ -128,6 +289,221 @@ ...@@ -128,6 +289,221 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .uni-popup .uni-popup__wrapper{
margin: 0 !important;
border-radius: 30rpx;
}
.container{
background-color: rgba(235, 239, 247, 1);
display: flex;
flex-direction: column;
.homeHeader{
box-sizing: border-box;
width: 100%;
background: linear-gradient(225deg, rgba(65, 69, 188, 1) 0%, rgba(29, 30, 125, 1) 100%);
padding: 30rpx 0 100rpx 0;
color: rgba(255,255,255,.3);
display: flex;
align-items: center;
justify-content: space-between;
font-size: 80rpx;
height: 300rpx;
view{
width: 33%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.titleTxt{
box-sizing: border-box;
position: absolute;
width: 100%;
left: 50%;
transform: translate(-50%);
bottom: -20%;
font-size: 28rpx;
color: #fff;
.icon-shuangyoujiantou{
font-size: 26rpx;
position: absolute;
right:0;
}
}
.lastTxt{
display: flex;
align-items: center;
flex-direction: column;
bottom: -40%;
line-height: 1.3;
}
}
}
.productBox{
flex: 1;
width: 100%;
padding: 0rpx 15rpx;
box-sizing: border-box;
.productList{
width: 100%;
box-sizing: border-box;
// margin-top: -2%;
background-color: #fff;
padding: 20rpx;
border-radius: 10rpx;
margin-bottom: 150rpx;
.productItem{
padding-bottom: 15rpx;
border-bottom: 1rpx solid rgba(238, 238, 240, 1);
margin-bottom: 20rpx;
.top{
display: flex;
justify-content: flex-start;
.left {
width: 220rpx;
flex-shrink: 0; /* 防止左侧被压缩 */
margin-right: 20rpx;
.productImg {
border-radius: 20rpx;
width: 100%;
height: 180rpx; /* 固定图片高度 */
display: block;
}
}
.right{
flex: 1; /* 右侧占据剩余空间 */
min-width: 0; /* 允许文本截断 */
display: flex;
flex-direction: column;
.one{
font-size: 30rpx;
font-weight: 500;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; /* 确保不会换行 */
}
.two{
font-size: 24rpx;
margin: 10rpx 0;
}
.three{
font-size: 28rpx;
color: rgba(32, 39, 155, 1);
margin-top: auto; /* 关键代码:自动顶部边距,推到底部 */
}
}
}
.bottom{
box-sizing: border-box;
margin: 10rpx 0;
width: 100%;
padding-left: 240rpx;
.bottomCon{
box-sizing: border-box;
width: 100%;
background: rgba(54, 57, 169, 0.05);
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
.left{
padding: 15rpx 0rpx 15rpx 20rpx;
font-size: 26rpx;
color: rgba(34, 35, 133, 1);
}
.right{
display: flex;
align-items: center;
justify-content: center;
padding: 15rpx 10rpx 15rpx 15rpx;
background: rgba(36, 37, 137, 1);
width: 20%;
font-size: 27rpx;
color: #fff;
border-radius: 0 10rpx 10rpx 0rpx; /* 左上 右上 右下 左下 */
}
}
}
}
.productItem:last-child{
border: none;
}
}
}
.descriptionBox {
width: 510rpx;
padding: 40rpx;
.popupClose{
display: flex;
align-items: center;
justify-content: flex-end;
.icon-guanbi{
font-size: 28rpx;
}
}
.imageBox{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
font-size: 32rpx;
font-weight: 600;
.subTit{
font-size: 28rpx;
color: #919094;
margin: 15rpx 0;
font-weight: 400;
}
}
.codeBox{
display: flex;
align-items: center;
justify-content: center;
height: 250rpx;
}
.description{
color: rgba(56, 56, 56, 1);
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
}
.markBox {
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
color: #fff;
display: flex;
justify-content: flex-end;
z-index: 100000;
background: rgba(0, 0, 0, 0.8);
.guideImgBox {
margin: 20px auto;
uni-image {
width: 25% !important;
position: absolute;
right: 0;
top: 0;
}
}
.tips {
margin-top: 30%;
padding: 0 30px;
}
}
}
.ulBox,.liBox{ .ulBox,.liBox{
padding-bottom: 30rpx; padding-bottom: 30rpx;
display: flex; display: flex;
......
<template> <template>
<view class="container"> <view class="container">
<view class="homeHeader">
<view class="top">
<view class="one">
<search
ref="searchRef"
:isSearch="1"
:userId="userId"
:initialQuery.sync="searchQuery"
@send="getCourseList"
v-if="showSearch"
></search>
</view>
<view class="two">
<text class="iconfont icon-gongsi" @click="getIntroduce('center')"></text>
</view>
</view>
<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)">
<view class="imgbox">
<view class="iconfont iconSize" :class="`${featureItem.icon}`"></view>
</view>
<view style="font-size: 26rpx;color: #fff;">{{featureItem.name}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="carouselBox">
<view class="swiperBox">
<swiper
style="height:250rpx;"
circular
:indicator-dots="true"
:autoplay="true"
:interval="3000"
:duration="1000"
>
<swiper-item v-for="(bannerItem,index) in cffpUserInfo.fileUploadItemList" :key="index">
<view class="swiperItemBox">
<view class="swiperBtn" @click="jumpUrl(bannerItem.destinationAddress)">
立即查看
</view>
<image class="swiperImg" :src="bannerItem.filePath" mode="widthFix" ></image>
</view>
</swiper-item>
</swiper>
</view>
</view> -->
<!-- 产品区域 -->
<view class="productBox">
<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 class="productList" v-if="cffpCourseInfos.length>0">
<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="productDesBox">
{{item.fileSynopsis}}
</view>
</view>
<view class="bottom" style="text-align: left !important;">
<view class="one">
{{item.fileTitle}}
</view>
<view class="two">
<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 class="productEmpty" v-else>
暂无数据
</view>
</view>
<uni-popup ref="joinPopup" type="center" background-color="#fff">
<view class="joinContent">
<view class="joinHeader">
<view class="iconfont icon-hezuo" style="font-size: 35rpx;color: #fff;"></view>
</view>
<view class="joinCon">
<view class="one">
您还未加盟为合伙人
</view>
<view class="two">
成为合伙人后,分享商品,好友购物得收益
</view>
</view>
<view class="joinFotter" @click="gotoApply">
去加盟拿收益
</view>
</view>
</uni-popup>
<!-- 以前的代码 -->
<view class="top"> <view class="top">
<view class="compony"> <!-- <view class="compony">
<image src="@/static/logo1.png" mode="widthFix" style="width: 120rpx !important;"></image> <image src="@/static/logo1.png" mode="widthFix" style="width: 120rpx !important;"></image>
<text class="name">{{cffpUserInfo.name}}</text> <text class="name">{{cffpUserInfo.name}}</text>
<text class="iconfont icon-31tishi" @click="getIntroduce('center')"></text> <text class="iconfont icon-31tishi" @click="getIntroduce('center')"></text>
</view> </view> -->
<!--搜索组件--> <!-- <search
<!-- <search
:isSearch="0"
:userId="userId"
></search> -->
<search
ref="searchRef" ref="searchRef"
:isSearch="0" :isSearch="0"
:userId="userId" :userId="userId"
:initialQuery.sync="searchQuery" :initialQuery.sync="searchQuery"
v-if="showSearch" v-if="showSearch"
></search> ></search> -->
<!--轮播组件--> <!--轮播组件-->
<view class="banner" style="overflow: none;"> <!-- <view class="banner" style="overflow: none;">
<view class="uni-margin-wrap"> <view class="uni-margin-wrap">
<carousel :carouselList="cffpUserInfo.fileUploadItemList" ></carousel> <carousel :carouselList="cffpUserInfo.fileUploadItemList" ></carousel>
</view> </view>
</view> </view> -->
</view> </view>
<view class="message" @click="jumpToAnnouncement()"> <!-- <view class="message" @click="jumpToAnnouncement()">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<text class="iconfont icon-gonggao"></text> <text class="iconfont icon-gonggao"></text>
<text style="font-size: 27rpx;">{{announcementInfo}}</text> <text style="font-size: 27rpx;">{{announcementInfo}}</text>
</view> </view>
<text class="iconfont icon-youjiantou iconStyle"></text> <text class="iconfont icon-youjiantou iconStyle"></text>
</view> </view> -->
<view class="content"> <!-- <view class="content">
<view class="featureContent"> <view class="featureContent">
<!-- 模块导航 -->
<view class="nav_wrapper"> <view class="nav_wrapper">
<view class="nav_content" v-for="featureItem in featureLists" :key="featureItem.key" <view class="nav_content" v-for="featureItem in featureLists" :key="featureItem.key"
@click="featureSelect(featureItem)"> @click="featureSelect(featureItem)">
<!-- <view style="width: 120rpx;text-align: center;">
<image :src="'/static/moduleIcon/'+featureItem.icon + '.png'" alt="" srcset=""
mode="widthFix"></image>
</view> -->
<view class="imgbox"> <view class="imgbox">
<view class="iconfont iconSize" :class="`${featureItem.icon}`"></view> <view class="iconfont iconSize" :class="`${featureItem.icon}`"></view>
</view> </view>
...@@ -50,32 +146,39 @@ ...@@ -50,32 +146,39 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
<view class="course_content"> <!-- <view class="course_content">
<view class="tag"> <view class="tag">
<h4>推荐产品</h4> <h4>推荐产品</h4>
<view @click="goToCourselist()" style="font-size: 30rpx;">更多<text class="iconfont icon-youjiantou iconStyle"></text></view> <view @click="goToCourselist()" style="font-size: 30rpx;">更多<text class="iconfont icon-youjiantou iconStyle"></text></view>
</view> </view>
<!-- <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}"
></course-item> ></course-item>
</view> </view>
</view> </view>
</view> </view> -->
<view class="" style="text-align: center;color: #666666;font-size: 24rpx;margin-top: 20rpx;"> <!-- <view class="" style="text-align: center;color: #666666;font-size: 24rpx;margin-top: 20rpx;">
{{companyFullName}}提供 {{companyFullName}}提供
</view> </view> -->
<!-- <tabBar :currentPage="currentPage"></tabBar> --> <!-- <tabBar :currentPage="currentPage"></tabBar> -->
</view> </view>
<uni-popup ref="popup" type="top" background-color="#fff"> <uni-popup ref="popup" type="top" background-color="#fff">
<view class="description"> <view class="descriptionBox">
{{cffpUserInfo.description}} <view class="popupClose">
<text class="iconfont icon-guanbi" @click="$refs.popup.close()"></text>
</view>
<view class="imageBox">
<image src="@/static/logo2.png" mode="widthFix" style="width: 120rpx !important;"></image>
</view>
<view class="description">
{{cffpUserInfo.description}}
</view>
</view> </view>
</uni-popup> </uni-popup>
</template> </template>
...@@ -87,6 +190,7 @@ ...@@ -87,6 +190,7 @@
import search from '@/components/search/search.vue'; import search from '@/components/search/search.vue';
import courseItem from "@/components/courseItem/courseItem.vue"; import courseItem from "@/components/courseItem/courseItem.vue";
import {companyInfo} from "@/environments/environment"; import {companyInfo} from "@/environments/environment";
export default { export default {
data() { data() {
return { return {
...@@ -105,14 +209,16 @@ ...@@ -105,14 +209,16 @@
name: '成交订单', name: '成交订单',
icon:'icon-dingdan', icon:'icon-dingdan',
link: '/pages/saleCourseLists/saleCourseLists', link: '/pages/saleCourseLists/saleCourseLists',
isOpen: true isOpen: true,
enName:'order'
}, },
{ {
key: '01', key: '01',
name: '佣金', name: '佣金',
icon: 'icon-yongjin', icon: 'icon-yongjin',
link: '/pages/pointsExchange/pointsExchange', link: '/pages/pointsExchange/pointsExchange',
isOpen: true isOpen: true,
isJoin: true
}, },
{ {
key: '02', key: '02',
...@@ -215,7 +321,24 @@ ...@@ -215,7 +321,24 @@
uni.$off('loginUpdate', this.queryAreaCenterInfo); uni.$off('loginUpdate', this.queryAreaCenterInfo);
}, },
methods: { methods: {
gotoApply(){
uni.navigateTo({
url: '/pages/application-process/basic-info'
})
this.$refs.joinPopup.close()
},
jumpUrl(url) {
if (!url) {
return false
} else {
const match = url.match(/fileId=([^&]*)/);
const fileId = match ? match[1] : null;
uni.navigateTo({
url: `/pages/courseDetail/courseDetail?fileId=${fileId}`
})
}
},
init() { init() {
if (uni.getStorageSync('isLogin')) { if (uni.getStorageSync('isLogin')) {
let loginType = uni.getStorageSync('loginType') let loginType = uni.getStorageSync('loginType')
...@@ -228,6 +351,8 @@ ...@@ -228,6 +351,8 @@
} }
if(loginType == 'codelogin'){ if(loginType == 'codelogin'){
this.querySystemMessage() this.querySystemMessage()
}else {
uni.removeTabBarBadge({ index: 3 });
} }
this.queryAreaCenterInfo(); this.queryAreaCenterInfo();
} else { } else {
...@@ -282,6 +407,11 @@ ...@@ -282,6 +407,11 @@
url: `/pages/courseDetail/courseDetail?fileId=${item.fileId}` url: `/pages/courseDetail/courseDetail?fileId=${item.fileId}`
}); });
}, },
getCourseList(res){
console.log('res',res);
this.queryName = res;
this.courseList()
},
courseList() { courseList() {
const param = { const param = {
queryName: this.queryName queryName: this.queryName
...@@ -289,6 +419,11 @@ ...@@ -289,6 +419,11 @@
api.courseList(param).then(res => { api.courseList(param).then(res => {
if (res['success']) { if (res['success']) {
this.cffpCourseInfos = res['data']['data']; this.cffpCourseInfos = res['data']['data'];
if(this.cffpCourseInfos.length>0){
this.cffpCourseInfos.forEach(item=>{
item.coursePrice =Number(item.coursePrice).toFixed(2) || '0.00'
})
}
} }
}) })
}, },
...@@ -312,9 +447,6 @@ ...@@ -312,9 +447,6 @@
icon: 'none' icon: 'none'
}); });
uni.clearStorageSync(); uni.clearStorageSync();
// uni.redirectTo({
// url: '/components/login/login'
// })
uni.navigateTo({ uni.navigateTo({
url: '/components/login/login?from=index' url: '/components/login/login?from=index'
}) })
...@@ -331,12 +463,9 @@ ...@@ -331,12 +463,9 @@
return false return false
} }
} }
if (this.cffpUserInfo.partnerType == null && featureItem.name == '邀请加盟') { if (this.cffpUserInfo.partnerType == null && featureItem.isJoin) {
uni.showToast({ this.$refs.joinPopup.open()
title: "您本人尚未加盟,您加盟后可邀请加盟",
duration: 2000,
icon: 'none'
});
return false return false
} else if (featureItem.isOpen && featureItem.link) { } else if (featureItem.isOpen && featureItem.link) {
if (featureItem.key == '07') { if (featureItem.key == '07') {
...@@ -344,8 +473,10 @@ ...@@ -344,8 +473,10 @@
url: featureItem.link url: featureItem.link
}) })
} else { } else {
const urlObj = JSON.parse(JSON.stringify(featureItem))
urlObj.link =urlObj.enName=='order'? `${urlObj.link}?partnerType=${this.cffpUserInfo.partnerType}`:urlObj.link
uni.navigateTo({ uni.navigateTo({
url: featureItem.link url: urlObj.link
}) })
} }
} else { } else {
...@@ -407,41 +538,321 @@ ...@@ -407,41 +538,321 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .uni-popup .uni-popup__wrapper{
margin: 0 !important;
border-radius: 30rpx;
}
.container { .container {
padding: 30rpx 30rpx 20rpx;
height: auto; height: auto;
overflow-y: auto; /* 关键属性 */ overflow-y: auto; /* 关键属性 */
-webkit-overflow-scrolling: touch; /* 优化移动端滚动 */ -webkit-overflow-scrolling: touch; /* 优化移动端滚动 */
.top { background-color: rgba(235, 239, 247, 1);
.compony { .homeHeader{
box-sizing: border-box;
width: 100%;
background: linear-gradient(225deg, rgba(65, 69, 188, 1) 0%, rgba(29, 30, 125, 1) 100%);
padding: 15rpx 30rpx;
.top{
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
// max-height: 150rpx; justify-content: space-between;
// overflow: hidden; .one{
width: 80%;
.name {
font-size: 36rpx;
} }
.two{
image { .icon-gongsi{
margin-right: 40rpx; font-size: 40rpx;
color: #fff;
}
}
}
.bottom{
.content {
overflow: hidden;
position: relative;
.featureContent {
box-sizing: border-box;
padding: 30rpx 0;
.nav_wrapper {
display: flex;
align-items: center;
justify-content: space-around;
flex-wrap: wrap;
width: 100%;
box-sizing: border-box;
.nav_content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 0 0 20%;
font-size: 14px;
color: rgba(51, 51, 51, 1);
image {
max-width: 80%;
}
.imgbox{
margin-bottom: 10rpx;
.iconSize{
font-size: 40rpx;
color: #fff;
}
}
}
}
}
} }
}
.icon-31tishi { }
font-size: 40rpx; .carouselBox{
width: 100%;
background-color: #fff;
padding: 15rpx;
box-sizing: border-box;
overflow: hidden;
.swiperBox{
.swiperItemBox{
position: relative;
.swiperBtn{
position: absolute;
left: 10%;
bottom: 20%;
padding: 15rpx 30rpx;
border-radius: 50rpx;
z-index: 2;
color: #fff;
font-size: 26rpx;
background: linear-gradient(180deg, rgba(111, 156, 255, 1) 0%, rgba(34, 96, 251, 1) 100%);
}
.swiperImg{
width: 100%;
height: 100%;
border-radius: 50rpx;
}
} }
} }
}
.banner { .productBox {
border-radius: 20rpx; background-color: #fff;
overflow: hidden; margin-top: 15rpx;
margin-bottom: 30rpx; box-sizing: border-box;
.swiper{ margin-bottom: 100rpx;
height:250rpx;
.productTitle {
border-bottom: 1rpx solid rgba(238, 238, 238, 1);
padding-bottom: 10rpx;
.titleTxt {
padding: 15rpx 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.more {
font-size: 26rpx;
color: rgba(84, 84, 84, 1);
.icon-youjiantou {
font-size: 26rpx;
}
}
}
.productList {
width: 100%;
box-sizing: border-box;
.productListBox {
padding: 30rpx;
display: grid;
/* 默认两列,固定宽度 */
grid-template-columns: repeat(auto-fill, minmax(300rpx, 1fr));
gap: 30rpx;
justify-content: center;
.productListItem {
width: 100%;
max-width: 350rpx; /* 设置最大宽度 */
display: flex;
flex-direction: column;
overflow: hidden;
box-sizing: border-box;
margin: 0 auto; /* 居中显示 */
.top {
width: 100%;
position: relative;
border-radius: 20rpx;
overflow: hidden;
/* 确保图片容器有固定宽高比 */
&::before {
content: "";
display: block;
padding-top: 100%; /* 1:1 宽高比 */
}
.productImg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.productDesBox {
box-sizing: border-box;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
padding: 0 15rpx;
box-sizing: border-box;
background: rgba(0, 0, 0, 0.1);
border-radius: 0 0 20rpx 20rpx;
font-size: 24rpx;
color: #fff;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
/* 关键修改:添加精确的高度计算 */
max-height: calc(2 * 1.4 * 24rpx); /* 2行 × 行高 × 字体大小 */
line-height: 1.5;
/* 确保在Firefox等浏览器也有效 */
display: -moz-box;
-moz-box-orient: vertical;
-moz-line-clamp: 2;
}
}
.bottom {
width: 100%;
box-sizing: border-box;
padding: 10rpx 0;
.one {
font-size: 27rpx;
margin-bottom: 5rpx;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.two {
display: flex;
justify-content: space-between;
align-items: center;
.price {
font-size: 28rpx;
color: rgba(32, 39, 155, 1);
}
.num {
font-size: 24rpx;
color: rgba(166, 166, 166, 1);
}
}
}
}
}
}
/* iPad竖屏和小屏幕平板 */
@media (min-width: 768px) and (max-width: 1023px) {
.productList .productListBox {
grid-template-columns: repeat(auto-fill, minmax(300rpx, 1fr));
gap: 30rpx;
}
}
/* iPad横屏和大屏幕平板 */
@media (min-width: 1024px) and (max-width: 1279px) {
.productList .productListBox {
grid-template-columns: repeat(auto-fill, minmax(300rpx, 1fr));
gap: 30rpx;
}
}
/* 电脑端 */
@media (min-width: 1280px) {
.productList .productListBox {
grid-template-columns: repeat(auto-fill, minmax(300rpx, 1fr));
gap: 30rpx;
}
}
.productEmpty {
color: rgba(166, 166, 166, 1);
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 30rpx 0;
font-size: 28rpx;
}
}
.joinContent{
width: 500rpx;
// height: 300rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
.joinHeader{
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background: rgba(54, 57, 169, 1);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
}
.joinCon{
// padding: 20rpx 0;
.one{
font-size: 30rpx;
color: rgba(38, 41, 44, 1);
font-weight: 600;
text-align: center;
} }
.two{
color: rgba(145, 144, 148, 1);
font-size: 26rpx;
text-align: center;
margin-top: 10rpx;
margin-bottom: 20rpx;
}
}
.joinFotter{
width: 100%;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 10rpx 0;
background: rgba(54, 57, 169, 1);
border-radius: 60rpx;
font-size: 28rpx;
} }
} }
.message { .message {
display: flex; display: flex;
...@@ -463,46 +874,46 @@ ...@@ -463,46 +874,46 @@
} }
} }
.content { // .content {
margin-bottom: 20rpx; // margin-bottom: 20rpx;
overflow: hidden; // overflow: hidden;
background: #fff; // background: #fff;
position: relative; // position: relative;
.featureContent { // .featureContent {
box-sizing: border-box; // box-sizing: border-box;
padding: 30rpx 0; // padding: 30rpx 0;
.nav_wrapper { // .nav_wrapper {
display: flex; // display: flex;
align-items: center; // align-items: center;
justify-content: space-around; // justify-content: space-around;
flex-wrap: wrap; // flex-wrap: wrap;
width: 100%; // width: 100%;
box-sizing: border-box; // box-sizing: border-box;
// padding: 10rpx; // // padding: 10rpx;
.nav_content { // .nav_content {
display: flex; // display: flex;
flex-direction: column; // flex-direction: column;
align-items: center; // align-items: center;
justify-content: center; // justify-content: center;
flex: 0 0 20%; // flex: 0 0 20%;
font-size: 14px; // font-size: 14px;
color: rgba(51, 51, 51, 1); // color: rgba(51, 51, 51, 1);
// margin: 10px 2%; // // margin: 10px 2%;
image { // image {
max-width: 80%; // max-width: 80%;
} // }
.imgbox{ // .imgbox{
margin-bottom: 10rpx; // margin-bottom: 10rpx;
.iconSize{ // .iconSize{
font-size: 40rpx; // font-size: 40rpx;
} // }
} // }
} // }
} // }
} // }
} // }
.course_content { .course_content {
position: relative; position: relative;
...@@ -537,12 +948,34 @@ ...@@ -537,12 +948,34 @@
} }
} }
} }
.descriptionBox {
width: 550rpx;
padding: 40rpx;
.popupClose{
display: flex;
align-items: center;
justify-content: flex-end;
.icon-guanbi{
font-size: 28rpx;
}
}
.imageBox{
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
}
.description{
color: rgba(56, 56, 56, 1);
font-size: 26rpx;
line-height: 1.5;
}
}
.ulBox { .ulBox {
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
// background-color: #20279b;
} }
.liBox { .liBox {
...@@ -554,7 +987,5 @@ ...@@ -554,7 +987,5 @@
width: 100%; width: 100%;
} }
.description {
padding: 40rpx;
}
</style> </style>
\ No newline at end of file
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
return { return {
companyType:'', companyType:'',
areaName: companyInfo.companyName, areaName: companyInfo.companyName,
imgSrc:'../../static/yd_Logo.png', imgSrc:'../../static/logo2.png',
//imgSrc: '../../static/cffp_logo.png', //imgSrc: '../../static/cffp_logo.png',
liginName: '登录', liginName: '登录',
disabledSendBtn:false, disabledSendBtn:false,
......
<template> <template>
<view class="padding-top container"> <view class="padding-top container">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text>
<!-- #endif -->
<view class="tabTitle"> <view class="tabTitle">
<text :class="{'actived': tabType===1}" @click="switchTab(1)">基本信息</text> <text :class="{'actived': tabType===1}" @click="switchTab(1)">基本信息</text>
...@@ -495,17 +498,17 @@ ...@@ -495,17 +498,17 @@
} }
&.listUl::before { // &.listUl::before {
display: block; // display: block;
content: ''; // content: '';
position: absolute; // position: absolute;
left: 10rpx; // left: 10rpx;
top: 20rpx; // top: 20rpx;
width: 8rpx; // width: 8rpx;
height: 20rpx; // height: 20rpx;
background-color: #FA882F; // background-color: #FA882F;
border-radius: 8rpx; // border-radius: 8rpx;
} // }
} }
.sendInvite { .sendInvite {
......
<template> <template>
<view class="container"> <view class="container">
<!-- 时间选择 --> <view class="">
<view class="timeSelectContent"> <!-- 时间选择 -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <view class="timeSelectContent">
<CommonTimePicker <!-- #ifdef APP -->
:timeData="startDate" <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
:visible="showTime1" <!-- #endif -->
@confirmDate="changeStartTime" <CommonTimePicker
@closeTime="showTime1=false" :timeData="startDate"
@click="showTime1=true" :visible="showTime1"
/> @confirmDate="changeStartTime"
@closeTime="showTime1=false"
</view> @click="showTime1=true"
<!-- 分享统计 --> />
<view class="shareStatisticalContent">
<view class="statisticItem">
<text>{{coursesCountInfos.shareFrequencyMonth}}</text>
<text>本月分享(频次)</text>
</view>
<view class="statisticItem" @click="viewIntegral()">
<text class="colorText">{{coursesCountInfos.integralMonth}}</text>
<text>本月获得积分</text>
</view>
<view class="statisticItem">
<text>{{coursesCountInfos.shareSectionMonth}}</text>
<text>本月统计(节)</text>
</view> </view>
<view class="statisticItem"> <!-- 分享统计 -->
<text>{{coursesCountInfos.shareFrequencyCount}}</text> <view class="shareStatisticalContent">
<text>累计分享(频次)</text> <view class="statisticItem">
</view> <text>{{coursesCountInfos.shareFrequencyMonth}}</text>
<view class="statisticItem" @click="viewIntegral()"> <text>本月分享(频次)</text>
<text class="colorText">{{coursesCountInfos.integralCount}}</text> </view>
<text>累计获得积分</text> <view class="statisticItem" @click="viewIntegral()">
</view> <text class="colorText">{{coursesCountInfos.integralMonth}}</text>
<view class="statisticItem"> <text>本月获得积分</text>
<text>{{coursesCountInfos.shareSectionCount}}</text> </view>
<text>累计分享(节)</text> <view class="statisticItem">
<text>{{coursesCountInfos.shareSectionMonth}}</text>
<text>本月统计(节)</text>
</view>
<view class="statisticItem">
<text>{{coursesCountInfos.shareFrequencyCount}}</text>
<text>累计分享(频次)</text>
</view>
<view class="statisticItem" @click="viewIntegral()">
<text class="colorText">{{coursesCountInfos.integralCount}}</text>
<text>累计获得积分</text>
</view>
<view class="statisticItem">
<text>{{coursesCountInfos.shareSectionCount}}</text>
<text>累计分享(节)</text>
</view>
</view> </view>
</view> </view>
<!-- 分享明细 --> <!-- 分享明细 -->
<view class="shareDetailContent"> <view class="shareDetailContent">
<h3>分享明细</h3> <view class="shareBox">
<template v-if="userShareCourses && userShareCourses.length > 0"> <h3 class="shareTitle">分享明细</h3>
<view class="shareOrderInfoItem" v-for="item in userShareCourses" :key="item.fileId"> <template v-if="userShareCourses && userShareCourses.length > 0">
<view class="timeBox">{{item.shareDate}}</view> <view class="shareOrderInfoItem" v-for="item in userShareCourses" :key="item.fileId">
<view class="courseInfoContent"> <view class="timeBox">{{item.shareDate}}</view>
<course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" <view class="courseInfoContent">
:summaryBox="item.fileSynopsis" <course-item :thumbnailPath="item.displayImage" :title="item.fileTitle"
:dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :summaryBox="item.fileSynopsis"
:fileLecturerId="item.fileLecturerId"></course-item> :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}"
</view> :fileLecturerId="item.fileLecturerId"></course-item>
<view class="countsContent">
<view @click="goDetail(item.fileId,1)">
<i class="iconfont icon-zhuanfa iconStyle"></i>
<text>分享</text>
<text>{{item.shareCount}}</text>
</view> </view>
<view @click="goDetail(item.fileId,2)"> <view class="countsContent">
<i class="iconfont icon-yidu iconStyle"></i> <view @click="goDetail(item.fileId,1)">
<text>阅读</text> <i class="iconfont icon-zhuanfa iconStyle"></i>
<text>{{item.readCount}}</text> <text>分享</text>
</view> <text>{{item.shareCount}}</text>
<view @click="goDetail(item.fileId,3)"> </view>
<i class="iconfont icon-yifukuan iconStyle"></i> <view @click="goDetail(item.fileId,2)">
<text>购买</text> <i class="iconfont icon-yidu iconStyle"></i>
<text>{{item.buyCount}}</text> <text>阅读</text>
<text>{{item.readCount}}</text>
</view>
<view @click="goDetail(item.fileId,3)">
<i class="iconfont icon-yifukuan iconStyle"></i>
<text>购买</text>
<text>{{item.buyCount}}</text>
</view>
</view> </view>
</view> </view>
</view> </template>
</template> <h4 class="noListTip" v-else>暂无分享记录!</h4>
<h4 class="noListTip" v-else>暂无分享记录!</h4> </view>
</view> </view>
<uni-popup ref="joinPopup" type="center" background-color="#fff">
<view class="joinContent">
<view class="joinHeader">
<view class="iconfont icon-hezuo" style="font-size: 35rpx;color: #fff;"></view>
</view>
<view class="joinCon">
<view class="one">
您还未加盟为合伙人
</view>
<view class="two">
成为合伙人后,分享商品,好友购物得收益
</view>
</view>
<view class="joinFotter" @click="gotoApply">
去加盟拿收益
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
...@@ -103,10 +129,19 @@ ...@@ -103,10 +129,19 @@
integralCount: 0, integralCount: 0,
shareSectionCount: 0 shareSectionCount: 0
}, },
userShareCourses: [] userShareCourses: [],
partnerType:''
} }
}, },
methods: { methods: {
// 去加盟
gotoApply(){
uni.navigateTo({
url: '/pages/application-process/basic-info'
})
this.$refs.joinPopup.close()
},
changeStartTime(obj){ changeStartTime(obj){
this.startDate = obj this.startDate = obj
this.queryDate=`${obj.year}-${obj.month<10?`0${obj.month}`:obj.month}` this.queryDate=`${obj.year}-${obj.month<10?`0${obj.month}`:obj.month}`
...@@ -164,17 +199,21 @@ ...@@ -164,17 +199,21 @@
url: `/pages/commonDetail/commonDetail?fileId=${val}&type=${type}&queryDate=${this.queryDate}` url: `/pages/commonDetail/commonDetail?fileId=${val}&type=${type}&queryDate=${this.queryDate}`
}) })
}, },
// 查看积分 // 查看佣金
viewIntegral() { viewIntegral(){
// uni.navigateTo({ if(this.partnerType == 'null'){
// url: `/pages/myPoints/myPoints` this.$refs.joinPopup.open()
// }) return
}
uni.navigateTo({ uni.navigateTo({
url: `/pages/pointsExchange/pointsExchange` url:`/pages/pointsExchange/pointsExchange`
}) })
} },
}, },
onLoad() { onLoad(options) {
if(options.partnerType){
this.partnerType = options.partnerType
}
this.userShareCount(); this.userShareCount();
this.userShareQuery(); this.userShareQuery();
}, },
...@@ -185,9 +224,63 @@ ...@@ -185,9 +224,63 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .uni-popup .uni-popup__wrapper{
margin: 0 !important;
border-radius: 30rpx;
}
.container { .container {
height: 100%; padding-bottom: 20rpx;
display: flex;
flex-direction: column;
.joinContent{
width: 500rpx;
// height: 300rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
.joinHeader{
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background: rgba(54, 57, 169, 1);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
}
.joinCon{
// padding: 20rpx 0;
.one{
font-size: 30rpx;
color: rgba(38, 41, 44, 1);
font-weight: 600;
text-align: center;
}
.two{
color: rgba(145, 144, 148, 1);
font-size: 26rpx;
text-align: center;
margin-top: 10rpx;
margin-bottom: 20rpx;
}
}
.joinFotter{
width: 100%;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 10rpx 0;
background: rgba(54, 57, 169, 1);
border-radius: 60rpx;
font-size: 28rpx;
}
}
.timeSelectContent { .timeSelectContent {
background-color: #fff; background-color: #fff;
padding: 20rpx 0; padding: 20rpx 0;
...@@ -195,7 +288,6 @@ ...@@ -195,7 +288,6 @@
justify-content: center; justify-content: center;
align-items: baseline; align-items: baseline;
color: #333; color: #333;
.xiajiantou { .xiajiantou {
color: #999; color: #999;
font-size: 24rpx; font-size: 24rpx;
...@@ -206,10 +298,11 @@ ...@@ -206,10 +298,11 @@
.shareStatisticalContent { .shareStatisticalContent {
background-color: #fff; background-color: #fff;
margin: 10rpx 20rpx; margin: 20rpx 20rpx;
padding: 20rpx 14rpx; padding: 20rpx 14rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
border-radius: 10rpx;
.statisticItem { .statisticItem {
flex: 1; flex: 1;
...@@ -241,47 +334,45 @@ ...@@ -241,47 +334,45 @@
} }
.shareDetailContent { .shareDetailContent {
h3 { flex: 1;
box-sizing: border-box;
background-color: #fff;
margin: 0rpx 20rpx;
padding: 20rpx;
border-radius: 10rpx;
.shareTitle {
// margin: 20rpx 20rpx 0 20rpx;
// padding: 20rpx;
border-bottom: 1rpx solid #F2F2F2;
color: #333; color: #333;
font-size: 36rpx; font-size: 36rpx;
position: relative; position: relative;
margin: 10rpx 0 10rpx 58rpx; background-color: #fff;
border-radius: 10rpx 10rpx 0rpx 0rpx;
&::before {
content: '';
display: block;
position: absolute;
left: -5px;
top: 4px;
width: 2px;
height: 70%;
border-radius: 4rpx;
background-color: #FA882F;
}
} }
.shareOrderInfoItem { .shareOrderInfoItem {
margin: 0 20rpx; // margin: 0 20rpx;
background-color: #fff;
box-sizing: border-box;
padding: 20rpx 10rpx;
.timeBox { .timeBox {
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
margin: 10rpx 0 10rpx 50rpx; margin-bottom: 10rpx;
} }
.countsContent { .countsContent {
background-color: #fff; background-color: #fff;
display: flex; display: flex;
border-bottom-left-radius: 20rpx; padding: 20rpx 0;
border-bottom-right-radius: 20rpx;
padding: 10rpx 10rpx 20rpx 10rpx;
view { view {
flex: 1; flex: 1;
font-size: 24rpx; font-size: 24rpx;
display: flex; display: flex;
align-items: center; align-items: center;
text { text {
color: #666; color: #666;
...@@ -293,7 +384,12 @@ ...@@ -293,7 +384,12 @@
} }
} }
} }
}
.shareOrderInfoItem:last-child{
border-radius: 0 0 10rpx 10rpx;
} }
} }
} }
</style> </style>
<template> <template>
<view class="container"> <view class="container">
<view style="flex: 1;"> <view style="flex: 1;">
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
</view>
<!-- #endif -->
<!-- 课程详情 --> <!-- 课程详情 -->
<template v-if="courseInfoItem"> <template v-if="courseInfoItem">
<view class="courseItemBox" style="padding-top:80rpx"> <view class="courseItemBox" >
<view class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top:18rpx">
</view>
<course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle" <course-item :thumbnailPath="courseInfoItem.displayImage" :title="courseInfoItem.fileTitle"
:summaryBox="courseInfoItem.fileSynopsis" :summaryBox="courseInfoItem.fileSynopsis"
:dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}" :dataList="{coursePrice:courseInfoItem.coursePrice,salesNumber:courseInfoItem.salesNumber}"
...@@ -543,10 +547,29 @@ ...@@ -543,10 +547,29 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.backArrow{
box-sizing: border-box;
display: flex;
height: 100rpx;
justify-content: space-between;
align-items: center;
position: relative;
width: 100%;
margin-bottom: 10rpx;
color: #333333;
background-color: #fff;
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
.txtFont{ .txtFont{
font-size: 27rpx; font-size: 27rpx;
} }
.courseItemBox { .courseItemBox {
margin: 20rpx;
border-radius: 10rpx;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
background-color: #fff; background-color: #fff;
} }
...@@ -700,7 +723,7 @@ ...@@ -700,7 +723,7 @@
.paymentMethodContent, .paymentMethodContent,
.totalContent { .totalContent {
background-color: #fff; background-color: #fff;
margin: 0 10rpx; margin: 0 20rpx;
padding: 20rpx; padding: 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
......
<template> <template>
<view class="container" style="padding-top: 50rpx;"> <view class="container" >
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 16rpx;"></text> <!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
<text style="font-size: 30rpx;">订单详情</text>
</view>
<!-- #endif -->
<view class="orderInfoContent"> <view class="orderInfoContent">
<view class="ulBox"> <view class="ulBox">
<view v-for="item in orderInfoList.filter(item=>item.pageArea===1)" :key="item.id" class="liBox"> <view class="conent">
<text>{{item.name}}:</text> <view v-for="item in orderInfoList.filter(item=>item.pageArea===1)" :key="item.id" class="liBox">
<text <text>{{item.name}}:</text>
:style="{color:item.color ? item.color : '#666'}">{{item.type==='currency' && item.value ? '¥' : ''}}{{item.value ? item.value : '/'}}</text> <text
:style="{color:item.color ? item.color : '#666'}">{{item.type==='currency' && item.value ? '¥' : ''}}{{item.value ? item.value : '/'}}</text>
</view>
</view> </view>
</view> </view>
<view class="ulBox"> <view class="ulBox">
<view v-for="item in orderInfoList.filter(item=>item.pageArea===2)" :key="item.id" class="liBox"> <view class="conent">
<text>{{item.name}}:</text> <view v-for="item in orderInfoList.filter(item=>item.pageArea===2)" :key="item.id" class="liBox">
<text <text>{{item.name}}:</text>
:style="{color:item.color ? item.color : '#666'}" <text
> :style="{color:item.color ? item.color : '#666'}"
{{item.type==='currency' && item.value ? '¥' : ''}}{{item.value ? item.value : '/'}} >
</text> {{item.type==='currency' && item.value ? '¥' : ''}}{{item.value ? item.value : '/'}}
</text>
</view>
</view> </view>
</view> </view>
<!-- 退课 -->
<view class="dropClassBox" v-if="Withdrawal=='1' && orderDetail.isRefund == '1'&& type == 'drop'"> <view class="dropClassBox" v-if="Withdrawal=='1' && orderDetail.isRefund == '1'&& type == 'drop'">
<!-- <view class="dropClassBox" v-if="Withdrawal=='1' && orderDetail.operationStatus == '1'&& type == 'drop'"> -->
<view class="dropBtn" @click="dropClasses()">退款</view> <view class="dropBtn" @click="dropClasses()">退款</view>
</view> </view>
</view> </view>
...@@ -232,13 +242,32 @@ ...@@ -232,13 +242,32 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
height: 100%; height: 100%;
.backArrow{
box-sizing: border-box;
display: flex;
height: 100rpx;
justify-content: space-between;
align-items: center;
position: relative;
width: 100%;
margin-bottom: 10rpx;
color: #333333;
background-color: #fff;
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
.orderInfoContent { .orderInfoContent {
.ulBox { .ulBox {
background-color: #fff; box-sizing: border-box;
margin: 20rpx 22rpx; padding: 20rpx 20rpx 5rpx 20rpx;
padding: 20rpx; .conent{
padding: 20rpx ;
background-color: #fff;
border-radius: 10rpx;
}
.liBox { .liBox {
margin-bottom: 20rpx; margin-bottom: 20rpx;
display: flex; display: flex;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="successBox" v-if="orderStatus=='2'"> <view class="successBox" v-if="orderStatus=='2'">
<i class="iconfont icon-dengdai"></i> <i class="iconfont icon-dengdai"></i>
<text class="statusText">订单支付成功</text> <text class="statusText">订单支付成功</text>
<text @click="viewDetail()" class="viewOrder">查看订单 ></text> <text @click="viewDetail()" class="viewOrder">查看订单</text>
</view> </view>
<view class="failBox" v-if="orderStatus=='1'"> <view class="failBox" v-if="orderStatus=='1'">
<text style="color:#F04604"><i class="iconfont icon-guanbi"></i>订单支付失败</text> <text style="color:#F04604"><i class="iconfont icon-guanbi"></i>订单支付失败</text>
...@@ -14,19 +14,38 @@ ...@@ -14,19 +14,38 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 精选课程 -->
<view class="courlistBox"> <view class="productBox">
<view class="course_content"> <view class="productTitle">
<view class="tag"> <view class="titleTxt">
<h4>推荐产品</h4> <text style="font-size: 30rpx;font-weight: 500;">推荐产品</text>
<view @click="goToCourselist()">更多<text class="iconfont icon-youjiantou"></text></view> <text class="more" @click="goToCourselist()">更多 <text class="iconfont icon-youjiantou"></text> </text>
</view>
<view class="ulBox" v-if="cffpCourseInfos.length>0">
<view class="liBox" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)">
<course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" ></course-item>
</view>
</view> </view>
</view> </view>
<view class="productList" v-if="cffpCourseInfos.length>0">
<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="productDesBox">
{{item.fileSynopsis}}
</view>
</view>
<view class="bottom" style="text-align: left !important;">
<view class="one">
{{item.fileTitle}}
</view>
<view class="two">
<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 class="productEmpty" v-else>
暂无数据
</view>
</view> </view>
<tabBar :currentPage="currentPage" :infoTotal="infoTotal"></tabBar> <tabBar :currentPage="currentPage" :infoTotal="infoTotal"></tabBar>
</view> </view>
...@@ -147,14 +166,175 @@ ...@@ -147,14 +166,175 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ulBox{ .container{
flex-direction: column; padding-bottom: 50rpx;
} .productBox {
.liBox{ background-color: #fff;
background-color: #fff; margin-top: 15rpx;
border-radius: 20rpx; box-sizing: border-box;
margin-bottom: 10rpx; margin-bottom: 100rpx;
padding: 10rpx;
.productTitle {
border-bottom: 1rpx solid rgba(238, 238, 238, 1);
padding-bottom: 10rpx;
.titleTxt {
padding: 15rpx 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.more {
font-size: 26rpx;
color: rgba(84, 84, 84, 1);
.icon-youjiantou {
font-size: 26rpx;
}
}
}
.productList {
width: 100%;
box-sizing: border-box;
.productListBox {
padding: 30rpx;
display: grid;
/* 默认两列,固定宽度 */
grid-template-columns: repeat(auto-fill, minmax(300rpx, 1fr));
gap: 30rpx;
justify-content: center;
.productListItem {
width: 100%;
max-width: 350rpx; /* 设置最大宽度 */
display: flex;
flex-direction: column;
overflow: hidden;
box-sizing: border-box;
margin: 0 auto; /* 居中显示 */
.top {
width: 100%;
position: relative;
border-radius: 20rpx;
overflow: hidden;
/* 确保图片容器有固定宽高比 */
&::before {
content: "";
display: block;
padding-top: 100%; /* 1:1 宽高比 */
}
.productImg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.productDesBox {
box-sizing: border-box;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
padding: 0 15rpx;
box-sizing: border-box;
background: rgba(0, 0, 0, 0.1);
border-radius: 0 0 20rpx 20rpx;
font-size: 24rpx;
color: #fff;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
/* 关键修改:添加精确的高度计算 */
max-height: calc(2 * 1.4 * 24rpx); /* 2行 × 行高 × 字体大小 */
line-height: 1.5;
/* 确保在Firefox等浏览器也有效 */
display: -moz-box;
-moz-box-orient: vertical;
-moz-line-clamp: 2;
}
}
.bottom {
width: 100%;
box-sizing: border-box;
padding: 10rpx 0;
.one {
font-size: 27rpx;
margin-bottom: 5rpx;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.two {
display: flex;
justify-content: space-between;
align-items: center;
.price {
font-size: 28rpx;
color: rgba(32, 39, 155, 1);
}
.num {
font-size: 24rpx;
color: rgba(166, 166, 166, 1);
}
}
}
}
}
}
/* iPad竖屏和小屏幕平板 */
@media (min-width: 768px) and (max-width: 1023px) {
.productList .productListBox {
grid-template-columns: repeat(auto-fill, minmax(300rpx, 1fr));
gap: 30rpx;
}
}
/* iPad横屏和大屏幕平板 */
@media (min-width: 1024px) and (max-width: 1279px) {
.productList .productListBox {
grid-template-columns: repeat(auto-fill, minmax(300rpx, 1fr));
gap: 30rpx;
}
}
/* 电脑端 */
@media (min-width: 1280px) {
.productList .productListBox {
grid-template-columns: repeat(auto-fill, minmax(300rpx, 1fr));
gap: 30rpx;
}
}
.productEmpty {
color: rgba(166, 166, 166, 1);
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 30rpx 0;
font-size: 28rpx;
}
} }
.statusBox{ .statusBox{
padding: 30rpx 0; padding: 30rpx 0;
...@@ -210,29 +390,7 @@ ...@@ -210,29 +390,7 @@
} }
} }
} }
.course_content{
background: #fff; }
position: relative;
padding: 0 30rpx 100rpx 30rpx;
.tag{
padding: 20rpx;
display: flex;
justify-content: space-between;
h4{
// margin-left: 20rpx;
}
}
.tag:before{
position: absolute;
left: 20rpx;
top: 20rpx;
display: inline-block;
content: '';
width: 2px;
height: 16px;
background-color: #F15A1F;
border-radius: 2px;
}
}
</style> </style>
<template> <template>
<view class="content"> <view class="content">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 10rpx;"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 10rpx;"></text>
<!-- #endif -->
<view class="header"> <view class="header">
<view class="header-box"> <view class="header-box">
<view class="header-box-img" > <view class="header-box-img" >
...@@ -40,7 +43,7 @@ ...@@ -40,7 +43,7 @@
companyType : companyInfo.companyType, companyType : companyInfo.companyType,
companyFullName : companyInfo.companyFullName, companyFullName : companyInfo.companyFullName,
appName : companyInfo.appName, appName : companyInfo.appName,
companyLogo : '../../../static/myteam/logo.png' companyLogo : '../../../static/logo2.png'
} }
}, },
created() { created() {
...@@ -53,14 +56,14 @@ ...@@ -53,14 +56,14 @@
if(this.companyType == '1'){ if(this.companyType == '1'){
this.companyLogo='../../../static/myteam/Group1633.png'; this.companyLogo='../../../static/myteam/Group1633.png';
}else if(this.companyType == '2'){ }else if(this.companyType == '2'){
this.companyLogo='../../../static/myteam/logo.png' this.companyLogo='../../../static/logo2.png'
} }
}, },
onShow() { onShow() {
if(this.companyType == '1'){ if(this.companyType == '1'){
this.companyLogo='../../../static/myteam/Group1633.png'; this.companyLogo='../../../static/myteam/Group1633.png';
}else if(this.companyType == '2'){ }else if(this.companyType == '2'){
this.companyLogo='../../../static/myteam/logo.png' this.companyLogo='../../../static/logo2.png'
} }
}, },
methods:{ methods:{
...@@ -113,19 +116,10 @@ ...@@ -113,19 +116,10 @@
text-align: center; text-align: center;
padding: 50rpx; padding: 50rpx;
} }
// .header-box{
// height: 300rpx;
// margin: 0 50rpx;
// display: flex;
// border-bottom: 1px solid #E6E6E6;
// }
.header-box-img{ .header-box-img{
width: 124rpx; width: 124rpx;
height: 124rpx; height: 124rpx;
margin: 90rpx auto 45rpx auto; margin: 90rpx auto 45rpx auto;
//background: url({{this.companyLogo}});
//background: url('../../../static/myteam/logo.png');
background-size: auto 100%; background-size: auto 100%;
} }
</style> </style>
\ No newline at end of file
<template>
<view class="container">
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
<text style="font-size: 30rpx;">帮助中心</text>
</view>
<!-- #endif -->
<view class="filterBox">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="120">
<view
class="scroll-view-item_H"
v-for="item in tabList"
:key="item.id"
:class="{active:item.id == currentTab }"
@click="changeTab(item)"
>
{{item.title}}
</view>
</scroll-view>
</view>
<view class="questionsBox">
<view class="questionItem" v-for="item in newQuestionData" :key="item.id">
<view class="" >
<view class="itemTit">
<text class="iconfont myIcon" :class="item.icon" ></text>
{{item.category}}
</view>
<view class="itemQuestion" v-for="(question, index) in item.questions" :key="index">
<view class="Q">
Q:{{question.Q}}
</view>
<view class="A" v-if="question.isMore">
<view class="">
A:
</view>
<view class="" v-for="(a, index1) in question.A" :key="index1">
{{a}}
</view>
</view>
<view class="A" v-else>
A:{{question.A}}
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import questionsData from "@/util/questions";
export default {
data() {
return {
tabList:[
{title:'关于团队',id: '1'},
{title:'关于订单',id: '2'},
{title:'关于佣金',id: '3'},
],
currentTab:'1',
// questionsData:[]
}
},
computed:{
newQuestionData(){
let result = questionsData.filter(item=>item.id==this.currentTab)
return result
}
},
methods:{
changeTab(item){
this.currentTab = item.id
},
goBack(){
uni.navigateBack({
delta: 1
});
},
},
}
</script>
<style lang="scss" scoped>
.container{
padding-bottom: 50rpx;
.backArrow{
box-sizing: border-box;
display: flex;
height: 100rpx;
justify-content: space-between;
align-items: center;
position: relative;
width: 100%;
color: #333333;
background-color: #fff;
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
.filterBox{
box-sizing: border-box;
width: 100%;
background-color: #fff;
padding: 20rpx 60rpx 0 60rpx;
display: flex;
align-items: center;
justify-content: space-between;
.scroll-view_H {
white-space: nowrap;
width: 100%;
box-sizing: border-box;
}
.scroll-view-item {
text-align: center;
font-size: 36rpx;
}
.scroll-view-item_H {
margin-bottom: 20rpx;
display: inline-block;
margin-right: 20rpx;
text-align: center;
font-size: 27rpx;
padding: 10rpx 20rpx;
color: rgba(46, 38, 29, 1);
&.active{
color: rgba(32, 39, 155, 1);
position: relative;
}
&.active::before{
display: block;
content: "";
position: absolute;
left: 50%;
transform: translate(-50%);
bottom: -3%;
width: 50%;
// height: 1rpx;
border: 1rpx solid rgba(32, 39, 155, 1);
border-radius: 5rpx;
}
}
.scroll-view-item_H:last-child{
margin-right: 0rpx;
}
.scrollBtn:last-child{
margin-right: 0rpx;
}
.filterItem{
background: #f7f7f7;
font-size: 27rpx;
padding: 10rpx;
color: rgba(46, 38, 29, 1);
border-radius: 8rpx;
&.active{
background: rgba(32, 39, 155, 1);
color: #fff;
}
}
}
.questionsBox{
padding: 20rpx;
box-sizing: border-box;
.questionItem{
box-sizing: border-box;
margin-bottom: 20rpx;
width: 100%;
background-color: #fff;
border-radius: 10rpx;
padding: 20rpx;
.itemTit{
font-size: 30rpx;
font-weight: 500;
.myIcon{
font-size: 32rpx;
color: rgba(32, 39, 155, 1);
}
}
.itemQuestion{
padding: 20rpx 0;
border-bottom: 1rpx solid #f2f2f2;
.Q{
margin-bottom: 10rpx;
font-size: 28rpx;
}
.A{
font-size: 26rpx;
color: #666;
line-height: 1.5;
}
}
.itemQuestion:last-child{
border: none;
}
}
}
}
</style>
\ No newline at end of file
<template> <template>
<view class="container"> <view class="container">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text> <view class="myHeader">
<!-- <view v-for="item in minorMenuLists.filter(v=>v.isShow)" :key="item.title" @click="goteam(item)" class="liBox"> <!-- #ifdef APP -->
<view class="infoBox"> <view class="backArrow">
<view class="infoBoxtext">{{item.title}}</view> <text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
<text style="font-size: 30rpx;">我的团队</text>
</view> </view>
<view class="iconBox"> <!-- #endif -->
<i class="iconfont icon-youjiantou"></i>
<view class="timeBox" v-if="currentBtn == '2'" @click="showTime1 = true">
<CommonTimePicker
:timeData="startDate"
:visible="showTime1"
iconColor="#fff"
@confirmDate="changeStartTime"
@closeTime="showTime1=false"
/>
</view> </view>
</view> --> <view class="renshu" :style="{marginTop}">
<view class="ulBox"> <view class="top">
<view v-for="item in minorMenuLists.filter(v=>v.isShow)" :key="item.title" @click="goteam(item)" <view class="left">
class="liBox"> <text v-if="currentBtn == '1'">团队有效人数</text>
<view class="infoBox"> <text v-if="currentBtn == '2'">团队标准销售额</text>
<text>{{item.title}}</text> </view>
<view class="right" @click="changeCurrentBtn">
<text v-if="currentBtn == '1'">查看业绩</text>
<text v-if="currentBtn == '2'">查看团队</text>
</view>
</view>
<view class="bottom">
<text v-if="currentBtn == '1'">{{teamCount}}</text>
<text v-if="currentBtn == '2'">{{monthStandardSales}}</text>
</view>
</view>
<view class="moneyBox">
<view class="one">
<view v-if="currentBtn == '1'" class="">
{{monthStandardSales}}
</view>
<view v-if="currentBtn == '2'" class="">
{{totalCoursePrice}}
</view>
<view style="margin-top: 5rpx;">
<text v-if="currentBtn == '1'">本月团队标准销售额</text>
<text v-if="currentBtn == '2'">总销售额</text>
</view>
</view>
<view class="two">
<view class="">
{{totalOrder}}
</view>
<view style="margin-top: 5rpx;">
<text>团队出单数</text>
</view>
</view>
</view>
</view>
<view
v-if="currentBtn == '2'"
class="filterBox"
style="background: none;margin: 10rpx 0;">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="120">
<view
class="scrollBtn"
v-for="item in btnList"
:key="item.id"
:class="{active:item.id == currentFilterBtn }"
@click="sortswitch(item)"
>
{{item.title}}
</view>
</scroll-view>
</view>
<view class="filterBox" :style="{marginTop:currentBtn=='1'?'20rpx':''}">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="120">
<view
class="scroll-view-item_H"
v-for="item in tabList"
:key="item.id"
:class="{active:item.id == currentTab }"
@click="changeTab(item)"
>
{{item.title}}
</view>
</scroll-view>
</view>
<view class="tableBox">
<view class="table">
<view class="content-box">
<view class="content-box-title" v-for="(item,index) in tableHeaderList" :key="index">
<text class="title">{{item.title}}</text>
</view>
</view> </view>
<view class="iconBox"> <view v-if="currentBtn == '1'&&myTeamList.length>0">
<view class="" v-if="item.isType == 'text'"> <view class="content-sam-box" v-for="(pointItem,index) in myTeamList" :key="index">
<text>{{item.contentType}}</text> <span class="content-box-title cell">{{pointItem.parentName}}</span>
<span class="content-box-title cell">{{pointItem.name}}</span>
<span class="content-box-title cell">{{pointItem.levelName}}</span>
<span class="content-box-title cell">{{pointItem.referrer}}</span>
</view> </view>
<i v-else class="iconfont icon-youjiantou iconStyle"></i> </view>
<view v-else-if="currentBtn == '2'&&currentFilterBtn!=='3'&& myTeamAchievementList.length>0">
<view class="content-sam-box" v-for="(pointItem,index) in myTeamAchievementList" :key="index">
<span class="content-box-title cell">{{pointItem.name}}</span>
<span class="content-box-title cell">{{pointItem.orderNum}}</span>
<span class="content-box-title cell">{{pointItem.coursePrice}}</span>
<span class="content-box-title cell" >{{pointItem.standardSales || '0.00'}}</span>
</view>
</view>
<view v-else-if="currentBtn == '2'&& currentFilterBtn=='3'&& myTeamAchievementList.length>0">
<view class="content-sam-box" v-for="(pointItem,index) in myTeamAchievementList" :key="index">
<span class="content-box-title cell">{{pointItem.saleDate}}</span>
<span class="content-box-title cell">{{pointItem.orderNum}}</span>
<span class="content-box-title cell">{{pointItem.coursePrice}}</span>
<span class="content-box-title cell" >{{pointItem.standardSales || '0.00'}}</span>
</view>
</view>
<view class="empty" v-else>
暂无数据
</view> </view>
</view> </view>
</view> </view>
...@@ -27,16 +125,224 @@ ...@@ -27,16 +125,224 @@
</template> </template>
<script> <script>
import CommonTimePicker from '@/components/commonTimePicker/commonTimePicker.vue';
import dataHandling from "@/util/dataHandling";
import api from "@/api/api";
export default { export default {
components: {
CommonTimePicker
},
data() { data() {
return { return {
minorMenuLists:[ showTime1:false,
{title:'成员信息',icon:'shareEcode',link:'',isOpen:true,isShow:true,type: 1}, startDate:{year:dataHandling.getDateParts().year,month:dataHandling.getDateParts().month},
{title:'团队业绩',icon:'card',link:'',isOpen:true,isShow:true,type: 2}, tabList:[
] {title:'全部',id: '1',type:4},
{title:'直辖团队',id: '2',type:1},
{title:'所辖团队',id: '3',type:2},
],
btnList:[
{title:'按标准销售额',id: '1',sortType:5},
{title:'按销售额',id: '2',sortType:2},
{title:'按销售日期',id: '3',sortType:4},
],
tableHeaderList:[
{title:'上级',id:'1'},
{title:'成员',id:'2'},
{title:'职级',id:'3'},
{title:'关系',id:'4'},
],
currentTab:'1',
currentBtn:'1', // 1代表团队 2代表业绩
currentFilterBtn:'1',
teamCount:0,//团队总人数,育成团队人数不算
userId: uni.getStorageSync('cffp_userId'),
otherList: null, // 直辖团队
directList: null, //所辖团队数组
myTeamList:[],//我的团队表格数据,
myTeamData:{},//我的团队总数据,
CffpOrgInfoReqVO: {
userId: uni.getStorageSync('cffp_userId'),
startDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`,
endDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`,
courseOrPolicy: '1',
type: '2',
sortType:5
},
totalOrder: '0', //总单数
totalCoursePrice: '0.00', // 总销售额
monthStandardSales:'0.00',//本月团队标准销售额
myTeamAchievementList:[],//我的业绩数据列表,
marginTop:'30rpx'
} }
}, },
watch: {
currentBtn: {
deep: true,
handler(newVal) {
if(newVal == '1') {
this.tableHeaderList = [
{title:'上级',id:'1'},
{title:'成员',id:'2'},
{title:'职级',id:'3'},
{title:'关系',id:'4'},
]
// #ifdef H5
this.marginTop = '30rpx'
// #endif
this.getmyseatem()
return
}
if(newVal == '2') {
this.tableHeaderList = [
{title:'成员',id:'1'},
{title:'单数',id:'2'},
{title:'销售额',id:'3'},
{title:'标准销售额',id:'4'},
]
this.getqueryTeamAchievement()
// #ifdef H5
this.marginTop = '0rpx'
// #endif
return
}
}
},
currentTab: {
deep: true,
handler(newVal) {
this.myTeamList = []
if(newVal == '1') {
if(this.myTeamData.other && this.myTeamData.other.length != 0 && this.myTeamData.other != null){
this.myTeamList.push(...this.myTeamData['other'])
}
if(this.myTeamData.directList && this.myTeamData.directList.length != 0 && this.myTeamData.directList != null){
this.myTeamList.push( ...this.myTeamData['directList'])
}
return
}
if(newVal == '2') {
if(this.myTeamData.other && this.myTeamData.other.length != 0 && this.myTeamData.other != null){
this.myTeamList.push(...this.myTeamData['other'])
}
}
if(newVal == '3'){
if(this.myTeamData.directList && this.myTeamData.directList.length != 0 && this.myTeamData.directList != null){
this.myTeamList.push( ...this.myTeamData['directList'])
}
}
}
},
currentFilterBtn: {
deep: true,
handler(newVal) {
if(newVal == '3'&&this.currentBtn=='2') {
this.tableHeaderList = [
{title:'销售日期',id:'1'},
{title:'单数',id:'2'},
{title:'销售额',id:'3'},
{title:'标准销售额',id:'4'},
]
this.getqueryTeamAchievement()
return
}else {
this.tableHeaderList = [
{title:'成员',id:'1'},
{title:'单数',id:'2'},
{title:'销售额',id:'3'},
{title:'标准销售额',id:'4'},
]
this.getqueryTeamAchievement()
return
}
}
},
},
onLoad(){
this.getmyseatem()
this.getqueryTeamAchievement()
},
methods: { methods: {
sortswitch(obj) {
this.currentFilterBtn = obj.id
this.CffpOrgInfoReqVO.sortType = obj.sortType
this.getqueryTeamAchievement()
// if(obj.sortType == 4){
// this.CffpOrgInfoReqVO.sortType = obj.sortType
// this.getqueryTeamAchievement()
// }else{
// delete this.CffpOrgInfoReqVO.sortType
// this.getqueryTeamAchievement()
// }
},
changeTab(item){
this.currentTab = item.id
if(this.currentBtn == '2'){
this.getqueryTeamAchievement()
}
},
getqueryTeamAchievement() {
this.CffpOrgInfoReqVO.queryType = this.tabList.filter(item=>item.id == this.currentTab)[0].type
this.CffpOrgInfoReqVO.sortType = this.btnList.filter(item=>item.id == this.currentFilterBtn)[0].sortType
api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => {
if (res['success']) {
this.myTeamAchievementList = []
// this.listType = true
this.myTeamAchievementList = res.data.list || [];
if(this.myTeamAchievementList.length>0){
this.myTeamAchievementList.forEach(item=>{
item.saleDate = dataHandling.dateFormat2(item.saleDate,'yyyy-MM-dd')
item.coursePrice = Number(item.coursePrice).toFixed(2) || '0.00'
})
}
this.totalOrder = res.data.totalOrder ? res.data.totalOrder : '0';
this.totalCoursePrice = res.data.totalCoursePrice ? Number(res.data.totalCoursePrice).toFixed(2) : '0.00';
this.monthStandardSales = res.data.monthStandardSales ? Number(res.data.monthStandardSales).toFixed(2) : '0.00';
}
})
},
// 获取团队数据
getmyseatem() {
this.myTeamList = []
api.queryMyTeamInfo({
userId: this.userId,
type: '1'
}).then(res =>{
if(res['success']){
let data = res.data
this.myTeamData = res.data
if(data.orgInfo) {
this.teamCount = data.orgInfo.count
}
if(data.other && data.other.length != 0 && data.other != null){
this.myTeamList.push(...data['other'])
}
if(data.directList && data.directList.length != 0 && data.directList != null){
this.myTeamList.push( ...data['directList'])
}
}
})
},
changeStartTime(obj){
this.startDate = obj
this.CffpOrgInfoReqVO.startDate=`${obj.year}-${obj.month<10?`0${obj.month}`:obj.month}`
this.CffpOrgInfoReqVO.endDate=`${obj.year}-${obj.month<10?`0${obj.month}`:obj.month}`
this.getqueryTeamAchievement()
this.showTime1 = false
},
changeCurrentBtn(){
this.currentTab = '1'
this.currentFilterBtn = '1'
if(this.currentBtn == '1'){
this.currentBtn = '2'
return
}
if(this.currentBtn == '2'){
this.currentBtn = '1'
}
},
goBack(){ goBack(){
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
...@@ -54,55 +360,261 @@ ...@@ -54,55 +360,261 @@
} }
}, },
}, },
onLoad() {
},
mounted() {
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container{
height: 100%; background-color: rgba(235, 239, 247, 1);
background: #FFFFFF; display: flex;
padding-top: 50rpx; flex-direction: column;
} box-sizing: border-box;
.ulBox { .myHeader{
padding: 0 30rpx; color: #fff;
box-sizing: border-box;
.liBox { background: linear-gradient(225deg, rgba(65, 69, 188, 1) 0%, rgba(29, 30, 125, 1) 100%);
display: flex; .backArrow{
align-items: center; box-sizing: border-box;
justify-content: space-between;
border-bottom: 1px solid #E6E6E6;
height: 92rpx;
margin-top: 20rpx;
.infoBox {
display: flex; display: flex;
height: 60rpx;
justify-content: space-between;
align-items: center; align-items: center;
font-size: 28rpx; position: relative;
image { width: 100%;
width: 52rpx !important; margin-bottom: 10rpx;
height: 52rpx; color: #fff;
margin-top: 20rpx;
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
} }
} }
& > view:first-child{ .timeBox{
position: relative; margin-top: 30rpx;
&::after{ padding-left: 25rpx;
content:''; width: 50%;
}
.renshu{
padding: 10rpx 25rpx;
color: #fff;
.top{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 26rpx;
.right{
padding: 10rpx 15rpx;
background-color: #fff;
border-radius: 30rpx;
color: rgba(32, 39, 155, 1);
font-size: 25rpx;
}
}
.bottom{
font-size: 34rpx;
font-weight: 500;
}
}
.moneyBox{
box-sizing: border-box;
width: 100%;
background-color: rgba(255,255,255,.15);
padding:15rpx 20rpx;
display: flex;
align-items: center;
justify-content: space-around;
.one{
font-size: 26rpx;
text-align: center;
width: 50%;
position: relative;
}
.one::after{
position: absolute; position: absolute;
left: 0; top: 50%;
bottom: -6rpx; transform: translateY(-50%);
background: linear-gradient(90deg,#FA882F, #D9D9D9); right: 0;
border-radius: 4rpx; content: '';
height: 8rpx; height: 40rpx;
width: 80rpx; border: 1rpx dashed #fff;
}
.two{
font-size: 26rpx;
text-align: center;
width: 50%;
} }
} }
&:last-child { }
border: none; .filterBox{
box-sizing: border-box;
// margin: 20rpx 0;
width: 100%;
background-color: #fff;
padding: 20rpx 60rpx 0 60rpx;
display: flex;
align-items: center;
justify-content: space-between;
.scroll-view_H {
white-space: nowrap;
width: 100%;
box-sizing: border-box;
}
.scroll-view-item {
text-align: center;
font-size: 36rpx;
}
.scroll-view-item_H {
margin-bottom: 20rpx;
display: inline-block;
margin-right: 20rpx;
text-align: center;
font-size: 27rpx;
padding: 10rpx 20rpx;
color: rgba(46, 38, 29, 1);
&.active{
color: rgba(32, 39, 155, 1);
position: relative;
}
&.active::before{
display: block;
content: "";
position: absolute;
left: 50%;
transform: translate(-50%);
bottom: -3%;
width: 50%;
// height: 1rpx;
border: 1rpx solid rgba(32, 39, 155, 1);
border-radius: 5rpx;
}
}
.scroll-view-item_H:last-child{
margin-right: 0rpx;
}
.scrollBtn {
display: inline-block;
margin-right: 20rpx;
text-align: center;
font-size: 27rpx;
padding: 10rpx 20rpx;
color: rgba(46, 38, 29, 1);
&.active{
color: rgba(32, 39, 155, 1);
}
}
.scrollBtn:last-child{
margin-right: 0rpx;
}
.filterItem{
background: #f7f7f7;
font-size: 27rpx;
padding: 10rpx;
color: rgba(46, 38, 29, 1);
border-radius: 8rpx;
&.active{
background: rgba(32, 39, 155, 1);
color: #fff;
}
}
}
.tableBox{
// background-color: #fff;
padding: 20rpx;
width: 100%;
box-sizing: border-box;
border-radius: 20rpx;
.table{
background-color: #fff;
border-radius: 20rpx;
padding: 10rpx 0;
margin-bottom: 50rpx;
box-sizing: border-box;
.content-box {
display: flex;
font-weight: 600;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #F2F2F2;
padding: 20rpx 0;
}
.content-box-title {
flex: 1;
font-size: 28rpx;
text-align: center;
}
.content-sam-box{
background-color: #fff;
display: flex;
align-items: center;
font-size: 24rpx;
justify-content: space-between;
padding: 20rpx 0;
color: #333333;
border-bottom: 1px solid #F2F2F2;
.cell{
font-size: 24rpx;
}
}
.content-sam-box:last-child{
border: none;
}
.empty{
width: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 200rpx;
font-size: 26rpx;
color: #333333;
}
} }
} }
} }
// 之前的样式
// .ulBox {
// padding: 0 30rpx;
// .liBox {
// display: flex;
// align-items: center;
// justify-content: space-between;
// border-bottom: 1px solid #E6E6E6;
// height: 92rpx;
// margin-top: 20rpx;
// .infoBox {
// display: flex;
// align-items: center;
// font-size: 28rpx;
// image {
// width: 52rpx !important;
// height: 52rpx;
// }
// }
// & > view:first-child{
// position: relative;
// &::after{
// content:'';
// position: absolute;
// left: 0;
// bottom: -6rpx;
// background: linear-gradient(90deg,#FA882F, #D9D9D9);
// border-radius: 4rpx;
// height: 8rpx;
// width: 80rpx;
// }
// }
// &:last-child {
// border: none;
// }
// }
// }
</style> </style>
\ No newline at end of file
<template>
<view class="container">
<view class="myHeader">
<!-- #ifdef APP -->
<view class="backArrow">
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
<text style="font-size: 30rpx;">育成团队</text>
</view>
<!-- #endif -->
<view class="timeBox" v-if="currentBtn == '2'" @click="showTime1 = true">
<CommonTimePicker
:timeData="startDate"
:visible="showTime1"
iconColor="#fff"
@confirmDate="changeStartTime"
@closeTime="showTime1=false"
/>
</view>
<view class="renshu" :style="{marginTop}">
<view class="top">
<view class="left">
<text v-if="currentBtn == '1'">育成部长数</text>
<text v-if="currentBtn == '2'">团队标准销售额</text>
</view>
<view class="right" @click="changeCurrentBtn">
<text v-if="currentBtn == '1'">查看业绩</text>
<text v-if="currentBtn == '2'">查看团队</text>
</view>
</view>
<view class="bottom">
<text v-if="currentBtn == '1'">{{myTeamList.length}}</text>
<text v-if="currentBtn == '2'">{{monthStandardSales}}</text>
</view>
</view>
<view class="moneyBox">
<view class="one">
<view v-if="currentBtn == '1'" class="">
{{monthStandardSales}}
</view>
<view v-if="currentBtn == '2'" class="">
{{totalCoursePrice}}
</view>
<view style="margin-top: 5rpx;">
<text v-if="currentBtn == '1'">本月团队标准销售额</text>
<text v-if="currentBtn == '2'">总销售额</text>
</view>
</view>
<view class="two">
<view class="">
{{totalOrder}}
</view>
<view style="margin-top: 5rpx;">
<text>团队出单数</text>
</view>
</view>
</view>
</view>
<view
v-if="currentBtn == '2'"
class="filterBox"
style="background: none;margin: 10rpx 0;">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="120">
<view
class="scrollBtn"
v-for="item in btnList"
:key="item.id"
:class="{active:item.id == currentFilterBtn }"
@click="sortswitch(item)"
>
{{item.title}}
</view>
</scroll-view>
</view>
<!-- <view class="filterBox" :style="{marginTop:currentBtn=='1'?'20rpx':''}">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="120">
<view
class="scroll-view-item_H"
v-for="item in tabList"
:key="item.id"
:class="{active:item.id == currentTab }"
@click="changeTab(item)"
>
{{item.title}}
</view>
</scroll-view>
</view> -->
<view class="tableBox">
<view class="table">
<view class="content-box">
<view class="content-box-title" v-for="(item,index) in tableHeaderList" :key="index">
<text class="title">{{item.title}}</text>
</view>
</view>
<view v-if="currentBtn == '1'&&myTeamList.length>0">
<view class="content-sam-box" v-for="(pointItem,index) in myTeamList" :key="index">
<span class="content-box-title cell">{{pointItem.raiseTeamLeder}}</span>
<span class="content-box-title cell">{{pointItem.raiseTime}}</span>
<span class="content-box-title cell">{{pointItem.standardSales}}</span>
</view>
</view>
<view v-else-if="currentBtn == '2'&&myTeamAchievementList.length>0">
<view class="content-sam-box" v-for="(pointItem,index) in myTeamAchievementList" :key="index">
<span class="content-box-title cell">{{pointItem.saleDate}}</span>
<span class="content-box-title cell">{{pointItem.orderNum}}</span>
<span class="content-box-title cell">{{pointItem.coursePrice}}</span>
<span class="content-box-title cell">{{pointItem.standardSales || '0.00'}}</span>
</view>
</view>
<view class="empty" v-else>
暂无数据
</view>
</view>
</view>
</view>
</template>
<script>
import CommonTimePicker from '@/components/commonTimePicker/commonTimePicker.vue';
import dataHandling from "@/util/dataHandling";
import api from "@/api/api";
export default {
components: {
CommonTimePicker
},
data() {
return {
showTime1:false,
startDate:{year:dataHandling.getDateParts().year,month:dataHandling.getDateParts().month},
tabList:[
{title:'全部',id: '1',type:'all'},
{title:'直辖团队',id: '2',type:1},
{title:'所辖团队',id: '3',type:2},
],
btnList:[
{title:'按标准销售额',id: '1',sortType:5},
{title:'按销售额',id: '2',sortType:2},
{title:'按销售日期',id: '3',sortType:4},
],
tableHeaderList:[
{title:'营业部部长',id:'1'},
{title:'育成时间',id:'2'},
{title:'标准销售额',id:'3'},
],
currentTab:'1',
currentBtn:'1', // 1代表团队 2代表业绩
currentFilterBtn:'1',
teamCount:0,//团队总人数,育成团队人数不算
userId: uni.getStorageSync('cffp_userId'),
otherList: null, // 直辖团队
directList: null, //所辖团队数组
myTeamList:[],//我的团队表格数据,
myTeamData:{},//我的团队总数据,
CffpOrgInfoReqVO: {
userId: uni.getStorageSync('cffp_userId'),
startDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`,
endDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1 > 9 ? new Date().getMonth() + 1 : '0'+ (new Date().getMonth() + 1)}`,
courseOrPolicy: '1',
type: '2',
queryType:3,
sortType:5
},
totalOrder: '0', //总单数
totalCoursePrice: '0.00', // 总销售额
monthStandardSales:'0.00',//本月团队标准销售额
myTeamAchievementList:[],//我的业绩数据列表
marginTop:'30rpx'
}
},
watch: {
currentBtn: {
deep: true,
handler(newVal) {
if(newVal == '1') {
this.tableHeaderList = [
{title:'营业部部长',id:'1'},
{title:'育成时间',id:'2'},
{title:'标准销售额',id:'3'},
]
this.getmyseatem()
// #ifdef H5
this.marginTop = '30rpx'
// #endif
return
}
if(newVal == '2') {
this.tableHeaderList = [
{title:'销售日期',id:'1'},
{title:'单数',id:'2'},
{title:'销售额',id:'3'},
{title:'标准销售额',id:'4'},
]
this.getqueryTeamAchievement()
// #ifdef H5
this.marginTop = '0rpx'
// #endif
return
}
}
},
// currentFilterBtn: {
// deep: true,
// handler(newVal) {
// if(newVal == '3'&&this.currentBtn=='2') {
// this.tableHeaderList = [
// {title:'销售日期',id:'1'},
// {title:'单数',id:'2'},
// {title:'销售额',id:'3'},
// {title:'标准销售额',id:'4'},
// ]
// this.getqueryTeamAchievement()
// return
// }else {
// this.tableHeaderList = [
// {title:'成员',id:'1'},
// {title:'单数',id:'2'},
// {title:'销售额',id:'3'},
// {title:'标准销售额',id:'4'},
// ]
// this.getqueryTeamAchievement()
// return
// }
// }
// },
},
onLoad(){
this.getmyseatem()
this.getqueryTeamAchievement()
},
methods: {
sortswitch(obj) {
this.currentFilterBtn = obj.id
this.getqueryTeamAchievement()
},
changeTab(item){
this.currentTab = item.id
if(this.currentBtn == '2'){
this.getqueryTeamAchievement()
}
},
getqueryTeamAchievement() {
this.CffpOrgInfoReqVO.sortType = this.btnList.filter(item=>item.id == this.currentFilterBtn)[0].sortType
console.log('this.CffpOrgInfoReqVO',this.CffpOrgInfoReqVO);
api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => {
if (res['success']) {
this.myTeamAchievementList = []
this.myTeamAchievementList = res.data.list || [];
if(this.myTeamAchievementList.length>0){
this.myTeamAchievementList.forEach(item=>{
item.saleDate = dataHandling.dateFormat2(item.saleDate,'yyyy-MM-dd')
item.coursePrice = Number(item.coursePrice).toFixed(2) || '0.00'
})
}
this.totalOrder = res.data.totalOrder ? res.data.totalOrder : '0';
this.totalCoursePrice = res.data.totalCoursePrice ? Number(res.data.totalCoursePrice).toFixed(2) : '0.00';
this.monthStandardSales = res.data.monthStandardSales ? Number(res.data.monthStandardSales).toFixed(2) : '0.00';
}
})
},
// 获取团队数据
getmyseatem() {
this.myTeamList = []
api.queryMyTeamInfo({
userId: this.userId,
type: '1'
}).then(res =>{
if(res['success']){
let data = res.data
this.myTeamData = res.data
if(data.raiseList && data.raiseList.length != 0 && data.raiseList != null){
this.myTeamList = data.raiseList
this.myTeamList.forEach(item=>{
item.raiseTime = dataHandling.dateFormat2(item.raiseTime,'yyyy-MM-dd')
})
}
console.log('this.myTeamList',this.myTeamList);
}
})
},
changeStartTime(obj){
this.startDate = obj
this.CffpOrgInfoReqVO.startDate=`${obj.year}-${obj.month<10?`0${obj.month}`:obj.month}`
this.CffpOrgInfoReqVO.endDate=`${obj.year}-${obj.month<10?`0${obj.month}`:obj.month}`
this.getqueryTeamAchievement()
this.showTime1 = false
},
changeCurrentBtn(){
this.currentTab = '1'
this.currentFilterBtn = '1'
if(this.currentBtn == '1'){
this.currentBtn = '2'
return
}
if(this.currentBtn == '2'){
this.currentBtn = '1'
}
},
goBack(){
uni.navigateBack({
delta: 1
});
},
goteam(item) {
if(item.type===1){
uni.navigateTo({
url:`/pages/personalCenter/teamMembers/teamMembers`,
})
}else{
uni.navigateTo({
url:`/pages/personalCenter/teamPerformance/teamPerformance`,
})
}
},
},
}
</script>
<style lang="scss" scoped>
.container{
background-color: rgba(235, 239, 247, 1);
display: flex;
flex-direction: column;
.myHeader{
color: #fff;
box-sizing: border-box;
background: linear-gradient(225deg, rgba(65, 69, 188, 1) 0%, rgba(29, 30, 125, 1) 100%);
.backArrow{
box-sizing: border-box;
display: flex;
height: 60rpx;
justify-content: space-between;
align-items: center;
position: relative;
width: 100%;
margin-bottom: 10rpx;
color: #fff;
margin-top: 20rpx;
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
.timeBox{
margin-top: 30rpx;
padding-left: 25rpx;
width: 50%;
}
.renshu{
padding: 10rpx 25rpx;
color: #fff;
.top{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 26rpx;
.right{
padding: 10rpx 15rpx;
background-color: #fff;
border-radius: 30rpx;
color: rgba(32, 39, 155, 1);
font-size: 25rpx;
}
}
.bottom{
font-size: 34rpx;
font-weight: 500;
}
}
.moneyBox{
box-sizing: border-box;
width: 100%;
background-color: rgba(255,255,255,.15);
padding:15rpx 20rpx;
display: flex;
align-items: center;
justify-content: space-around;
.one{
font-size: 26rpx;
text-align: center;
width: 50%;
position: relative;
}
.one::after{
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 0;
content: '';
height: 40rpx;
border: 1rpx dashed #fff;
}
.two{
font-size: 26rpx;
text-align: center;
width: 50%;
}
}
}
.filterBox{
box-sizing: border-box;
// margin: 20rpx 0;
width: 100%;
background-color: #fff;
padding: 20rpx 60rpx 0 60rpx;
display: flex;
align-items: center;
justify-content: space-between;
.scroll-view_H {
white-space: nowrap;
width: 100%;
box-sizing: border-box;
}
.scroll-view-item {
text-align: center;
font-size: 36rpx;
}
.scroll-view-item_H {
margin-bottom: 20rpx;
display: inline-block;
margin-right: 20rpx;
text-align: center;
font-size: 27rpx;
padding: 10rpx 20rpx;
color: rgba(46, 38, 29, 1);
&.active{
color: rgba(32, 39, 155, 1);
position: relative;
}
&.active::before{
display: block;
content: "";
position: absolute;
left: 50%;
transform: translate(-50%);
bottom: -3%;
width: 50%;
// height: 1rpx;
border: 1rpx solid rgba(32, 39, 155, 1);
border-radius: 5rpx;
}
}
.scroll-view-item_H:last-child{
margin-right: 0rpx;
}
.scrollBtn {
display: inline-block;
margin-right: 20rpx;
text-align: center;
font-size: 27rpx;
padding: 10rpx 20rpx;
color: rgba(46, 38, 29, 1);
&.active{
color: rgba(32, 39, 155, 1);
}
}
.scrollBtn:last-child{
margin-right: 0rpx;
}
.filterItem{
background: #f7f7f7;
font-size: 27rpx;
padding: 10rpx;
color: rgba(46, 38, 29, 1);
border-radius: 8rpx;
&.active{
background: rgba(32, 39, 155, 1);
color: #fff;
}
}
}
.tableBox{
padding: 20rpx;
width: 100%;
box-sizing: border-box;
.table{
background-color: #fff;
border-radius: 20rpx;
padding: 10rpx 0;
margin-bottom: 50rpx;
.content-box {
background-color: #fff;
display: flex;
font-weight: 600;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #F2F2F2;
padding: 20rpx 0;
}
.content-box-title {
flex: 1;
font-size: 28rpx;
text-align: center;
}
.content-sam-box{
background-color: #fff;
display: flex;
align-items: center;
font-size: 24rpx;
justify-content: space-between;
padding: 20rpx 0;
color: #333333;
border-bottom: 1px solid #F2F2F2;
.cell{
font-size: 24rpx;
}
}
.content-sam-box:last-child{
border: none;
}
.empty{
width: 100%;
display: flex;
align-items: center;
justify-content: center;
height: 200rpx;
font-size: 26rpx;
color: #333333;
}
}
}
}
// 之前的样式
// .ulBox {
// padding: 0 30rpx;
// .liBox {
// display: flex;
// align-items: center;
// justify-content: space-between;
// border-bottom: 1px solid #E6E6E6;
// height: 92rpx;
// margin-top: 20rpx;
// .infoBox {
// display: flex;
// align-items: center;
// font-size: 28rpx;
// image {
// width: 52rpx !important;
// height: 52rpx;
// }
// }
// & > view:first-child{
// position: relative;
// &::after{
// content:'';
// position: absolute;
// left: 0;
// bottom: -6rpx;
// background: linear-gradient(90deg,#FA882F, #D9D9D9);
// border-radius: 4rpx;
// height: 8rpx;
// width: 80rpx;
// }
// }
// &:last-child {
// border: none;
// }
// }
// }
</style>
\ No newline at end of file
<template> <template>
<view class="container"> <view class="container">
<!-- 使用默认图标的悬浮按钮 -->
<!-- <FloatingButton ></FloatingButton> -->
<view class="myHeader"> <view class="myHeader">
<view class="left" @click="userinfo()"> <view class="left" @click="userinfo()">
<view <view
class="avatar" class="avatar"
:style="{backgroundImage: 'url(' + (customerBasicInfo.headPicture || companyLogo) + ')'}" :style="{backgroundImage: 'url(' + (customerBasicInfo.headPicture || companyLogo) + ')'}"
> >
<!-- <image :src="customerBasicInfo.headPicture?customerBasicInfo.headPicture:companyLogo" alt="" mode="widthFix" ></image> -->
</view> </view>
<view class="headerInfo"> <view class="headerInfo">
<view class="headerTop"> <view class="headerTop">
...@@ -18,15 +19,16 @@ ...@@ -18,15 +19,16 @@
{{customerBasicInfo.partnerType}} {{customerBasicInfo.partnerType}}
</view> </view>
</view> </view>
<view class="nickName">
<text v-if="loginType == 'codelogin' && customerBasicInfo.nickName">昵称:{{customerBasicInfo.nickName}}</text> <!-- <view class="nickName">
<text v-if="loginType == 'visitor'">昵称:游客</text> <text v-if="loginornot && customerBasicInfo.nickName">昵称:{{customerBasicInfo.nickName}}</text>
</view> <text v-if="!loginornot">昵称:游客</text>
</view> -->
</view> </view>
</view> </view>
<view class="right" @click="goDetail(settingItem)"> <view class="right" @click="goDetail(settingItem)">
<view class="iconfont icon-shezhi iconColor" style="font-size: 40rpx;"></view> <view class="iconfont icon-shezhi " style="font-size: 40rpx;color: #fff;"></view>
</view> </view>
</view> </view>
<view class="myContent"> <view class="myContent">
...@@ -64,74 +66,24 @@ ...@@ -64,74 +66,24 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 头部信息 --> <uni-popup ref="joinPopup" type="center" background-color="#fff">
<!-- <view class="basicInfoBox"> <view class="joinContent">
<view class="avatar"> <view class="joinHeader">
<image :src="customerBasicInfo.headPicture?customerBasicInfo.headPicture:companyLogo" alt="" srcset="" ></image> <view class="iconfont icon-hezuo" style="font-size: 35rpx;color: #fff;"></view>
</view>
<view class="infoBox">
<view class="firstLineBox">
<view>
<strong>{{loginornot == true ?customerBasicInfo.realName :'游客'}}</strong>
<text class="csTag" v-if="customerBasicInfo.partnerType">{{customerBasicInfo.partnerType}}</text>
</view>
<view class="personalInfoBtn" @click="userinfo()">
<text>个人资料</text>
<i class="iconfont icon-bianji"></i>
</view>
</view>
<view>昵称:{{loginornot == true ?customerBasicInfo.nickName :'游客'}}</view>
<view>{{customerBasicInfo.userDescription}}</view>
</view>
</view -->
<!-- 主要菜单 -->
<!-- <view class="mainMenuBox">
<view class="item" v-for="mainMenu in mainMenuLists" :key="mainMenu.id">
<h4>{{mainMenu.categoryName}}</h4>
<view class="menuItemBox">
<view class="mainMenuItem" v-for="menuItem in mainMenu.children.filter(v=>v.isShow)" :key="menuItem.title" @click="goDetail(menuItem)">
<image :src="'/static/moduleIcon/'+menuItem.icon+'.png'" alt="" srcset="" mode="widthFix"></image>
<text>{{menuItem.title}}</text>
</view>
</view> </view>
</view> <view class="joinCon">
<view class="one">
</view> --> 您还未加盟为合伙人
<!-- 个人信息 -->
<!-- <view class="personalInfo">
<view class="ulBox">
<view v-for="item in minorMenuLists.filter(v=>v.isShow)" :key="item.title" @click="goDetail(item)" class="liBox">
<view class="infoBox">
<image :src="'/static/moduleIcon/'+item.icon+'.png'" alt="" srcset="" mode="widthFix"></image>
<text>{{item.title}}</text>
</view> </view>
<view class="iconBox"> <view class="two">
<i class="iconfont icon-youjiantou"></i> 成为合伙人后,分享商品,好友购物得收益
</view> </view>
</view> </view>
</view> <view class="joinFotter" @click="gotoApply">
</view> --> 去加盟拿收益
<!-- <tabBar :currentPage="currentPage"></tabBar> -->
<!-- 我的邀请码 -->
<!-- <view class="inviteQrcodeContainer">
<uni-popup ref="popup1" background-color="#fff">
<view class="popup1-content">
<view class="title">
<text></text>
<text>我的邀请码</text>
<i class="iconfont icon-guanbi" @click="closePopup()"></i>
</view>
<view class="content">
<view class="contentBox">
<h3>{{inviteEqrode}}</h3>
</view>
<view class="confirmBtn" @click="copy()">
一键复制
</view>
</view>
</view> </view>
</uni-popup> </view>
</view> --> </uni-popup>
</view> </view>
</template> </template>
...@@ -141,6 +93,7 @@ ...@@ -141,6 +93,7 @@
import tabBar from '../../components/tabBar/tabBar.vue'; import tabBar from '../../components/tabBar/tabBar.vue';
import api from "@/api/api"; import api from "@/api/api";
import {companyInfo} from "@/environments/environment"; import {companyInfo} from "@/environments/environment";
import FloatingButton from '@/components/FloatingButton/FloatingButton.vue';
export default { export default {
data() { data() {
return { return {
...@@ -149,7 +102,7 @@ ...@@ -149,7 +102,7 @@
msgTotal:0, msgTotal:0,
messageInfo:[], messageInfo:[],
companyType : companyInfo.companyType, companyType : companyInfo.companyType,
companyLogo : '../../static/myteam/logo.png', companyLogo : '../../static/logo2.png',
userId: uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
loginType : uni.getStorageSync('loginType'), loginType : uni.getStorageSync('loginType'),
inviteEqrode:'', inviteEqrode:'',
...@@ -196,21 +149,23 @@ ...@@ -196,21 +149,23 @@
{id:'00',categoryName:'交易', {id:'00',categoryName:'交易',
children:[ children:[
{title:'成交订单',icon:'icon-dingdan',link:'/pages/saleCourseLists/saleCourseLists',isOpen:true,isShow:true}, {title:'成交订单',icon:'icon-dingdan',link:'/pages/saleCourseLists/saleCourseLists',isOpen:true,isShow:true},
// 原本是我的积分 {title:'佣金',icon:'icon-yongjin',link:'/pages/pointsExchange/pointsExchange',isOpen:true,isShow:true,identity: true},
// {title:'我的积分',icon:'money',link:'/pages/myPoints/myPoints',isOpen:true,isShow:true},
// 原本是积分兑换
{title:'佣金',icon:'icon-yongjin',link:'/pages/pointsExchange/pointsExchange',isOpen:true,isShow:true},
{title:'我的售后',icon:'icon-shouhoufuwu',link:'/pages/afterSales/afterSales',isOpen:true,isShow:true}, {title:'我的售后',icon:'icon-shouhoufuwu',link:'/pages/afterSales/afterSales',isOpen:true,isShow:true},
{title:'分享数据',icon:'icon-shujufenxi',link:'/pages/myShare/myShare',isOpen:true,isShow:true}, {title:'分享数据',icon:'icon-shujufenxi',link:'/pages/myShare/myShare',isOpen:true,isShow:true},
{title:'产品中心',icon:'icon-pinzhishangpinhuichang',link:'pages/courselist/courselist',isOpen:true,isShow:true,isTab:true},
], ],
}, },
{id:'01',categoryName:'团队', {id:'01',categoryName:'团队',
children:[ children:[
{title:'申请加盟',icon:'icon-hezuo',link:'/pages/application-process/basic-info',isOpen:true,isShow:true}, {title:'申请加盟',icon:'icon-hezuo',link:'/pages/application-process/basic-info',isOpen:true,isShow:true},
{title:'邀请加盟',icon:'icon-yaoqing',link:'/pages/inviteJoin/inviteJoin',isOpen:true,isShow:true,identity: true}, {title:'邀请加盟',icon:'icon-yaoqing',link:'/pages/inviteJoin/inviteJoin',isOpen:true,isShow:true,identity: true},
{title:'我的团队',icon:'icon-tuandui',link:'/pages/personalCenter/myTeam',isOpen:true,isShow:true}, {title:'我的团队',icon:'icon-tuandui',link:'/pages/personalCenter/myTeam',isOpen:true,isShow:true,identity: true},
{title:'育成团队',icon:'icon-tuandui',link:'/pages/personalCenter/myTeamIncubate',isOpen:true,isShow:true,identity: true},
],
},
{id:'02',categoryName:'帮助',
children:[
{title:'帮助中心',icon:'icon-wenhao1',link:'/pages/personalCenter/helpCenter',isOpen:true,isShow:true,islogin:true},
{title:'咨询客服',icon:'icon-kefu',link:'',isOpen:true,isShow:true,islogin:true,kefu:true},
], ],
}, },
], ],
...@@ -230,11 +185,10 @@ ...@@ -230,11 +185,10 @@
}, },
onShow() { onShow() {
this.loginType = uni.getStorageSync('loginType') this.loginType = uni.getStorageSync('loginType')
console.log('this.loginType',this.loginType);
if(this.companyType == '1'){ if(this.companyType == '1'){
this.companyLogo='../../static/myteam/Group1633.png'; this.companyLogo='../../static/myteam/Group1633.png';
}else if(this.companyType == '2'){ }else if(this.companyType == '2'){
this.companyLogo='../../static/myteam/logo.png'; this.companyLogo='../../static/logo2.png';
} }
if(this.loginType == "visitor" ){ if(this.loginType == "visitor" ){
...@@ -246,6 +200,9 @@ ...@@ -246,6 +200,9 @@
if(this.loginType == 'codelogin'){ if(this.loginType == 'codelogin'){
this.querySystemMessage() this.querySystemMessage()
this.queryInfo(); this.queryInfo();
}else {
this.msgTotal = 0
this.customerBasicInfo = {}
} }
uni.$on("handClick", res => { uni.$on("handClick", res => {
this.customerBasicInfo = res.data this.customerBasicInfo = res.data
...@@ -260,6 +217,13 @@ ...@@ -260,6 +217,13 @@
}, },
methods: { methods: {
gotoApply(){
uni.navigateTo({
url: '/pages/application-process/basic-info'
})
this.$refs.joinPopup.close()
},
querySystemMessage(){ querySystemMessage(){
if(this.userId){ if(this.userId){
api.querySystemMessage({systemType:1,userId:uni.getStorageSync('cffp_userId')}).then((res)=>{ api.querySystemMessage({systemType:1,userId:uni.getStorageSync('cffp_userId')}).then((res)=>{
...@@ -316,8 +280,32 @@ ...@@ -316,8 +280,32 @@
}, },
// 菜单跳转页面 // 菜单跳转页面
goDetail(item){ goDetail(item){
if(item.kefu){
console.log('item',item); // 现在还没转化成小程序,暂时放在这
// #ifdef MP-WEIXIN
uni.openCustomerServiceChat({
extInfo: {
url: 'https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e'
},
corpId: 'ww43cac1cf9dd6a3d0', // 客服会话按钮打开后,在微信客服会话按钮处理的事件类型
showMessageCard: true,
sendMessageTitle: (uni.getStorageSync('hoservice_mobileNo')?(uni.getStorageSync('hoservice_mobileNo')+",") :"" ) + "进入个人中心-->咨询客服",
sendMessagePath: `/pages/index/mySelf.html`,
//sendMessageImg: cardItem.value['list'][0]['itemImg']
});
// #endif
// #ifndef MP-WEIXIN
window.open('https://work.weixin.qq.com/kfid/kfc08c55f4170e7fc9e')
// #endif
return
}
// 说明不需要登录就可以进
if(item.isLogin){
uni.navigateTo({
url: `${item.link}`
});
return
}
if(!this.loginornot&& !item.islogin){ if(!this.loginornot&& !item.islogin){
this.isLogin() this.isLogin()
return return
...@@ -334,25 +322,22 @@ ...@@ -334,25 +322,22 @@
}, },
ckidentity(item){ ckidentity(item){
if(item.identity == true && this.customerBasicInfo.partnerType ==null){ if(item.identity == true && this.customerBasicInfo.partnerType ==null){
uni.showToast({ this.$refs.joinPopup.open()
title: "您本人尚未加盟,您加盟后可邀请加盟",
duration: 2000,
icon: 'none'
});
return false return false
}else if(item.title == '邀请加盟'){ }else if(item.title == '邀请加盟'){
uni.navigateTo({ uni.navigateTo({
url: `${item.link}?levelCode=` + this.customerBasicInfo.levelCode url: `${item.link}?levelCode=` + this.customerBasicInfo.levelCode
}); });
}else{ }else{
item.link = `${item.link}?from=personalCenter` const urlObj = JSON.parse(JSON.stringify(item))
urlObj.link = `${urlObj.link}?from=personalCenter&partnerType=${this.customerBasicInfo.partnerType}`
if(item.isTab){ if(item.isTab){
uni.switchTab({ uni.switchTab({
url:`../../${item.link}` url:`../../${urlObj.link}`
}) })
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url: item.link url: urlObj.link
}); });
} }
...@@ -430,9 +415,13 @@ ...@@ -430,9 +415,13 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .uni-popup .uni-popup__wrapper{
margin: 0 !important;
border-radius: 30rpx;
}
.container{ .container{
box-sizing:border-box; box-sizing:border-box;
background-color: #f7f7f7; // background-color: #f7f7f7;
min-height: 100vh; /* 使用视口高度 */ min-height: 100vh; /* 使用视口高度 */
height: auto !important; height: auto !important;
height: 100vh; height: 100vh;
...@@ -444,9 +433,7 @@ ...@@ -444,9 +433,7 @@
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: 250rpx; height: 250rpx;
background-image: url('/static/mySelfBg.png'); background: linear-gradient(225deg, rgba(65, 69, 188, 1) 0%, rgba(29, 30, 125, 1) 100%);
background-size: cover;
background-repeat: no-repeat;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
...@@ -457,8 +444,8 @@ ...@@ -457,8 +444,8 @@
align-items: center; align-items: center;
.avatar{ .avatar{
flex-grow: 0; flex-grow: 0;
width: 150rpx; width: 130rpx;
height: 150rpx; height: 130rpx;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
/* 背景图设置 */ /* 背景图设置 */
...@@ -490,26 +477,14 @@ ...@@ -490,26 +477,14 @@
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
.headerTop{ .headerTop{
display: flex; color:#fff;
align-items: center;
justify-content: flex-start;
} }
// .myName{
// // width: 200rpx;
// min-width: 0;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
// font-size: 32rpx;
// }
.desBox{ .desBox{
border: 1px solid rgba(102, 102, 102, 1);
border-radius: 8rpx; border-radius: 8rpx;
padding: 0 2rpx; padding: 0 2rpx;
color: rgba(102, 102, 102, 1); font-size: 24rpx;
font-size: 23rpx;
font-weight: normal; font-weight: normal;
text-align: center;
} }
.nickName{ .nickName{
font-size: 27rpx; font-size: 27rpx;
...@@ -570,196 +545,93 @@ ...@@ -570,196 +545,93 @@
.kuaiTit{ .kuaiTit{
font-size: 30rpx; font-size: 30rpx;
} }
.kuaiCon{ .kuaiCon {
margin-top: 30rpx; margin-top: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start; /* 保持 flex-start */
flex-wrap: wrap; flex-wrap: wrap;
width: 100%; width: 100%;
gap: 20rpx; /* 替代 margin-right */
.kuaiItem{
display: flex;
align-items: center;
flex-direction: column;
margin-bottom: 40rpx;
font-size: 26rpx;
/* 关键修改:计算宽度时考虑间距 */
width: calc((100% - 40rpx * 2) / 3); /* 3个子项,左右各20rpx间距 */
margin-right: 40rpx; /* 右侧间距 */
.imgbox{
margin-bottom: 10rpx;
.iconSize{
font-size: 40rpx;
}
}
}
/* 每行第3个子项去掉右侧间距 */
.kuaiItem:nth-child(3n) {
margin-right: 0;
}
} }
}
.kuaiBox:last-child{ .kuaiItem {
margin-bottom: 100rpx; display: flex;
} align-items: center;
} flex-direction: column;
} margin-bottom: 40rpx;
.avatar { font-size: 26rpx;
width: 90rpx; // width: calc(25% - 20rpx); /* 4个子项,每个占25%宽度减去边距 */
height: 80rpx; width: calc(25% - 15rpx); /* 调整计算方式 */
/* border: 1rpx solid aqua; */ // margin-right: 20rpx; /* 设置右边距 */
margin-right: 17rpx;
border-radius: 50%;
}
.avatar image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.loading{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.basicInfoBox{
display: flex;
padding: 67rpx 20rpx 60rpx 28rpx;
background:linear-gradient(26deg, #D8E2E5 0%, #F0E6DD 31%, #E7DBDF 100%);
// .avatar{
// width: 0;
// height: 80rpx;
// border-radius: 50%;
// margin-right: 17rpx;
// background-color: #fff;
// flex: 0 0 80rpx;
// }
.infoBox{
width:100%;
color: #666666;
strong{
color: #333;
}
view{
margin-bottom: 8rpx;
.csTag{
border-radius: 10rpx;
border:1rpx solid #666;
padding: 4rpx 10rpx;
margin-left: 10rpx;
font-size: 24rpx;
} }
.personalInfoBtn{
border-radius: 10rpx; /* 每行第4个子项去掉右侧间距 */
background-color:#5359CD; .kuaiItem:nth-child(4n) {
color: #fff; margin-right: 0;
text-align: center;
padding: 6rpx 7rpx;
font-size: 24rpx;
.iconfont{
font-size: 24rpx;
margin-left: 4rpx;
}
} }
}
.firstLineBox{ .imgbox {
display: flex; margin-bottom: 10rpx;
justify-content: space-between;
align-items: center;
}
}
}
.mainMenuBox{
background-color: #fff;
width: 95%;
margin: -60rpx auto 30rpx;
border-radius: 10rpx;
padding: 12rpx 30rpx;
box-sizing: border-box;
h4{
font-size: 30rpx;
color: #333;
margin-bottom: 10rpx;
}
.item{
margin-bottom: 30rpx;
}
.menuItemBox{
display: flex;
flex-wrap: wrap;
.mainMenuItem{
display: flex;
flex-direction: column;
align-items: center;
max-width: 20%;
flex: 1;
uni-image{
width: 100rpx!important;
} }
text{
font-size: 28rpx; .iconSize {
color: #333; font-size: 40rpx;
} }
} }
} .kuaiBox:last-child{
margin-bottom: 100rpx;
}
.personalInfo{
background: #fff;
width: 95%;
margin: 6rpx auto 0;
.ulBox{
padding: 0 30rpx;
.liBox{
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #E6E6E6;
height: 92rpx;
.infoBox{
display: flex;
align-items: center;
image{
width: 52rpx !important;
height: 52rpx;
}
}
&:last-child{
border:none;
}
} }
} }
} .joinContent{
.inviteQrcodeContainer{ width: 500rpx;
.popup1-content{ // height: 300rpx;
.title{ border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
.joinHeader{
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background: rgba(54, 57, 169, 1);
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
justify-content: center;
margin-bottom: 20rpx;
} }
.content{ .joinCon{
.contentBox{ // padding: 20rpx 0;
.one{
font-size: 30rpx;
color: rgba(38, 41, 44, 1);
font-weight: 600;
text-align: center; text-align: center;
h3{ }
padding: 30rpx; .two{
} color: rgba(145, 144, 148, 1);
font-size: 26rpx;
text-align: center;
margin-top: 10rpx;
margin-bottom: 20rpx;
} }
} }
.confirmBtn{ .joinFotter{
border-radius: 80rpx; width: 100%;
height: 80rpx;
width: 60%;
background-color: #20269B;
color: #fff; color: #fff;
margin: 64rpx auto 0;
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 10rpx 0;
background: rgba(54, 57, 169, 1);
border-radius: 60rpx;
font-size: 28rpx;
} }
} }
} }
</style> </style>
<template> <template>
<view style="display: flex;flex-direction: column;"> <view style="display: flex;flex-direction: column;">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 10rpx;"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 10rpx;"></text>
<!-- #endif -->
<view class=""> <view class="">
<menu-list :menuList="minorMenuLists"></menu-list> <menu-list :menuList="minorMenuLists"></menu-list>
</view> </view>
...@@ -29,15 +32,15 @@ ...@@ -29,15 +32,15 @@
isTips: false, isTips: false,
isType: 'text' isType: 'text'
}, },
{ // {
title: '重置密码', // title: '重置密码',
icon: '', // icon: '',
link: '/pages/personalCenter/accountoperation/resetpassword', // link: '/pages/personalCenter/accountoperation/resetpassword',
isOpen: true, // isOpen: true,
isShow: true, // isShow: true,
isTips: false, // isTips: false,
isType: 'radio' // isType: 'radio'
}, // },
{ {
title: '注销账号', title: '注销账号',
icon: '', icon: '',
......
<template> <template>
<view class="container"> <view class="container">
<!-- #ifdef APP -->
<view class="top"> <view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>注销账号</text> <text>注销账号</text>
</view> </view>
<view class="" style="text-align: center;font-size: 40rpx;"> <!-- #endif -->
<view class="mobileBox" >
<text>注销手机号:</text> <text>注销手机号:</text>
<text style="color: #20269B;">{{hideMoblie(mobile)}}</text> <text style="color: #20269B;">{{hideMoblie(mobile)}}</text>
</view> </view>
...@@ -78,6 +81,7 @@ ...@@ -78,6 +81,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container{
padding: 0 20rpx; padding: 0 20rpx;
background-color: #f7f7f7;
} }
.top{ .top{
display: flex; display: flex;
...@@ -86,7 +90,7 @@ ...@@ -86,7 +90,7 @@
align-items: center; align-items: center;
position: relative; position: relative;
width: 100%; width: 100%;
margin: 0 auto 60rpx auto; // margin: 0 auto 60rpx auto;
.zuojiantou{ .zuojiantou{
display: inline-block; display: inline-block;
transform: rotate(180deg); transform: rotate(180deg);
...@@ -100,6 +104,11 @@ ...@@ -100,6 +104,11 @@
position: absolute; position: absolute;
} }
} }
.mobileBox{
text-align: center;
font-size: 40rpx;
padding-top: 40rpx;
}
.tips{ .tips{
color: #666666; color: #666666;
li{ li{
......
<template> <template>
<view style="display: flex;flex-direction: column;"> <view style="display: flex;flex-direction: column;">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 10rpx;"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 10rpx;"></text>
<!-- #endif -->
<view> <view>
<menu-list v-if="menuList != 'undefined '" :menuList="minorMenuLists"></menu-list> <menu-list v-if="menuList != 'undefined '" :menuList="minorMenuLists"></menu-list>
</view> </view>
......
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
.content-box-title { .content-box-title {
flex: 1; flex: 1;
font-size: 28rpx; font-size: 28rpx;
text-align: center;
} }
.content-sam-box{ .content-sam-box{
background-color: #fff; background-color: #fff;
......
...@@ -246,20 +246,6 @@ ...@@ -246,20 +246,6 @@
delete this.CffpOrgInfoReqVO.sortType delete this.CffpOrgInfoReqVO.sortType
this.getqueryTeamAchievement() this.getqueryTeamAchievement()
} }
// 以前的写法
// this.teListsort = !this.teListsort
// this.dataList.sort((a, b) => {
// //排序基于的数据
// if (this.teListsort == false) {
// return b.courseIncome - a.courseIncome;
// } else {
// return b.coursePrice - a.coursePrice;
// }
// })
// this.dataList.sort((a, b) => {
// return b.key - a.key;
// })
}, },
mountdchange(e) { mountdchange(e) {
this.montdindex = e.detail.value this.montdindex = e.detail.value
......
<template> <template>
<view class="content"> <view class="content">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text>
<!-- #endif -->
<view class="header"> <view class="header">
<view class="headportrait" @click="uploadAvatar()"> <view class="headportrait" @click="uploadAvatar()">
<image :src="optionForm.headPicture ? optionForm.headPicture :companyLogo" mode="widthFix"></image> <image :src="optionForm.headPicture ? optionForm.headPicture :companyLogo" mode="widthFix"></image>
...@@ -53,7 +56,7 @@ ...@@ -53,7 +56,7 @@
// 敏感词列表(可扩展) // 敏感词列表(可扩展)
bannedWords: ["admin", "test", "root", "password"], bannedWords: ["admin", "test", "root", "password"],
companyType : companyInfo.companyType, companyType : companyInfo.companyType,
companyLogo : '../../static/myteam/logo.png', companyLogo : '../../static/logo2.png',
dataForm: { dataForm: {
loginId: "1", loginId: "1",
targetType: "5", targetType: "5",
...@@ -92,7 +95,7 @@ ...@@ -92,7 +95,7 @@
if(this.companyType == '1'){ if(this.companyType == '1'){
this.companyLogo='../../static/myteam/Group1633.png'; this.companyLogo='../../static/myteam/Group1633.png';
}else if(this.companyType == '2'){ }else if(this.companyType == '2'){
this.companyLogo='../../static/myteam/logo.png'; this.companyLogo='../../static/logo2.png';
} }
this.optionForm = JSON.parse(options.customerBasicInfo) this.optionForm = JSON.parse(options.customerBasicInfo)
}, },
......
<template> <template>
<view class="container" :style="cffpFortuneDateList.length>6?'height:auto':'height:100vh'"> <view class="container" :style="cffpFortuneDateList.length>6?'height:auto':'height:100vh'">
<view class="backArrow"> <!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text> <view class="backArrow">
<text style="font-size: 30rpx;">佣金</text> <text class="iconfont icon-youjiantou zuojiantou" style="left: 5rpx;" @click="goBack()"></text>
</view> <text style="font-size: 30rpx;">佣金</text>
<view class="first"> </view>
<view class="top"> <!-- #endif -->
<view class="left">
<view class=""> <view class="listBox" >
可兑换积分(1积分=1元) <view class="first">
<view class="top">
<view class="left">
<view class="">
可兑换积分(1积分=1元)
</view>
<view style="font-size: 42rpx;font-family: 600;">
{{yesExchangeFortune?yesExchangeFortune:'0.00'}}
</view>
</view> </view>
<view style="font-size: 42rpx;font-family: 600;"> <view class="right" @click="toWithdrawal()">
{{yesExchangeFortune?yesExchangeFortune:'0.00'}} 提现
</view> </view>
</view> </view>
<view class="right" @click="toWithdrawal()"> <view class="bottom">
提现 <view class="bottomItem" v-for="score in scoreList " :key="score.id">
</view> <view class="one">
</view> <view style="font-size:28rpx;color: rgba(199, 199, 199, 1);">
<view class="bottom"> {{score.name}}
<view class="bottomItem" v-for="score in scoreList " :key="score.id"> </view>
<view class="one"> <uni-tooltip class="item" :content="score.content" :placement="score.position">
<view style="font-size:28rpx;color: rgba(199, 199, 199, 1);"> <text class="iconfont icon-wenhao1" style="margin-left: 3rpx;color: rgba(199, 199, 199, 1);font-size: 28rpx;" ></text>
{{score.name}} </uni-tooltip>
</view>
<view class="fotter">
{{score.value}}
</view> </view>
<uni-tooltip class="item" :content="score.content" :placement="score.position">
<text class="iconfont icon-wenhao1" style="margin-left: 3rpx;color: rgba(199, 199, 199, 1);font-size: 28rpx;" ></text>
</uni-tooltip>
</view>
<view class="fotter">
{{score.value}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="two"> <view class="" style="padding: 0 20rpx;">
<view class="twoHeader"> <view class="two" >
订单收益明细 <view class="twoHeader">
</view> 订单收益明细
<view class="timeBox" @click="$refs.timePopup.open()">
<view style="margin-right: 5rpx;">
{{showTime}}
</view> </view>
<text class="iconfont icon-xiajiantou iconStyle"></text> <view class="timeBox" @click="$refs.timePopup.open()">
</view> <view style="margin-right: 5rpx;">
<view class="filterBox"> {{showTime}}
<scroll-view class="scroll-view_H" scroll-x="true" scroll-left="120">
<view
class="scroll-view-item_H uni-bg-blue"
v-for="item in commissionTypeList"
:key="item.id"
:class="{active:item.id == currentFilter.id }"
@click="changeFilter(item)"
>
{{item.dropOptionName}}
</view> </view>
</scroll-view> <text class="iconfont icon-xiajiantou iconStyle"></text>
</view>
<view class="totalBox">
<view class="totalItem">
<text style="margin-right: 10rpx;">合计</text> {{sumCommissionAmount}}
</view>
<view class="totalSelect">
<uni-data-select
v-model="selectItem"
:localdata="selectList"
@change="getDetail()"
></uni-data-select>
</view> </view>
</view> <view class="filterBox">
<view class="detailBox" v-if="cffpFortuneDateList.length>0"> <scroll-view class="scroll-view_H" scroll-x="true" scroll-left="120">
<view <view
class="detailItem" class="scroll-view-item_H uni-bg-blue"
v-for="(item,index) in cffpFortuneDateList" v-for="item in commissionTypeList"
:key="index" :key="item.id"
@click="viewDetail(item)" :class="{active:item.id == currentFilter.id }"
> @click="changeFilter(item)"
<view class="detailLeft"> >
<view class="txt"> {{item.dropOptionName}}
{{item.productTypeName}}
</view>
<view class="date">
{{item.orderDate}}
</view> </view>
</scroll-view>
</view>
<view class="totalBox">
<view class="totalItem">
<text style="margin-right: 10rpx;">合计</text> {{sumCommissionAmount}}
</view> </view>
<view class="detailRight"> <view class="totalSelect">
<view class=""> <uni-data-select
<view class="money"> v-model="selectItem"
<text v-if="item.commissionAmount&&item.commissionAmount>0">+{{item.commissionAmount}}</text> :localdata="selectList"
<text v-if="item.commissionAmount&&item.commissionAmount<0" style="color: rgba(212, 48, 48, 1);">{{item.commissionAmount}}</text> @change="getDetail()"
></uni-data-select>
</view>
</view>
<view class="detailBox" v-if="cffpFortuneDateList.length>0">
<view
class="detailItem"
v-for="(item,index) in cffpFortuneDateList"
:key="index"
@click="viewDetail(item)"
>
<view class="detailLeft">
<view class="txt">
{{item.productTypeName}}
</view> </view>
<view style="font-weight: normal;font-size: 26rpx;color: rgba(56, 56, 56, 1);"> <view class="date">
{{item.exchangeStatus&&item.exchangeStatus=='1'?'待结算' {{item.orderDate}}
:item.exchangeStatus=='2'?'可兑换'
:item.exchangeStatus=='3'?'已兑换'
:item.exchangeStatus=='4'?'兑换中'
:item.exchangeStatus=='5'?'已失效'
:item.exchangeStatus
}}
</view> </view>
</view> </view>
<view class="arrow"> <view class="detailRight">
<text class="iconfont icon-youjiantou iconStyle"></text> <view class="">
<view class="money">
<text v-if="item.commissionAmount&&item.commissionAmount>0">+{{item.commissionAmount}}</text>
<text v-if="item.commissionAmount&&item.commissionAmount<0" style="color: rgba(212, 48, 48, 1);">{{item.commissionAmount}}</text>
</view>
<view style="font-weight: normal;font-size: 26rpx;color: rgba(56, 56, 56, 1);">
{{item.exchangeStatus&&item.exchangeStatus=='1'?'待结算'
:item.exchangeStatus=='2'?'可兑换'
:item.exchangeStatus=='3'?'已兑换'
:item.exchangeStatus=='4'?'兑换中'
:item.exchangeStatus=='5'?'已失效'
:item.exchangeStatus
}}
</view>
</view>
<view class="arrow">
<text class="iconfont icon-youjiantou iconStyle"></text>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> <view class="detailBox" v-else style="background:#fff">
<view class="detailBox" v-else style="background:#fff"> <view class="emptyBox">
<view class="emptyBox"> 暂无数据!
暂无数据! </view>
</view> </view>
</view> </view>
</view> </view>
<uni-popup ref="timePopup" type="bottom" > <uni-popup ref="timePopup" type="bottom" >
<customDatePop @closePop="closePop" @comfirm="comfirm" :dateParts="dateParts" :currentItem="currentItem" :childData="childData"></customDatePop> <customDatePop @closePop="closePop" @comfirm="comfirm" :dateParts="dateParts" :currentItem="currentItem" :childData="childData"></customDatePop>
</uni-popup> </uni-popup>
<!-- <CustomDatePop ref="customDatePop"></CustomDatePop> -->
<!-- <view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text>
<view>
{{yesExchangeFortune?yesExchangeFortune:0}}
</view>
<view>
可兑换积分
</view>
</view>
<view class="content_wrapper">
<view class="item">
<text>A.可兑换</text>
<text>{{yesExchangeFortune?yesExchangeFortune:0}}积分</text>
</view>
<view class="item">
<text>B.待兑换</text>
<text>{{notExchangeFortune?notExchangeFortune:0}}积分</text>
</view>
<view class="item">
<text>C.兑换中</text>
<text>{{inExchangeFortune?inExchangeFortune:0}}积分</text>
</view>
<view class="item">
<text>D.已兑换</text>
<text>{{alreadyExchangeFortune?alreadyExchangeFortune:0}}积分</text>
</view>
<view class="item">
<text>E.已退款</text>
<text style="color: #0A2F99;" @click="viewDropLists()">{{returnFortune?returnFortune:0}}积分<i class="iconfont icon-youjiantou" style="margin-right: 10rpx;"></i></text>
</view>
</view>
<view class="total">
<view class="description">
<text>总积分:</text>
<text>(A+B+C+D+E)</text>
</view>
<view class="">
{{totalFortune?totalFortune:0}}积分
</view>
</view>
<view class="record" @click="toRecord()">
兑换记录
</view>
<view class="btn" @click="toWithdrawal()" style="bottom: 30rpx;">
去提现
</view> -->
</view> </view>
</template> </template>
...@@ -184,7 +144,7 @@ ...@@ -184,7 +144,7 @@
scoreList:[ scoreList:[
{name:'总积分',value:'0.00',id:'1',position:'bottom',content:'包含已兑换+待结算+兑换中的积分'}, {name:'总积分',value:'0.00',id:'1',position:'bottom',content:'包含已兑换+待结算+兑换中的积分'},
{name:'已兑换',value:'0.00',id:'2',position:'bottom',content:'已经提取入账的积分'}, {name:'已兑换',value:'0.00',id:'2',position:'bottom',content:'已经提取入账的积分'},
{name:'待结算',value:'0.00',id:'3',position:'left',content:'用户商品未使用或还在七天可退换时间内'}, {name:'待结算',value:'0.00',id:'3',position:'left',content:'订单成交后需等待7天结算期'},
{name:'兑换中',value:'0.00',id:'4',position:'left',content:'正在审核中的积分'}, {name:'兑换中',value:'0.00',id:'4',position:'left',content:'正在审核中的积分'},
], ],
commissionTypeList:[], commissionTypeList:[],
...@@ -405,12 +365,16 @@ ...@@ -405,12 +365,16 @@
} }
.container{ .container{
box-sizing: border-box; box-sizing: border-box;
padding: 20rpx; /* #ifdef H5 */
background-color: #f7f7f7; padding-top: 15rpx;
/* #endif */
padding-bottom: 20rpx;
.backArrow{ .backArrow{
background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
height: 60rpx; height: 100rpx;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
position: relative; position: relative;
...@@ -422,7 +386,12 @@ ...@@ -422,7 +386,12 @@
position: absolute; position: absolute;
} }
} }
.listBox{
padding: 10rpx 20rpx 0rpx 20rpx;
}
.first{ .first{
color: rgba(244, 239, 212, 1); color: rgba(244, 239, 212, 1);
box-sizing: border-box; box-sizing: border-box;
background: #2a2927; background: #2a2927;
......
...@@ -141,7 +141,6 @@ ...@@ -141,7 +141,6 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container{
box-sizing:border-box; box-sizing:border-box;
background-color: #f7f7f7;
height: 92.9vh; height: 92.9vh;
padding: 30rpx; padding: 30rpx;
.kuaiBox{ .kuaiBox{
......
<template> <template>
<view class="container"> <view class="container">
<!-- 时间选择 --> <view>
<view class="top"> <!-- 时间选择 -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text> <view class="top">
<view class="timeSelectContent" @click="showTime1=true"> <!-- #ifdef APP -->
<CommonTimePicker <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text>
:timeData="startDate" <!-- #endif -->
:visible="showTime1" <view class="timeSelectContent" @click="showTime1=true">
@confirmDate="changeStartTime" <CommonTimePicker
@closeTime="showTime1=false" :timeData="startDate"
/> :visible="showTime1"
@confirmDate="changeStartTime"
</view> @closeTime="showTime1=false"
</view> />
<!-- 销售统计 -->
<view class="saleStatisticalContent"> </view>
<view class="statisticItem">
<text>{{coursesCountInfos.integralCount}}</text>
<text>累计积分</text>
</view>
<view class="statisticItem" @click="viewIntegral()">
<text class="colorText">{{coursesCountInfos.integralDay}}</text>
<text>今日获得积分</text>
</view>
<view class="statisticItem">
<text>{{coursesCountInfos.integralMonth}}</text>
<text>本月得分</text>
</view>
<view class="statisticItem">
<text>{{coursesCountInfos.orderCount}}</text>
<text>累计订单</text>
</view>
<view class="statisticItem" @click="viewIntegral()">
<text class="colorText">{{coursesCountInfos.orderDay}}</text>
<text>今日成交单数</text>
</view> </view>
<view class="statisticItem"> <!-- 销售统计 -->
<text>{{coursesCountInfos.orderMonth}}</text> <view class="saleStatisticalContent">
<text>本月单数</text> <view class="statisticItem">
<text>{{coursesCountInfos.integralCount}}</text>
<text>累计积分</text>
</view>
<view class="statisticItem" @click="viewIntegral()">
<text class="colorText">{{coursesCountInfos.integralDay}}</text>
<text>今日获得积分</text>
</view>
<view class="statisticItem">
<text>{{coursesCountInfos.integralMonth}}</text>
<text>本月得分</text>
</view>
<view class="statisticItem">
<text>{{coursesCountInfos.orderCount}}</text>
<text>累计订单</text>
</view>
<view class="statisticItem" @click="viewIntegral()">
<text class="colorText">{{coursesCountInfos.orderDay}}</text>
<text>今日成交单数</text>
</view>
<view class="statisticItem">
<text>{{coursesCountInfos.orderMonth}}</text>
<text>本月单数</text>
</view>
</view> </view>
</view> </view>
<!-- 分享明细 --> <!-- 分享明细 -->
<view class="saleDetailContent"> <view class="saleDetailContent" :style="{flex:userCourses.length<=0 || userShareCourseOrders.length <=0 ?'1':''}">
<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>
...@@ -50,17 +55,27 @@ ...@@ -50,17 +55,27 @@
<h4 class="noListTip" v-if="!userCourses || userCourses.length<=0 && tabType===1">暂无购买记录!</h4> <h4 class="noListTip" v-if="!userCourses || userCourses.length<=0 && tabType===1">暂无购买记录!</h4>
<h4 class="noListTip" v-if="!userShareCourseOrders || userShareCourseOrders.length <=0 && tabType===2">暂无分享记录!</h4> <h4 class="noListTip" v-if="!userShareCourseOrders || userShareCourseOrders.length <=0 && tabType===2">暂无分享记录!</h4>
<template v-if="userCourses && tabType===1"> <template v-if="userCourses && tabType===1">
<view class="saleOrderInfoItem" v-for="item in userCourses" :key="item.fileId"> <view class="saleOrderInfoItem" v-for="item in userCourses" :key="item.fileId" >
<view class="courseInfoContent" style="display: flex;justify-content: space-between;"> <view class="courseInfoContent" style="display: flex;justify-content: space-between;">
<view class="" @click="curriculumDetail(item)"> <view class="" @click="curriculumDetail(item)">
<course-item :thumbnailPath="item.displayImage" :fileId="item.fileId" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :fileLecturerId="item.fileLecturerId" :orderId="item.orderId"></course-item> <course-item
</view> :thumbnailPath="item.displayImage"
<view class="detailBtn"> :fileId="item.fileId"
<text class="detailBtn" @click="viewDetail(item)" style="color: #000;">订单详情></text> :title="item.fileTitle"
:summaryBox="item.fileSynopsis"
:dataList="{coursePrice:item.coursePrice}"
:fileLecturerId="item.fileLecturerId"
:orderId="item.orderId"
:showDetail="true"
></course-item>
</view> </view>
</view> </view>
<view class="countsContent"> <view class="countsContent">
<text>实际支付:¥{{parseFloat(item.paymentAmount).toFixed(2)}}</text> <text>实际支付:¥{{parseFloat(item.paymentAmount).toFixed(2)}}</text>
<view class="arrowBox" @click="viewDetail(item)">
<text class="detailBtn" >订单详情</text>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -70,12 +85,29 @@ ...@@ -70,12 +85,29 @@
<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 class="infoBtn" @click="viewDetail(item)">订单详情</text>
<text @click="viewDetail(item)">订单详情></text>
</view> </view>
</view> </view>
</template> </template>
</view> </view>
<uni-popup ref="joinPopup" type="center" background-color="#fff">
<view class="joinContent">
<view class="joinHeader">
<view class="iconfont icon-hezuo" style="font-size: 35rpx;color: #fff;"></view>
</view>
<view class="joinCon">
<view class="one">
您还未加盟为合伙人
</view>
<view class="two">
成为合伙人后,分享商品,好友购物得收益
</view>
</view>
<view class="joinFotter" @click="gotoApply">
去加盟拿收益
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
...@@ -102,10 +134,19 @@ ...@@ -102,10 +134,19 @@
userShareCourseOrders:[], userShareCourseOrders:[],
userCourseCountNum:0, userCourseCountNum:0,
userShareCourseCount:0, userShareCourseCount:0,
tabType:1 tabType:1,
partnerType:''
} }
}, },
methods: { methods: {
// 去加盟
gotoApply(){
uni.navigateTo({
url: '/pages/application-process/basic-info'
})
this.$refs.joinPopup.close()
},
changeStartTime(obj){ changeStartTime(obj){
this.startDate = obj this.startDate = obj
this.queryDate=`${obj.year}-${obj.month<10?`0${obj.month}`:obj.month}` this.queryDate=`${obj.year}-${obj.month<10?`0${obj.month}`:obj.month}`
...@@ -168,23 +209,22 @@ ...@@ -168,23 +209,22 @@
} }
}, },
// // 查看详情
// goDetail(val){ // 查看佣金
// uni.navigateTo({
// url:`/pages/commonDetail/commonDetail?fileId=${val}&type=1`
// })
// },
// 查看积分
viewIntegral(){ viewIntegral(){
// uni.navigateTo({ if(this.partnerType == 'null'){
// url:`/pages/myPoints/myPoints` this.$refs.joinPopup.open()
// }) return
}
uni.navigateTo({ uni.navigateTo({
url:`/pages/pointsExchange/pointsExchange` url:`/pages/pointsExchange/pointsExchange`
}) })
}, },
}, },
onLoad() { onLoad(options) {
if(options.partnerType){
this.partnerType = options.partnerType
}
this.userCourseCount() this.userCourseCount()
this.userCourseList() this.userCourseList()
...@@ -198,8 +238,63 @@ ...@@ -198,8 +238,63 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .uni-popup .uni-popup__wrapper{
margin: 0 !important;
border-radius: 30rpx;
}
.container{ .container{
height: 100%; // padding-bottom: 50rpx;
display: flex;
flex-direction: column;
.joinContent{
width: 500rpx;
// height: 300rpx;
border-radius: 30rpx;
background-color: #ffff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
flex-direction: column;
.joinHeader{
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background: rgba(54, 57, 169, 1);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
}
.joinCon{
// padding: 20rpx 0;
.one{
font-size: 30rpx;
color: rgba(38, 41, 44, 1);
font-weight: 600;
text-align: center;
}
.two{
color: rgba(145, 144, 148, 1);
font-size: 26rpx;
text-align: center;
margin-top: 10rpx;
margin-bottom: 20rpx;
}
}
.joinFotter{
width: 100%;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 10rpx 0;
background: rgba(54, 57, 169, 1);
border-radius: 60rpx;
font-size: 28rpx;
}
}
.top{ .top{
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -227,8 +322,9 @@ ...@@ -227,8 +322,9 @@
} }
} }
.saleStatisticalContent{ .saleStatisticalContent{
margin: 20rpx;
border-radius: 10rpx;
background-color: #fff; background-color: #fff;
margin: 10rpx 0;
padding: 20rpx 14rpx; padding: 20rpx 14rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -258,26 +354,52 @@ ...@@ -258,26 +354,52 @@
} }
} }
.saleDetailContent{ .saleDetailContent{
margin: 10rpx 20rpx; box-sizing: border-box;
padding: 20rpx 40rpx 0rpx 20rpx;
background-color: #fff;
margin: 0rpx 20rpx 20rpx 20rpx;
border-radius: 10rpx;
.noListTip{ .noListTip{
font-size: 30rpx; font-size: 30rpx;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
} }
.saleOrderInfoItem{ .saleOrderInfoItem{
padding: 18rpx 0rpx 18rpx 10rpx; padding: 18rpx 0rpx 18rpx 10rpx;
border-radius: 20rpx; border-radius: 20rpx;
background-color: #fff; background-color: #fff;
border-bottom: 1rpx solid #F2F2F2;
margin-bottom: 10rpx;
.countsContent{ .countsContent{
display: flex;
align-items: center;
justify-content: space-between;
text-align: right; text-align: right;
color: #333; color: #333;
font-size: 32rpx; font-size: 32rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
.detailBtn{ .arrowBox{
font-size: 24rpx; display: flex;
color: #4A4A4A; align-items: center;
white-space: nowrap; justify-content: center;
.detailBtn{
font-size: 24rpx;
color:#fff;
white-space: nowrap;
background-color: #20269B;
padding: 10rpx 20rpx;
border-radius: 40rpx;
}
} }
}
.saleOrderInfoItem:last-child{
border: none;
} }
.orderItemDetailBox{ .orderItemDetailBox{
padding: 10rpx 20rpx 10rpx 40rpx; padding: 10rpx 20rpx 10rpx 40rpx;
...@@ -286,6 +408,7 @@ ...@@ -286,6 +408,7 @@
color: #4a4a4a; color: #4a4a4a;
margin-bottom: 20rpx; margin-bottom: 20rpx;
font-size: 28rpx; font-size: 28rpx;
border-bottom: 1rpx solid #F2F2F2;
view{ view{
position: relative; position: relative;
margin-bottom: 20rpx; margin-bottom: 20rpx;
...@@ -306,14 +429,23 @@ ...@@ -306,14 +429,23 @@
width: 8rpx; width: 8rpx;
height: 60%; height: 60%;
border-radius:8rpx; border-radius:8rpx;
background-color: #FA882F; background-color: #20269B;
} }
&.orderDetailLine{ &.orderDetailLine{
justify-content: flex-end; justify-content: flex-end;
font-size: 28rpx; font-size: 28rpx;
.infoBtn{
padding: 10rpx 20rpx;
color: #fff;
border-radius: 40rpx;
background-color: #20269B;
}
} }
} }
} }
.orderItemDetailBox:last-child{
border: none;
}
.courseTab{ .courseTab{
margin-top: 20rpx; margin-top: 20rpx;
text{ text{
......
<template> <template>
<view class="container"> <view class="container">
<view class="top"> <view class="top">
<view class="iconfont icon-youjiantou zuojiantou" @click="goBack()"> <!-- #ifdef APP -->
</view> <view class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></view>
<view class="commonTitle" style="width: 60%;text-align: right;"> <view class="commonTitle" style="width: 60%;text-align: right;">
消息列表 消息列表
</view> </view>
<!-- #endif -->
<view class="clear" @click="oneKeyRead()" > <view class="clear" @click="oneKeyRead()" >
<text class="iconfont icon-saoba myIcon" ></text> <text class="iconfont icon-saoba myIcon" ></text>
<text>一键已读</text> <text>一键已读</text>
...@@ -131,7 +133,12 @@ ...@@ -131,7 +133,12 @@
.top{ .top{
display: flex; display: flex;
height: 100rpx; height: 100rpx;
/* #ifdef APP */
justify-content: space-between; justify-content: space-between;
/* #endif */
/* #ifdef H5 */
justify-content: flex-end;
/* #endif */
align-items: center; align-items: center;
position: relative; position: relative;
background: #fff; background: #fff;
......
<template> <template>
<!-- #ifdef APP -->
<view class="top"> <view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text class="commonTitle">消息详情</text> <text class="commonTitle">消息详情</text>
</view> </view>
<!-- #endif -->
<view class="announcement_detail_wrapper container"> <view class="announcement_detail_wrapper container">
<view class="content"> <view class="content">
<view class="title"> <view class="title">
...@@ -84,10 +87,11 @@ ...@@ -84,10 +87,11 @@
font-size: 24rpx; font-size: 24rpx;
} }
.content{ .content{
margin-top: 20rpx; // margin-top: 20rpx;
padding: 20rpx; padding: 20rpx;
background: #fff; background: #fff;
word-break: break-word; word-break: break-word;
border-radius: 10rpx;
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<view class="container"> <view class="container">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text>
<!-- #endif -->
<view class="top"> <view class="top">
<view> <view>
可兑换 可兑换
...@@ -23,7 +26,7 @@ ...@@ -23,7 +26,7 @@
<text>{{noTaxAmount}}</text> <text>{{noTaxAmount}}</text>
</view> </view>
</view> </view>
<view class="content_wrapper"> <view class="content_wrapper tixian">
<h4>提现到</h4> <h4>提现到</h4>
<view class="paymentItem" @click="selectPaymentMethod(2)"> <view class="paymentItem" @click="selectPaymentMethod(2)">
<view> <view>
...@@ -323,10 +326,16 @@ ...@@ -323,10 +326,16 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container{
box-sizing: border-box;
padding: 20rpx;
}
.top{ .top{
width: 100%; width: 100%;
text-align: center; text-align: center;
padding: 20rpx 0; padding: 20rpx 0;
background-color: #fff;
border-radius: 10rpx;
view:nth-child(1){ view:nth-child(1){
font-size: 36rpx; font-size: 36rpx;
color: #666; color: #666;
...@@ -338,6 +347,7 @@ ...@@ -338,6 +347,7 @@
} }
} }
.content_wrapper{ .content_wrapper{
border-radius: 10rpx;
background: #fff; background: #fff;
margin: 20rpx auto; margin: 20rpx auto;
padding:0 30rpx; padding:0 30rpx;
...@@ -420,4 +430,7 @@ ...@@ -420,4 +430,7 @@
} }
} }
} }
.tixian{
padding: 20rpx;
}
</style> </style>
\ No newline at end of file
<template> <template>
<view> <view>
<view class="wrapper"> <view class="wrapper">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 30rpx;"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 30rpx;"></text>
<!-- #endif -->
<view class="banner"> <view class="banner">
<!--头部技术支持组件--> <!--头部技术支持组件-->
<!-- <commonHead></commonHead> --> <!-- <commonHead></commonHead> -->
......
<template> <template>
<view class="wrapper"> <view class="wrapper">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 30rpx;"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 30rpx;"></text>
<!-- #endif -->
<view class="banner"> <view class="banner">
<!--头部技术支持组件--> <!--头部技术支持组件-->
<!-- <commonHead></commonHead> --> <!-- <commonHead></commonHead> -->
......
<template> <template>
<!-- 已关注公众号用户 --> <!-- 已关注公众号用户 -->
<view class="content"> <view class="content">
<!-- #ifdef APP -->
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 30rpx;"></text> <text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 30rpx;"></text>
<!-- #endif -->
<view class="banner"> <view class="banner">
<image src="/static/images/policyIrrBanner.png" mode="widthFix"></image> <image src="/static/images/policyIrrBanner.png" mode="widthFix"></image>
<!-- 使用说明 --> <!-- 使用说明 -->
......
...@@ -55,6 +55,48 @@ ...@@ -55,6 +55,48 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe116;</span>
<div class="name">客服</div>
<div class="code-name">&amp;#xe116;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xecc0;</span>
<div class="name">双右箭头</div>
<div class="code-name">&amp;#xecc0;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe641;</span>
<div class="name">雷电</div>
<div class="code-name">&amp;#xe641;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe610;</span>
<div class="name">信息</div>
<div class="code-name">&amp;#xe610;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe759;</span>
<div class="name">搜索</div>
<div class="code-name">&amp;#xe759;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe6be;</span>
<div class="name">使用教程</div>
<div class="code-name">&amp;#xe6be;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe65e;</span>
<div class="name">公司</div>
<div class="code-name">&amp;#xe65e;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe115;</span> <span class="icon iconfont">&#xe115;</span>
<div class="name">下箭头</div> <div class="name">下箭头</div>
<div class="code-name">&amp;#xe115;</div> <div class="code-name">&amp;#xe115;</div>
...@@ -228,9 +270,9 @@ ...@@ -228,9 +270,9 @@
<pre><code class="language-css" <pre><code class="language-css"
>@font-face { >@font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('iconfont.woff2?t=1749031328434') format('woff2'), src: url('iconfont.woff2?t=1750649292857') format('woff2'),
url('iconfont.woff?t=1749031328434') format('woff'), url('iconfont.woff?t=1750649292857') format('woff'),
url('iconfont.ttf?t=1749031328434') format('truetype'); url('iconfont.ttf?t=1750649292857') format('truetype');
} }
</code></pre> </code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
...@@ -257,6 +299,69 @@ ...@@ -257,6 +299,69 @@
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib"> <li class="dib">
<span class="icon iconfont icon-kefu"></span>
<div class="name">
客服
</div>
<div class="code-name">.icon-kefu
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shuangyoujiantou"></span>
<div class="name">
双右箭头
</div>
<div class="code-name">.icon-shuangyoujiantou
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-leidian"></span>
<div class="name">
雷电
</div>
<div class="code-name">.icon-leidian
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-xinxi"></span>
<div class="name">
信息
</div>
<div class="code-name">.icon-xinxi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-sousuo"></span>
<div class="name">
搜索
</div>
<div class="code-name">.icon-sousuo
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shiyongjiaocheng"></span>
<div class="name">
使用教程
</div>
<div class="code-name">.icon-shiyongjiaocheng
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-gongsi"></span>
<div class="name">
公司
</div>
<div class="code-name">.icon-gongsi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-xiajiantou"></span> <span class="icon iconfont icon-xiajiantou"></span>
<div class="name"> <div class="name">
下箭头 下箭头
...@@ -519,6 +624,62 @@ ...@@ -519,6 +624,62 @@
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-kefu"></use>
</svg>
<div class="name">客服</div>
<div class="code-name">#icon-kefu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shuangyoujiantou"></use>
</svg>
<div class="name">双右箭头</div>
<div class="code-name">#icon-shuangyoujiantou</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-leidian"></use>
</svg>
<div class="name">雷电</div>
<div class="code-name">#icon-leidian</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xinxi"></use>
</svg>
<div class="name">信息</div>
<div class="code-name">#icon-xinxi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-sousuo"></use>
</svg>
<div class="name">搜索</div>
<div class="code-name">#icon-sousuo</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shiyongjiaocheng"></use>
</svg>
<div class="name">使用教程</div>
<div class="code-name">#icon-shiyongjiaocheng</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-gongsi"></use>
</svg>
<div class="name">公司</div>
<div class="code-name">#icon-gongsi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xiajiantou"></use> <use xlink:href="#icon-xiajiantou"></use>
</svg> </svg>
<div class="name">下箭头</div> <div class="name">下箭头</div>
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4933433 */ font-family: "iconfont"; /* Project id 4933433 */
src: url('iconfont.woff2?t=1749031328434') format('woff2'), src: url('iconfont.woff2?t=1750649292857') format('woff2'),
url('iconfont.woff?t=1749031328434') format('woff'), url('iconfont.woff?t=1750649292857') format('woff'),
url('iconfont.ttf?t=1749031328434') format('truetype'); url('iconfont.ttf?t=1750649292857') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,6 +13,34 @@ ...@@ -13,6 +13,34 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-kefu:before {
content: "\e116";
}
.icon-shuangyoujiantou:before {
content: "\ecc0";
}
.icon-leidian:before {
content: "\e641";
}
.icon-xinxi:before {
content: "\e610";
}
.icon-sousuo:before {
content: "\e759";
}
.icon-shiyongjiaocheng:before {
content: "\e6be";
}
.icon-gongsi:before {
content: "\e65e";
}
.icon-xiajiantou:before { .icon-xiajiantou:before {
content: "\e115"; content: "\e115";
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,6 +6,55 @@ ...@@ -6,6 +6,55 @@
"description": "", "description": "",
"glyphs": [ "glyphs": [
{ {
"icon_id": "518189",
"name": "客服",
"font_class": "kefu",
"unicode": "e116",
"unicode_decimal": 57622
},
{
"icon_id": "6999657",
"name": "双右箭头",
"font_class": "shuangyoujiantou",
"unicode": "ecc0",
"unicode_decimal": 60608
},
{
"icon_id": "39934155",
"name": "雷电",
"font_class": "leidian",
"unicode": "e641",
"unicode_decimal": 58945
},
{
"icon_id": "4550364",
"name": "信息",
"font_class": "xinxi",
"unicode": "e610",
"unicode_decimal": 58896
},
{
"icon_id": "4933408",
"name": "搜索",
"font_class": "sousuo",
"unicode": "e759",
"unicode_decimal": 59225
},
{
"icon_id": "29085756",
"name": "使用教程",
"font_class": "shiyongjiaocheng",
"unicode": "e6be",
"unicode_decimal": 59070
},
{
"icon_id": "29941060",
"name": "公司",
"font_class": "gongsi",
"unicode": "e65e",
"unicode_decimal": 58974
},
{
"icon_id": "9021520", "icon_id": "9021520",
"name": "下箭头", "name": "下箭头",
"font_class": "xiajiantou", "font_class": "xiajiantou",
......
...@@ -48,38 +48,31 @@ ...@@ -48,38 +48,31 @@
return { return {
bottomData: [{ bottomData: [{
text: '首页', text: '首页',
icon: 'iconfont icon-shouye', icon: 'iconfont icon-shouye16',
name: 'home', name: 'home',
link:'/pages/index/index' link:'/pages/index/index',
}, tabbar:true
{
text: '搜索',
icon: 'iconfont icon-sousuo',
name: 'searh',
link:'/pages/courselist/courselist'
}, },
// {
// icon: 'iconfont icon-sousuo',
// name: 'searh',
// link:'/pages/courselist/courselist'
// },
{ {
text: '我的', text: '我的',
icon: 'iconfont icon-wode', icon: 'iconfont icon-gerenzhongxin',
name: 'user', name: 'user',
link:'/pages/personalCenter/personalCenter' link:'/pages/personalCenter/personalCenter',
tabbar:true
}, },
{ {
text: '消息', text: '消息',
icon: 'iconfont icon-xiaoxi', icon: 'iconfont icon-xiaoxi',
name: 'news', name: 'news',
link:'/pages/systemMsg/system_msg' link:'/pages/systemMsg/system_msg',
tabbar:false
}, },
// {
// text: '百度',
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
// name: 'copy'
// },
// {
// text: '其他',
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
// name: 'more'
// }
] ]
} }
}, },
...@@ -97,10 +90,7 @@ ...@@ -97,10 +90,7 @@
* 选择内容 * 选择内容
*/ */
select(item, index) { select(item, index) {
this.$emit('select', { this.$emit('select',item )
item,
index
})
this.close() this.close()
}, },
...@@ -117,8 +107,8 @@ ...@@ -117,8 +107,8 @@
</script> </script>
<style lang="scss" > <style lang="scss" >
.uni-popup-share { .uni-popup-share {
background-color: #F4F2F3; // background-color: #F4F2F3;
// background-color: #fff; background-color: #fff;
border-top-left-radius: 11rpx; border-top-left-radius: 11rpx;
border-top-right-radius: 11rpx; border-top-right-radius: 11rpx;
} }
......
## 1.2.9(2025-04-14)
- 修复: 下拉筛选中 toISOString() 引发的时区问题
## 1.2.8(2024-10-15)
- 修复 运行到抖音小程序上出现的问题
## 1.2.7(2024-10-15)
- 修复 微信小程序中的getSystemInfo警告
## 1.2.4(2023-12-19)
- 修复 uni-tr只有一列时minWidth计算错误,列变化实时计算更新
## 1.2.3(2023-03-28)
- 修复 在vue3模式下可能会出现错误的问题
## 1.2.2(2022-11-29)
- 优化 主题样式
## 1.2.1(2022-06-06)
- 修复 微信小程序存在无使用组件的问题
## 1.2.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-table](https://uniapp.dcloud.io/component/uniui/uni-table)
## 1.1.0(2021-07-30)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.0.7(2021-07-08)
- 新增 uni-th 支持 date 日期筛选范围
## 1.0.6(2021-07-05)
- 新增 uni-th 支持 range 筛选范围
## 1.0.5(2021-06-28)
- 新增 uni-th 筛选功能
## 1.0.4(2021-05-12)
- 新增 示例地址
- 修复 示例项目缺少组件的Bug
## 1.0.3(2021-04-16)
- 新增 sortable 属性,是否开启单列排序
- 优化 表格多选逻辑
## 1.0.2(2021-03-22)
- uni-tr 添加 disabled 属性,用于 type=selection 时,设置某行是否可由全选按钮控制
## 1.0.1(2021-02-05)
- 调整为uni_modules目录规范
<template>
<view class="uni-table-scroll" :class="{ 'table--border': border, 'border-none': !noData }">
<!-- #ifdef H5 -->
<table class="uni-table" border="0" cellpadding="0" cellspacing="0" :class="{ 'table--stripe': stripe }" :style="{ 'min-width': minWidth + 'px' }">
<slot></slot>
<tr v-if="noData" class="uni-table-loading">
<td class="uni-table-text" :class="{ 'empty-border': border }">{{ emptyText }}</td>
</tr>
<view v-if="loading" class="uni-table-mask" :class="{ 'empty-border': border }"><div class="uni-table--loader"></div></view>
</table>
<!-- #endif -->
<!-- #ifndef H5 -->
<view class="uni-table" :style="{ 'min-width': minWidth + 'px' }" :class="{ 'table--stripe': stripe }">
<slot></slot>
<view v-if="noData" class="uni-table-loading">
<view class="uni-table-text" :class="{ 'empty-border': border }">{{ emptyText }}</view>
</view>
<view v-if="loading" class="uni-table-mask" :class="{ 'empty-border': border }"><div class="uni-table--loader"></div></view>
</view>
<!-- #endif -->
</view>
</template>
<script>
/**
* Table 表格
* @description 用于展示多条结构类似的数据
* @tutorial https://ext.dcloud.net.cn/plugin?id=3270
* @property {Boolean} border 是否带有纵向边框
* @property {Boolean} stripe 是否显示斑马线
* @property {Boolean} type 是否开启多选
* @property {String} emptyText 空数据时显示的文本内容
* @property {Boolean} loading 显示加载中
* @event {Function} selection-change 开启多选时,当选择项发生变化时会触发该事件
*/
export default {
name: 'uniTable',
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
emits:['selection-change'],
props: {
data: {
type: Array,
default() {
return []
}
},
// 是否有竖线
border: {
type: Boolean,
default: false
},
// 是否显示斑马线
stripe: {
type: Boolean,
default: false
},
// 多选
type: {
type: String,
default: ''
},
// 没有更多数据
emptyText: {
type: String,
default: '没有更多数据'
},
loading: {
type: Boolean,
default: false
},
rowKey: {
type: String,
default: ''
}
},
data() {
return {
noData: true,
minWidth: 0,
multiTableHeads: []
}
},
watch: {
loading(val) {},
data(newVal) {
let theadChildren = this.theadChildren
let rowspan = 1
if (this.theadChildren) {
rowspan = this.theadChildren.rowspan
}
// this.trChildren.length - rowspan
this.noData = false
// this.noData = newVal.length === 0
}
},
created() {
// 定义tr的实例数组
this.trChildren = []
this.thChildren = []
this.theadChildren = null
this.backData = []
this.backIndexData = []
},
methods: {
isNodata() {
let theadChildren = this.theadChildren
let rowspan = 1
if (this.theadChildren) {
rowspan = this.theadChildren.rowspan
}
this.noData = this.trChildren.length - rowspan <= 0
},
/**
* 选中所有
*/
selectionAll() {
let startIndex = 1
let theadChildren = this.theadChildren
if (!this.theadChildren) {
theadChildren = this.trChildren[0]
} else {
startIndex = theadChildren.rowspan - 1
}
let isHaveData = this.data && this.data.length > 0
theadChildren.checked = true
theadChildren.indeterminate = false
this.trChildren.forEach((item, index) => {
if (!item.disabled) {
item.checked = true
if (isHaveData && item.keyValue) {
const row = this.data.find(v => v[this.rowKey] === item.keyValue)
if (!this.backData.find(v => v[this.rowKey] === row[this.rowKey])) {
this.backData.push(row)
}
}
if (index > (startIndex - 1) && this.backIndexData.indexOf(index - startIndex) === -1) {
this.backIndexData.push(index - startIndex)
}
}
})
// this.backData = JSON.parse(JSON.stringify(this.data))
this.$emit('selection-change', {
detail: {
value: this.backData,
index: this.backIndexData
}
})
},
/**
* 用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中)
*/
toggleRowSelection(row, selected) {
// if (!this.theadChildren) return
row = [].concat(row)
this.trChildren.forEach((item, index) => {
// if (item.keyValue) {
const select = row.findIndex(v => {
//
if (typeof v === 'number') {
return v === index - 1
} else {
return v[this.rowKey] === item.keyValue
}
})
let ischeck = item.checked
if (select !== -1) {
if (typeof selected === 'boolean') {
item.checked = selected
} else {
item.checked = !item.checked
}
if (ischeck !== item.checked) {
this.check(item.rowData||item, item.checked, item.rowData?item.keyValue:null, true)
}
}
// }
})
this.$emit('selection-change', {
detail: {
value: this.backData,
index:this.backIndexData
}
})
},
/**
* 用于多选表格,清空用户的选择
*/
clearSelection() {
let theadChildren = this.theadChildren
if (!this.theadChildren) {
theadChildren = this.trChildren[0]
}
// if (!this.theadChildren) return
theadChildren.checked = false
theadChildren.indeterminate = false
this.trChildren.forEach(item => {
// if (item.keyValue) {
item.checked = false
// }
})
this.backData = []
this.backIndexData = []
this.$emit('selection-change', {
detail: {
value: [],
index: []
}
})
},
/**
* 用于多选表格,切换所有行的选中状态
*/
toggleAllSelection() {
let list = []
let startIndex = 1
let theadChildren = this.theadChildren
if (!this.theadChildren) {
theadChildren = this.trChildren[0]
} else {
startIndex = theadChildren.rowspan - 1
}
this.trChildren.forEach((item, index) => {
if (!item.disabled) {
if (index > (startIndex - 1) ) {
list.push(index-startIndex)
}
}
})
this.toggleRowSelection(list)
},
/**
* 选中\取消选中
* @param {Object} child
* @param {Object} check
* @param {Object} rowValue
*/
check(child, check, keyValue, emit) {
let theadChildren = this.theadChildren
if (!this.theadChildren) {
theadChildren = this.trChildren[0]
}
let childDomIndex = this.trChildren.findIndex((item, index) => child === item)
if(childDomIndex < 0){
childDomIndex = this.data.findIndex(v=>v[this.rowKey] === keyValue) + 1
}
const dataLen = this.trChildren.filter(v => !v.disabled && v.keyValue).length
if (childDomIndex === 0) {
check ? this.selectionAll() : this.clearSelection()
return
}
if (check) {
if (keyValue) {
this.backData.push(child)
}
this.backIndexData.push(childDomIndex - 1)
} else {
const index = this.backData.findIndex(v => v[this.rowKey] === keyValue)
const idx = this.backIndexData.findIndex(item => item === childDomIndex - 1)
if (keyValue) {
this.backData.splice(index, 1)
}
this.backIndexData.splice(idx, 1)
}
const domCheckAll = this.trChildren.find((item, index) => index > 0 && !item.checked && !item.disabled)
if (!domCheckAll) {
theadChildren.indeterminate = false
theadChildren.checked = true
} else {
theadChildren.indeterminate = true
theadChildren.checked = false
}
if (this.backIndexData.length === 0) {
theadChildren.indeterminate = false
}
if (!emit) {
this.$emit('selection-change', {
detail: {
value: this.backData,
index: this.backIndexData
}
})
}
}
}
}
</script>
<style lang="scss">
$border-color: #ebeef5;
.uni-table-scroll {
width: 100%;
/* #ifndef APP-NVUE */
overflow-x: auto;
/* #endif */
}
.uni-table {
position: relative;
width: 100%;
border-radius: 5px;
// box-shadow: 0px 0px 3px 1px rgba(0, 0, 0, 0.1);
background-color: #fff;
/* #ifndef APP-NVUE */
box-sizing: border-box;
display: table;
overflow-x: auto;
::v-deep .uni-table-tr:nth-child(n + 2) {
&:hover {
background-color: #f5f7fa;
}
}
::v-deep .uni-table-thead {
.uni-table-tr {
// background-color: #f5f7fa;
&:hover {
background-color:#fafafa;
}
}
}
/* #endif */
}
.table--border {
border: 1px $border-color solid;
border-right: none;
}
.border-none {
/* #ifndef APP-NVUE */
border-bottom: none;
/* #endif */
}
.table--stripe {
/* #ifndef APP-NVUE */
::v-deep .uni-table-tr:nth-child(2n + 3) {
background-color: #fafafa;
}
/* #endif */
}
/* 表格加载、无数据样式 */
.uni-table-loading {
position: relative;
/* #ifndef APP-NVUE */
display: table-row;
/* #endif */
height: 50px;
line-height: 50px;
overflow: hidden;
box-sizing: border-box;
}
.empty-border {
border-right: 1px $border-color solid;
}
.uni-table-text {
position: absolute;
right: 0;
left: 0;
text-align: center;
font-size: 14px;
color: #999;
}
.uni-table-mask {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(255, 255, 255, 0.8);
z-index: 99;
/* #ifndef APP-NVUE */
display: flex;
margin: auto;
transition: all 0.5s;
/* #endif */
justify-content: center;
align-items: center;
}
.uni-table--loader {
width: 30px;
height: 30px;
border: 2px solid #aaa;
// border-bottom-color: transparent;
border-radius: 50%;
/* #ifndef APP-NVUE */
animation: 2s uni-table--loader linear infinite;
/* #endif */
position: relative;
}
@keyframes uni-table--loader {
0% {
transform: rotate(360deg);
}
10% {
border-left-color: transparent;
}
20% {
border-bottom-color: transparent;
}
30% {
border-right-color: transparent;
}
40% {
border-top-color: transparent;
}
50% {
transform: rotate(0deg);
}
60% {
border-top-color: transparent;
}
70% {
border-left-color: transparent;
}
80% {
border-bottom-color: transparent;
}
90% {
border-right-color: transparent;
}
100% {
transform: rotate(-360deg);
}
}
</style>
<template>
<!-- #ifdef H5 -->
<tbody>
<slot></slot>
</tbody>
<!-- #endif -->
<!-- #ifndef H5 -->
<view><slot></slot></view>
<!-- #endif -->
</template>
<script>
export default {
name: 'uniBody',
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
data() {
return {
}
},
created() {},
methods: {}
}
</script>
<style>
</style>
<template>
<!-- #ifdef H5 -->
<td class="uni-table-td" :rowspan="rowspan" :colspan="colspan" :class="{'table--border':border}" :style="{width:width + 'px','text-align':align}">
<slot></slot>
</td>
<!-- #endif -->
<!-- #ifndef H5 -->
<!-- :class="{'table--border':border}" -->
<view class="uni-table-td" :class="{'table--border':border}" :style="{width:width + 'px','text-align':align}">
<slot></slot>
</view>
<!-- #endif -->
</template>
<script>
/**
* Td 单元格
* @description 表格中的标准单元格组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=3270
* @property {Number} align = [left|center|right] 单元格对齐方式
*/
export default {
name: 'uniTd',
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
props: {
width: {
type: [String, Number],
default: ''
},
align: {
type: String,
default: 'left'
},
rowspan: {
type: [Number,String],
default: 1
},
colspan: {
type: [Number,String],
default: 1
}
},
data() {
return {
border: false
};
},
created() {
this.root = this.getTable()
this.border = this.root.border
},
methods: {
/**
* 获取父元素实例
*/
getTable() {
let parent = this.$parent;
let parentName = parent.$options.name;
while (parentName !== 'uniTable') {
parent = parent.$parent;
if (!parent) return false;
parentName = parent.$options.name;
}
return parent;
},
}
}
</script>
<style lang="scss">
$border-color:#EBEEF5;
.uni-table-td {
display: table-cell;
padding: 8px 10px;
font-size: 14px;
border-bottom: 1px $border-color solid;
font-weight: 400;
color: #606266;
line-height: 23px;
box-sizing: border-box;
}
.table--border {
border-right: 1px $border-color solid;
}
</style>
<template>
<view class="uni-filter-dropdown">
<view class="dropdown-btn" @click="onDropdown">
<view class="icon-select" :class="{active: canReset}" v-if="isSelect || isRange"></view>
<view class="icon-search" :class="{active: canReset}" v-if="isSearch">
<view class="icon-search-0"></view>
<view class="icon-search-1"></view>
</view>
<view class="icon-calendar" :class="{active: canReset}" v-if="isDate">
<view class="icon-calendar-0"></view>
<view class="icon-calendar-1"></view>
</view>
</view>
<view class="uni-dropdown-cover" v-if="isOpened" @click="handleClose"></view>
<view class="dropdown-popup dropdown-popup-right" v-if="isOpened" @click.stop>
<!-- select-->
<view v-if="isSelect" class="list">
<label class="flex-r a-i-c list-item" v-for="(item,index) in dataList" :key="index"
@click="onItemClick($event, index)">
<check-box class="check" :checked="item.checked" />
<view class="checklist-content">
<text class="checklist-text" :style="item.styleIconText">{{item[map.text]}}</text>
</view>
</label>
</view>
<view v-if="isSelect" class="flex-r opera-area">
<view class="flex-f btn btn-default" :class="{disable: !canReset}" @click="handleSelectReset">
{{resource.reset}}</view>
<view class="flex-f btn btn-submit" @click="handleSelectSubmit">{{resource.submit}}</view>
</view>
<!-- search -->
<view v-if="isSearch" class="search-area">
<input class="search-input" v-model="filterValue" />
</view>
<view v-if="isSearch" class="flex-r opera-area">
<view class="flex-f btn btn-submit" @click="handleSearchSubmit">{{resource.search}}</view>
<view class="flex-f btn btn-default" :class="{disable: !canReset}" @click="handleSearchReset">
{{resource.reset}}</view>
</view>
<!-- range -->
<view v-if="isRange">
<view class="input-label">{{resource.gt}}</view>
<input class="input" v-model="gtValue" />
<view class="input-label">{{resource.lt}}</view>
<input class="input" v-model="ltValue" />
</view>
<view v-if="isRange" class="flex-r opera-area">
<view class="flex-f btn btn-default" :class="{disable: !canReset}" @click="handleRangeReset">
{{resource.reset}}</view>
<view class="flex-f btn btn-submit" @click="handleRangeSubmit">{{resource.submit}}</view>
</view>
<!-- date -->
<view v-if="isDate">
<uni-datetime-picker ref="datetimepicker" :value="dateRange" type="datetimerange" return-type="timestamp" @change="datetimechange" @maskClick="timepickerclose">
<view></view>
</uni-datetime-picker>
</view>
</view>
</view>
</template>
<script>
import checkBox from '../uni-tr/table-checkbox.vue'
const resource = {
"reset": "重置",
"search": "搜索",
"submit": "确定",
"filter": "筛选",
"gt": "大于等于",
"lt": "小于等于",
"date": "日期范围"
}
const DropdownType = {
Select: "select",
Search: "search",
Range: "range",
Date: "date",
Timestamp: "timestamp"
}
export default {
name: 'FilterDropdown',
emits:['change'],
components: {
checkBox
},
options: {
virtualHost: true
},
props: {
filterType: {
type: String,
default: DropdownType.Select
},
filterData: {
type: Array,
default () {
return []
}
},
mode: {
type: String,
default: 'default'
},
map: {
type: Object,
default () {
return {
text: 'text',
value: 'value'
}
}
},
filterDefaultValue: {
type: [Array,String],
default () {
return ""
}
}
},
computed: {
canReset() {
if (this.isSearch) {
return this.filterValue.length > 0
}
if (this.isSelect) {
return this.checkedValues.length > 0
}
if (this.isRange) {
return (this.gtValue.length > 0 && this.ltValue.length > 0)
}
if (this.isDate) {
return this.dateSelect.length > 0
}
return false
},
isSelect() {
return this.filterType === DropdownType.Select
},
isSearch() {
return this.filterType === DropdownType.Search
},
isRange() {
return this.filterType === DropdownType.Range
},
isDate() {
return (this.filterType === DropdownType.Date || this.filterType === DropdownType.Timestamp)
}
},
watch: {
filterData(newVal) {
this._copyFilters()
},
indeterminate(newVal) {
this.isIndeterminate = newVal
}
},
data() {
return {
resource,
enabled: true,
isOpened: false,
dataList: [],
filterValue: this.filterDefaultValue,
checkedValues: [],
gtValue: '',
ltValue: '',
dateRange: [],
dateSelect: []
};
},
created() {
this._copyFilters()
},
methods: {
_copyFilters() {
let dl = JSON.parse(JSON.stringify(this.filterData))
for (let i = 0; i < dl.length; i++) {
if (dl[i].checked === undefined) {
dl[i].checked = false
}
}
this.dataList = dl
},
openPopup() {
this.isOpened = true
if (this.isDate) {
this.$nextTick(() => {
if (!this.dateRange.length) {
this.resetDate()
}
this.$refs.datetimepicker.show()
})
}
},
closePopup() {
this.isOpened = false
},
handleClose(e) {
this.closePopup()
},
resetDate() {
let date = new Date()
let dateText = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`
this.dateRange = [dateText + ' 0:00:00', dateText + ' 23:59:59']
},
onDropdown(e) {
this.openPopup()
},
onItemClick(e, index) {
let items = this.dataList
let listItem = items[index]
if (listItem.checked === undefined) {
items[index].checked = true
} else {
items[index].checked = !listItem.checked
}
let checkvalues = []
for (let i = 0; i < items.length; i++) {
const item = items[i]
if (item.checked) {
checkvalues.push(item.value)
}
}
this.checkedValues = checkvalues
},
datetimechange(e) {
this.closePopup()
this.dateRange = e
this.dateSelect = e
this.$emit('change', {
filterType: this.filterType,
filter: e
})
},
timepickerclose(e) {
this.closePopup()
},
handleSelectSubmit() {
this.closePopup()
this.$emit('change', {
filterType: this.filterType,
filter: this.checkedValues
})
},
handleSelectReset() {
if (!this.canReset) {
return;
}
var items = this.dataList
for (let i = 0; i < items.length; i++) {
let item = items[i]
this.$set(item, 'checked', false)
}
this.checkedValues = []
this.handleSelectSubmit()
},
handleSearchSubmit() {
this.closePopup()
this.$emit('change', {
filterType: this.filterType,
filter: this.filterValue
})
},
handleSearchReset() {
if (!this.canReset) {
return;
}
this.filterValue = ''
this.handleSearchSubmit()
},
handleRangeSubmit(isReset) {
this.closePopup()
this.$emit('change', {
filterType: this.filterType,
filter: isReset === true ? [] : [parseInt(this.gtValue), parseInt(this.ltValue)]
})
},
handleRangeReset() {
if (!this.canReset) {
return;
}
this.gtValue = ''
this.ltValue = ''
this.handleRangeSubmit(true)
}
}
}
</script>
<style lang="scss">
$uni-primary: #1890ff !default;
.flex-r {
display: flex;
flex-direction: row;
}
.flex-f {
flex: 1;
}
.a-i-c {
align-items: center;
}
.j-c-c {
justify-content: center;
}
.icon-select {
width: 14px;
height: 16px;
border: solid 6px transparent;
border-top: solid 6px #ddd;
border-bottom: none;
background-color: #ddd;
background-clip: content-box;
box-sizing: border-box;
}
.icon-select.active {
background-color: $uni-primary;
border-top-color: $uni-primary;
}
.icon-search {
width: 12px;
height: 16px;
position: relative;
}
.icon-search-0 {
border: 2px solid #ddd;
border-radius: 8px;
width: 7px;
height: 7px;
}
.icon-search-1 {
position: absolute;
top: 8px;
right: 0;
width: 1px;
height: 7px;
background-color: #ddd;
transform: rotate(-45deg);
}
.icon-search.active .icon-search-0 {
border-color: $uni-primary;
}
.icon-search.active .icon-search-1 {
background-color: $uni-primary;
}
.icon-calendar {
color: #ddd;
width: 14px;
height: 16px;
}
.icon-calendar-0 {
height: 4px;
margin-top: 3px;
margin-bottom: 1px;
background-color: #ddd;
border-radius: 2px 2px 1px 1px;
position: relative;
}
.icon-calendar-0:before, .icon-calendar-0:after {
content: '';
position: absolute;
top: -3px;
width: 4px;
height: 3px;
border-radius: 1px;
background-color: #ddd;
}
.icon-calendar-0:before {
left: 2px;
}
.icon-calendar-0:after {
right: 2px;
}
.icon-calendar-1 {
height: 9px;
background-color: #ddd;
border-radius: 1px 1px 2px 2px;
}
.icon-calendar.active {
color: $uni-primary;
}
.icon-calendar.active .icon-calendar-0,
.icon-calendar.active .icon-calendar-1,
.icon-calendar.active .icon-calendar-0:before,
.icon-calendar.active .icon-calendar-0:after {
background-color: $uni-primary;
}
.uni-filter-dropdown {
position: relative;
font-weight: normal;
}
.dropdown-popup {
position: absolute;
top: 100%;
background-color: #fff;
box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d;
min-width: 150px;
z-index: 1000;
}
.dropdown-popup-left {
left: 0;
}
.dropdown-popup-right {
right: 0;
}
.uni-dropdown-cover {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: transparent;
z-index: 100;
}
.list {
margin-top: 5px;
margin-bottom: 5px;
}
.list-item {
padding: 5px 10px;
text-align: left;
}
.list-item:hover {
background-color: #f0f0f0;
}
.check {
margin-right: 5px;
}
.search-area {
padding: 10px;
}
.search-input {
font-size: 12px;
border: 1px solid #f0f0f0;
border-radius: 3px;
padding: 2px 5px;
min-width: 150px;
text-align: left;
}
.input-label {
margin: 10px 10px 5px 10px;
text-align: left;
}
.input {
font-size: 12px;
border: 1px solid #f0f0f0;
border-radius: 3px;
margin: 10px;
padding: 2px 5px;
min-width: 150px;
text-align: left;
}
.opera-area {
cursor: default;
border-top: 1px solid #ddd;
padding: 5px;
}
.opera-area .btn {
font-size: 12px;
border-radius: 3px;
margin: 5px;
padding: 4px 4px;
}
.btn-default {
border: 1px solid #ddd;
}
.btn-default.disable {
border-color: transparent;
}
.btn-submit {
background-color: $uni-primary;
color: #ffffff;
}
</style>
<template>
<!-- #ifdef H5 -->
<th :rowspan="rowspan" :colspan="colspan" class="uni-table-th" :class="{ 'table--border': border }" :style="{ width: customWidth + 'px', 'text-align': align }">
<view class="uni-table-th-row">
<view class="uni-table-th-content" :style="{ 'justify-content': contentAlign }" @click="sort">
<slot></slot>
<view v-if="sortable" class="arrow-box">
<text class="arrow up" :class="{ active: ascending }" @click.stop="ascendingFn"></text>
<text class="arrow down" :class="{ active: descending }" @click.stop="descendingFn"></text>
</view>
</view>
<dropdown v-if="filterType || filterData.length" :filterDefaultValue="filterDefaultValue" :filterData="filterData" :filterType="filterType" @change="ondropdown"></dropdown>
</view>
</th>
<!-- #endif -->
<!-- #ifndef H5 -->
<view class="uni-table-th" :class="{ 'table--border': border }" :style="{ width: customWidth + 'px', 'text-align': align }"><slot></slot></view>
<!-- #endif -->
</template>
<script>
// #ifdef H5
import dropdown from './filter-dropdown.vue'
// #endif
/**
* Th 表头
* @description 表格内的表头单元格组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=3270
* @property {Number | String} width 单元格宽度(支持纯数字、携带单位px或rpx)
* @property {Boolean} sortable 是否启用排序
* @property {Number} align = [left|center|right] 单元格对齐方式
* @value left 单元格文字左侧对齐
* @value center 单元格文字居中
* @value right 单元格文字右侧对齐
* @property {Array} filterData 筛选数据
* @property {String} filterType [search|select] 筛选类型
* @value search 关键字搜素
* @value select 条件选择
* @event {Function} sort-change 排序触发事件
*/
export default {
name: 'uniTh',
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
components: {
// #ifdef H5
dropdown
// #endif
},
emits:['sort-change','filter-change'],
props: {
width: {
type: [String, Number],
default: ''
},
align: {
type: String,
default: 'left'
},
rowspan: {
type: [Number, String],
default: 1
},
colspan: {
type: [Number, String],
default: 1
},
sortable: {
type: Boolean,
default: false
},
filterType: {
type: String,
default: ""
},
filterData: {
type: Array,
default () {
return []
}
},
filterDefaultValue: {
type: [Array,String],
default () {
return ""
}
}
},
data() {
return {
border: false,
ascending: false,
descending: false
}
},
computed: {
// 根据props中的width属性 自动匹配当前th的宽度(px)
customWidth(){
if(typeof this.width === 'number'){
return this.width
} else if(typeof this.width === 'string') {
let regexHaveUnitPx = new RegExp(/^[1-9][0-9]*px$/g)
let regexHaveUnitRpx = new RegExp(/^[1-9][0-9]*rpx$/g)
let regexHaveNotUnit = new RegExp(/^[1-9][0-9]*$/g)
if (this.width.match(regexHaveUnitPx) !== null) { // 携带了 px
return this.width.replace('px', '')
} else if (this.width.match(regexHaveUnitRpx) !== null) { // 携带了 rpx
let numberRpx = Number(this.width.replace('rpx', ''))
// #ifdef MP-WEIXIN
let widthCoe = uni.getWindowInfo().screenWidth / 750
// #endif
// #ifndef MP-WEIXIN
let widthCoe = uni.getSystemInfoSync().screenWidth / 750
// #endif
return Math.round(numberRpx * widthCoe)
} else if (this.width.match(regexHaveNotUnit) !== null) { // 未携带 rpx或px 的纯数字 String
return this.width
} else { // 不符合格式
return ''
}
} else {
return ''
}
},
contentAlign() {
let align = 'left'
switch (this.align) {
case 'left':
align = 'flex-start'
break
case 'center':
align = 'center'
break
case 'right':
align = 'flex-end'
break
}
return align
}
},
created() {
this.root = this.getTable('uniTable')
this.rootTr = this.getTable('uniTr')
this.rootTr.minWidthUpdate(this.customWidth ? this.customWidth : 140)
this.border = this.root.border
this.root.thChildren.push(this)
},
methods: {
sort() {
if (!this.sortable) return
this.clearOther()
if (!this.ascending && !this.descending) {
this.ascending = true
this.$emit('sort-change', { order: 'ascending' })
return
}
if (this.ascending && !this.descending) {
this.ascending = false
this.descending = true
this.$emit('sort-change', { order: 'descending' })
return
}
if (!this.ascending && this.descending) {
this.ascending = false
this.descending = false
this.$emit('sort-change', { order: null })
}
},
ascendingFn() {
this.clearOther()
this.ascending = !this.ascending
this.descending = false
this.$emit('sort-change', { order: this.ascending ? 'ascending' : null })
},
descendingFn() {
this.clearOther()
this.descending = !this.descending
this.ascending = false
this.$emit('sort-change', { order: this.descending ? 'descending' : null })
},
clearOther() {
this.root.thChildren.map(item => {
if (item !== this) {
item.ascending = false
item.descending = false
}
return item
})
},
ondropdown(e) {
this.$emit("filter-change", e)
},
/**
* 获取父元素实例
*/
getTable(name) {
let parent = this.$parent
let parentName = parent.$options.name
while (parentName !== name) {
parent = parent.$parent
if (!parent) return false
parentName = parent.$options.name
}
return parent
}
}
}
</script>
<style lang="scss">
$border-color: #ebeef5;
$uni-primary: #007aff !default;
.uni-table-th {
padding: 12px 10px;
/* #ifndef APP-NVUE */
display: table-cell;
box-sizing: border-box;
/* #endif */
font-size: 14px;
font-weight: bold;
color: #909399;
border-bottom: 1px $border-color solid;
}
.uni-table-th-row {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
}
.table--border {
border-right: 1px $border-color solid;
}
.uni-table-th-content {
display: flex;
align-items: center;
flex: 1;
}
.arrow-box {
}
.arrow {
display: block;
position: relative;
width: 10px;
height: 8px;
// border: 1px red solid;
left: 5px;
overflow: hidden;
cursor: pointer;
}
.down {
top: 3px;
::after {
content: '';
width: 8px;
height: 8px;
position: absolute;
left: 2px;
top: -5px;
transform: rotate(45deg);
background-color: #ccc;
}
&.active {
::after {
background-color: $uni-primary;
}
}
}
.up {
::after {
content: '';
width: 8px;
height: 8px;
position: absolute;
left: 2px;
top: 5px;
transform: rotate(45deg);
background-color: #ccc;
}
&.active {
::after {
background-color: $uni-primary;
}
}
}
</style>
<template>
<!-- #ifdef H5 -->
<thead class="uni-table-thead">
<tr class="uni-table-tr">
<th :rowspan="rowspan" colspan="1" class="checkbox" :class="{ 'tr-table--border': border }">
<table-checkbox :indeterminate="indeterminate" :checked="checked"
@checkboxSelected="checkboxSelected"></table-checkbox>
</th>
</tr>
<slot></slot>
</thead>
<!-- #endif -->
<!-- #ifndef H5 -->
<view class="uni-table-thead">
<slot></slot>
</view>
<!-- #endif -->
</template>
<script>
import tableCheckbox from '../uni-tr/table-checkbox.vue'
export default {
name: 'uniThead',
components: {
tableCheckbox
},
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
data() {
return {
border: false,
selection: false,
rowspan: 1,
indeterminate: false,
checked: false
}
},
created() {
this.root = this.getTable()
// #ifdef H5
this.root.theadChildren = this
// #endif
this.border = this.root.border
this.selection = this.root.type
},
methods: {
init(self) {
this.rowspan++
},
checkboxSelected(e) {
this.indeterminate = false
const backIndexData = this.root.backIndexData
const data = this.root.trChildren.filter(v => !v.disabled && v.keyValue)
if (backIndexData.length === data.length) {
this.checked = false
this.root.clearSelection()
} else {
this.checked = true
this.root.selectionAll()
}
},
/**
* 获取父元素实例
*/
getTable(name = 'uniTable') {
let parent = this.$parent
let parentName = parent.$options.name
while (parentName !== name) {
parent = parent.$parent
if (!parent) return false
parentName = parent.$options.name
}
return parent
}
}
}
</script>
<style lang="scss">
$border-color: #ebeef5;
.uni-table-thead {
display: table-header-group;
}
.uni-table-tr {
/* #ifndef APP-NVUE */
display: table-row;
transition: all 0.3s;
box-sizing: border-box;
/* #endif */
border: 1px red solid;
background-color: #fafafa;
}
.checkbox {
padding: 0 8px;
width: 26px;
padding-left: 12px;
/* #ifndef APP-NVUE */
display: table-cell;
vertical-align: middle;
/* #endif */
color: #333;
font-weight: 500;
border-bottom: 1px $border-color solid;
font-size: 14px;
// text-align: center;
}
.tr-table--border {
border-right: 1px $border-color solid;
}
/* #ifndef APP-NVUE */
.uni-table-tr {
::v-deep .uni-table-th {
&.table--border:last-child {
// border-right: none;
}
}
::v-deep .uni-table-td {
&.table--border:last-child {
// border-right: none;
}
}
}
/* #endif */
</style>
<template>
<view class="uni-table-checkbox" @click="selected">
<view v-if="!indeterminate" class="checkbox__inner" :class="{'is-checked':isChecked,'is-disable':isDisabled}">
<view class="checkbox__inner-icon"></view>
</view>
<view v-else class="checkbox__inner checkbox--indeterminate">
<view class="checkbox__inner-icon"></view>
</view>
</view>
</template>
<script>
export default {
name: 'TableCheckbox',
emits:['checkboxSelected'],
props: {
indeterminate: {
type: Boolean,
default: false
},
checked: {
type: [Boolean,String],
default: false
},
disabled: {
type: Boolean,
default: false
},
index: {
type: Number,
default: -1
},
cellData: {
type: Object,
default () {
return {}
}
}
},
watch:{
checked(newVal){
if(typeof this.checked === 'boolean'){
this.isChecked = newVal
}else{
this.isChecked = true
}
},
indeterminate(newVal){
this.isIndeterminate = newVal
}
},
data() {
return {
isChecked: false,
isDisabled: false,
isIndeterminate:false
}
},
created() {
if(typeof this.checked === 'boolean'){
this.isChecked = this.checked
}
this.isDisabled = this.disabled
},
methods: {
selected() {
if (this.isDisabled) return
this.isIndeterminate = false
this.isChecked = !this.isChecked
this.$emit('checkboxSelected', {
checked: this.isChecked,
data: this.cellData
})
}
}
}
</script>
<style lang="scss">
$uni-primary: #007aff !default;
$border-color: #DCDFE6;
$disable:0.4;
.uni-table-checkbox {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
position: relative;
margin: 5px 0;
cursor: pointer;
// 多选样式
.checkbox__inner {
/* #ifndef APP-NVUE */
flex-shrink: 0;
box-sizing: border-box;
/* #endif */
position: relative;
width: 16px;
height: 16px;
border: 1px solid $border-color;
border-radius: 2px;
background-color: #fff;
z-index: 1;
.checkbox__inner-icon {
position: absolute;
/* #ifdef APP-NVUE */
top: 2px;
/* #endif */
/* #ifndef APP-NVUE */
top: 2px;
/* #endif */
left: 5px;
height: 7px;
width: 3px;
border: 1px solid #fff;
border-left: 0;
border-top: 0;
opacity: 0;
transform-origin: center;
transform: rotate(45deg);
box-sizing: content-box;
}
&.checkbox--indeterminate {
border-color: $uni-primary;
background-color: $uni-primary;
.checkbox__inner-icon {
position: absolute;
opacity: 1;
transform: rotate(0deg);
height: 2px;
top: 0;
bottom: 0;
margin: auto;
left: 0px;
right: 0px;
bottom: 0;
width: auto;
border: none;
border-radius: 2px;
transform: scale(0.5);
background-color: #fff;
}
}
&:hover{
border-color: $uni-primary;
}
// 禁用
&.is-disable {
/* #ifdef H5 */
cursor: not-allowed;
/* #endif */
background-color: #F2F6FC;
border-color: $border-color;
}
// 选中
&.is-checked {
border-color: $uni-primary;
background-color: $uni-primary;
.checkbox__inner-icon {
opacity: 1;
transform: rotate(45deg);
}
// 选中禁用
&.is-disable {
opacity: $disable;
}
}
}
}
</style>
<template>
<!-- #ifdef H5 -->
<tr class="uni-table-tr">
<th v-if="selection === 'selection' && ishead" class="checkbox" :class="{ 'tr-table--border': border }">
<table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled"
@checkboxSelected="checkboxSelected"></table-checkbox>
</th>
<slot></slot>
<!-- <uni-th class="th-fixed">123</uni-th> -->
</tr>
<!-- #endif -->
<!-- #ifndef H5 -->
<view class="uni-table-tr">
<view v-if="selection === 'selection' " class="checkbox" :class="{ 'tr-table--border': border }">
<table-checkbox :checked="checked" :indeterminate="indeterminate" :disabled="disabled"
@checkboxSelected="checkboxSelected"></table-checkbox>
</view>
<slot></slot>
</view>
<!-- #endif -->
</template>
<script>
import tableCheckbox from './table-checkbox.vue'
/**
* Tr 表格行组件
* @description 表格行组件 仅包含 th,td 组件
* @tutorial https://ext.dcloud.net.cn/plugin?id=
*/
export default {
name: 'uniTr',
components: {
tableCheckbox
},
props: {
disabled: {
type: Boolean,
default: false
},
keyValue: {
type: [String, Number],
default: ''
}
},
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
data() {
return {
value: false,
border: false,
selection: false,
widthThArr: [],
ishead: true,
checked: false,
indeterminate: false
}
},
created() {
this.root = this.getTable()
this.head = this.getTable('uniThead')
if (this.head) {
this.ishead = false
this.head.init(this)
}
this.border = this.root.border
this.selection = this.root.type
this.root.trChildren.push(this)
const rowData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue)
if (rowData) {
this.rowData = rowData
}
this.root.isNodata()
},
mounted() {
if (this.widthThArr.length > 0) {
const selectionWidth = this.selection === 'selection' ? 50 : 0
this.root.minWidth = Number(this.widthThArr.reduce((a, b) => Number(a) + Number(b))) + selectionWidth;
}
},
// #ifndef VUE3
destroyed() {
const index = this.root.trChildren.findIndex(i => i === this)
this.root.trChildren.splice(index, 1)
this.root.isNodata()
},
// #endif
// #ifdef VUE3
unmounted() {
const index = this.root.trChildren.findIndex(i => i === this)
this.root.trChildren.splice(index, 1)
this.root.isNodata()
},
// #endif
methods: {
minWidthUpdate(width) {
this.widthThArr.push(width)
if (this.widthThArr.length > 0) {
const selectionWidth = this.selection === 'selection' ? 50 : 0;
this.root.minWidth = Number(this.widthThArr.reduce((a, b) => Number(a) + Number(b))) + selectionWidth;
}
},
// 选中
checkboxSelected(e) {
let rootData = this.root.data.find(v => v[this.root.rowKey] === this.keyValue)
this.checked = e.checked
this.root.check(rootData || this, e.checked, rootData ? this.keyValue : null)
},
change(e) {
this.root.trChildren.forEach(item => {
if (item === this) {
this.root.check(this, e.detail.value.length > 0 ? true : false)
}
})
},
/**
* 获取父元素实例
*/
getTable(name = 'uniTable') {
let parent = this.$parent
let parentName = parent.$options.name
while (parentName !== name) {
parent = parent.$parent
if (!parent) return false
parentName = parent.$options.name
}
return parent
}
}
}
</script>
<style lang="scss">
$border-color: #ebeef5;
.uni-table-tr {
/* #ifndef APP-NVUE */
display: table-row;
transition: all 0.3s;
box-sizing: border-box;
/* #endif */
}
.checkbox {
padding: 0 8px;
width: 26px;
padding-left: 12px;
/* #ifndef APP-NVUE */
display: table-cell;
vertical-align: middle;
/* #endif */
color: #333;
font-weight: 500;
border-bottom: 1px $border-color solid;
font-size: 14px;
// text-align: center;
}
.tr-table--border {
border-right: 1px $border-color solid;
}
/* #ifndef APP-NVUE */
.uni-table-tr {
::v-deep .uni-table-th {
&.table--border:last-child {
// border-right: none;
}
}
::v-deep .uni-table-td {
&.table--border:last-child {
// border-right: none;
}
}
}
/* #endif */
</style>
{
"filter-dropdown.reset": "Reset",
"filter-dropdown.search": "Search",
"filter-dropdown.submit": "Submit",
"filter-dropdown.filter": "Filter",
"filter-dropdown.gt": "Greater or equal to",
"filter-dropdown.lt": "Less than or equal to",
"filter-dropdown.date": "Date"
}
{
"filter-dropdown.reset": "Reiniciar",
"filter-dropdown.search": "Búsqueda",
"filter-dropdown.submit": "Entregar",
"filter-dropdown.filter": "Filtrar",
"filter-dropdown.gt": "Mayor o igual a",
"filter-dropdown.lt": "Menos que o igual a",
"filter-dropdown.date": "Fecha"
}
{
"filter-dropdown.reset": "Réinitialiser",
"filter-dropdown.search": "Chercher",
"filter-dropdown.submit": "Soumettre",
"filter-dropdown.filter": "Filtre",
"filter-dropdown.gt": "Supérieur ou égal à",
"filter-dropdown.lt": "Inférieur ou égal à",
"filter-dropdown.date": "Date"
}
import en from './en.json'
import es from './es.json'
import fr from './fr.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
export default {
en,
es,
fr,
'zh-Hans': zhHans,
'zh-Hant': zhHant
}
{
"filter-dropdown.reset": "重置",
"filter-dropdown.search": "搜索",
"filter-dropdown.submit": "确定",
"filter-dropdown.filter": "筛选",
"filter-dropdown.gt": "大于等于",
"filter-dropdown.lt": "小于等于",
"filter-dropdown.date": "日期范围"
}
{
"filter-dropdown.reset": "重置",
"filter-dropdown.search": "搜索",
"filter-dropdown.submit": "確定",
"filter-dropdown.filter": "篩選",
"filter-dropdown.gt": "大於等於",
"filter-dropdown.lt": "小於等於",
"filter-dropdown.date": "日期範圍"
}
{
"id": "uni-table",
"displayName": "uni-table 表格",
"version": "1.2.9",
"description": "表格组件,多用于展示多条结构类似的数据,如",
"keywords": [
"uni-ui",
"uniui",
"table",
"表格"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": ["uni-scss","uni-datetime-picker"],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "n",
"app-harmony": "u",
"app-uvue": "u"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "n",
"QQ": "y"
},
"快应用": {
"华为": "n",
"联盟": "n"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
## Table 表单
> 组件名:``uni-table``,代码块: `uTable`。
用于展示多条结构类似的数据
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-table)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
...@@ -164,6 +164,7 @@ export default{ ...@@ -164,6 +164,7 @@ export default{
// 判断是否已满18岁 // 判断是否已满18岁
return eighteenYearsLater <= currentDate; return eighteenYearsLater <= currentDate;
}, },
// 防抖函数
debounce(fn, delay = 200) { debounce(fn, delay = 200) {
let timer = null; let timer = null;
return function (...args) { return function (...args) {
...@@ -172,5 +173,104 @@ export default{ ...@@ -172,5 +173,104 @@ export default{
fn.apply(this, args); // 延迟执行 fn.apply(this, args); // 延迟执行
}, delay); }, delay);
}; };
},
/**
* 安全可靠的运行环境判断
* @returns {'app' | 'wechat-h5' | 'wechat-mp' | 'wechat-work' | 'browser' | 'unknown'}
*/
getRuntimeEnv() {
try {
// UniApp 环境判断
if (typeof uni !== 'undefined' && uni.getEnv) {
const uniEnv = uni.getEnv();
if (uniEnv === 'app-plus') return 'app';
if (uniEnv === 'mp-weixin') return 'wechat-mp';
}
// H5 环境判断
if (
typeof window !== 'undefined' &&
window.navigator &&
window.navigator.userAgent
) {
const ua = window.navigator.userAgent.toLowerCase();
if (/micromessenger/i.test(ua)) {
return /wxwork/i.test(ua) ? 'wechat-work' : 'wechat-h5';
}
return 'browser';
}
return 'unknown';
} catch (e) {
console.warn('环境判断失败:', e);
return 'unknown';
}
},
/**
* 判断当前运行环境
* @returns {Object} 包含环境信息的对象
*/
getRuntimeEnv2() {
// 获取uni-app系统信息
const systemInfo = uni.getSystemInfoSync()
// 判断平台类型
const isH5 = systemInfo.platform === 'h5'
const isApp = systemInfo.platform === 'android' || systemInfo.platform === 'ios'
const isMP = systemInfo.platform === 'mp-weixin' // 微信小程序
// 判断设备类型
let isMobile = false
let isTablet = false
let isDesktop = false
// 在H5环境下需要额外判断
if (isH5) {
// 通过userAgent判断
const userAgent = navigator.userAgent.toLowerCase()
const isMobileUserAgent = /mobile|android|iphone|ipad|ipod/.test(userAgent)
// 通过屏幕尺寸判断
const isSmallScreen = window.innerWidth < 768
// 在开发环境下,如果浏览器开启了手机模拟器模式,也认为是手机
isMobile = isMobileUserAgent || isSmallScreen
// 平板判断
isTablet = !isMobile && (systemInfo.windowWidth >= 768 && systemInfo.windowWidth < 992)
// 桌面判断
isDesktop = !isMobile && !isTablet
return
} else {
// 非H5环境使用uni-app提供的信息
isMobile = systemInfo.deviceType === 'phone'
isTablet = systemInfo.deviceType === 'pad'
isDesktop = false // 非H5环境下不会有桌面端
}
return {
// 平台类型
platform: {
isH5,
isApp,
isMP,
isWeixin: isMP, // 微信小程序别名
isAndroid: systemInfo.platform === 'android',
isIOS: systemInfo.platform === 'ios',
},
// 设备类型
device: {
isMobile,
isTablet,
isDesktop,
isIPhone: systemInfo.model && systemInfo.model.includes('iPhone'),
isIPad: systemInfo.model && systemInfo.model.includes('iPad'),
},
// 原始系统信息
systemInfo,
}
} }
} }
\ No newline at end of file
export default [
{
"category": "关于团队",
"id": "1",
"icon":"icon-tuandui",
"questions": [
{
"Q": "如何成为合伙人",
"A": "申请加盟→填写个人信息→等待资质审核→审核通过后,完成加盟",
"isActive": 1
},
{
"Q": "如何邀请朋友加入",
"A": "进入\"邀请加盟\"页面→填写被邀请人信息→发起邀请→通过右上角菜单分享给朋友→受邀方填写加盟资料完成申请",
"isActive": 1
},
{
"Q": "如何查看被邀请人是否加盟成功",
"A": "进入首页→点击\"邀请加盟\"→填写\"邀请信息\"→若邀请状态显示\"成功\",即表示加盟成功",
"isActive": 1
},
{
"Q": "合伙人晋升条件",
"A": [
"见习合伙人:完成加盟申请",
"新锐合伙人:个人标准销售额≥799元",
"资深合伙人:个人标准销售额≥799元 + 团队有效人数≥5人 + 团队标准销售额≥5万元",
"精英合伙人:个人标准销售额≥799元 + 团队有效人数≥10人 + 团队标准销售额≥15万元",
"营业部部长:个人标准销售额≥799元 + 团队有效人数≥20人 + 团队标准销售额≥50万元"
],
"isActive": 1,
"isMore": true
}
]
},
{
"category": "关于订单",
"id": "2",
"icon":"icon-dingdan",
"questions": [
{
"Q": "如何查看商品订单?",
"A": "进入首页或\"我的\"页面→点击\"成交订单\"→点击我的订单→查看订单列表",
"isActive": 1
},
{
"Q": "如何分享产品",
"A": "进入产品中心→选择要分享的产品→点击\"去分享\"→发送给朋友",
"isActive": 1
},
{
"Q": "如何查看分享后成交的订单?",
"A": "进入首页或\"我的\"页面→点击\"成交订单\"→选择\"分享订单\"→查看订单列表",
"isActive": 1
},
{
"Q": "如何查看订单明细",
"A": "进入首页或\"我的\"页面→点击\"成交订单\"→选择\"分享订单\"\"我的订单\"→点击具体订单,查看明细",
"isActive": 1
}
]
},
{
"category": "关于佣金",
"id": "3",
"icon":"icon-yongjin",
"questions": [
{
"Q": "如何获得佣金",
"A": [
"见习合伙人:自购或分享产品,他人购买后可获得销售收入",
"更高级别合伙人:可额外获得团队订单的一级/二级管理津贴",
"营业部部长:可享受部长津贴",
"育成营业部部长:可享受育成津贴",
"(以上收益可叠加)"
],
"isActive": 1,
"isMore": true
},
{
"Q": "如何查看佣金",
"A": "进入首页或\"我的\"页面→点击\"佣金\"→查看佣金明细",
"isActive": 1
},
{
"Q": "如何提现佣金",
"A": "进入首页或\"我的\"页面→点击\"佣金\"→点击\"提现\"按钮→发起提现申请",
"isActive": 1
},
{
"Q": "为什么佣金状态显示\"待结算\"?",
"A": "订单成交后需等待7天结算期,期间佣金状态为\"待结算\"。",
"isActive": 1
}
]
}
]
\ No newline at end of file
...@@ -8,6 +8,7 @@ const whiteList = [ ...@@ -8,6 +8,7 @@ const whiteList = [
'/pages/orderDetail/orderDetail', '/pages/orderDetail/orderDetail',
'/pages/courseDetail/courseDetail', '/pages/courseDetail/courseDetail',
'/pages/courselist/courselist', '/pages/courselist/courselist',
'/pages/personalCenter/helpCenter?type=1',
'/pages/index/index' '/pages/index/index'
] ]
export default function initApp(){ export default function initApp(){
......
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