Commit cf843675 authored by wangxuelai's avatar wangxuelai

Merge remote-tracking branch 'origin/lvtz_clock' into wxl-user-optimize

parents e19fd2f7 97a76a69
...@@ -341,7 +341,6 @@ Page({ ...@@ -341,7 +341,6 @@ Page({
}, },
shortWordsList() { shortWordsList() {
shortWordsList({ shortWordsList({
// subject_id: this.data.tid,
school_id:this.data.sid school_id:this.data.sid
}).then((res) => { }).then((res) => {
if (res.data.list) { if (res.data.list) {
......
...@@ -20,6 +20,7 @@ var app = getApp(); ...@@ -20,6 +20,7 @@ var app = getApp();
import { import {
bOssAccess, bOssAccess,
} from '../../../service/common.js'; } from '../../../service/common.js';
import regexp from '../../../constants/regexp.js';
Page({ Page({
data: { data: {
editType: 1, editType: 1,
...@@ -195,30 +196,6 @@ Page({ ...@@ -195,30 +196,6 @@ Page({
saveLockPost() { saveLockPost() {
const that = this; const that = this;
const { params } = this.data const { params } = this.data
// if (params.title.trim() == '') {
// wx.showToast({
// title: '请输入模板名称',
// duration: 1500,
// icon: 'none',
// })
// return;
// }
// if (params.name.trim() == '') {
// wx.showToast({
// title: '请输入老师姓名',
// duration: 1500,
// icon: 'none',
// })
// return;
// }
// if (params.mobile == '' && params.img=='') {
// wx.showToast({
// title: '请添加手机号码或者上传微信二维码',
// duration: 1500,
// icon: 'none',
// })
// return;
// }
if (this.data.publishing) { if (this.data.publishing) {
return return
} }
......
...@@ -332,6 +332,15 @@ function bTokenExchange(data) { ...@@ -332,6 +332,15 @@ function bTokenExchange(data) {
needToken: true needToken: true
}) })
} }
function authLogin(data) {
return wxRequest({
url: apis.customer.common.bTokenExchange,
data,
method: 'POST',
errorresolve: 1,
})
}
function getVerifyCode(data) { function getVerifyCode(data) {
return wxRequest({ return wxRequest({
url: apis.getVerifyCode, url: apis.getVerifyCode,
...@@ -503,6 +512,7 @@ export { ...@@ -503,6 +512,7 @@ export {
getMember, getMember,
teacherPcLoginReport, teacherPcLoginReport,
bTokenExchange, bTokenExchange,
authLogin,
getVerifyCode, getVerifyCode,
getAccountList, getAccountList,
getMemberMe, getMemberMe,
......
...@@ -318,13 +318,13 @@ Page({ ...@@ -318,13 +318,13 @@ Page({
const clockdate = _activeDay.year + month + day; const clockdate = _activeDay.year + month + day;
let myBaseinfo = this.data.myBaseinfo; let myBaseinfo = this.data.myBaseinfo;
let initShareObj = { let initShareObj = {
title: `我正在参加${this.data.themeSelect.title}】的打卡`, title: `我正在参加打卡【${this.data.themeSelect.title}`,
path: `/src/pages/beforeinvitation/index?tid=${this.data.tid}&consumerId=${visitor && visitor.id || 0}&d=${clockdate.substr(2)}&w=${app.globalData.currentSchoolStudentId}` path: `/src/pages/calendarthemeindex/landpage?tid=${this.data.tid}&sid=${this.data.sid}&consumerId=${visitor && visitor.id || 0}&d=${clockdate.substr(2)}&w=${app.globalData.currentSchoolStudentId}`
} }
if (from == 'menu') { if (from == 'menu') {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({ app.setSharerLog({
source_path: 'src/pages/beforeinvitation/index', source_path: 'src/pages/calendarthemeindex/landpage',
source_id: this.data.tid, source_id: this.data.tid,
source_type_model: 5, source_type_model: 5,
param: JSON.stringify({ param: JSON.stringify({
...@@ -388,7 +388,7 @@ Page({ ...@@ -388,7 +388,7 @@ Page({
} }
}else{ }else{
app.setSharerLog({ app.setSharerLog({
source_path: 'src/pages/beforeinvitation/index', source_path: 'src/pages/calendarthemeindex/landpage',
source_id: this.data.tid, source_id: this.data.tid,
source_type_model: 5, source_type_model: 5,
param: JSON.stringify({ param: JSON.stringify({
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<view class="section clock-section"> <view class="section clock-section">
<view class="title">已打卡<text class="static">{{clockTotal + selfcount}}</text>人</view> <view class="title">已打卡<text class="static">{{clockTotal + selfcount}}</text>人</view>
<block wx:if="{{themeSelect.is_cheat == 0 || (themeSelect.is_cheat == 1 && activeDay.isClock) || (themeSelect.is_cheat == 1 && !isSchoolStudent) || (clockTotal + selfcount) == 0}}"> <block wx:if="{{themeSelect.is_cheat == 0 || (themeSelect.is_cheat == 1 && activeDay.isClock) || (themeSelect.is_cheat == 1 && isSchoolStudent)}}">
<view class="clock-list" wx:if="{{!emptyPage}}"> <view class="clock-list" wx:if="{{!emptyPage}}">
<block wx:for="{{clockList}}" wx:key="bigindex" wx:for-index="bigindex" wx:for-item="bigitem"> <block wx:for="{{clockList}}" wx:key="bigindex" wx:for-index="bigindex" wx:for-item="bigitem">
<view class="clock-item" wx:key="index" wx:for="{{bigitem}}"> <view class="clock-item" wx:key="index" wx:for="{{bigitem}}">
......
...@@ -245,10 +245,8 @@ Page({ ...@@ -245,10 +245,8 @@ Page({
let myBaseinfo = this.data.myBaseinfo; let myBaseinfo = this.data.myBaseinfo;
let shareObj = {}; let shareObj = {};
let initShareObj = { let initShareObj = {
title: `我正在参加【${this.data.themeSelect.title}】的打卡`, title: `我正在参加打卡【${this.data.themeSelect.title}】`,
path: `/src/pages/themeindex/landpage?&tid=${ path: `/src/pages/calendarindex/landpage?&tid=${this.data.tid}&sid=${this.data.sid}&consumerId=${(visitor && visitor.id) || 0}&w=${
this.data.tid
}&sid=${this.data.sid}&consumerId=${(visitor && visitor.id) || 0}&w=${
app.globalData.currentSchoolStudentId app.globalData.currentSchoolStudentId
}` }`
}; };
...@@ -258,9 +256,8 @@ Page({ ...@@ -258,9 +256,8 @@ Page({
source_type_model: 5, source_type_model: 5,
source_path: "src/pages/beforeinvitation/index", source_path: "src/pages/beforeinvitation/index",
source_id: this.data.tid, source_id: this.data.tid,
source_type_model: 5,
param: JSON.stringify({ param: JSON.stringify({
query: `tid=${this.data.tid}&consumerId=${(visitor && visitor.id) || query: `tid=${this.data.tid}&sid=${this.data.tid}&consumerId=${(visitor && visitor.id) ||
0}&w=${app.globalData.currentSchoolStudentId}` 0}&w=${app.globalData.currentSchoolStudentId}`
}) })
}); });
......
...@@ -459,7 +459,6 @@ Page({ ...@@ -459,7 +459,6 @@ Page({
content_100: data.content.length > 100 ? data.content.substr(0, 100) + '...' : data.content, content_100: data.content.length > 100 ? data.content.substr(0, 100) + '...' : data.content,
contentexpand: false contentexpand: false
}), }),
id: data.class_id,
sid: data.school_id, sid: data.school_id,
hasData: true, hasData: true,
// tid: data.subject_id // tid: data.subject_id
...@@ -476,16 +475,14 @@ Page({ ...@@ -476,16 +475,14 @@ Page({
type: 32, type: 32,
open_id: visitor1 && visitor1.openid, open_id: visitor1 && visitor1.openid,
school_id: data.school_id, school_id: data.school_id,
remark: '', remark: ''
class_id: data.class_id
}) })
if(this.data.isQrcodeIn){ if(this.data.isQrcodeIn){
activityLog({ activityLog({
type: 39, type: 39,
open_id: visitor1 && visitor1.openid, open_id: visitor1 && visitor1.openid,
school_id: data.school_id, school_id: data.school_id,
remark: '', remark: ''
class_id: data.class_id
}) })
} }
this.newLikeIndex(data.id, function (likeRes) { this.newLikeIndex(data.id, function (likeRes) {
...@@ -734,12 +731,12 @@ Page({ ...@@ -734,12 +731,12 @@ Page({
switch (this.data.clock.subject_type) { switch (this.data.clock.subject_type) {
case 1: case 1:
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/themeindex/index?tid=${this.data.tid}` url: `/src/pages/themeindex/landpage?tid=${this.data.tid}&sid=${this.data.sid}`
}) })
break; break;
case 2: case 2:
wx.redirectTo({ wx.redirectTo({
url: `/src/pages/calendarthemeindex/index?tid=${this.data.tid}` url: `/src/pages/calendarthemeindex/landpage?tid=${this.data.tid}&sid=${this.data.sid}`
}) })
break; break;
case 3: case 3:
...@@ -1641,7 +1638,7 @@ Page({ ...@@ -1641,7 +1638,7 @@ Page({
mobile: mobile, mobile: mobile,
school_id: this.data.sid, school_id: this.data.sid,
source_type: 1, source_type: 1,
custom:this.data.clock.class_id+'_'+this.data.clock.subject.subject_type+'-'+this.data.clock.subject.id, custom: this.data.clock.class_id+'_'+this.data.clock.subject.subject_type+'-'+this.data.clock.subject.id,
share_student_id: app.globalData.sharerStudentId || '', share_student_id: app.globalData.sharerStudentId || '',
}).then((res) => { }).then((res) => {
const { const {
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
<view class="right"> <view class="right">
<view class="title">{{clock.subject.title}}</view> <view class="title">{{clock.subject.title}}</view>
<view class="password-tips" wx:if="{{themeDetailData.join_rule_type == 2}}">密码加入</view> <view class="password-tips" wx:if="{{themeDetailData.join_rule_type == 3}}">密码加入</view>
<view class="line-item"> <view class="line-item">
<view class="num-box">1位好友参与</view> <view class="num-box">1位好友参与</view>
......
...@@ -284,7 +284,7 @@ Page({ ...@@ -284,7 +284,7 @@ Page({
} = e.currentTarget; } = e.currentTarget;
this.themeNoticeRead(theme); this.themeNoticeRead(theme);
if (theme.subject_type == 1) { if (theme.subject_type == 1) {
if (theme.is_join == 1) { if (theme.is_join != 1) {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/themeindex/index?&tid=${theme.id}&sid=${this.data.sid}` url: `/src/pages/themeindex/index?&tid=${theme.id}&sid=${this.data.sid}`
}); });
...@@ -294,7 +294,7 @@ Page({ ...@@ -294,7 +294,7 @@ Page({
}); });
} }
} else if (theme.subject_type == 2) { } else if (theme.subject_type == 2) {
if (theme.is_join == 1) { if (theme.is_join != 1) {
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/calendarthemeindex/index?&tid=${theme.id}&sid=${this.data.sid}` url: `/src/pages/calendarthemeindex/index?&tid=${theme.id}&sid=${this.data.sid}`
}); });
......
...@@ -358,18 +358,17 @@ Page({ ...@@ -358,18 +358,17 @@ Page({
let shareObj = { let shareObj = {
} }
let initShareObj = { let initShareObj = {
title: `我正在参加${this.data.circleInfo.title}】的打卡`, title: `我正在参加打卡【${this.data.themeSelect.title}`,
path: `/src/pages/beforeinvitation/index?tid=${this.data.tid}&consumerId=${visitor && visitor.id || 0}&w=${app.globalData.currentSchoolStudentId}` path: `/src/pages/themeindex/landpage?tid=${this.data.tid}&sid=${this.data.sid}&consumerId=${visitor && visitor.id || 0}&w=${app.globalData.currentSchoolStudentId}`
} }
if (from == 'menu') { if (from == 'menu') {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({ app.setSharerLog({
source_type_model: 5, source_type_model: 5,
source_path: 'src/pages/beforeinvitation/index', source_path: 'src/pages/themeindex/landpage',
source_id: this.data.tid, source_id: this.data.tid,
source_type_model: 5,
param: JSON.stringify({ param: JSON.stringify({
query: `tid=${this.data.tid}&consumerId=${visitor && visitor.id || 0}&w=${app.globalData.currentSchoolStudentId}` query: `tid=${this.data.tid}&sid=${this.data.sid}&consumerId=${visitor && visitor.id || 0}&w=${app.globalData.currentSchoolStudentId}`
}) })
}); });
} else if (from == 'button') { } else if (from == 'button') {
...@@ -429,11 +428,11 @@ Page({ ...@@ -429,11 +428,11 @@ Page({
} }
}else{ }else{
app.setSharerLog({ app.setSharerLog({
source_path: 'src/pages/beforeinvitation/index', source_path: 'src/pages/themeindex/landpage',
source_type_model: 5, source_type_model: 5,
source_id: this.data.tid, source_id: this.data.tid,
param: JSON.stringify({ param: JSON.stringify({
query: `tid=${this.data.tid}&consumerId=${visitor && visitor.id || 0}&w=${app.globalData.currentSchoolStudentId}` query: `tid=${this.data.tid}&sid=${this.data.sid}&consumerId=${visitor && visitor.id || 0}&w=${app.globalData.currentSchoolStudentId}`
}) })
}); });
shareObj = initShareObj; shareObj = initShareObj;
...@@ -442,7 +441,11 @@ Page({ ...@@ -442,7 +441,11 @@ Page({
return { return {
title: shareObj.title, title: shareObj.title,
path: shareObj.path path: shareObj.path,
imageUrl: imagify(
this.data.themeSelect.land_content.cover ||
"https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png"
),
} }
}, },
judgeIsSchoolStudent (sid) { judgeIsSchoolStudent (sid) {
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<view class="section clock-section"> <view class="section clock-section">
<view class="title">已打卡<text class="static">{{clockTotal + selfcount}}</text>人</view> <view class="title">已打卡<text class="static">{{clockTotal + selfcount}}</text>人</view>
<block wx:if="{{themeSelect.is_cheat == 0 || (themeSelect.is_cheat == 1 && isClock) || (themeSelect.is_cheat == 1 && !isSchoolStudent) || (clockTotal + selfcount) == 0}}"> <block wx:if="{{themeSelect.is_cheat == 0 || (themeSelect.is_cheat == 1 && isClock) || (themeSelect.is_cheat == 1 && isSchoolStudent) }}">
<view class="clock-list" wx:if="{{!emptyPage}}"> <view class="clock-list" wx:if="{{!emptyPage}}">
<block wx:for="{{clockList}}" wx:key="bigindex" wx:for-index="bigindex" wx:for-item="bigitem"> <block wx:for="{{clockList}}" wx:key="bigindex" wx:for-index="bigindex" wx:for-item="bigitem">
<view class="clock-item" wx:key="index" wx:for="{{bigitem}}"> <view class="clock-item" wx:key="index" wx:for="{{bigitem}}">
......
...@@ -96,7 +96,6 @@ page { ...@@ -96,7 +96,6 @@ page {
transform: translateY(-50%); transform: translateY(-50%);
} */ } */
.instro-box .media-box { .instro-box .media-box {
margin-top: -12rpx;
} }
/* 头部banner+介绍 end*/ /* 头部banner+介绍 end*/
......
...@@ -251,32 +251,27 @@ Page({ ...@@ -251,32 +251,27 @@ Page({
let myBaseinfo = this.data.myBaseinfo; let myBaseinfo = this.data.myBaseinfo;
let shareObj = {}; let shareObj = {};
let initShareObj = { let initShareObj = {
title: `我正在参加【${this.data.themeSelect.title}】的打卡`, title: `我正在参加打卡【${this.data.themeSelect.title}】`,
path: `/src/pages/themeindex/landpage?tid=${ path: `/src/pages/themeindex/landpage?tid=${this.data.tid}&sid=${this.data.sid}&consumerId=${(visitor && visitor.id) || 0}&w=${
this.data.tid
}&sid=${this.data.sid}&consumerId=${(visitor && visitor.id) || 0}&w=${
app.globalData.currentSchoolStudentId app.globalData.currentSchoolStudentId
}` }`
}; };
// if (from == "menu") {
shareObj = initShareObj; shareObj = initShareObj;
app.setSharerLog({ app.setSharerLog({
source_type_model: 5, source_type_model: 5,
source_path: "src/pages/beforeinvitation/index", source_path: "src/pages/themeindex/landpage",
source_id: this.data.tid, source_id: this.data.tid,
source_type_model: 5,
param: JSON.stringify({ param: JSON.stringify({
query: `tid=${this.data.tid}&consumerId=${(visitor && visitor.id) || query: `tid=${this.data.tid}&sid=${this.data.tid}&consumerId=${(visitor && visitor.id) ||
0}&w=${app.globalData.currentSchoolStudentId}` 0}&w=${app.globalData.currentSchoolStudentId}`
}) })
}); });
// }
console.log(shareObj); console.log(shareObj);
return { return {
title: shareObj.title, title: shareObj.title,
imageUrl: imagify( imageUrl: imagify(
this.data.themeSelect.banner || this.data.themeSelect.land_content.cover ||
"https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png" "https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png"
), ),
path: shareObj.path path: shareObj.path
......
...@@ -98,7 +98,6 @@ page { ...@@ -98,7 +98,6 @@ page {
transform: translateY(-50%); transform: translateY(-50%);
} */ } */
.instro-bx .media-box { .instro-bx .media-box {
margin-top: -12rpx;
} }
/* 头部banner+介绍 end*/ /* 头部banner+介绍 end*/
......
This diff is collapsed.
...@@ -120,25 +120,41 @@ ...@@ -120,25 +120,41 @@
<text class="desc"></text> <text class="desc"></text>
</view> </view>
<view class="menu-item" bindtap="loginToManager"> <!-- <view class="menu-item" bindtap="loginToManager">
<loginbtn loginCode="{{loginCode}}"/> <loginbtn loginCode="{{loginCode}}"/>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image> <image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image>
<text class="title">机构登录</text> <text class="title">机构登录</text>
<text class="desc">老师/校长在这里登录</text> <text class="desc">老师/校长在这里登录</text>
</view> -->
<view class="menu-item">
<loginbtn loginCode="{{loginCode}}"/>
<view class="menu-item-inner" bindtap="loginToManager" wx:if="{{ userInfo.mobile }}">
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image>
<text class="title">机构登录(新)</text>
<text class="desc">老师/校长在这里登录</text>
</view>
<button class="menu-item-inner" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:else>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image>
<text class="title">机构登录(新)</text>
<text class="desc">老师/校长在这里登录</text>
</button>
</view> </view>
<view class="menu-item" bindtap="loginToManager" wx:if="{{ storageUser && storageUser.token }}">
<!-- <view class="menu-item" bindtap="loginToManager" wx:if="{{ storageUser && storageUser.token }}">
<loginbtn loginCode="{{loginCode}}"/> <loginbtn loginCode="{{loginCode}}"/>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image> <image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image>
<text class="title">新登录</text> <text class="title">新登录</text>
<text class="desc"></text> <text class="desc"></text>
</view> </view>
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="menu-item" wx:else> <button class="menu-item" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:else>
<!-- <loginbtn loginCode="{{loginCode}}"/> --> <loginbtn loginCode="{{loginCode}}"/>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image> <image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image>
<text class="title">新登录</text> <text class="title">新登录</text>
<text class="desc"></text> <text class="desc"></text>
</button> </button> -->
<view class="menu-item" bindtap="loginToManagerWaitDel"> <view class="menu-item" bindtap="loginToManagerWaitDel">
<loginbtn loginCode="{{loginCode}}"/> <loginbtn loginCode="{{loginCode}}"/>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image> <image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image>
......
...@@ -363,4 +363,13 @@ page{ ...@@ -363,4 +363,13 @@ page{
font-weight: bold; font-weight: bold;
border-radius: 20rpx; border-radius: 20rpx;
margin: 14rpx 0; margin: 14rpx 0;
}
.menu-item-inner{
width:100%;
display:flex;
align-items:center;
flex-direction:column;
position:relative;
margin:0;
background:#fff;
} }
\ No newline at end of file
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