Commit 052bf502 authored by sujie@126.com's avatar sujie@126.com

Merge branch 'class_lvtz' of git.server:wangxuelai/wechatapp.shangjiadao.com into sj-dev-dev

parents 5267621f 13d63a3c
......@@ -8,7 +8,7 @@ import {
LocalStorage
} from '../../../utilities/index.js';
import {
classroomdetailGet,
classroomdetailGet2,
readreviewcountGet,
classroomlikesGet,
classroomcommentsGet,
......@@ -67,9 +67,11 @@ Page({
optDialog: false,//操作(置顶 修改 删除)
modalDeleteReview: false, //删除确认
modalReviewHadDel: false, //被删除弹框
like_status: false,
likeSubmitting: false,
showRefresh:false,
errTip: '点评故事已被删除'
},
/**
......@@ -163,11 +165,17 @@ Page({
}
},
ClassroomDetailGet(){
classroomdetailGet({
classroomdetailGet2({
id: this.data.rid
}).then((res)=>{
const {code, data} = res;
if(code == 200){
if(code == 40018){
this.setData({
modalReviewHadDel: true,
errTip: '点评故事已被删除'
})
return
}else if(code == 200){
try {
data.content = data.content ? JSON.parse(data.content) :'';
data.works = data.works ? JSON.parse(data.works) :'';
......@@ -178,11 +186,18 @@ Page({
data.read_remind = Number(data.read_remind);
data.unread_remind = Number(data.unread_remind);
this.setData({
reviewDetail: data
reviewDetail: data,
like_status: data.like_status
})
if(this.data.type==2){
this.subjectReviewTemplate(data.content.templates);
}
}else{
this.setData({
modalReviewHadDel: true,
errTip: msg
})
return
}
}).catch((err)=>{
console.log(err)
......@@ -241,8 +256,7 @@ Page({
const {code, data} = res;
if(code == 200) {
this.setData({
likesList: data.list[Number(this.data.rid)].list || [],
like_status: data.list[Number(this.data.rid)].list.find(ele=>ele.like_user_id==this.data.reviewDetail.school_teacher.id)? true: false
likesList: data.list[Number(this.data.rid)].list || []
})
}
}).catch((err)=>{
......@@ -781,9 +795,10 @@ Page({
})
},
toShareCard(){
const {sid,id,rid,type} = this.data
const {sid,id,rid,type} = this.data;
// role 1为b端,2为c端
wx.navigateTo({
url: `/src/pages/papersquare/classreviewshare?sid=${sid}&id=${id}&rid=${rid}&type=${type}`
url: `/src/pages/papersquare/classreviewshare?sid=${sid}&id=${id}&rid=${rid}&type=${type}&role=1`
})
},
hideCountDailogShow(e){
......@@ -819,6 +834,7 @@ Page({
title: `${warnText}成功`,
duration: 500
})
that.prevPageShow();
})
}else{
wx.showToast({
......@@ -938,7 +954,7 @@ Page({
if (code == 200) {
if (like_status == 2) { // 取消点赞
like_status = false;
likesList = likesList.filter(ele => ele.like_user_id != this.data.reviewDetail.school_teacher.id);
likesList = likesList.filter(ele => ele.id != data.id);
} else if (like_status == 1) { // 点赞
like_status = true;
likesList.push({
......@@ -946,7 +962,6 @@ Page({
avatar: data.school_teacher.avatar || avatar
},
id: data.id,
like_user_id: data.like_user_id,
like_user_type: data.like_user_type,
});
}
......@@ -974,5 +989,11 @@ Page({
showRefresh: true
})
}
},
bindIGet(){
const {sid,id} = this.data
wx.redirectTo({
url: `/business/pages/classservice/classreviewindex?sid=${sid}&id=${id}`
})
}
})
\ No newline at end of file
......@@ -376,4 +376,15 @@
<view class="modal-btn btn-red" bindtap="sureDeleteReview">确认</view>
</view>
</view>
</view>
<view class="modal-dialog" wx:if="{{modalReviewHadDel}}">
<view class="modal-mask"></view>
<view class="modal-box">
<view class="modal-title">温馨提示</view>
<view class="modal-content">{{errTip}}</view>
<view class="modal-bottom">
<view class="modal-btn" bindtap="bindIGet">我知道了</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -777,6 +777,8 @@ page{
display: flex;
align-items: center;
justify-content: center;
color: #4F4F4F;
font-size: 30rpx;
}
.modal-dialog .modal-box .modal-bottom{
width: 100%;
......
......@@ -20,49 +20,49 @@
</view>
</view>
</view>
<block wx:if="{{dakarole==1}}">
<view class="box">
<view class="box-title">
<view class="title">完善机构信息</view>
</view>
<view class="box">
<view class="box-title">
<view class="title">完善机构信息</view>
</view>
<view class="line-item">
<view class="item-label">机构LOGO <text>建议尺寸:120*120</text></view>
<view class="right" bindtap="proMainImgUpload" data-type="schoollogo">
<image class="logo-upload-img" wx:if="{{params.logo != ''}}" src="{{filter.imagify(params.logo, 'image/resize,w_640/format,jpg/quality,q_50')}}"></image>
<!-- <image class="logo-upload-img" wx:else src="{{localImageRoot}}2c/pclogin/logo.png?{{imageVersion}}"></image> -->
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
<view class="line-item">
<view class="item-label">机构LOGO <text>建议尺寸:120*120</text></view>
<view class="right" bindtap="proMainImgUpload" data-type="schoollogo">
<image class="logo-upload-img" wx:if="{{params.logo != ''}}" src="{{filter.imagify(params.logo, 'image/resize,w_640/format,jpg/quality,q_50')}}"></image>
<!-- <image class="logo-upload-img" wx:else src="{{localImageRoot}}2c/pclogin/logo.png?{{imageVersion}}"></image> -->
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
</view>
<view class="line-item">
<view class="item-label">机构名称</view>
<view class="right">
<input type="text" placeholder-class="placeholderclass" class="iteminput" maxlength="30" value="{{params.title}}" bindinput="titleInput" placeholder="输入机构名称"></input>
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
<view class="line-item">
<view class="item-label">机构名称</view>
<view class="right">
<input type="text" placeholder-class="placeholderclass" class="iteminput" maxlength="30" value="{{params.title}}" bindinput="titleInput" placeholder="输入机构名称"></input>
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
</view>
<view class="line-item line-item-subject">
<view class="item-label">机构类型</view>
<view class="right content-box">
<view class="item-box" wx:for="{{allSubject}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" data-active-item="{{item}}" bindtap="selectSubject" >
<view class="{{selectedSubjectStyle[item.id]?'item-box-inner selectd-item-box-inner':'item-box-inner'}}">{{item.name}}</view>
<view class="line-item line-item-subject">
<view class="item-label">机构类型</view>
<view class="right content-box">
<view class="item-box" wx:for="{{allSubject}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" data-active-item="{{item}}" bindtap="selectSubject" >
<view class="{{selectedSubjectStyle[item.id]?'item-box-inner selectd-item-box-inner':'item-box-inner'}}">{{item.name}}</view>
</view>
</view>
</view>
</view>
<view class="line-item">
<view class="item-label">地址</view>
<view class="right" bindtap="addressSelect">
<view class="iteminput">{{params.location_address ? params.location_address : '点击定位'}}</view>
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
<view class="line-item">
<view class="item-label">地址</view>
<view class="right" bindtap="addressSelect">
<view class="iteminput">{{params.location_address ? params.location_address : '点击定位'}}</view>
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
</view>
</view>
<view class="submitbtn" bindtap="save">完成</view>
<view class="submitbtn" bindtap="save">完成</view>
</block>
<!-- <view class="common-dialog" wx:if="{{showAuthSettingDia}}">
<view class="dialog-box">
......
export default {
// dailysignSchool 机构825生成日签,自定义的一张poster
dailysignSchool: [
{
sid: 825,
posterbg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg825.png'
},
{
sid: 449,
posterbg:'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg825.png'
},
]
}
\ No newline at end of file
export default {
imageRoot: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/',
// host: 'https://qxapi.qingxiao.online/daka',
// host2: 'https://wx.m.shangjiadao.cn',
host: 'https://qxapi.qingxiao.online/daka',
host2: 'https://wx.m.shangjiadao.cn',
storageVersion: '4.0',
imageVersion: '20191104',
host: 'https://clock.wp53.cn',
host2: 'https://test.wp53.cn',
// host: 'https://clock.wp53.cn',
// host2: 'https://test.wp53.cn',
appId: 'wxc1246ea029394785',
miniProgram: {
clock: 'wxdeee20e52a1fd7ee'
......@@ -152,25 +152,25 @@ export default {
}],
dailyPosterNew: [{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg1.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg1.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg2.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg2.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg3.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg3.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg4.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg4.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg5.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg5.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg6.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg6.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg7.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg7.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg8.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg8.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg9.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg9.png'
},{
bg: 'https://cdn.img.shangjiadao.cn/source/images/dakav4/2c/dailyposter2/bg10.png'
bg: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/dailyposter2/bg10.png'
}],
dailytextNew: [{
linea: '慈母手中线,游子身上衣。谁言寸草心,报得三春晖。',
......
......@@ -104,6 +104,15 @@ function classroomdetailGet (data) {
errorresolve: 1,
})
}
function classroomdetailGet2 (data) {
return wxRequest({
role: '2b',
url: apis.business.classservice.classroomdetail,
data,
method: 'GET',
errorresolve: 2,
})
}
function classreviewPlacetop (data) {
return wxRequest({
role: '2b',
......@@ -196,6 +205,7 @@ export {
remindpushPOST,
studentreviewPost,
classroomdetailGet,
classroomdetailGet2,
readreviewcountGet,
classroomlikesGet,
classroomcommentsGet,
......
......@@ -49,7 +49,7 @@ function classroomdetailGet(data){
url: `${apis.customer.common.classroomdetailGet}`,
data,
method: 'GET',
errorresolve: 1,
errorresolve: 2,
})
}
export {
......
......@@ -479,6 +479,9 @@ Component({
}
},
goClockDetail () {
if(this.data.type != 0 && this.data.othertype!=1){
return
}
if (this.data.clock.subject_type == 3) {
wx.navigateTo({
url: `/src/pages/clockdetail/newindex?tid=${this.data.clock.unlock_mode_id}&cid=${this.data.clock.id}`,
......
This diff is collapsed.
......@@ -62,6 +62,8 @@ import {
import {
studentidentity
} from '../../../service/customer/signup.js'
import activityconfig from '../../../constants/activityconfig.js';
var app = getApp();
Page({
data: {
......@@ -180,7 +182,7 @@ Page({
isSchoolStudent: false,
myBaseinfo:'',
needREfresh: false,
studentId: ''
studentId: '',
},
onLoad: function (options) { // Do some initialize when page load.
// this.getWeeksDay(new Date());
......@@ -2253,7 +2255,146 @@ Page({
if(myrate<80){
myrate = Math.floor(Math.random() * 10 + 80);
}
this.setData({
if(activityconfig.dailysignSchool.find(item=>item.sid==this.data.sid)){
let activitySchoolInfo = activityconfig.dailysignSchool.filter(item=>item.sid==this.data.sid)[0];
this.setData({
painting: {
width: 750,
height: 1334,
views: [
{ // 头像
type: 'image',
url: userInfo?imagify(userInfo.avatar, 'image/resize,w_160/format,jpg'):imagify(visitor.userInfo.avatarUrl, 'image/resize,w_160/format,jpg'),
top: 766,
left: 70,
width: 80,
height: 80
},
{ // 背景
type: 'image',
url: activitySchoolInfo.posterbg,
top: 0,
left: 0,
width: 750,
height: 1334
},
{ // 二维码
type: 'image',
url: qrcode,
top: 1133,
left: 528,
width: 145,
height: 145
},
{ // 日期
type: 'text',
content: date.day,
fontSize: 100,
color: '#fff',
textAlign: 'left',
top: 120,
left: 40,
lineHeight: 1,
bolder: true
},
{ // 月份英文
type: 'text',
content: date.month.shortName + ' '+ date.year,
fontSize: 30,
color: '#fff',
textAlign: 'left',
top: 240,
left: 41,
lineHeight: 1,
bolder: true
},
{ // 昵称
type: 'text',
content: userInfo?userInfo.nickname:visitor.userInfo.nickName,
fontSize: 30,
color: '#2C2C2C',
textAlign: 'left',
top: 767,
left: 175,
bolder: true
},
{ // 打卡详情
type: 'text',
content: `在〔${circleInfo.title && circleInfo.title.length > 15 ? circleInfo.title.substr(0,15) + '...' : circleInfo.title || ''}〕完成打卡`,
fontSize: 24,
color: '#4F4F4F',
textAlign: 'left',
top: 819,
left: 176,
bolder: false
},
{ // %
type: 'text',
content: '%',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 565,
bolder: false
},
{ // 天
type: 'text',
content: '天',
fontSize: 22,
color: '#000000',
textAlign: 'left',
top: 1020,
left: 240,
bolder: false
},
{ // 百分比
type: 'text',
content: `${myrate}`,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 510,
bolder: true
},
{ // 打卡次数
type: 'text',
content: my_rank.clock_days,
fontSize: 60,
color: '#000000',
textAlign: 'center',
width: 120,
top: 985,
left: 200,
bolder: true
},
{ // 校区名
type: 'text',
content: `来「${schoolInfo.title && schoolInfo.title.length > 15 ? schoolInfo.title.substr(0,15) + '...' : schoolInfo.title || ''}」`,
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1139,
left: 86,
bolder: true
},
{ // 校区名
type: 'text',
content: '和TA一起学习',
fontSize: 24,
color: '#000000',
textAlign: 'left',
top: 1175,
left: 86,
bolder: true
},
]
}
})
}else{
this.setData({
painting: {
width: 750,
height: 1334,
......@@ -2419,6 +2560,8 @@ Page({
]
}
})
}
})
},
eventGetImage(e) {
......
This diff is collapsed.
......@@ -15,11 +15,14 @@ import {
} from '../../../service/customer/signup.js'
import {
classroomdetailGet
} from '../../../service/business/classservice.js';
} from '../../../service/customer/papersquare.js';
import {
wxGetImageInfo
} from '../../../utilities/wxApi.js';
import CanvasDrag from '../../../components/canvas-drag/canvas-drag';
import {
classroomdetailGet2
} from '../../../service/business/classservice.js';
var app = getApp();
Page({
data: {
......@@ -55,12 +58,13 @@ Page({
sharePage: 'src/pages/papersquare/reviewdetail', // TODO 换路径 src/pages/papersquare/classsharereview 事例src/pages/clockdetail/newindex
},
onLoad: function (options) {
const {sid,rid,type,id} = options;
const {sid,rid,type,id,role} = options;
this.setData({
rid,
sid,
type,
id: id || '',
role,
tempImgArr1: [
{
idx: 0,
......@@ -161,9 +165,20 @@ Page({
wx.showLoading({
title: '加载中'
});
classroomdetailGet({
id: this.data.rid
}).then((res)=>{
let ajax = null;
console.log(this.data.role,'role',this.data.role==1)
// role 1为b端,2为c端
if(this.data.role==1){
ajax = classroomdetailGet2({
id: this.data.rid
})
}else{
ajax = classroomdetailGet({
id: this.data.rid
})
}
ajax.then((res)=>{
const {code, data, datetime} = res;
this.data.datetime = datetime;
if(code == 200){
......@@ -531,8 +546,10 @@ Page({
changeCover(){
let that = this;
let ReviewImgLen = this.data.hasReviewImg.length;
let coverindex = this.data.coverindex
let coverindex = this.data.coverindex;
if(ReviewImgLen==1){
return
}
if(this.data.coverindex>=ReviewImgLen-1){
coverindex=0
}else{
......@@ -541,7 +558,6 @@ Page({
that.setData({
coverindex,
})
// that.setData({canvasBg:null});
CanvasDrag.clearCanvas();
that.setData({
graph: {
......
......@@ -58,7 +58,9 @@ Page({
erpStudentId: 0,
like_status: false,
likeSubmitting: false
likeSubmitting: false,
modalDeleteReview: false, //内容删除
errTip: '点评故事已被删除'
},
onLoad: function (options) {
this.innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
......@@ -77,7 +79,7 @@ Page({
sid,
id,
rid,
type
type,
})
}
app.getCurrentSchoolStudentId({
......@@ -93,7 +95,6 @@ Page({
},
onShow: function () {
},
onHide: function () {
this.innerAudioContext.pause();
......@@ -138,8 +139,14 @@ Page({
classroomdetailGet({
id: this.data.rid
}).then((res)=>{
const {code, data} = res;
if(code == 200){
const {code, data,msg} = res;
if(code == 40018){
this.setData({
modalDeleteReview: true,
errTip: '点评故事已被删除'
})
return
}else if(code == 200){
try {
let thisContent = JSON.parse(data.content);
data.content = thisContent;
......@@ -163,6 +170,12 @@ Page({
id: data.id,
school_id: data.school_id,
})
}else{
this.setData({
modalDeleteReview: true,
errTip: msg
})
return
}
}).catch((err)=>{
console.log(err)
......@@ -521,13 +534,14 @@ Page({
return
}
wx.navigateTo({
url: `/src/pages/growthrecord/index?consumerId=${dataset.like.student.id}&id=${this.data.id}&sid=${this.data.id}`
url: `/src/pages/growthrecord/index?consumerId=${dataset.like.student.id}&id=${this.data.id}&sid=${this.data.sid}`
})
},
generatelongimg(){
const {sid,id,rid,type} = this.data;
// role 1为b端,2为c端
wx.navigateTo({
url: `/src/pages/papersquare/classreviewshare?sid=${sid}&id=${id}&rid=${rid}&type=${type}`
url: `/src/pages/papersquare/classreviewshare?sid=${sid}&id=${id}&rid=${rid}&type=${type}&role=2`
})
},
backPage(){
......@@ -572,9 +586,12 @@ Page({
like_status = true;
likesList.push({
student:{
avatar: data.school_student.avatar || avatar
avatar: data.school_student.avatar || avatar,
id: data.school_student.id
},
id: data.id,
is_join_school: 1,
like_user_type: data.like_user_type
});
}
this.setData({
......@@ -601,5 +618,10 @@ Page({
needRefresh: true
})
}
},
bindIGet(){
wx.reLaunch({
url: '/ucenter/index'
})
}
})
\ No newline at end of file
......@@ -280,4 +280,15 @@
<comment-editor wx:if="{{commenteditor}}" prams="{{commentclock}}" bind:hidecommenteditor="hidecommenteditor" type="2c"></comment-editor>
</view>
<view class="modal-dialog" wx:if="{{modalDeleteReview}}">
<view class="modal-mask"></view>
<view class="modal-box">
<view class="modal-title">温馨提示</view>
<view class="modal-content">{{errTip}}</view>
<view class="modal-bottom">
<view class="modal-btn" bindtap="bindIGet">我知道了</view>
</view>
</view>
</view>
......@@ -485,4 +485,95 @@
.scoreshow {
color: #828E9C;
font-size: 26rpx;
}
.modal-dialog{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 99;
}
.modal-dialog .modal-mask{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0,0,0,.5);
z-index: 99;
}
.modal-dialog .modal-box{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
width: 600rpx;
height: 357rpx;
background:rgba(255,255,255,1);
border-radius: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
line-height: 1;
z-index: 100;
}
.modal-dialog .modal-box .modal-title{
font-size: 32rpx;
color: #000;
font-weight: bold;
text-align: center;
padding-top: 56rpx;
}
.modal-dialog .modal-box .modal-content{
padding: 0 24rpx;
display: flex;
align-items: center;
justify-content: center;
color: #4F4F4F;
font-size: 30rpx;
}
.modal-dialog .modal-box .modal-bottom{
width: 100%;
height: 96rpx;
display: flex;
position: relative;
}
.modal-dialog .modal-box .modal-bottom::before{
content: '';
width: 100%;
height: 1px;
background:rgba(0,0,0,.05);
position: absolute;
left: 0;
top: 0;
transform: scaleY(.5);
}
.modal-dialog .modal-box .modal-bottom .modal-btn{
flex: 1;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
font-size: 30rpx;
font-weight: bold;
color: #434343;
}
.modal-dialog .modal-box .modal-bottom .modal-btn.btn-red{
color: #FF5A5A;
}
.modal-dialog .modal-box .modal-bottom .modal-btn::after{
content: '';
width: 1px;
height:100%;
background:rgba(0,0,0,.05);
position: absolute;
right: 0;
top: 0;
transform: scaleX(.5);
}
.modal-dialog .modal-box .modal-bottom .modal-btn:last-of-type::after{
display: none;
}
\ No newline at end of file
This diff is collapsed.
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