Commit bcb8a4d5 authored by sujie@126.com's avatar sujie@126.com

合并代码

parent 4e2320fc
......@@ -416,6 +416,13 @@
"pages": [
"index"
]
},
{
"root": "business/pages/calendarthemeindex",
"name": "businessecalendarthemeindex",
"pages": [
"index"
]
}
],
"preloadRule": {
......
......@@ -18,7 +18,8 @@ import initCalendar, {
setTodoLabels,
setSelectedDays,
getSelectedDay,
enableArea
enableArea,
jump
} from '../../../components/calendar/main.js';
const innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
var app = getApp();
......@@ -36,16 +37,26 @@ Page({
content: [],
is_cheat: 0,
is_encrypt: 0,
is_read: 0,
is_remind:0,
readtime: 0,
force_status: 2,
force_num:0,
push_status:2,
text_require_status:2,
text_require_num:0,
image_require_status:2,
image_require_num:0,
video_require_status:2,
video_require_num:0,
audio_require_status:2,
audio_require_num:0,
supplement_status:2,
supplement_num:0,
startDate: '2019-04-05',
startTime: '0000',
endDate: '2019-05-05',
endTime: '0000',
dayStime: '00:00',
dayEtime: '24:00',
tipTime:'00:00'
startTime: '00:00',
endDate: '2019-06-05',
endTime: '00:00',
clock_start_time: '00:00',
clock_end_time: '23:59',
push_time:'00:00'
},
submiting: false,
audioStatus: { // 录音弹窗的交互状态
......@@ -90,7 +101,7 @@ Page({
const that = this;
initCalendar({
multi: true,
noDefault: false,
defaultDay:0,
whenChangeMonth(current, next) {
console.log(current);
console.log(next);
......@@ -120,6 +131,7 @@ Page({
enableArea([that.data.params.startDate, that.data.params.endDate]);
setTimeout(() => {
// setSelectedDays(data);
jump()
}, 2000);
}
});
......@@ -233,6 +245,11 @@ Page({
formId
} = e.detail;
const _params = JSON.parse(JSON.stringify(this.data.params));
const _selectRestDays = this.data.selectRestDays;
const restdates = [];
for(let i=0;i<_selectRestDays.length;i++){
restdates.push(_selectRestDays[i].data.year+'-'+_selectRestDays[i].data.month+'-'+_selectRestDays[i].data.day)
}
if (_params.title.trim() === '') {
wx.showModal({
title: '提示',
......@@ -264,12 +281,17 @@ Page({
let content = JSON.parse(JSON.stringify(sjdMediaEditor.data.content));
let _content = content.filter((ele) => ele.value.trim() != '');
_params.content = JSON.stringify(_content);
themeEditor(Object.assign(_params, {
const data = Object.assign(_params, {
class_id: this.data.id,
tid: this.data.tid,
clone: this.data.clone,
school_id: this.data.sid
})).then((res) => {
school_id: this.data.sid,
subject_type:2,
start_time:this.data.params.startDate+' '+this.data.params.startTime,
end_time:this.data.params.endDate+' '+this.data.params.endTime,
rest_dates:restdates.join(',')
})
themeEditor(data).then((res) => {
const {
code,
data
......@@ -496,25 +518,80 @@ Page({
})
}
},
readswitch() {
if (Number(this.data.params.is_read) == 0) {
readswitch(){
if (Number(this.data.params.force_status) == 2) {
this.setData({
'params.force_status': 1
})
} else if (Number(this.data.params.force_status) == 1) {
this.setData({
'params.force_status': 2
})
}
},
supplementswitch(){
if (Number(this.data.params.supplement_status) == 2) {
this.setData({
'params.supplement_status': 1
})
} else if (Number(this.data.params.supplement_status) == 1) {
this.setData({
'params.supplement_status': 2
})
}
},
textswitch() {
if (Number(this.data.params.text_require_status) == 2) {
this.setData({
'params.text_require_status': 1
})
} else if (Number(this.data.params.text_require_status) == 1) {
this.setData({
'params.text_require_status': 2
})
}
},
imageswitch() {
if (Number(this.data.params.image_require_status) == 2) {
this.setData({
'params.image_require_status': 1
})
} else if (Number(this.data.params.image_require_status) == 1) {
this.setData({
'params.image_require_status': 2
})
}
},
videoswitch() {
if (Number(this.data.params.video_require_status) == 2) {
this.setData({
'params.video_require_status': 1
})
} else if (Number(this.data.params.video_require_status) == 1) {
this.setData({
'params.video_require_status': 2
})
}
},
audioswitch() {
if (Number(this.data.params.audio_require_status) == 2) {
this.setData({
'params.is_read': 1
'params.audio_require_status': 1
})
} else if (Number(this.data.params.is_read) == 1) {
} else if (Number(this.data.params.audio_require_status) == 1) {
this.setData({
'params.is_read': 0
'params.audio_require_status': 2
})
}
},
remindswitch() {
if (Number(this.data.params.is_remind) == 0) {
if (Number(this.data.params.push_status) == 2) {
this.setData({
'params.is_remind': 1
'params.push_status': 1
})
} else if (Number(this.data.params.is_remind) == 1) {
} else if (Number(this.data.params.push_status) == 1) {
this.setData({
'params.is_remind': 0
'params.push_status': 2
})
}
},
......@@ -523,15 +600,53 @@ Page({
value
} = e.detail;
this.setData({
'params.readtime': value,
'params.force_num': value,
})
},
supplementInput(e){
const {
value
} = e.detail;
this.setData({
'params.supplement_num': value,
})
},
textInput(e) {
const {
value
} = e.detail;
this.setData({
'params.text_require_num': value,
})
},
imageInput(e) {
const {
value
} = e.detail;
this.setData({
'params.image_require_num': value,
})
},
videoInput(e) {
const {
value
} = e.detail;
this.setData({
'params.video_require_num': value,
})
},
audioInput(e) {
const {
value
} = e.detail;
this.setData({
'params.audio_require_num': value,
})
},
startDateChange(e) {
const {
value
} = e.detail;
console.log(value);
enableArea([value, this.data.params.endDate]);
this.setData({
'params.startDate': value,
})
......@@ -548,7 +663,6 @@ Page({
const {
value
} = e.detail;
enableArea([this.data.params.startDate, value]);
this.setData({
'params.endDate': value,
})
......@@ -562,11 +676,13 @@ Page({
})
},
dayStimeChange(e) {
const {
value
} = e.detail;
console.log(value,'value')
this.setData({
'params.dayStime': value,
'params.clock_start_time': value,
})
},
dayEtimeChange(e) {
......@@ -574,7 +690,7 @@ Page({
value
} = e.detail;
this.setData({
'params.dayEtime': value,
'params.clock_end_time': value,
})
},
tipTimeChange(e){
......@@ -582,7 +698,7 @@ Page({
value
} = e.detail;
this.setData({
'params.tipTime': value,
'params.push_time': value,
})
},
selectrestdays(e){
......@@ -631,5 +747,6 @@ Page({
calenderShow:false,
selectRestDays:days
})
console.log(this.data.selectRestDays,'selectRestDays')
},
})
\ No newline at end of file
This diff is collapsed.
{
"navigationBarTitleText": "日历打卡",
"enablePullDownRefresh": true,
"usingComponents": {
"sjd-media-show": "../../../components/sjdmediashow",
"clock-item": "../../components/clockitem",
"empty-content": "../../../components/emptycontent",
"poster-box": "../../../components/posterbox",
"go-top": "../../components/goTop",
"list-loading": "../../../components/listloading",
"comment-editor": "../../../components/commenteditor",
"calender":"../../../components/calendar"
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -29,16 +29,24 @@ Page({
content: [],
is_cheat: 0,
is_encrypt: 0,
is_read: 0,
is_remind:0,
readtime: 0,
force_status: 2,
force_num:0,
push_status:2,
text_require_status:2,
text_require_num:0,
image_require_status:2,
image_require_num:0,
video_require_status:2,
video_require_num:0,
audio_require_status:2,
audio_require_num:0,
startDate: '2019-04-05',
startTime: '0000',
startTime: '00:00',
endDate: '2019-04-05',
endTime: '0000',
dayStime: '00:00',
dayEtime: '24:00',
tipTime:'00:00'
endTime: '00:00',
clock_start_time: '00:00',
clock_end_time: '23:59',
push_time:'00:00'
},
submiting: false,
audioStatus: { // 录音弹窗的交互状态
......@@ -188,6 +196,7 @@ Page({
formId
} = e.detail;
const _params = JSON.parse(JSON.stringify(this.data.params));
if (_params.title.trim() === '') {
wx.showModal({
title: '提示',
......@@ -219,12 +228,17 @@ Page({
let content = JSON.parse(JSON.stringify(sjdMediaEditor.data.content));
let _content = content.filter((ele) => ele.value.trim() != '');
_params.content = JSON.stringify(_content);
themeEditor(Object.assign(_params, {
const data = Object.assign(_params, {
class_id: this.data.id,
tid: this.data.tid,
clone: this.data.clone,
school_id: this.data.sid
})).then((res) => {
school_id: this.data.sid,
subject_type:1,
publish_time:this.data.params.startDate+' '+this.data.params.startTime,
end_time:this.data.params.endDate+' '+this.data.params.endTime,
})
console.log(data,'data');
themeEditor(data).then((res) => {
const {
code,
data
......@@ -451,25 +465,69 @@ Page({
})
}
},
readswitch() {
if (Number(this.data.params.is_read) == 0) {
readswitch(){
if (Number(this.data.params.force_status) == 2) {
this.setData({
'params.force_status': 1
})
} else if (Number(this.data.params.force_status) == 1) {
this.setData({
'params.force_status': 2
})
}
},
textswitch() {
if (Number(this.data.params.text_require_status) == 2) {
this.setData({
'params.text_require_status': 1
})
} else if (Number(this.data.params.text_require_status) == 1) {
this.setData({
'params.text_require_status': 2
})
}
},
imageswitch() {
if (Number(this.data.params.image_require_status) == 2) {
this.setData({
'params.image_require_status': 1
})
} else if (Number(this.data.params.image_require_status) == 1) {
this.setData({
'params.image_require_status': 2
})
}
},
videoswitch() {
if (Number(this.data.params.video_require_status) == 2) {
this.setData({
'params.video_require_status': 1
})
} else if (Number(this.data.params.video_require_status) == 1) {
this.setData({
'params.video_require_status': 2
})
}
},
audioswitch() {
if (Number(this.data.params.audio_require_status) == 2) {
this.setData({
'params.is_read': 1
'params.audio_require_status': 1
})
} else if (Number(this.data.params.is_read) == 1) {
} else if (Number(this.data.params.audio_require_status) == 1) {
this.setData({
'params.is_read': 0
'params.audio_require_status': 2
})
}
},
remindswitch() {
if (Number(this.data.params.is_remind) == 0) {
if (Number(this.data.params.push_status) == 2) {
this.setData({
'params.is_remind': 1
'params.push_status': 1
})
} else if (Number(this.data.params.is_remind) == 1) {
} else if (Number(this.data.params.push_status) == 1) {
this.setData({
'params.is_remind': 0
'params.push_status': 2
})
}
},
......@@ -478,7 +536,39 @@ Page({
value
} = e.detail;
this.setData({
'params.readtime': value,
'params.force_num': value,
})
},
textInput(e) {
const {
value
} = e.detail;
this.setData({
'params.text_require_num': value,
})
},
imageInput(e) {
const {
value
} = e.detail;
this.setData({
'params.image_require_num': value,
})
},
videoInput(e) {
const {
value
} = e.detail;
this.setData({
'params.video_require_num': value,
})
},
audioInput(e) {
const {
value
} = e.detail;
this.setData({
'params.audio_require_num': value,
})
},
startDateChange(e) {
......@@ -514,11 +604,13 @@ Page({
})
},
dayStimeChange(e) {
const {
value
} = e.detail;
console.log(value,'value')
this.setData({
'params.dayStime': value,
'params.clock_start_time': value,
})
},
dayEtimeChange(e) {
......@@ -526,7 +618,7 @@ Page({
value
} = e.detail;
this.setData({
'params.dayEtime': value,
'params.clock_end_time': value,
})
},
tipTimeChange(e){
......@@ -534,7 +626,7 @@ Page({
value
} = e.detail;
this.setData({
'params.tipTime': value,
'params.push_time': value,
})
}
})
\ No newline at end of file
This diff is collapsed.
......@@ -47,10 +47,12 @@ Page({
data: {
imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion,
localImageRoot:'../../../images/',
id: 0,
tid: 0,
sid:'',
params: {
searchName:''
},
// detailExpand: false,
bigSort: 1, // 1 打卡点评 2 打卡统计
......@@ -1133,4 +1135,10 @@ Page({
clockList: _clockList
})
},
searchinput(e) {
const { value } = e.detail;
this.setData({
'params.searchName': value,
})
},
})
\ No newline at end of file
{
"navigationBarTitleText": "打卡主题",
"navigationBarTitleText": "作业打卡",
"enablePullDownRefresh": true,
"usingComponents": {
"sjd-media-show": "../../../components/sjdmediashow",
......
This diff is collapsed.
......@@ -53,8 +53,8 @@
/* display: flex;
display: -webkit-flex;
justify-content: space-between; */
background-color: #fff;
padding: 30rpx 25rpx 0 23rpx;
background-color: rgba(244, 244, 247, 1);
position: relative;
}
.header-box .title-box {
width: 492rpx;
......@@ -72,8 +72,44 @@
.topbox {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 30rpx;
height: 255rpx;
background:linear-gradient(180deg,rgba(53,186,253,1),rgba(79,142,255,1));
}
.topbox .btn-box{
flex: 1;
text-align:center;
position: relative;
}
.topbox .btn-box button{
width: 100%;
height: 100%;
opacity: 0;
position: absolute;
left: 0;
top: 0;
}
.topbox .btn-box .icon .btn{
width: 42rpx;
height: 36rpx;
}
.topbox .btn-box .text{
font-size:22rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(255,255,255,1);
line-height: 1;
padding-top: 21rpx;
}
.header-box .theme-detail{
width:702rpx;
background:rgba(255,255,255,1);
border:1px solid rgba(242,242,242,1);
box-shadow:0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius:20rpx;
margin: 0 auto;
margin-top:-54rpx;
padding: 30rpx;
}
.name-edit-box {
display: inline-block;
......@@ -219,7 +255,6 @@
color: #65B8F4;
}
.shift-box .small-sort-box {
margin-top: 50rpx;
display: flex;
display: -webkit-flex;
justify-content: space-around;
......@@ -229,13 +264,26 @@
position: relative;
}
.shift-box .small-sort-box .small-sort-item {
padding-bottom: 20rpx;
/* padding-bottom: 20rpx; */
position: relative;
flex: 1;
text-align: center;
}
.shift-box .small-sort-box .small-sort-item.active {
color: #65B8F4;
/* padding-top: 50rpx; */
/* border-bottom: 4rpx solid rgba(101,184,244,1); */
}
.shift-box .small-sort-box .small-sort-item .inner-box{
margin: 0 40rpx;
padding-bottom:20rpx;
}
.shift-box .small-sort-box .small-sort-item .inner-box.active {
border-bottom: 4rpx solid rgba(101,184,244,1);
}
.shift-box .small-sort-box .small-sort-item {
color: #65B8F4;
}
.shift-box .small-sort-box .small-sort-item .small-sort-name{
font-size: 28rpx;
font-weight: 800;
......@@ -250,7 +298,42 @@
position: relative;
z-index: 1;
}
.search-box{
padding: 25rpx 25rpx 40rpx 25rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.search-box .btn{
width:92rpx;
height:50rpx;
line-height: 50rpx;
text-align: center;
border:1px solid rgba(101,184,244,1);
border-radius:10rpx;
font-size:26rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(101,184,244,1);
}
.search-box .ipt-box{
width:525rpx;
height:60rpx;
background:rgba(255,255,255,1);
border:1px solid rgba(228,229,240,1);
border-radius:30rpx;
display: flex;
justify-content: center;
}
.search-box .ipt-box .ipt-iocn{
width:29rpx;
height:30rpx;
padding: 15rpx 28rpx;
}
.search-box .ipt-box .search-input{
width: 440rpx;
border: none;
}
.sign-member-content .has-not-sign-box {
/* padding: 0 24rpx 0; */
border-bottom: 1rpx solid transparent
......@@ -420,3 +503,25 @@
display:inline-block;
box-shadow:0px 8rpx 18rpx 0px rgba(101,184,244,0.56);
}
.footer-box{
/* position: fixed;
left: 0;
top: 0; */
width:100%;
height:100rpx;
background:rgba(255,255,255,1);
border-top: 1px solid rgba(0,0,0,.1);
}
.footer-box .btn{
width:564rpx;
height:68rpx;
margin: 16rpx auto;
background:rgba(101,184,244,1);
border-radius:34rpx;
font-size:28rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(255,255,255,1);
line-height:68rpx;
text-align: center;
}
\ No newline at end of file
......@@ -94,7 +94,7 @@
display: -webkit-flex;
align-items: center;
justify-content: center;
padding: 32rpx 0;
padding: 32rpx 0 0 0;
}
.expand-box-withtext.down, .expand-box-withouttext.down {
......
import constants from './constants.js';
const api = constants.host + '/v2/'; // 打卡通用接口
const api = constants.host + '/v3/'; // 打卡通用接口
const apiv2 = constants.host2 + '/shop/api/'; // 打卡登录注册忘记密码接口
const apis = {
formIdCreate: `${api}common/form_id`,
customer: {
......
......@@ -4,8 +4,8 @@ export default {
// host2: 'https://wx.m.shangjiadao.cn',
storageVersion: '3.0',
imageVersion: '20190416',
host: 'https://clock.wp53.cn',
host2: 'https://test.wp53.cn',
host: 'http://clock.wp53.cn',
host2: 'http://test.wp53.cn',
appId: 'wxc1246ea029394785',
miniProgram: {
clock: 'wxdeee20e52a1fd7ee'
......
......@@ -29,8 +29,8 @@ WussComponent({
value: 'default',
},
value: {
type: Boolean,
value: false,
type: Number,
value: 2,
},
color: {
type: String,
......@@ -40,6 +40,10 @@ WussComponent({
type: Boolean,
value: false,
},
isBoolean:{
type: Boolean,
value: false,
}
},
methods: {
_handleClick() {
......
......@@ -4,7 +4,9 @@
hover-stop-propagation="false"
catchtap="_handleClick"
>
<view class="wuss-switch-circle {{ value ? 'wuss-switch-circle-active' : '' }}" />
<view class="wuss-switch-mask {{ value ? 'wuss-switch-mask-active' : '' }}" style="border: 1rpx solid {{ color }};background-color: {{ color }};" />
<view wx:if="{{!isBoolean}}" class="wuss-switch-circle {{ value==1 ? 'wuss-switch-circle-active' : '' }}" />
<view wx:if="{{!isBoolean}}" class="wuss-switch-mask {{ value==1 ? 'wuss-switch-mask-active' : '' }}" style="border: 1rpx solid {{ color }};background-color: {{ color }};" />
<view wx:if="{{isBoolean}}" class="wuss-switch-circle {{ value ? 'wuss-switch-circle-active' : '' }}" />
<view wx:if="{{isBoolean}}" class="wuss-switch-mask {{ value ? 'wuss-switch-mask-active' : '' }}" style="border: 1rpx solid {{ color }};background-color: {{ color }};" />
</view>
......@@ -4,14 +4,15 @@
"ignore": []
},
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true,
"nodeModules": true,
"autoAudits": false,
"uglifyFileName": true
"uglifyFileName": true,
"checkInvalidKey": true
},
"compileType": "miniprogram",
"libVersion": "2.2.5",
......@@ -764,10 +765,24 @@
"scene": null
},
{
"id": -1,
"id": 103,
"name": "编辑日历打卡",
"pathName": "business/pages/calendarthemeeditor/index",
"query": "id=7&tid=0",
"query": "id=54&tid=0",
"scene": null
},
{
"id": 104,
"name": "b端作业打卡",
"pathName": "business/pages/themeindex/index",
"query": "sid=22&id=97&tid=152",
"scene": null
},
{
"id": -1,
"name": "b端",
"pathName": "business/pages/calendarthemeindex/index",
"query": "sid=22&id=97&tid=152",
"scene": null
}
]
......
......@@ -9,43 +9,43 @@ function themeEditor (data) {
url = apis.business.themeEditor.themeApi,
type = 'POST'
}
let params = {};
if (data.tid != 0) {
params = {
class_id: data.class_id,
type: data.type,
title: data.title,
content: data.content,
is_cheat: data.is_cheat,
is_encrypt: data.is_encrypt,
school_id: data.school_id
}
} else {
params = {
class_id: data.class_id,
type: data.type,
title: data.title,
content: data.content,
is_cheat: data.is_cheat,
is_encrypt: data.is_encrypt,
school_id: data.school_id
}
}
if(data.clone&&data.clone == 1){
params = {
class_id: data.class_id,
type: data.type,
title: data.title,
content: data.content,
is_cheat: data.is_cheat,
is_encrypt: data.is_encrypt,
school_id: data.school_id
}
}
// let params = {};
// if (data.tid != 0) {
// params = {
// class_id: data.class_id,
// type: data.type,
// title: data.title,
// content: data.content,
// is_cheat: data.is_cheat,
// is_encrypt: data.is_encrypt,
// school_id: data.school_id
// }
// } else {
// params = {
// class_id: data.class_id,
// type: data.type,
// title: data.title,
// content: data.content,
// is_cheat: data.is_cheat,
// is_encrypt: data.is_encrypt,
// school_id: data.school_id
// }
// }
// if(data.clone&&data.clone == 1){
// params = {
// class_id: data.class_id,
// type: data.type,
// title: data.title,
// content: data.content,
// is_cheat: data.is_cheat,
// is_encrypt: data.is_encrypt,
// school_id: data.school_id
// }
// }
return wxRequest({
role: '2b',
url,
data: params,
data: data,
method: type,
errorresolve: 1,
})
......
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