Commit 501bccef authored by 吴颖's avatar 吴颖

'test'

parents 5acda6d6 45165cbb
...@@ -58,7 +58,7 @@ App({ ...@@ -58,7 +58,7 @@ App({
codeChangeToken(code, cb) { codeChangeToken(code, cb) {
let that = this let that = this
wx.request({ wx.request({
url: 'https://wandoutiyu.test.xueyoubangedu.com/api/getsessionkey', url: 'https://wandoutiyu.xueyoubangedu.com/api/getsessionkey',
data: { data: {
code: code code: code
}, },
...@@ -87,7 +87,7 @@ App({ ...@@ -87,7 +87,7 @@ App({
wx.checkSession({ wx.checkSession({
success() { success() {
wx.request({ wx.request({
url: 'https://wandoutiyu.test.xueyoubangedu.com/api/saveinfo', url: 'https://wandoutiyu.xueyoubangedu.com/api/saveinfo',
data: { data: {
encryptedData: encodeURIComponent(info.encryptedData), encryptedData: encodeURIComponent(info.encryptedData),
iv: encodeURIComponent(info.iv), iv: encodeURIComponent(info.iv),
......
...@@ -7,13 +7,16 @@ Page({ ...@@ -7,13 +7,16 @@ Page({
status: false, status: false,
num: 0, num: 0,
arr: [], arr: [],
listArr : [],
badge_ids: [] badge_ids: []
}, },
onLoad: function (options) { onLoad: function (options) {
var arr1 = JSON.parse(options.listData) var arr1 = JSON.parse(options.listData)
this.setData({ this.setData({
arr: arr1 arr: arr1
}) })
console.log(arr1)
this.getList() this.getList()
}, },
getList() { getList() {
...@@ -23,20 +26,28 @@ Page({ ...@@ -23,20 +26,28 @@ Page({
let params = { let params = {
url: 'badges/all', url: 'badges/all',
callback: (data) => { callback: (data) => {
console.log(data)
wx.hideLoading() wx.hideLoading()
data.map((item, index) => { data.map((item, index) => {
Object.assign(item, { status: false }) // console.log(item)
item.list.map((item_a) => {
Object.assign(item_a, { status: false })
})
}); });
this.setData({ this.setData({
list: data list: data
}) })
console.log(this.data.list)
for (var i = 0; i < this.data.list.length; i++) { for (var i = 0; i < this.data.list.length; i++) {
for (var j = 0; j < this.data.arr.length; j++) { for(var a = 0; a < this.data.list[i].list.length; a++){
if (this.data.arr[j].id == this.data.list[i].id) { for (var j = 0; j < this.data.arr.length; j++) {
this.data.list[i].status = this.data.arr[j].status if (this.data.arr[j].id == this.data.list[i].list[a].id) {
this.data.list[i].list[a].status = this.data.arr[j].status
}
} }
} }
} }
console.log(this.data.list)
this.setData({ this.setData({
list: this.data.list list: this.data.list
}) })
...@@ -46,47 +57,37 @@ Page({ ...@@ -46,47 +57,37 @@ Page({
}, },
chooseOne: function (e) { chooseOne: function (e) {
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
var list = this.data.list; let parent_index = e.currentTarget.dataset.parent
if (list[index].status) { var listArr = this.data.list;
list[index].status = false if (listArr[parent_index].list[index].status) {
listArr[parent_index].list[index].status = false
} else { } else {
list[index].status = true listArr[parent_index].list[index].status = true
} }
//点击图片把status==true的组成新的数组 console.log(listArr)
// //点击图片把status==true的组成新的数组
var arr = []; var arr = [];
var badge_ids = []; var badge_ids = [];
for (var i = 0; i < list.length; i++) { for (var i = 0; i < listArr.length; i++) {
if (list[i].status == true) { for(var j = 0;j<listArr[i].list.length;j++){
arr.push(list[i]) if(listArr[i].list[j].status == true){
badge_ids.push(list[i].id) arr.push(listArr[i].list[j])
badge_ids.push(listArr[i].list[j].id)
}
} }
} }
this.setData({ this.setData({
list: list, list: listArr,
arr: arr, arr: arr,
badge_ids: badge_ids badge_ids: badge_ids
}) })
console.log(arr)
console.log(badge_ids) console.log(badge_ids)
var s = badge_ids.toString()
console.log(s)
}, },
save: function (e) { save: function (e) {
var pages = getCurrentPages(); var pages = getCurrentPages();
var prevPage = pages[pages.length - 2]; //上一个页面 var prevPage = pages[pages.length - 2]; //上一个页面
// if (this.data.arr.length == 0) {
// base.toast('请至少选择一个徽章')
// } else if (this.data.arr.length > 3) {
// base.toast('最多选择三个徽章')
// } else {
// prevPage.setData({
// arr: this.data.arr,
// badge_ids: this.data.badge_ids
// })
// wx.navigateBack({
// delta: 1
// })
// }
if (this.data.arr.length > 3) { if (this.data.arr.length > 3) {
base.toast('最多选择三个徽章') base.toast('最多选择三个徽章')
} else { } else {
......
<view> <view>
<view class="tip">提示:最多选择三个徽章</view> <view class="tip">提示:最多选择三个徽章</view>
<view class="top"> <view class="top">
<view class="title">运动大满贯</view> <block wx:for="{{list}}" wx:key='index' wx:for-item='item_a' wx:for-index='idx'>
<view class="imgbox flex-h flex-vc flex-hw"> <view class="title">{{item_a.name}}</view>
<view wx:for="{{list}}" wx:key='index' wx:for-item='item_a' data-index="{{index}}" bindtap="chooseOne" data-id="{{item_a.id}}"> <view class="imgbox flex-h flex-vc flex-hw">
<image wx:if="{{item_a.status}}" class="bigimg" src="{{item_a.icon_active}}"></image> <view wx:for="{{item_a.list}}" wx:key='index' data-index="{{index}}" data-parent="{{idx}}" bindtap="chooseOne" data-id="{{item.id}}">
<image wx:else class="bigimg" src="{{item_a.icon}}"></image> <image wx:if="{{item.status}}" class="bigimg" src="{{item.icon_active}}"></image>
<image wx:else class="bigimg" src="{{item.icon}}"></image>
</view>
</view> </view>
</view> </block>
</view> </view>
</view> </view>
<view class="button"> <view class="button">
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
<view class="cont"> <view class="cont">
<view class="item flex-h flex-vc flex-hb" wx:for="{{stuList}}" wx:key="index" data-id="{{item.id}}"> <view class="item flex-h flex-vc flex-hb" wx:for="{{stuList}}" wx:key="index" data-id="{{item.id}}">
<view class="flex-h flex-vc"> <view class="flex-h flex-vc">
<image src="/images/default_head.png" wx:if="{{item.child.thumb == null}}"></image> <image src="/images/default_head.png" wx:if="{{item.child.thumb == null}}" mode="aspectFill"></image>
<image src="{{item.child.thumb}}" wx:else></image> <image src="{{item.child.thumb}}" wx:else mode="aspectFill"></image>
<view> <view>
<view class="name">{{item.child.nick_name !=null ? item.child.nick_name : ''}}</view> <view class="name">{{item.child.nick_name !=null ? item.child.nick_name : ''}}</view>
<view class="big_name">{{item.child.child_name}}</view> <view class="big_name">{{item.child.child_name}}</view>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<image src="{{coach.thumb}}" wx:else mode="aspectFill"></image> <image src="{{coach.thumb}}" wx:else mode="aspectFill"></image>
<text class="name">{{coach.title}}</text> <text class="name">{{coach.title}}</text>
</view> </view>
<view class="teacher_right">{{coachcomment.class_comment}}</view> <text class="teacher_right">{{coachcomment.class_comment}}</text>
</view> </view>
</view> </view>
<view class="line" wx:if="{{coachcomment.comment_reply!='' && coachcomment.comment_reply!=null}}"></view> <view class="line" wx:if="{{coachcomment.comment_reply!='' && coachcomment.comment_reply!=null}}"></view>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<image src="{{coachcomment.child.wx_user.avatarurl}}" wx:else></image> <image src="{{coachcomment.child.wx_user.avatarurl}}" wx:else></image>
<text class="name">{{coachcomment.child.wx_user.nickname}}</text> <text class="name">{{coachcomment.child.wx_user.nickname}}</text>
</view> </view>
<view class="comments">{{coachcomment.comment_reply}}</view> <text class="comments">{{coachcomment.comment_reply}}</text>
</view> </view>
</view> </view>
<view class="one" wx:if="{{awardList.length > 0}}"> <view class="one" wx:if="{{awardList.length > 0}}">
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<text>{{item.updated_at}}</text> <text>{{item.updated_at}}</text>
</view> </view>
</view> </view>
<view class="comments">{{item.comment_reply}}</view> <text class="comments">{{item.comment_reply}}</text>
<view class="class"> <view class="class">
<view class="evaluation">{{item.course.sub_title}}</view> <view class="evaluation">{{item.course.sub_title}}</view>
<view class="row"> <view class="row">
......
...@@ -3,7 +3,6 @@ page{ ...@@ -3,7 +3,6 @@ page{
} }
.item{ .item{
width: 750rpx; width: 750rpx;
height: 454rpx;
background: #FFFFFF; background: #FFFFFF;
margin-top: 20rpx; margin-top: 20rpx;
padding: 30rpx; padding: 30rpx;
......
...@@ -176,6 +176,7 @@ Page({ ...@@ -176,6 +176,7 @@ Page({
type: 'POST', type: 'POST',
callback: (data) => { callback: (data) => {
base.toast('保存区域成功') base.toast('保存区域成功')
base.goBack(2)
} }
} }
base.newRequest(params) base.newRequest(params)
......
<view> <view>
<button class="save" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">申请成为教练</button> <view class="img">
<image src="https://wdty.xueyoubangedu.com/wandou/applycoach.jpg"></image>
</view>
<view class="btn">
<button class="save" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">申请成为教练</button>
</view>
</view> </view>
\ No newline at end of file
.save { .img {
position: absolute; width: 690rpx;
bottom: 33rpx; height: 2652rpx;
left: 50rpx; margin: 30rpx auto 300rpx;
right: 50rpx; }
width: 650rpx !important;
height: 80rpx !important; .img image {
line-height: 80rpx !important; width: 690rpx;
text-align: center; height: 2652rpx;
}
.btn {
width: 750rpx;
height: 116rpx;
padding: 18rpx 68rpx 20rpx;
position: fixed;
bottom: 0;
background: #FFFFFF;
}
.btn .save {
width: 620rpx;
height: 80rpx;
border: none;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%); background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 40rpx; border-radius: 40rpx;
font-size: 30rpx;
color: #000000; color: #000000;
padding: 0 !important; font-size: 30rpx;
text-align: center;
line-height: 50rpx;
} }
\ No newline at end of file
...@@ -57,7 +57,7 @@ Page({ ...@@ -57,7 +57,7 @@ Page({
}) })
}, },
fail() { fail() {
base.toast('上传失败,请重试') // base.toast('上传失败,请重试')
} }
}) })
}, },
......
<view class="loginBox"> <!-- <view class="loginBox">
<view class="logo-view"> <view class="logo-view">
<image src="/images/my/login.png"></image> <image src="/images/my/login.png"></image>
</view> </view>
...@@ -8,4 +8,23 @@ ...@@ -8,4 +8,23 @@
微信一键注册/登录 微信一键注册/登录
</button> </button>
<view class="desc">请登录查看更多内容</view> <view class="desc">请登录查看更多内容</view>
</view> </view> -->
\ No newline at end of file
<view class="pic">
<swiper indicator-dots="true" autoplay="true" style="width:690rpx;height:750rpx">
<swiper-item>
<image src="https://wdty.xueyoubangedu.com/wandou/firstopen1.png"></image>
</swiper-item>
<swiper-item>
<image src="https://wdty.xueyoubangedu.com/wandou/firstopen2.png"></image>
</swiper-item>
<swiper-item>
<image src="https://wdty.xueyoubangedu.com/wandou/firstopen3.png"></image>
</swiper-item>
<swiper-item>
<image src="https://wdty.xueyoubangedu.com/wandou/firstopen4.png"></image>
</swiper-item>
</swiper>
</view>
<button class="save" open-type="getUserInfo" bindgetuserinfo="userInfoHandler" catchtap="checkVisions">开始使用</button>
\ No newline at end of file
.loginBox { /* .loginBox {
padding-top: 174rpx; padding-top: 174rpx;
} }
...@@ -38,4 +38,30 @@ ...@@ -38,4 +38,30 @@
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
text-align: center; text-align: center;
} */
.pic{
width: 690rpx;
height: 750rpx;
margin: 100rpx 30rpx;
}
swiper-item image{
width: 100%;
height: 750rpx;
}
.save {
position: absolute;
bottom: 200rpx;
left: 50rpx;
right: 50rpx;
width: 650rpx !important;
height: 80rpx !important;
line-height: 80rpx !important;
text-align: center;
background: linear-gradient(-70deg, #FFC600 0%, #FFD400 100%);
border-radius: 40rpx;
font-size: 30rpx;
color: #000000;
padding: 0 !important;
} }
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</view> </view>
<view class="content1" wx:if="{{profitList.length > 0}}"> <view class="content1" wx:if="{{profitList.length > 0}}">
<view class="content1_head flex-h flex-vc"> <view class="content1_head flex-h flex-vc flex-hc">
<view style="width:30%">日期</view> <view style="width:30%">日期</view>
<view style="width:30%">结算金额</view> <view style="width:30%">结算金额</view>
<view style="width:40%">说明</view> <view style="width:40%">说明</view>
......
...@@ -205,6 +205,7 @@ ...@@ -205,6 +205,7 @@
font-size: 24rpx; font-size: 24rpx;
color: #333333; color: #333333;
padding: 0 10rpx; padding: 0 10rpx;
text-align: center;
} }
.content1_body { .content1_body {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
border-radius: 0; border-radius: 0;
overflow: hidden; overflow: hidden;
/* height: 220rpx; */ /* height: 220rpx; */
height: 560rpx; height: 640rpx;
} }
.heightBoard { .heightBoard {
height: auto; height: auto;
......
...@@ -3,8 +3,8 @@ var app = getApp() ...@@ -3,8 +3,8 @@ var app = getApp()
const qiniuUploader = require("./qiniuUploader.js"); const qiniuUploader = require("./qiniuUploader.js");
class Base { class Base {
constructor() { constructor() {
// this.baseUrl = 'https://wandoutiyu.xueyoubangedu.com/api/' //线上接口 this.baseUrl = 'https://wandoutiyu.xueyoubangedu.com/api/' //线上接口
this.baseUrl = 'https://wandoutiyu.test.xueyoubangedu.com/api/' //测试接口 // this.baseUrl = 'https://wandoutiyu.test.xueyoubangedu.com/api/' //测试接口
} }
newRequest(params, flag = false, tips = true) { newRequest(params, flag = false, tips = true) {
let that = this let that = this
......
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