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

'test'

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