Commit fd17ea9f authored by 张杰's avatar 张杰

优化

parent e1641e6d
var request = require('./request.js')
const app = getApp()
module.exports = {
queryStudentRecord(pageNumber, pageSize, studentId) {
......@@ -10,5 +10,16 @@ module.exports = {
studentId: studentId
}
return request.post('/wxsite/parents/queryStudentRecord.do', params)
},
changePassword(oldPassword, newPassword) {
var param = {
oldPassword: oldPassword,
newPassword: newPassword,
userId: app.globalData.login.user.id
}
return request.post('/wxsite/wxa/user/changePassword.do', param)
}
}
......@@ -239,7 +239,7 @@ function wx_getUserInfo() {
* @param decryptUserInfo 是否解密用户信息
* @return 用户信息,如果返回的 #member字段为空,说明当前粉丝没有绑定手机号, 还不是会员。
*/
module.exports.kg_login = function (decryptUserInfo = true, mobile) {
module.exports.kg_login = function (decryptUserInfo = true, mobile, psw) {
var self = this;
var loginCode = '';
return wx_login()
......@@ -257,6 +257,7 @@ module.exports.kg_login = function (decryptUserInfo = true, mobile) {
appid: APP_ID,
code: loginCode,
mobile: mobile,
password:psw,
encryptedUserInfo: encryptedUserInfo
};
return self.post('/wxsite/wxa/user/login.do', req);
......
......@@ -59,7 +59,7 @@ module.exports = {
return request.post('/wxsite/teacher/auditSignSummary.do?signSummaryId=' + signSummaryId)
},
// 添加、修改记录明细
setRecord(signSummaryId, recordList, pictureIds) {
setRecord(signSummaryId, recordList, pictureIds, remark, picRemark) {
var params = {
recordList: recordList
}
......@@ -67,7 +67,9 @@ module.exports = {
if (signSummaryId != null) {
params.pictureList = [{
signSummaryId: signSummaryId,
pictures: pictureIds.join(',')
pictures: pictureIds.join(','),
remark:remark,
pictureRemark: picRemark
}]
}
......
......@@ -3,10 +3,8 @@
"pages/login/index",
"pages/home/teacher/index",
"pages/home/reviewer/index",
"pages/home/sign/index",
"pages/reset_psw/index",
"pages/home/parents/index",
"pages/add_record/index",
"pages/review_student/index"
......
......@@ -45,12 +45,18 @@ Page({
eatRecord: [],
sleepRecord: [],
wcRecord: [],
// 如果是多个学生, 则不显示添加图片区域和备注
hidePhoto: false,
pictureIds: [],
pictureUrl: [],
//学生备注
remark:'',
//图片备注
picRemark: ''
},
//添加图片
addPicture: function(e) {
var that = this;
......@@ -109,6 +115,24 @@ Page({
urls: this.data.pictureUrl
})
},
remarkInput: function (e) {
console.log(e)
let inputValue = e.detail.value
this.setData({
remark: inputValue
})
},
picRemarkInput: function (e) {
console.log(e)
let inputValue = e.detail.value
this.setData({
picRemark: inputValue
})
},
//删除图片
deleteImg: function(e) {
......@@ -401,11 +425,16 @@ Page({
}
let signSummaryId = null
let remark = null
let picRemark = null
if (this.data.studentIds.length == 1) {
signSummaryId = arrRecordList[0].signSummaryId
remark = this.data.remark
picRemark = this.data.picRemark
}
req.setRecord(signSummaryId,arrRecordList,this.data.pictureIds).then(res => {
req.setRecord(signSummaryId,arrRecordList,this.data.pictureIds, remark, picRemark).then(res => {
wx.showToast({
title: '保存成功~',
duration: 1500
......@@ -421,6 +450,8 @@ Page({
onLoad: function(options) {
this.data.studentIds = JSON.parse(options.studentIds)
let remark = options.remark
let picRemark = options.picRemark
if (options.pictureIds != null) {
this.data.pictureIds = JSON.parse(options.pictureIds)
}
......@@ -429,7 +460,9 @@ Page({
this.data.pictureUrl.push(utils.handleImgShow(this.data.pictureIds[i]))
}
this.setData({
pictureUrl: this.data.pictureUrl
pictureUrl: this.data.pictureUrl,
remark: remark != null ? remark : '',
picRemark: picRemark != null? picRemark : ''
})
console.log(this.data.pictureIds)
......
......@@ -3,7 +3,7 @@
<view class='kg-separater ' style='height:2rpx;'></view>
<view class="segmentedControl">
<!-- 循环遍历 -->
<block wx:for="{{radioValues}}">
<block wx:for="{{radioValues}}" wx:key="{{item}}">
<text data-index="{{index}}" bindtap="indexChanged" class="{{clazz[index]}}">{{item.value}}</text>
</block>
</view>
......@@ -14,7 +14,7 @@
<template is="section_header" data="{{title:'分类'}}"></template>
<!-- 分类选项 -->
<view class="category">
<view wx:for="{{categorys}}">
<view wx:for="{{categorys}}" wx:key="{{item}}">
<view class="eat_category_btn {{typeIndex == index ? 'selected' : ''}}" bindtap='tapType' data-index='{{index}}'>
{{item}}
</view>
......@@ -23,34 +23,35 @@
<view class='kg-separater'></view>
<!-- 数量 -->
<view style='margin:20rpx'>
<view wx:for="{{eatRecord}}" wx:for-index="dietIndex">
<view wx:for="{{item.recordItems}}" wx:for-item="r">
<view wx:for="{{eatRecord}}" wx:for-index="dietIndex" wx:key="{{item.signSummaryId}}">
<view wx:for="{{item.recordItems}}" wx:for-item="r" wx:key="{{item.id}}">
<view class='kg-quantity-cell'>
<template is='quantity_cell' data="{{title:item.recordStudentName,type:r.cellType,unit:r.cellUnit, options: r.cellOptions, selectOptionIndex:r.optionIndex, cellIndex:dietIndex, inputValue:r.value}}"></template>
</view>
</view>
</view>
</view>
<view wx:if="{{!hidePhoto}}">
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
<view class='kg-separater'></view>
<template is="section_header" data="{{title:'今日拍照'}}"></template>
<view class='home-student-picture-item' style='padding-left:20rpx;padding-bottom:40rpx;'>
<!-- 选择的图片 -->
<view wx:for="{{pictureUrl}}">
<view wx:for="{{pictureUrl}}" wx:key="{{item}}">
<view class='add_picture_view'>
<image src='{{item}}' class='add_picture' catchtap='previewPic' data-index='{{index}}' mode='aspectFill'></image>
<image src='/src/img/cancel.png' class='delete' bindtap='deleteImg' data-index='{{index}}'></image>
</view>
</view>
<view wx:if="{{pictureUrl.length < 2}}">
<!-- 添加图片按钮 -->
<view class='add_picture_view' bindtap='addPicture'>
<image src='/src/img/take_photo.png' class='add_picture'></image>
</view>
<!-- 添加图片按钮 -->
<view class='add_picture_view' bindtap='addPicture'>
<image src='/src/img/take_photo.png' class='add_picture'></image>
</view>
</view>
</view>
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
</view>
</scroll-view>
......@@ -61,14 +62,35 @@
<!-- 滑动区域 -->
<scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx - 140rpx)' scroll-y='true'>
<view style='margin:20rpx'>
<view wx:for="{{sleepRecord}}" wx:for-index="dietIndex">
<view wx:for="{{item.recordItems}}" wx:for-item="r">
<view wx:for="{{sleepRecord}}" wx:for-index="dietIndex" wx:key="{{item.signSummaryId}}">
<view wx:for="{{item.recordItems}}" wx:for-item="r" wx:key="{{item.id}}">
<view class='kg-quantity-cell'>
<template is='quantity_cell' data="{{title:item.recordStudentName,type:r.cellType,unit:r.cellUnit, options: r.cellOptions, selectOptionIndex:r.optionIndex, cellIndex:dietIndex, inputValue:r.value}}"></template>
</view>
</view>
</view>
</view>
<view wx:if="{{!hidePhoto}}">
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
<view class='kg-separater'></view>
<template is="section_header" data="{{title:'今日拍照'}}"></template>
<view class='home-student-picture-item' style='padding-left:20rpx;padding-bottom:40rpx;'>
<!-- 选择的图片 -->
<view wx:for="{{pictureUrl}}" wx:key="{{item}}">
<view class='add_picture_view'>
<image src='{{item}}' class='add_picture' catchtap='previewPic' data-index='{{index}}' mode='aspectFill'></image>
<image src='/src/img/cancel.png' class='delete' bindtap='deleteImg' data-index='{{index}}'></image>
</view>
</view>
<view wx:if="{{pictureUrl.length < 2}}">
<!-- 添加图片按钮 -->
<view class='add_picture_view' bindtap='addPicture'>
<image src='/src/img/take_photo.png' class='add_picture'></image>
</view>
</view>
</view>
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
</view>
</scroll-view>
</view>
......@@ -76,7 +98,7 @@
<view hidden='{{controlIndex != 2}}'>
<scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx - 140rpx)' scroll-y='true'>
<view style='margin:20rpx'>
<view wx:for="{{wcRecord}}" wx:for-index="dietIndex">
<view wx:for="{{wcRecord}}" wx:for-index="dietIndex" wx:key="{{item.signSummaryId}}">
<!-- <view wx:for="{{item.recordItems}}" wx:for-item="r"> -->
<view class='kg-quantity-cell'>
<template is='quantity_cell' data="{{title:item.recordStudentName,type:item.cellType,unit:item.cellUnit, options: item.cellOptions, selectOptionIndex:item.optionIndex, cellIndex:dietIndex, inputValue:item.value}}"></template>
......@@ -85,6 +107,27 @@
</view>
</view>
</view>
<view wx:if="{{!hidePhoto}}">
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
<view class='kg-separater'></view>
<template is="section_header" data="{{title:'今日拍照'}}"></template>
<view class='home-student-picture-item' style='padding-left:20rpx;padding-bottom:40rpx;'>
<!-- 选择的图片 -->
<view wx:for="{{pictureUrl}}" wx:key="{{item}}">
<view class='add_picture_view'>
<image src='{{item}}' class='add_picture' catchtap='previewPic' data-index='{{index}}' mode='aspectFill'></image>
<image src='/src/img/cancel.png' class='delete' bindtap='deleteImg' data-index='{{index}}'></image>
</view>
</view>
<view wx:if="{{pictureUrl.length < 2}}">
<!-- 添加图片按钮 -->
<view class='add_picture_view' bindtap='addPicture'>
<image src='/src/img/take_photo.png' class='add_picture'></image>
</view>
</view>
</view>
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
</view>
</scroll-view>
</view>
......
......@@ -87,3 +87,12 @@
width: 60rpx;
height: 60rpx;
}
.add_remark {
height:200rpx;
width: auto;
margin:20rpx 16rpx;
background-color: #f1f1f1;
border-radius: 5px;
}
......@@ -16,10 +16,18 @@ Page({
pageSize: 15,
records: [],
recordTypes: app.globalData.recordTypes,
eatStates: app.globalData.eatStates
eatStates: app.globalData.eatStates,
rightIcon: '/src/img/xiugaimima.png'
},
changePwdTap: function(e) {
wx.navigateTo({
url: '/pages/reset_psw/index',
})
},
previewPic: function (e) {
var current = this.data.records[e.target.dataset.index].arrPic[e.target.dataset.picIndex]
wx.previewImage({
......@@ -46,7 +54,8 @@ Page({
let student = app.globalData.login.students[0]
var studentId = student.id
this.setData({
student:student
student:student,
userIcon: app.globalData.login.wxaUser.avatarUrl
})
request.queryStudentRecord(that.data.page, that.data.pageSize, studentId).then(res => {
......
......@@ -3,8 +3,11 @@
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-home-header kg-flex-row'>
<template is='userInfo' data="{{userImg:'/src/img/defaut_teacher_icon.png',title:student.name,subTitle:student.className,sex:'male'}}"></template>
<view></view>
<template is='userInfo' data="{{userImg:userIcon,title:student.name,subTitle:student.className,sex:'male'}}"></template>
<view class='home-header-roll-call' bindtap='changePwdTap'>
<image class='roll-call-image' src='{{rightIcon}}'></image>
<view class='roll-call-title'>修改密码</view>
</view>
</view>
<view class='kg-separater'></view>
......
......@@ -14,6 +14,7 @@ Page({
classList: [],
classId: "",
records: [],
userIcon: ""
},
......@@ -23,15 +24,16 @@ Page({
selectIndex: e.target.dataset.index,
classId: e.currentTarget.id
}),
this.querySignSummary()
this.querySignSummary()
},
tapStudent: function(e) {
let student = this.data.records[e.currentTarget.dataset.index]
wx.navigateTo({
url: '/pages/review_student/index?signSummaryId=' + student.id + '&pictureIds=' + JSON.stringify(student.arrIds)
url: '/pages/review_student/index?signSummaryId=' + student.id + '&pictureIds=' + JSON.stringify(student.arrIds) + '&remark=' + (student.remark ? student.remark : '') + '&picRemark=' + (student.pictureRemark ? student.pictureRemark : '') + '&studentName=' + student.signStudentName + '&sex=' + student.signStudentSex
})
},
......@@ -85,6 +87,7 @@ Page({
teacherId: app.globalData.login.user.id,
classList: app.globalData.login.classes,
reviewerName: app.globalData.login.user.name,
userIcon: app.globalData.login.wxaUser.avatarUrl
})
......
......@@ -3,7 +3,7 @@
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-home-header kg-flex-row'>
<template is='userInfo' data="{{userImg:'/src/img/defaut_teacher_icon.png',title:reviewerName,subTitle:kindergarten,sex:''}}"></template>
<template is='userInfo' data="{{userImg:userIcon,title:reviewerName,subTitle:kindergarten,sex:''}}"></template>
<view></view>
</view>
<view class='kg-separater'></view>
......@@ -20,21 +20,24 @@
</view>
<view class='home-student-info' wx:for="{{records}}" data-index='{{index}}' wx:key="id" id="{{item.id}}" bindtap='tapStudent'>
<!-- 名字 -->
<view class='home-student-name'>
<view class='kg-text-normal-dark'>{{item.signStudentName}}</view>
<template is="sex" data="{{sex:item.signStudentSex == '0' ? 'male' : 'female'}}"></template>
</view>
<view class='kg-flex-row' style='margin-right:30rpx;'>
<view class='home-student-name'>
<view class='kg-text-normal-dark'>{{item.signStudentName}}</view>
<template is="sex" data="{{sex:item.signStudentSex}}"></template>
</view>
<template is='imgTextView' data="{{img:'zhaopian',text:item.arrIds.length}}"></template>
</view>
<!-- 图片 -->
<view class='home-student-picture-item'>
<!-- <view class='home-student-picture-item'>
<view wx:for="{{item.arrPic}}" wx:for-item="picItem" wx:for-index="picIndex">
<image src='{{picItem}}' class='home-student-picture' catchtap='previewPic' data-index='{{index}}' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
</view>
</view>
</view> -->
<!-- 行为 -->
<view class='home-student-name' style='justify-content: space-between;margin:0rpx 30rpx;'>
<template is='imgTextView' data="{{img:'eat',text:item.eatCount ? item.eatCount : 0}}"> </template>
<template is='imgTextView' data="{{img:'sleep',text:item.sleepTotal }}"> </template>
<template is='imgTextView' data="{{img:'wc',text:item.wcCount }}"> </template>
<template is='imgTextView' data="{{img:'sleep',text:item.sleepTotal ? item.sleepTotal : 0 }}"> </template>
<template is='imgTextView' data="{{img:'wc',text:item.wcCount ? item.wcCount : 0 }}"> </template>
</view>
</view>
</scroll-view>
\ No newline at end of file
......@@ -9,7 +9,8 @@ Page({
*/
data: {
selectTags: {},
classId: ""
classId: "",
studentPaymentTypes: { 'nursery_all': '全托', 'nursery_morning': '上午托', 'nursery_afternoon': '下午托',}
},
......@@ -22,6 +23,8 @@ Page({
console.log(res)
for (var i = 0; i < res.length; i++) {
var record = res[i]
let paymentType = this.data.studentPaymentTypes[record.studentPaymentType]
record.name = record.name + ' (' + paymentType + ')'
//存在签到id,说明已经签到过,自动打勾
if (record.signSummaryId) {
this.data.selectTags[i] = true
......
......@@ -9,7 +9,7 @@ Page({
*/
data: {
signIcon: "/src/img/signin.png",
userIcon: "/src/img/defaut_teacher_icon.png",
userIcon: "",
records: [],
userName:'',
subTitle:'共0人'
......@@ -30,7 +30,7 @@ Page({
let index = e.currentTarget.dataset.index
let student = this.data.records[index]
wx.navigateTo({
url: '/pages/add_record/index?studentIds=' + JSON.stringify([student.id]) + '&pictureIds=' + JSON.stringify(student.arrIds),
url: '/pages/add_record/index?studentIds=' + JSON.stringify([student.id]) + '&pictureIds=' + JSON.stringify(student.arrIds) + '&remark=' + (student.remark ? student.remark : '') + '&picRemark=' + (student.pictureRemark ? student.pictureRemark : ''),
})
},
......@@ -66,6 +66,7 @@ Page({
onLoad: function(options) {
this.setData({
userName: app.globalData.login.user.userName,
userIcon: app.globalData.login.wxaUser.avatarUrl
})
},
......@@ -113,7 +114,6 @@ Page({
if (item.picture != null && item.picture != '') {
arrIds = item.picture.split(",")
for (var j = 0; j < arrIds.length; j++) {
let id = arrIds[j]
arrPic.push(utils.handleImgShow(id))
}
......@@ -121,7 +121,6 @@ Page({
console.log(arrPic)
item.arrIds = arrIds
item.arrPic = arrPic
}
this.setData({
records: res
......
......@@ -12,7 +12,7 @@
<!-- 滑动区域 -->
<scroll-view style='height:calc(100vh - 200rpx - 140rpx)' scroll-y='true'>
<template is="section_header" data="{{title:dateStr}}"></template>
<view wx:for="{{records}}">
<view wx:for="{{records}}" wx:key="{{item.id}}">
<view class='home-student-info' bindtap='tapCell' data-index='{{index}}'>
<!-- 名字 -->
<view class='kg-flex-row' style='margin-right:30rpx;'>
......
/* pages/home/teacher/index.wxss */
.home-header-roll-call {
width: 120rpx;
width: auto;
height: 80rpx;
display: flex;
flex-direction: row;
......
......@@ -8,7 +8,8 @@ Page({
* 页面的初始数据
*/
data: {
mobile: ''
mobile: '',
psw: ''
},
......@@ -16,6 +17,12 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let d = wx.getStorageSync('psw')
this.setData({
psw: wx.getStorageSync('psw'),
mobile: wx.getStorageSync('mobile')
})
},
......@@ -26,6 +33,12 @@ Page({
})
},
inputPSW: function(e) {
this.setData({
psw: e.detail.value
})
},
operateTap: function (event) {
let mobile = this.data.mobile
if (mobile.length == 0) {
......@@ -35,7 +48,26 @@ Page({
})
return
}
request.kg_login(true, mobile).then(res=>{
let psw = this.data.psw
if (psw.length == 0) {
wx.showToast({
title: '请输入密码',
icon: 'none'
})
return
}
request.kg_login(true, mobile, psw).then(res=>{
wx.setStorage({
key: 'psw',
data: psw,
})
wx.setStorage({
key: 'mobile',
data: mobile,
})
console.log(res)
app.globalData.login = res
//1是老师,2是家长
......@@ -65,7 +97,7 @@ Page({
}).catch(function (err) {
wx.showToast({
title: err.message,
title: err.message ? err.message : '网络错误',
icon: 'none',
duration: 2000
});
......
......@@ -2,9 +2,12 @@
<import src='/template/operate_btn/index.wxml'></import>
<view style='padding:16px;margin-top:50rpx;'>
<view class='kg-text-normal-gray'>手机号</view>
<input placeholder='请输入手机号登录' style='margin:30rpx 0rpx;' bindinput='inputAction'></input>
<input placeholder='请输入手机号登录' style='margin:30rpx 0rpx;' bindinput='inputAction' value='{{mobile}}'></input>
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-text-normal-gray'>密码</view>
<input placeholder='请输入手机号登录' style='margin:30rpx 0rpx;' bindinput='inputPSW' value='{{psw}}' password='true'></input>
<view class='kg-separater' style='height:2rpx;'></view>
</view>
<view class='kg-operate-btn-bg'>
<button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap' open-type='getUserInfo'>登录</button>
<button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap' open-type='getUserInfo' >登录</button>
</view>
\ No newline at end of file
// pages/reset_psw/index.js
const req = require('../../api/parrent.js')
Page({
/**
* 页面的初始数据
*/
data: {
oldPSW: '',
psw:''
},
inputPSW:function(e) {
console.log(e.detail.value)
this.setData({
psw: e.detail.value
})
},
inputOldPSW:function(e) {
console.log(e.detail.value)
this.setData({
oldPSW: e.detail.value
})
},
operateTap: function(e) {
req.changePassword(this.data.oldPSW, this.data.psw).then(res=>{
wx.showToast({
title: '修改成功, 下次登录请使用新密码',
duration: 1500
})
setTimeout(() => {
wx.navigateBack({
})
}, 1500)
}).catch(function (err) {
wx.showToast({
title: err.message ? err.message : '网络错误',
icon: 'none',
duration: 2000
});
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "修改密码"
}
\ No newline at end of file
<!--pages/reset_psw/index.wxml-->
<import src='/template/operate_btn/index.wxml'></import>
<view style='padding:16px;margin-top:50rpx;'>
<view class='kg-text-normal-gray'>旧密码</view>
<input placeholder='请输入旧密码' style='margin:30rpx 0rpx;' bindinput='inputOldPSW' ></input>
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-text-normal-gray'>新密码</view>
<input placeholder='请输入新密码' style='margin:30rpx 0rpx;' bindinput='inputPSW'></input>
<view class='kg-separater' style='height:2rpx;'></view>
</view>
<view class='kg-operate-btn-bg'>
<button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap' open-type='getUserInfo' >确认修改</button>
</view>
/* pages/reset_psw/index.wxss */
\ No newline at end of file
......@@ -29,7 +29,14 @@ Page({
"less": "少",
"normal": "正常",
"more": "多"
}
},
//学生备注
remark: '',
//图片备注
picRemark: '',
studentName: '',
kindergarten: '',
sex: ''
},
//加载详情
......@@ -104,6 +111,16 @@ Page({
},
previewPic: function (e) {
var current = this.data.arrPic[e.target.dataset.picIndex]
wx.previewImage({
current: current,
urls: this.data.arrPic
})
},
operateTap: function(e) {
this.auditSignSummary(this.data.signSummaryId)
},
......@@ -113,6 +130,15 @@ Page({
*/
onLoad: function(options) {
this.data.signSummaryId = options.signSummaryId;
let remark = options.remark
let picRemark = options.picRemark
this.setData({
remark: remark,
picRemark: picRemark,
studentName: options.studentName,
sex: options.sex
})
if (options.pictureIds != null) {
this.data.pictureIds = JSON.parse(options.pictureIds)
var arrPic = []
......
......@@ -3,7 +3,7 @@
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-home-header kg-flex-row'>
<template is='userInfo' data="{{userImg:'/src/img/defaut_teacher_icon.png',title:'审核老师',subTitle:'向日葵幼儿园',sex:'male'}}"></template>
<template is='userInfo' data="{{userImg:'/src/img/defaut_teacher_icon.png',title:studentName,subTitle:'',sex:sex}}"></template>
<view></view>
</view>
<view class='kg-separater'></view>
......@@ -49,6 +49,7 @@
<text class='kg-text-normal-gray'>{{wcItem.value}}次</text>
</view>
</view>
<text class='kg-text-normal-gray' style='margin-left:60rpx;'>{{remark}}</text>
<!-- 今日照片 -->
<template is='imgTextView' data="{{img:'today',text:'今日照片'}}"> </template>
......@@ -57,6 +58,8 @@
<image src='{{picItem}}' class='home-student-picture' catchtap='previewPic' data-index='{{index}}' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
</view>
</view>
<text class='kg-text-normal-gray' style='margin-left:60rpx;'>{{picRemark}}</text>
</view>
</scroll-view>
<template is="operate_btn" data="{{title:'通过'}}" wx:if="{{showAuditBtn}}"></template>
\ No newline at end of file
......@@ -27,13 +27,23 @@
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
"current": 0,
"list": [
{
"id": -1,
"name": "教师首页",
"pathName": "pages/home/teacher/index"
}
]
}
}
}
\ No newline at end of file
......@@ -32,7 +32,7 @@
<view wx:if="{{type == 'select'}}">
<!-- 选择型cell -->
<view class='kg-flex-row'>
<view wx:for="{{options}}" wx:for-index="optionIndex">
<view wx:for="{{options}}" wx:for-index="optionIndex" wx:key="{{item}}">
<view class="eat_category_btn {{selectOptionIndex == optionIndex ? 'selected' : ''}}" bindtap='quantityCellTap' data-optionIndex='{{optionIndex}}' data-cellIndex='{{cellIndex}}' style='width: 120rpx;margin-right: 0rpx;margin-bottom: 0rpx;margin-left:20rpx;'>{{item}}</view>
</view>
</view>
......
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