Commit 67e4f9ae authored by lvtz's avatar lvtz

fix

parents 8562684c 007be3fc
......@@ -66,25 +66,28 @@ Component({
ready() {},
methods: {
// 生成长图海报相关代码
generatelongimg() {
let page = '';
let scene = '';
switch (Number(this.data.clock.subject.subject_type)) {
case 1:
page = 'src/pages/themeindex/index';
scene = `i=${this.data.clock.class_id}&t=${this.data.clock.subject_id}`
break;
case 2:
page = 'src/pages/calendarthemeindex/index';
scene = `i=${this.data.clock.class_id}&t=${this.data.clock.subject_id}`
break;
case 3:
scene = `i=${this.data.clock.class_id}&t=${this.data.clock.unlock_mode_id}`
page = 'src/pages/morethemeindex/index';
break;
}
wx.navigateTo({
url: `/src/pages/clockdetail/shareclock?scene=${scene}&page=${page}&clockId=${this.data.clock.id}&tid=${this.data.tid}`
goClickShare(e) {
// let page = '';
// let scene = '';
// switch (Number(this.data.clock.subject.subject_type)) {
// case 1:
// page = 'src/pages/themeindex/index';
// scene = `i=${this.data.clock.class_id}&t=${this.data.clock.subject_id}`
// break;
// case 2:
// page = 'src/pages/calendarthemeindex/index';
// scene = `i=${this.data.clock.class_id}&t=${this.data.clock.subject_id}`
// break;
// case 3:
// scene = `i=${this.data.clock.class_id}&t=${this.data.clock.unlock_mode_id}`
// page = 'src/pages/morethemeindex/index';
// break;
// }
// wx.navigateTo({
// url: `/src/pages/clockdetail/shareclock?scene=${scene}&page=${page}&clockId=${this.data.clock.id}&tid=${this.data.tid}`
// })
this.triggerEvent('goClickShare', {
clock: this.data.clock
})
},
goCommentEditor(e) {
......
......@@ -279,7 +279,7 @@
<text class="location-address" selectable="false" space="false" decode="false">{{clock.location_address}}</text>
</view>
<view class="rightbtn clearfix" >
<view class="btn share-btn" bindtap="generatelongimg">
<view class="btn share-btn" bindtap="goClickShare">
<image class="iconimg" src="{{imageRoot}}2c/clockitem/sharewx.png?{{imageVersion}}" ></image>
<text class="btnname" selectable="false" space="false" decode="false">分享</text>
<!-- <button open-type="share" data-info="{{clock}}" class="share-button"></button> -->
......
// business/components/commentClockItemShare/index.js
var app = getApp();
import {
imagify,
LocalStorage
} from '../../../utilities/index.js';
Component({
/**
* 组件的属性列表
*/
properties: {
shareModalShow: {
type: Boolean,
value: false,
},
shareModalClass: {
type: Boolean,
value: false,
},
info: {
type: Object,
value: {},
},
},
/**
* 组件的初始数据
*/
data: {
imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion,
localImageRoot: '../../../images/'
},
/**
* 组件的方法列表
*/
methods: {
onShareAppMessage: function () { // return custom share data when user share.
const { info } = this.data;
const visitor = LocalStorage.getItem('visitor');
let tid = '';
switch (Number(info.subject.subject_type)) {
case 1:
tid = info.subject_id;
break;
case 2:
tid = info.subject_id;
break;
case 3:
tid = info.unlock_mode_id;
break;
}
let shareObj = {
title: `${info.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?id=${info.class_id}&tid=${tid}&cid=${info.id}&w=${app.globalData.currentSchoolStudentId}`
}
app.setSharerLog({
source_path: 'src/pages/clockdetail/newindex',
source_type_model: 4,
source_id: info.id,
param: JSON.stringify({
query: `id=${info.class_id}&tid=${tid}&cid=${info.id}&w=${app.globalData.currentSchoolStudentId}`
})
});
console.log(shareObj)
return {
title: shareObj.title,
path: shareObj.path,
}
},
closeShareModal() {
this.triggerEvent('closeShareModal')
},
goPoster(){
const{ info} = this.data;
let page = '';
let scene = '';
switch (Number(info.subject.subject_type)) {
case 1:
page = 'src/pages/themeindex/index';
scene = `i=${info.class_id}&t=${info.subject_id}`
break;
case 2:
page = 'src/pages/calendarthemeindex/index';
scene = `i=${info.class_id}&t=${info.subject_id}`
break;
case 3:
scene = `i=${info.class_id}&t=${info.unlock_mode_id}`
page = 'src/pages/morethemeindex/index';
break;
}
wx.navigateTo({
url: `/src/pages/clockdetail/shareclock?scene=${scene}&page=${page}&clockId=${info.id}&tid=${info.subject_id}`,
success:() =>{
this.triggerEvent('closeShareModal')
}
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--business/components/commentClockItemShare/index.wxml-->
<view class="modal {{shareModalClass? 'hide': ''}}" hidden="{{!shareModalShow}}">
<view class="mask" bindtap="closeShareModal"></view>
<view class="modal-content">
<view class="modal-share-wrap">
<view class="share-list">
<button class="share-item share-button" open-type="share" data-type="share_clock">
<image src="{{localImageRoot}}2b/themeindex/share_wx.png"></image>
<view class="share-item-name">分享给学生(或班级群)</view>
</button>
<view class="share-item" bindtap="goPoster">
<image src="{{localImageRoot}}2b/themeindex/share_poster.png"></image>
<view class="share-item-name">生成海报{{shareModalShow}}</view>
</view>
</view>
<view class="close-img" bindtap="closeShareModal">
<image src="{{localImageRoot}}2b/themeindex/close_icon.png"></image>
</view>
</view>
</view>
</view>
\ No newline at end of file
/* business/components/commentClockItemShare/index.wxss */
@keyframes modalhide {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes modalhide {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes modalmoveup {
from {
transform: translateY(100%);
}
to {
transform: translateY(0%);
}
}
@keyframes modalmovedown {
from {
transform: translateY(0);
}
to {
transform: translateY(100%);
}
}
.modal{
position: fixed;
width: 100%;
height: 100%;
background: rgba(0,0,0,.5);
top: 0;
left: 0;
z-index: 299;
line-height: 1;
animation: modalshow 0.2s linear;
}
.modal.hide{
animation: modalhide 0.2s linear forwards;
}
.modal .mask{
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.modal .modal-content{
position: fixed;
width: 100%;
left: 0;
bottom: 0;
background: #fff;
border-radius: 30rpx 30rpx 0 0;
z-index: 8;
animation: modalmoveup 0.2s linear forwards;
}
.modal.hide .modal-content{
animation: modalmovedown 0.2s linear forwards;
}
.modal .modal-content .modal-share-wrap {
height: 308rpx;
}
.modal .modal-content .modal-share-wrap .share-list {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 58rpx;
margin-bottom: 36rpx;
}
.modal .modal-content .modal-share-wrap .share-list .share-item {
flex: 1;
text-align: center;
}
.modal .modal-content .modal-share-wrap .share-list .share-item.share-button {
padding: 0;
border-radius: 0;
background-color: transparent;
line-height: 1;
}
.modal .modal-content .modal-share-wrap .share-list .share-item >image {
width: 112rpx;
height: 112rpx;
margin-bottom: 8rpx;
}
.modal .modal-content .modal-share-wrap .share-list .share-item .share-item-name {
font-size:22rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(102,102,102,1);
line-height:32rpx;
}
.modal .modal-content .modal-share-wrap .close-img {
width: 90rpx;
height: 100%;
margin: 0 auto;
text-align: center;
}
.modal .modal-content .modal-share-wrap .close-img >image {
width: 24rpx;
height: 24rpx;
}
\ No newline at end of file
......@@ -45,6 +45,11 @@ Page({
tid: 0,
cid: 0,
}
},
goShareClockItem: {
shareModalShow: false,
shareModalClass: false,
info: {}
}
},
......@@ -65,6 +70,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
this.newShare = this.selectComponent("#shareClockItem");
let dakarole = LocalStorage.getItem('dakarole');
if (dakarole == 1) {
this.setData({
......@@ -120,7 +126,16 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function (option) {
console.log(option)
const {
from,
target
} = option;
if (target.dataset.type == 'share_clock') {
this.newShare.onShareAppMessage()
return
}
return {
title: `${this.data.clock.school_student.nickname}的打卡详情`,
path: `/src/pages/clockdetail/newindex?tid=${this.data.tid}&cid=${this.data.clock.id}`
......@@ -656,4 +671,30 @@ Page({
})
},
// 跟录音相关的操作
// 分享弹框
goClickShare(e) {
const { clock } = e.detail;
this.setData({
goShareClockItem: {
shareModalShow: true,
shareModalClass: false,
info: { ...clock }
}
})
},
closeShareModal() {
this.setData({
"goShareClockItem.shareModalClass": true,
})
setTimeout(() => {
this.setData({
goShareClockItem: {
shareModalShow: false,
shareModalClass: false,
info: {}
}
})
}, 200)
}
})
\ No newline at end of file
......@@ -5,6 +5,7 @@
"comment-editor": "../../../components/commenteditor",
"btn-drag":"../../../components/btndrag",
"expiredTip": "../../components/expiredTip",
"commentClockItemShare": "../../components/commentClockItemShare",
"comment-editor-type-choose": "../../components/commentEditorTypeChoose"
}
}
\ No newline at end of file
......@@ -27,6 +27,7 @@
bind:playvideo="playvideo"
bind:showcommenteditor="showcommenteditor"
bind:goCommentEditor="goCommentEditor"
bind:goClickShare="goClickShare"
>
</clock-item>
<view class="submitbtn-box" >
......@@ -64,4 +65,11 @@
cid="{{goCommentEditorInfo.info.cid}}"
sid="{{goCommentEditorInfo.info.sid}}"
bind:hideChooseTypeDia="hideChooseTypeDia"
/>
<commentClockItemShare
id="shareClockItem"
info="{{goShareClockItem.info}}"
shareModalShow="{{goShareClockItem.shareModalShow}}"
bind:closeShareModal="closeShareModal"
shareModalClass="{{goShareClockItem.shareModalClass}}"
/>
\ No newline at end of file
......@@ -127,6 +127,13 @@ Page({
},
detailModalShow: false,
detailModalClass: false,
settingModalShow: false,
settingModalClass: false,
goShareClockItem: {
shareModalShow: false,
shareModalClass: false,
info: {}
}
},
onLoad: function(options) { // Do some initialize when page load.
const that = this;
......@@ -143,6 +150,7 @@ Page({
this.clockMemberListGet('init');
},
onReady: function() { // Do something when page ready.
this.newShare = this.selectComponent("#shareClockItem");
},
onShow: function() { // Do something when page show.
if(this.data.showRefresh || this.data.needRefresh){
......@@ -187,12 +195,17 @@ Page({
this.clockListGet(this.data.oneSmallSort, 'up')
},
onShareAppMessage: function (option) { // return custom share data when user share.
console.log(option)
const {
from,
target
} = option;
let shareObj = {
}
if (target.dataset.type == 'share_clock') {
this.newShare.onShareAppMessage()
return
}
if (from == 'menu') {
shareObj = this.data.shareObj;
......@@ -1139,6 +1152,7 @@ Page({
// 选择点评类型的代码
goCommentEditor (e) {
const { clock } = e.detail;
console.log(clock, 'clock')
this.setData({
goCommentEditorInfo: {
show: true,
......@@ -1260,5 +1274,60 @@ Page({
detailModalClass: false
})
}, 200)
},
// 跳转打卡数据
goClock(){
const { params } = this.data;
wx.navigateTo({
url: `/business/pages/themeindex/jobclockdata?subject_id=${params.id}&subject_type=${params.subject_type}&subject_title=${params.title}`,
})
},
handleClickSetting(){
this.setData({
settingModalShow: true,
})
},
closeSettingModal(){
this.setData({
settingModalClass: true,
})
setTimeout(() => {
this.setData({
settingModalClass: false,
settingModalShow: false
})
}, 200)
},
goMembers(){
const { params } = this.data;
wx.navigateTo({
url: `/business/pages/themeindex/members?subject_id=${params.id}&subject_type=${params.subject_type}&sid=${params.school_id}`,
})
},
// 分享弹框
goClickShare(e){
const { clock } = e.detail;
console.log(clock)
this.setData({
goShareClockItem: {
shareModalShow: true,
shareModalClass: false,
info: { ...clock}
}
})
},
closeShareModal(){
this.setData({
"goShareClockItem.shareModalClass": true,
})
setTimeout(() => {
this.setData({
goShareClockItem: {
shareModalShow: false,
shareModalClass: false,
info: { }
}
})
}, 200)
}
})
\ No newline at end of file
......@@ -11,6 +11,7 @@
"comment-editor": "../../../components/commenteditor",
"btn-drag":"../../../components/btndrag",
"expiredTip": "../../components/expiredTip",
"comment-editor-type-choose": "../../components/commentEditorTypeChoose"
"comment-editor-type-choose": "../../components/commentEditorTypeChoose",
"commentClockItemShare": "../../components/commentClockItemShare"
}
}
\ No newline at end of file
......@@ -25,7 +25,7 @@
<view class="top-detail" bindtap="goLoodDetail">查看详情</view>
</view>
</view>
<view class="greybox"></view>
<!-- <view class="greybox"></view>
<view class="card-middle-box">
<view class="clock-rate-box">
<view class="title-box">
......@@ -62,7 +62,7 @@
</block>
</view>
</view>
</view>
</view> -->
<view class="greybox"></view>
<view class="shift-box">
<view class="small-sort-item" data-onesmallsort="1" bindtap="onesmallsortselect">
......@@ -98,7 +98,7 @@
<view class="clock-item" wx:for="{{listItem}}" wx:key="index">
<clock-item clock="{{item}}" permission="{{permission}}" bind:clocksplacetop="clocksplacetop" bind:delClock="delClock" bind:expandAccessment="expandAccessment" bind:fingureUp="fingureUp" cindex="{{index}}" tid="{{tid}}" cid="{{id}}" bind:expandLikes="expandLikes"
bind:expandContent="expandContent" bind:delComments="delComments" bind:playvoice="playvoice" actionsPalyvalue="{{actPalyaudioValue}}" bind:pausevoice="pausevoice" bind:voiceslide="voiceslide" audioStorage="{{audioStorage}}" bind:slidestart="slidestart"
bind:slideend="slideend" bind:playvideo="playvideo" data-listindex="{{idx}}" data-index="{{index}}" bind:showcommenteditor="showcommenteditor" bind:goCommentEditor="goCommentEditor">
bind:slideend="slideend" bind:playvideo="playvideo" data-listindex="{{idx}}" data-index="{{index}}" bind:showcommenteditor="showcommenteditor" bind:goCommentEditor="goCommentEditor" bind:goClickShare="goClickShare">
</clock-item>
</view>
</view>
......@@ -144,16 +144,17 @@
</view>
</view>
<!-- 底部按钮 -->
<view class="fixed-tabbar" style="background-image: url('{{localImageRoot}}2b/themeindex/bottomTabbar.png')">
<!-- {{localImageRoot}}2b/themeindex/bottomTabbar.png?v=1') -->
<view class="fixed-tabbar" style="background-image: url('https://s1.ax1x.com/2020/03/23/8TVEIf.png?v=1')">
<view class="tabbar-list">
<view class="tabbar-item">
<view class="tabbar-item" bindtap="handleClickSetting">
<image class="tabbar-img" src="{{localImageRoot}}2b/themeindex/tabbar_setting.png"></image>
<text class="tabbar-text">高级设置</text>
</view>
<view class="tabbar-item">
<view class="tabbar-share">分享</view>
<button class="tabbar-share" open-type="share">分享</button>
</view>
<view class="tabbar-item">
<view class="tabbar-item" bindtap="goClock">
<image class="tabbar-img" src="{{localImageRoot}}2b/themeindex/tabbar_data.png"></image>
<text class="tabbar-text">打卡数据</text>
</view>
......@@ -169,10 +170,54 @@
<image src="{{localImageRoot}}2b/themeindex/close_icon.png"></image>
</view>
</view>
<view class="modal-wrap" wx:if="{{params.content.length > 0}}">
<view class="modal-detail-wrap" wx:if="{{params.content.length > 0}}">
<sjd-media-show content="{{params.content}}" noheight="{{true}}" bind:playvoice="playvoice" actionsPalyvalue="{{actPalyaudioValue}}" bind:pausevoice="pausevoice" bind:voiceslide="voiceslide" audioStorage="{{audioStorage}}" bind:slidestart="slidestart"
bind:slideend="slideend" expanded="{{false}}" expandeddefault='{{false}}' widthtext="{{false}}" text="" bind:playvideo="playvideo" defineheight="{{200}}">
</sjd-media-show>
</view>
</view>
</view>
\ No newline at end of file
</view>
<!-- 高级设置弹框 -->
<view class="modal {{settingModalClass? 'hide': ''}}" hidden="{{!settingModalShow}}">
<view class="mask" bindtap="closeSettingModal"></view>
<view class="modal-content">
<view class="modal-title">
高级设置
<view class="close-img" bindtap="closeSettingModal">
<image src="{{localImageRoot}}2b/themeindex/close_icon.png"></image>
</view>
</view>
<view class="modal-setting-wrap">
<view class="modal-setting-list">
<view class="modal-setting-item" bindtap="goMembers">
<view class="modal-setting-left">
<view class="setting-left-name">成员管理</view>
<view class="setting-left-tip">已打卡学生管理、点评老师管理</view>
</view>
<view class="modal-setting-right">
<image src="{{localImageRoot}}2b/themeindex/setting_right.png"></image>
</view>
</view>
<view class="modal-setting-item">
<view class="modal-setting-left">
<view class="setting-left-name">作业打卡设置</view>
<view class="setting-left-tip">作业内容、作业要求、参与打卡方式等设置</view>
</view>
<view class="modal-setting-right">
<image src="{{localImageRoot}}2b/themeindex/setting_right.png"></image>
</view>
</view>
<view class="modal-setting-item">
<view class="modal-setting-left">
<view class="setting-left-name">打卡营销页设置</view>
<view class="setting-left-tip">配置此页面后可在学生加入打卡前展示,此功能可收集有意向学生的联系方式。 <text class="setting-more-tip">了解更多</text></view>
</view>
<view class="modal-setting-right">
<image src="{{localImageRoot}}2b/themeindex/setting_right.png"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<commentClockItemShare id="shareClockItem" info="{{goShareClockItem.info}}" shareModalShow="{{goShareClockItem.shareModalShow}}" bind:closeShareModal="closeShareModal"shareModalClass="{{goShareClockItem.shareModalClass}}" />
\ No newline at end of file
......@@ -45,7 +45,7 @@
animation: btnscale 1s linear infinite forwards;
}
.theme-index-container {
background: #f2f2f2;
/* background: #f2f2f2; */
border-bottom: 1px solid transparent;
padding: 0 0 150rpx;
position: relative;
......@@ -77,7 +77,7 @@
border-radius:16rpx;
padding: 15rpx 20rpx;
margin-top: 16rpx;
height: 138rpx;
height: 140rpx;
}
.page-topbg .top-content .top-detail {
font-size:22rpx;
......@@ -543,7 +543,7 @@
background: rgba(0,0,0,.5);
top: 0;
left: 0;
z-index: 5;
z-index: 7;
line-height: 1;
animation: modalshow 0.2s linear;
}
......@@ -594,12 +594,55 @@
width: 24rpx;
height: 24rpx;
}
.modal .modal-content .modal-wrap {
.modal .modal-content .modal-detail-wrap {
max-height: 916rpx;
min-height: 916rpx;
overflow-y: scroll;
padding: 14rpx 20rpx;
}
.modal .modal-content .modal-setting-wrap {
height: 436rpx;
padding: 0 20rpx;
}
.modal .modal-content .modal-setting-wrap .modal-setting-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 26rpx 0;
}
.modal .modal-content .modal-setting-wrap .modal-setting-item:not(:last-child) {
border-bottom: 2rpx solid #F1F2F3;
}
.modal .modal-content .modal-setting-wrap .modal-setting-left {
width: 80%;
}
.modal .modal-content .modal-setting-wrap .modal-setting-left .setting-left-name {
font-size:26rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(34,34,34,1);
line-height:36rpx;
margin-bottom: 12rpx;
}
.modal .modal-content .modal-setting-wrap .modal-setting-left .setting-left-tip {
font-size:22rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(153,153,153,1);
line-height:32rpx;
}
.modal .modal-content .modal-setting-wrap .modal-setting-left .setting-left-tip .setting-more-tip {
color: #16B0FD;
font-size:22rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
line-height:32rpx;
}
.modal .modal-content .modal-setting-wrap .modal-setting-right>image {
width: 14rpx;
height: 24rpx;
}
.fixed-tabbar {
position: fixed;
bottom: 0;
......@@ -613,7 +656,6 @@
display: flex;
align-items: center;
height: 100rpx;
/* width: 66%; */
margin: 0 auto;
margin-top: 30rpx;
}
......@@ -623,27 +665,32 @@
align-items: center;
flex-direction: column;
height: 100rpx;
flex: 1;
}
.fixed-tabbar .tabbar-list .tabbar-item:nth-child(1) {
margin-left: 124rpx;
margin-left: 30rpx;
}
.fixed-tabbar .tabbar-list .tabbar-item:nth-child(3) {
margin-right: 30rpx;
}
.fixed-tabbar .tabbar-list .tabbar-item .tabbar-share {
width: 110rpx;
height: 110rpx;
width: 100rpx;
height: 100rpx;
background-color: #16B0FD;
border-radius: 50%;
font-size:30rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(255,255,255,1);
line-height:110rpx;
line-height:100rpx;
text-align: center;
margin: 0 124rpx 28rpx;
padding: 0;
margin-top: -15rpx;
}
.fixed-tabbar .tabbar-list .tabbar-item .tabbar-img {
width: 36rpx;
height: 36rpx;
margin-bottom: 6rpx;
margin: 6rpx 0;
}
.fixed-tabbar .tabbar-list .tabbar-item .tabbar-text {
font-size:18rpx;
......
images/2b/themeindex/bottomTabbar.png

1.21 KB | W: | H:

images/2b/themeindex/bottomTabbar.png

1.98 KB | W: | H:

images/2b/themeindex/bottomTabbar.png
images/2b/themeindex/bottomTabbar.png
images/2b/themeindex/bottomTabbar.png
images/2b/themeindex/bottomTabbar.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -111,6 +111,7 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function () {
console.log(this.data)
const visitor = LocalStorage.getItem('visitor');
let shareObj = {
title: `${this.data.clockDetail.school_student.nickname}的打卡详情`,
......
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