Commit 90bbed1b authored by sujie@126.com's avatar sujie@126.com

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

parents c41f6ef7 29d6ec4d
......@@ -4,7 +4,8 @@ import {
} from '../../../utilities/index.js';
import {
getVerifyCode,
login
login,
loginByCode
} from '../../../service/business/loginregister.js';
import {
formIdCreate
......@@ -161,7 +162,7 @@ Page({
})
getVerifyCode({
mobile: that.data.params.mobile,
type: 4,
type: 5,
}).then((res) => {
const {code} = res;
that.setData({
......@@ -269,13 +270,23 @@ Page({
wx.showLoading({
title: '登录中...'
})
login({
mobile,
password:this.data.type?'':password,
verify_code:this.data.type?verify_code:'',
min_open_id: visitor && visitor.openid,
union_id: visitor && visitor.unionid,
}).then((res) => {
let ajax = null;
if(!this.data.type){
ajax = login({
mobile,
password,
min_open_id: visitor && visitor.openid,
union_id: visitor && visitor.unionid,
})
}else{
ajax = loginByCode({
mobile,
verify_code: this.data.type?verify_code:'',
min_open_id: visitor && visitor.openid,
union_id: visitor && visitor.unionid,
})
}
ajax.then((res) => {
const {code, data} = res;
that.setData({
submiting: false
......
......@@ -4,7 +4,7 @@ import {
} from '../../../utilities/index.js';
import {
getVerifyCode,
login
loginByCode
} from '../../../service/business/loginregister.js';
import {
formIdCreate
......@@ -131,7 +131,7 @@ Page({
})
getVerifyCode({
mobile: that.data.params.mobile,
type: 4,
type: 5,
}).then((res) => {
const { code } = res;
that.setData({
......@@ -215,7 +215,7 @@ Page({
wx.showLoading({
title: '登录中...'
})
login({
loginByCode({
mobile,
verify_code ,
min_open_id: visitor && visitor.openid,
......@@ -267,7 +267,6 @@ Page({
'Authorization': `bearer ${res2.data.token}`,
},
success(res4) {
console.log('list',res4.data.data)
if (res4.data.code != 200) { // 失败的处理
} else {
......@@ -276,15 +275,16 @@ Page({
invitationList: res4.data.data.inviate_teacher
},()=>{
if(that.data.invitationList.length==0){
wx.showModal({
title: '提示',
content: '加入成功,请重新登录',
showCancel: false,
confirmColor: '#65B8F4',
})
// wx.showModal({
// title: '提示',
// content: '加入成功,请重新登录',
// showCancel: false,
// confirmColor: '#65B8F4',
// })
}
})
// 弹框去加入
}else{
// 没有未处理的邀请
if (res3.data.data.total > 0 ){
......@@ -442,7 +442,7 @@ Page({
})
},
toJoin(e){
const {status,id,index} = e.currentTarget.dataset;
const {status,id,index,sid} = e.currentTarget.dataset;
let that = this;
let invitationList = that.data.invitationList
......@@ -464,6 +464,11 @@ Page({
that.setData({
invitationList: invitationList.filter(ele => ele.id != id)
})
if(that.data.invitationList.length==0){
wx.redirectTo({
url: `/business/pages/classservice/tindex?sid=${sid}`
})
}
}
})
}else{
......
......@@ -37,7 +37,7 @@
<view class="content">{{item.school.title}}</view>
<view class="button-box">
<view class="btn" bindtap="toJoin" data-status="3" data-id="{{item.id}}" data-index='{{index}}'>拒绝</view>
<view class="btn btn-primary" bindtap="toJoin" data-status="2" data-id="{{item.id}}" data-index='{{index}}'>加入</view>
<view class="btn btn-primary" bindtap="toJoin" data-status="2" data-id="{{item.id}}" data-index='{{index}}' data-sid="{{item.school_id}}">加入</view>
</view>
</view>
</view>
......
......@@ -423,6 +423,7 @@ const apis = {
loginregistermsg: { //改版登录注册获取验证码
login: `${constants.host2}/v2/api/service/user/login`, //登录
loginByCode: `${constants.host2}/v2/api/service/user/clock_login`, //登录即注册
forgetPassword: `${constants.host2}/v2/api/service/user/reset_password`, //忘记密码
register: `${constants.host2}/v2/api/service/user/register`, // 提交注册
verifyCode: `${constants.host2}/v2/api/service/user/verify_code`, //获取短信验证码
......
......@@ -109,7 +109,7 @@ WussComponent({
_downTime(){
clearInterval(this.downtimer);
this.downtimer = setInterval(() => {
// console.log('启动了毫秒的计时器');
console.log('启动了毫秒的计时器');
this.setData({
downTime:Number(this.data.downTime)-1>=0?(Number(this.data.downTime)-1>=10?Number(this.data.downTime)-1:'0'+(Number(this.data.downTime)-1)):99
})
......
......@@ -23,7 +23,7 @@
<view class="maohao" >:</view>
<view class="time" >{{timedate.s}}</view>
<view class="maohao" >:</view>
<view class="time" ><image class="" src="{{localImageRoot}}common/cutdown/detailCutd.gif" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" /></view>
<view class="time" ><image class="" src="{{imageRoot}}common/cutdown/detailCutd.gif" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" /></view>
</view>
<text class="wuss-class wuss-countdown" wx:if="{{!isRead}}">{{timeText}}</text>
\ No newline at end of file
......@@ -60,9 +60,24 @@ function login (data) {
},
})
}
function loginByCode (data) {
return wxRequest({
role: '2b',
url: apis.business.loginregistermsg.loginByCode,
data,
method: 'POST',
errorresolve: 2,
needToken: false,
header: {
'content-type':'application/x-www-form-urlencoded',
'Accept': '*/*',
},
})
}
export {
getVerifyCode,
registerPost,
forgetPassword,
login
login,
loginByCode
}
\ No newline at end of file
......@@ -3,14 +3,14 @@
<view class="blankclickarea" bindtap="goClockDetail" wx:if="{{type == 0}}"></view>
<image class="best-flag" src="{{imageRoot}}2b/common/jinx.png?x-oss-process=image/resize,w_200/format,jpg" mode="aspectFit|aspectFill|widthFix" lazy-load="true" wx:if="{{clock.place_top_at}}"></image>
<view class="sign-user-info" >
<view class="left-box" bindtap="goGrowthRecord">
<view class="left-box" bindtap="goGrowthRecord">
<!-- <form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form> -->
<image class="sign-user-avator" src="{{filter.imagify(clock.school_student.avatar, 'image/resize,w_160/format,jpg')}}" mode="aspectFit|aspectFill|widthFix" lazy-load="true" binderror="" bindload=""></image>
<view class="sign-user-name-box" >
<view class="sign-user-name" >{{clock.school_student.nickname}}</view>
<view class="sign-create-box" >
<image class="sign-user-avator" bindtap="goGrowthRecord" src="{{filter.imagify(clock.school_student.avatar, 'image/resize,w_160/format,jpg')}}" mode="aspectFit|aspectFill|widthFix" lazy-load="true" binderror="" bindload=""></image>
<view class="sign-user-name-box">
<view class="sign-user-name" bindtap="goGrowthRecord">{{clock.school_student.nickname}}</view>
<view class="sign-create-box" bindtap="goGrowthRecord">
<text class="sign-create-time" selectable="false" space="false" decode="false">{{filter.timeCompare(clock.created_at_time)}}</text>
<text class="sign-count" selectable="false" space="false" decode="false" wx:if="{{modeType==3}}">已闯{{clock.clock_days}}关</text>
<text class="sign-count" selectable="false" space="false" decode="false" wx:else>已坚持{{clock.clock_days}}天</text>
......
......@@ -35,7 +35,7 @@
display: flex;
display: -webkit-flex;
justify-content: space-between;
margin-bottom: 38rpx;
padding-bottom: 38rpx;
}
.sign-item .sign-user-info.single {
padding: 0 23rpx;
......
......@@ -311,7 +311,9 @@ Component({
})
},
fingureUp (e) {
clearTimeout(this.data.t);
if (this.data.t) {
clearTimeout(this.data.t);
}
this.data.t ='';
let type = 0;
if (this.data.clock.had_like == 1) {
......@@ -324,7 +326,7 @@ Component({
})
this.data.t = setTimeout(()=>{
this.fingureUpAjax(type);
},300)
},200)
},
fingureUpAjax(type){
const visitor = LocalStorage.getItem('visitor');
......@@ -405,9 +407,7 @@ Component({
url: `/src/pages/clockdetail/newindex?tid=${this.data.clock.subject_id}&cid=${this.data.clock.id}`,
})
}
},
goThemeIndex (e) {
const item = e.currentTarget.dataset.subject;
// if(item.subject_type == 2){
......
......@@ -3,17 +3,17 @@
<view class="blankclickarea" bindtap="goClockDetail" wx:if="{{type == 0 || othertype==1}}"></view>
<image class="best-flag" src="{{imageRoot}}2b/common/jinx.png?x-oss-process=image/resize,w_200/format,jpg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" wx:if="{{clock.place_top_at}}"></image>
<view class="sign-user-info">
<view class="left-box" bindtap="goGrowthRecord">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<view class="left-box">
<!-- <form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="sign-user-avator" src="{{filter.imagify(clock.school_student.avatar, 'image/resize,w_160/format,jpg')}}" ></image>
</form> -->
<image class="sign-user-avator" bindtap="goGrowthRecord" src="{{filter.imagify(clock.school_student.avatar, 'image/resize,w_160/format,jpg')}}" ></image>
<view class="sign-user-name-box">
<view class="sign-user-name">{{clock.school_student.nickname}}</view>
<view class="sign-user-name" bindtap="goGrowthRecord">{{clock.school_student.nickname}}</view>
<view class="sign-create-box">
<text class="sign-create-time" >{{filter.timeCompare(clock.created_at_time)}}</text>
<text class="sign-count" wx:if="{{modeType==3}}">已闯{{clock.clock_days}}关</text>
<text class="sign-count" wx:else>已坚持{{clock.clock_days}}天</text>
<text class="sign-create-time" bindtap="goGrowthRecord">{{filter.timeCompare(clock.created_at_time)}}</text>
<text class="sign-count" wx:if="{{modeType==3}}" bindtap="goGrowthRecord">已闯{{clock.clock_days}}关</text>
<text class="sign-count" wx:else bindtap="goGrowthRecord">已坚持{{clock.clock_days}}天</text>
</view>
</view>
</view>
......@@ -34,8 +34,8 @@
<text class="sign-item-content-text" wx:if="{{type == 1}}" selectable="true">{{clock.content}}</text>
<text class="sign-item-content-text" wx:if="{{type == 0}}" selectable="true">{{!clock.contentexpand ? clock.content_100 : clock.content}}</text>
</view>
<view class="expand-content {{type == 1 ? '' : 'pdl64'}}" bindtap="goClockDetail" wx:if="{{clock.content.length > 100 && (type == 0 || othertype==1)}}">
<text class="" >全文</text>
<view class="expand-content {{type == 1 ? '' : 'pdl64'}}" wx:if="{{clock.content.length > 100 && (type == 0 || othertype==1)}}">
<text class="" bindtap="goClockDetail">全文 </text>
</view>
<view class="mediacontent {{type == 1 ? '' : 'pdl64'}}" wx:if="{{clock.video_parse.length > 0 && (type == 0 &&type != 1 || othertype==1)}}">
<view class="mediabox clearfix" wx:if="{{clock.video_parse.length == 1}}">
......@@ -136,11 +136,9 @@
</view>
</view>
<view class="radio-box {{type == 1 ? '' : 'pdl64'}}" wx:if="{{clock.audio_parse.length > 0}}">
<view class="sjd-radio-box mb24" wx:for="{{clock.audio_parse}}" wx:for-item="audio" wx:key="index">
<view class="sjd-radio-box {{index == clock.audio_parse.length - 1 ? '' : 'mb24'}}" wx:for="{{clock.audio_parse}}" wx:for-item="audio" wx:key="index">
<view
class="play-btn"
data-value="{{audio.src}}"
data-index="{{index}}"
data-duration="{{audio.duration}}"
......
......@@ -100,15 +100,15 @@
font-weight:bold;
color:rgba(108,122,151,1);
letter-spacing: 2rpx;
width:400rpx;
max-width:400rpx;
word-break:break-all;
text-overflow: -o-ellipsis-lastline;
/* text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
-webkit-box-orient: vertical; */
line-height: 1.1;
}
.sign-item .sign-user-info .sign-user-name-box .sign-create-box{
......@@ -150,7 +150,7 @@
} */
.sign-item-content-text-box {
/* padding: 0 25rpx 24rpx 25rpx; */
margin-bottom: 30rpx;
padding-bottom: 30rpx;
position: relative;
z-index: 2;
}
......@@ -199,7 +199,7 @@
} */
.mediacontent {
margin-bottom: 30rpx;
padding-bottom: 30rpx;
position: relative;
z-index: 2;
}
......@@ -355,8 +355,8 @@
display: -webkit-flex;
align-items: flex-end;
justify-content: space-between;
margin-top: 40rpx;
margin-bottom: 20rpx;
/* margin-top: 40rpx; */
padding-bottom: 20rpx;
margin-left: 240rpx;
position: relative;
z-index: 2;
......@@ -520,10 +520,9 @@
}
.expand-content {
text-align: left;
margin-bottom: 36rpx;
/* padding: 0 25rpx 0 25rpx; */
/* padding-top: 25rpx;
padding-bottom: 25rpx; */
padding-bottom: 36rpx;
position: relative;
z-index: 2;
}
.expand-content text {
color: #ffd146;
......@@ -541,7 +540,7 @@
}
.radio-box {
/* padding: 0 25rpx 0 25rpx; */
margin-bottom: 30rpx;
padding-bottom: 30rpx;
position: relative;
z-index: 2;
}
......@@ -902,6 +901,7 @@
}
.sign-item .sjd-radio-box {
width: 618rpx;
/* padding-bottom: 24px; */
}
/* .border-b-14px {
border-bottom: 14rpx solid rgba(247,247,249,1);
......
......@@ -470,6 +470,7 @@ Page({
autoclosefeedback() {
setTimeout(() => {
this.setData({
integral: 0,
scoreFeedBackStatus: {
integral: 0,
show: false,
......
......@@ -430,8 +430,7 @@ Page({
tid: data.subject_id
}, () => {
this.queryActivtySchoolInfo(this.data.sid);
this.adInfoGet();
this.clockListGet()
// this.adInfoGet();
this.circleDetailGet(data.class_id)
this.randomstudents()
this.oddjobschools()
......@@ -1621,6 +1620,7 @@ Page({
this.setData({
noUserinfo: true
})
this.clockListGet();
}
if (code == 200) {
if (data) {
......@@ -1631,6 +1631,7 @@ Page({
this.setData({
noUserinfo: true
})
this.clockListGet();
}
}
}).then(() => {
......
......@@ -99,7 +99,6 @@
<view class="line-20" wx:if="{{noUserinfo}}">
</view>
<!-- <view class="introduce" style="padding-bottom: 120rpx" wx:if="{{noUserinfo}}"> -->
<view class="introduce" style="padding-bottom: 120rpx" wx:if="{{noUserinfo}}">
<view class="title">精选作业</view>
<view class="line-16"></view>
......
......@@ -59,7 +59,7 @@ Page({
imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion,
clockPage: 1,
clockPerPage: 5,
clockPerPage: 10,
hasmore: true,
clockList: [],
userInfo: {},
......@@ -794,7 +794,7 @@ Page({
default:
break;
}
if (that.data.clockList.length == 0) {
if (this.caculateArrLength(that.data.clockList)== 0) {
that.setData({
emptyPage: true
})
......
......@@ -120,9 +120,9 @@
</view>
</view>
<view class="sign-content" >
<block class="clock-list" wx:if="{{!emptyPage}}">
<block class="clock-item" wx:for="{{clockList}}" wx:key="bigindex" wx:for-index="bigindex" wx:for-item="bigitem" wx:if="{{clockList.length > 0}}">
<view class="" wx:key="index" wx:for="{{bigitem}}">
<view class="clock-list" wx:if="{{!emptyPage}}">
<block wx:for="{{clockList}}" wx:key="bigindex" wx:for-index="bigindex" wx:for-item="bigitem" wx:if="{{clockList.length > 0}}">
<view class="clock-item" wx:key="index" wx:for="{{bigitem}}">
<clock-item
clock="{{item}}"
bind:delClock="delClock"
......@@ -154,7 +154,7 @@
</block>
<list-loading loading="{{listLoading}}"></list-loading>
<sjdbottombar wx:if="{{!hasmore}}"></sjdbottombar>
</block>
</view>
<view class="empty-content-box" wx:if="{{emptyPage}}">
<empty-content text="暂无数据~" emptyimg="common/empty/empty_c_sraech.png" width="263" height="219"></empty-content>
</view>
......
......@@ -690,10 +690,10 @@ sjd-input-footer .sure{
} */
@import "../../../style/radio.wxss";
.clock-box .clock-item{
.clock-list .clock-item{
border-bottom: 15rpx solid #F7F7F9;
}
.clock-box .clock-item:last-of-type{
.clock-list .clock-item:last-of-type{
border-bottom: 0;
}
......
......@@ -422,6 +422,7 @@ Page({
autoclosefeedback () {
setTimeout(() => {
this.setData({
integral: 0,
scoreFeedBackStatus: {
integral: 0,
show: false,
......
......@@ -428,37 +428,33 @@ Page({
that.data.clockRecordIds = clockRecordIds;
that.setData({
clockList: [data.list],
}, () => {
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
that.data.clockPage += 1;
} else { // 没有更多了
that.setData({
hasmore: false
})
}
})
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
that.data.clockPage += 1;
} else { // 没有更多了
that.setData({
hasmore: false
})
}
break;
case 'down': // 页面下拉刷新
that.data.clockRecordIds = clockRecordIds;
that.setData({
clockList: [data.list]
}, () => {
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
that.data.clockPage +=1
} else { // 没有更多了
that.setData({
hasmore: false
})
}
})
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
that.data.clockPage +=1
} else { // 没有更多了
that.setData({
hasmore: false
})
}
wx.stopPullDownRefresh();
break;
case 'up': // 页面上拉刷新
// let list = that.data.clockList;
// let _list = list.concat(data.list);
that.data.clockRecordIds = clockRecordIds;
that.setData({
// clockList: _list,
[`clockList[${this.data.clockPage - 1}]`]: data.list,
})
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
......
......@@ -107,6 +107,7 @@
padding: 107rpx 28rpx 22rpx;
margin-top: 80rpx;
position: relative;
min-height: 340rpx;
}
.latest-honor .img-top{
width: 482rpx;
......@@ -139,6 +140,7 @@
}
.latest-honor .mediabox .imgbox .img{
width: 100%;
height: 100%;
}
.latest-honor .mediabox.stretch .imgbox{
width: 100%;
......@@ -205,6 +207,10 @@
.latest-honor .info-box .content .nickname{
font-weight: bold;
color: #6C7A97;
max-width: 250rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.latest-honor .info-box .content .insist-num{
font-size: 22rpx;
......@@ -512,4 +518,4 @@
border-bottom: 0;
}
/* @import "../../style/radio.wxss"; */
\ No newline at end of file
@import "../../style/radio.wxss";
\ No newline at end of file
......@@ -516,7 +516,7 @@ Page({
return
} else {
const pageName = this.data.pagefrom
wx.navigateTo({
wx.redirectTo({
url: `/src/pages/clockeditor/index?id=${this.data.id}&tid=${this.data.tid}&cid=0&pagefrom=${pageName}&clockdate=${this.data.clockdate}&sub=${this.data.sub}`
})
}
......
......@@ -398,45 +398,39 @@ Page({
case 'init': //页面进来第一次加载
that.setData({
clockList: [data.list]
}, () => {
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
this.data.clockPage += 1;
} else { // 没有更多了
this.setData({
clockhasmore: false
})
}
})
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
this.data.clockPage += 1;
} else { // 没有更多了
this.setData({
clockhasmore: false
})
}
break;
case 'down': // 页面下拉刷新
that.setData({
clockList: [data.list]
}, () => {
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
this.data.clockPage += 1
} else { // 没有更多了
this.setData({
clockhasmore: false
})
}
})
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
this.data.clockPage += 1
} else { // 没有更多了
this.setData({
clockhasmore: false
})
}
wx.stopPullDownRefresh();
break;
case 'up': // 页面上拉刷新
// let list = that.data.clockList;
// let _list = list.concat(data.list);
that.setData({
// clockList: _list,
[`clockList[${this.data.clockPage - 1}]`]: data.list,
}, () => {
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
this.data.clockPage += 1;
} else { // 没有更多了
this.setData({
clockhasmore: false
})
}
})
if (that.data.clockTotal > that.caculateArrLength(that.data.clockList)) {
this.data.clockPage += 1;
} else { // 没有更多了
this.setData({
clockhasmore: false
})
}
break;
default:
break;
......
......@@ -43,7 +43,7 @@
<button form-type="submit" class="createidbutton">
</button>
</form> </view>
<view class="btn right" bindtap="sure">确定<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<view class="btn right" bindtap="sure">确定<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">
</button>
</form> </view>
......
......@@ -173,7 +173,7 @@
font-size:30rpx;
font-family:PingFang-SC-Bold;
font-weight:bold;
position: relative;
}
.dailog-box .dailog-footer-box .right{
color:rgba(255,209,70,1);
......
......@@ -387,6 +387,7 @@ Page({
autoclosefeedback () {
setTimeout(() => {
this.setData({
integral: 0,
scoreFeedBackStatus: {
integral: 0,
show: false,
......@@ -1485,7 +1486,7 @@ Page({
}
return rankrecord({
page: 1,
perPage: 20,
perPage: 1,
school_id: this.data.themeSelect.school_id,
type: 1,
consumer_id: visitor && visitor.id,
......
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