Commit 097b1b1f by sunchao

Merge branch 'dev' of http://139.224.139.2:9091/chaosun/CFFP into dev

parents bbf0933d b30043d5
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
{{loginTypeName}} {{loginTypeName}}
</view> </view>
<form> <form>
<view class="inputItem" v-if="loginType==='register'"> <!-- <view class="inputItem" v-if="loginType==='register'">
<input class="uni-input" name="invitationCode" placeholder="输入邀请码(非必填)" v-model="invitation_code"/> <input class="uni-input" name="invitationCode" placeholder="输入邀请码(非必填)" v-model="invitation_code"/>
</view> </view> -->
<view class="inputItem" v-if="loginType!=='agentlogin'"> <view class="inputItem" v-if="loginType!=='agentlogin'">
<input class="uni-input" name="mobileNo" placeholder="输入手机号" v-model="form.mobile" maxlength="11"/> <input class="uni-input" name="mobileNo" placeholder="输入手机号" v-model="form.mobile" maxlength="11"/>
</view> </view>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
</template> </template>
<script> <script>
import {fmdata} from '@/util/currentDate.js'
export default { export default {
props:{ props:{
fields:{ fields:{
...@@ -22,16 +23,18 @@ ...@@ -22,16 +23,18 @@
name: "time-picker", name: "time-picker",
data() { data() {
return { return {
queryDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`, queryDate: fmdata(new Date(),'M'),
// queryDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
maxDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`, maxDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
}; };
}, },
mounted() { mounted() {
if(this.fields == "month"){ if(this.fields == "month"){
this.queryDate = `${new Date().getFullYear()}-${new Date().getMonth() + 1}` // this.queryDate = `${new Date().getFullYear()}-${new Date().getMonth() + 1}`
this.queryDate = fmdata(new Date(),'M');
}else if (this.fields == "year") { }else if (this.fields == "year") {
this.queryDate = `${new Date().getFullYear()}` // this.queryDate = `${new Date().getFullYear()}`
console.log(this.queryDate, 'cak') this.queryDate = fmdata(new Date(),'Y');
}else { }else {
return false return false
} }
......
...@@ -136,6 +136,10 @@ ...@@ -136,6 +136,10 @@
} }
} }
} }
},
"nvueLaunchMode" : "",
"uniStatistics" : {
"enable" : false
} }
}, },
/* 快应用特有相关 */ /* 快应用特有相关 */
...@@ -187,6 +191,14 @@ ...@@ -187,6 +191,14 @@
} }
} }
} }
},
"uniStatistics" : {
"enable" : false
},
"optimization" : {
"treeShaking" : {
"enable" : true
}
} }
}, },
"_spaceID" : "mp-68e17e23-e517-4839-8210-27480303cc51", "_spaceID" : "mp-68e17e23-e517-4839-8210-27480303cc51",
......
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
padding: 20rpx; padding: 20rpx;
.grey{ .grey{
min-width: 100rpx; min-width: 100rpx;
font-size: 24rpx; font-size: 22rpx;
color: #CECECE; color: #CECECE;
} }
} }
......
...@@ -66,11 +66,12 @@ ...@@ -66,11 +66,12 @@
</template> </template>
<script> <script>
import {fmdata} from '@/util/currentDate.js'
import api from '../../api/api'; import api from '../../api/api';
export default{ export default{
data(){ data(){
return { return {
fortuneDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`, fortuneDate: fmdata(new Date(),'D'),
maxDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`, maxDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
navList:[{name:'日积分',timeFlag:'D'},{name:'月积分',timeFlag:'M'},{name:'年积分',timeFlag:'Y'}], navList:[{name:'日积分',timeFlag:'D'},{name:'月积分',timeFlag:'M'},{name:'年积分',timeFlag:'Y'}],
timeFlag:'D', timeFlag:'D',
...@@ -92,14 +93,15 @@ ...@@ -92,14 +93,15 @@
selectNav(navItem){ selectNav(navItem){
this.timeFlag = navItem.timeFlag; this.timeFlag = navItem.timeFlag;
if(this.timeFlag == 'D'){ if(this.timeFlag == 'D'){
this.fortuneDate = `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}` this.fortuneDate = fmdata(new Date(),'D');
} }
if(this.timeFlag == 'M'){ if(this.timeFlag == 'M'){
this.fortuneDate = `${new Date().getFullYear()}-${new Date().getMonth() + 1}` this.fortuneDate = fmdata(new Date(),'M');
this.fields = 'month' this.fields = 'month'
} }
if(this.timeFlag == 'Y'){ if(this.timeFlag == 'Y'){
this.fortuneDate=`${new Date().getFullYear()}` this.fortuneDate = fmdata(new Date(),'Y');
// this.fortuneDate=`${new Date().getFullYear()}`
this.fields = 'year' this.fields = 'year'
} }
this.findByUserIdForFortuneStatistic(); this.findByUserIdForFortuneStatistic();
......
...@@ -43,7 +43,10 @@ ...@@ -43,7 +43,10 @@
<view class="shareOrderInfoItem" v-for="item in userShareCourses" :key="item.fileId"> <view class="shareOrderInfoItem" v-for="item in userShareCourses" :key="item.fileId">
<view class="timeBox">{{item.shareDate}}</view> <view class="timeBox">{{item.shareDate}}</view>
<view class="courseInfoContent"> <view class="courseInfoContent">
<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> </view>
<view class="countsContent"> <view class="countsContent">
<view @click="goDetail(item.fileId,1)"> <view @click="goDetail(item.fileId,1)">
...@@ -71,94 +74,98 @@ ...@@ -71,94 +74,98 @@
<script> <script>
import api from "@/api/api"; import api from "@/api/api";
import courseItem from "@/components/courseItem/courseItem.vue"; import courseItem from "@/components/courseItem/courseItem.vue";
import {
fmdata
} from '@/util/currentDate.js'
export default { export default {
components:{ components: {
courseItem courseItem
}, },
data() { data() {
return { return {
queryDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`, queryDate: fmdata(new Date(), 'M'),
maxDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`, // queryDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
userId:uni.getStorageSync('cffp_userId'), maxDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
userId: uni.getStorageSync('cffp_userId'),
coursesCountInfos: { coursesCountInfos: {
shareFrequencyMonth:0, shareFrequencyMonth: 0,
integralMonth:0, integralMonth: 0,
shareSectionMonth:0, shareSectionMonth: 0,
shareFrequencyCount:0, shareFrequencyCount: 0,
integralCount:0, integralCount: 0,
shareSectionCount:0 shareSectionCount: 0
}, },
userShareCourses:[] userShareCourses: []
} }
}, },
methods: { methods: {
goBack(){ goBack() {
let back = getCurrentPages(); let back = getCurrentPages();
if(back && back.length>1) { if (back && back.length > 1) {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
}else{ } else {
history.back(); history.back();
} }
}, },
bindDateChange: function(e) { bindDateChange: function(e) {
this.queryDate = e.detail.value; this.queryDate = e.detail.value;
this.userShareCount(); this.userShareCount();
this.userShareQuery(); this.userShareQuery();
}, },
userShareCount(){ userShareCount() {
const params = { const params = {
userId:this.userId, userId: this.userId,
queryDate:this.queryDate queryDate: this.queryDate
} }
api.userShareCount(params).then(res=>{ api.userShareCount(params).then(res => {
console.log(res) console.log(res)
if(res['success']){ if (res['success']) {
this.coursesCountInfos = res['data'] ? res['data'] : this.coursesCountInfos; this.coursesCountInfos = res['data'] ? res['data'] : this.coursesCountInfos;
Object.keys(this.coursesCountInfos).forEach((item)=>{ Object.keys(this.coursesCountInfos).forEach((item) => {
if(!this.coursesCountInfos[item]){ if (!this.coursesCountInfos[item]) {
this.coursesCountInfos[item] = 0; this.coursesCountInfos[item] = 0;
} }
}) })
}else{ } else {
this.coursesCountInfos = { this.coursesCountInfos = {
shareFrequencyMonth:0, shareFrequencyMonth: 0,
integralMonth:0, integralMonth: 0,
shareSectionMonth:0, shareSectionMonth: 0,
shareFrequencyCount:0, shareFrequencyCount: 0,
integralCount:0, integralCount: 0,
shareSectionCount:0 shareSectionCount: 0
}; };
console.log(this.coursesCountInfos) console.log(this.coursesCountInfos)
} }
}) })
}, },
userShareQuery(){ userShareQuery() {
const params = { const params = {
userId:this.userId, userId: this.userId,
queryDate:this.queryDate queryDate: this.queryDate
} }
console.log(this.userShareCourses) console.log(this.userShareCourses)
api.userShareQuery(params).then(res=>{ api.userShareQuery(params).then(res => {
console.log(res) console.log(res)
if(res['success']){ if (res['success']) {
this.userShareCourses = res['data']['userShareCourses']; this.userShareCourses = res['data']['userShareCourses'];
}else{ } else {
this.userShareCourses = []; this.userShareCourses = [];
} }
}) })
}, },
// 查看详情 // 查看详情
goDetail(val,type){ goDetail(val, type) {
uni.navigateTo({ uni.navigateTo({
url:`/pages/commonDetail/commonDetail?fileId=${val}&type=${type}` url: `/pages/commonDetail/commonDetail?fileId=${val}&type=${type}`
}) })
}, },
// 查看积分 // 查看积分
viewIntegral(){ viewIntegral() {
uni.navigateTo({ uni.navigateTo({
url:`/pages/myPoints/myPoints` url: `/pages/myPoints/myPoints`
}) })
} }
}, },
...@@ -167,35 +174,39 @@ ...@@ -167,35 +174,39 @@
this.userShareQuery(); this.userShareQuery();
}, },
mounted() { mounted() {
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.container{ .container {
height: 100%; height: 100%;
.timeSelectContent{
.timeSelectContent {
background-color: #fff; background-color: #fff;
padding: 20rpx 0; padding: 20rpx 0;
display: flex; display: flex;
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;
transform: rotate(90deg); transform: rotate(90deg);
margin-left: 8rpx; margin-left: 8rpx;
} }
} }
.shareStatisticalContent{
.shareStatisticalContent {
background-color: #fff; background-color: #fff;
margin: 10rpx 20rpx; margin: 10rpx 20rpx;
padding: 20rpx 14rpx; padding: 20rpx 14rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.statisticItem{
.statisticItem {
flex: 1; flex: 1;
min-width: 33%; min-width: 33%;
display: flex; display: flex;
...@@ -203,29 +214,35 @@ ...@@ -203,29 +214,35 @@
align-items: center; align-items: center;
border-right: 1px solid #F4F4F4; border-right: 1px solid #F4F4F4;
margin-bottom: 10rpx; margin-bottom: 10rpx;
&:nth-of-type(3n){
&:nth-of-type(3n) {
border-right: none; border-right: none;
} }
text{
text {
color: #333; color: #333;
font-size: 36rpx; font-size: 36rpx;
&:last-child{
&:last-child {
color: #666; color: #666;
font-size: 28rpx; font-size: 28rpx;
} }
&.colorText{
&.colorText {
color: #F15A1F; color: #F15A1F;
} }
} }
} }
} }
.shareDetailContent{
h3{ .shareDetailContent {
h3 {
color: #333; color: #333;
font-size: 36rpx; font-size: 36rpx;
position: relative; position: relative;
margin: 10rpx 0 10rpx 58rpx; margin: 10rpx 0 10rpx 58rpx;
&::before{
&::before {
content: ''; content: '';
display: block; display: block;
position: absolute; position: absolute;
...@@ -237,27 +254,33 @@ ...@@ -237,27 +254,33 @@
background-color: #FA882F; background-color: #FA882F;
} }
} }
.shareOrderInfoItem{
.shareOrderInfoItem {
margin: 0 20rpx; margin: 0 20rpx;
.timeBox{
.timeBox {
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
margin: 10rpx 0 10rpx 50rpx; margin: 10rpx 0 10rpx 50rpx;
} }
.countsContent{
.countsContent {
background-color: #fff; background-color: #fff;
display: flex; display: flex;
border-bottom-left-radius: 20rpx; border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx; border-bottom-right-radius: 20rpx;
padding: 10rpx 10rpx 20rpx 10rpx; 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;
&:last-child{
&:last-child {
margin-left: 10rpx; margin-left: 10rpx;
color: #0A2F99; color: #0A2F99;
font-weight: bold; font-weight: bold;
......
...@@ -79,13 +79,15 @@ ...@@ -79,13 +79,15 @@
<script> <script>
import api from "@/api/api"; import api from "@/api/api";
import courseItem from "@/components/courseItem/courseItem.vue"; import courseItem from "@/components/courseItem/courseItem.vue";
import {fmdata} from '@/util/currentDate.js'
export default { export default {
components:{ components:{
courseItem courseItem
}, },
data() { data() {
return { return {
queryDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`, queryDate: fmdata(new Date(),'M'),
// queryDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1): new Date().getMonth() + 1}`,
maxDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`, maxDate:`${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
userId: uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
coursesCountInfos:{}, coursesCountInfos:{},
......
export function fmdata(val, filets) {
var date = new Date(Number(val)); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
var Y = date.getFullYear();
var M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1);
// var D = date.getDate() + " ";
var D = (date.getDate() < 10 ? "0" + (date.getDate()) : date.getDate()) + " ";
var h = date.getHours() + ":";
var m = date.getMinutes() + ":";
var s = (date.getSeconds() < 10 ? "0" + (date.getSeconds()) : date.getSeconds());
if (filets == 'D') {
return Y + "-" + M + "-" + D;
}
if (filets == 'M') {
return Y + "-" + M;
}
if (filets == 'Y') {
return Y;
}
// return Y + M + D + h + m + s;
}
export function fmdataTime(val) {
var date = new Date(Number(val)); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
var Y = date.getFullYear() + "-";
var M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-";
// var D = date.getDate() + " ";
var D = (date.getDate() < 10 ? "0" + (date.getDate()) : date.getDate()) + " ";
var h = date.getHours() + ":";
// var m = date.getMinutes() + ":";
var m = (date.getMinutes() < 10 ? "0" + (date.getMinutes()) : date.getMinutes()) + ":";
var s = (date.getSeconds() < 10 ? "0" + (date.getSeconds()) : date.getSeconds());
return h + m + s;
}
// format(date, fmt) {
// let ret;
// const opt = {
// "Y+": date.getFullYear().toString(), // 年
// "m+": (date.getMonth() + 1).toString(), // 月
// "d+": date.getDate().toString(), // 日
// "H+": date.getHours().toString(), // 时
// "M+": date.getMinutes().toString(), // 分
// "S+": date.getSeconds().toString() // 秒
// // 有其他格式化字符需求可以继续添加,必须转化成字符串
// };
// for (let k in opt) {
// ret = new RegExp("(" + k + ")").exec(fmt);
// if (ret) {
// fmt = fmt.replace(
// ret[1],
// ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0")
// );
// }
// }
// // str=str.Substring(0,i);
// return fmt;
// },
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