作者 吴亚瑞

页面

// app.js
App({
onLaunch() {
// 展示本地存储能力
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
if (wx.canIUse('getUpdateManager')) {
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
console.log('onCheckForUpdate====', res)
// 请求完新版本信息的回调
if (res.hasUpdate) {
console.log('res.hasUpdate====')
updateManager.onUpdateReady(function () {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function (res) {
console.log('success====', res)
// res: {errMsg: "showModal: ok", cancel: false, confirm: true}
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function () {
// 新的版本下载失败
wx.showModal({
title: '已经有新版本了哟~',
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
})
})
}
})
}
},
/**
* 自定义post函数,返回Promise
* +-------------------
* @param {String} url 接口网址
* @param {arrayObject} data 要传的数组对象 like: {name: 'name', age: 32}
* +-------------------
* @return {Promise} promise 返回promise供后续操作
*/
post: function (url, data, type) {
wx.showNavigationBarLoading()
// wx.showLoading({
// title: '加载中',
// })
var promise = new Promise((resolve, reject) => {
let that = this;
let postData = data;
//网络请求
let header = {
'content-type': 'application/json',
'token': wx.getStorageSync('token') ? wx.getStorageSync('token') : ''
}
})
wx.request({
url: that.globalData.baseUrl + url,
data: postData,
method: type || "POST",
header: header,
success: function (res) {
//返回取得的数据
// console.log(res)
if (res.statusCode == 200) {
resolve(res.data);
} else {
// wx.showModal({
// title: '提示',
// content: res.data.msg,
// showCancel: false,
// })
reject(res.data)
}
// wx.hideLoading()
wx.hideNavigationBarLoading()
},
fail: function (e) {
console.log(e)
reject('网络出错');
// wx.hideLoading()
wx.hideNavigationBarLoading()
}
})
});
return promise;
},
globalData: {
baseUrl: "https://english.brofirst.cn/api/",
userInfo: null
}
})
\ No newline at end of file
})
\ No newline at end of file
... ...
... ... @@ -10,7 +10,6 @@
"pages/five/five",
"pages/six/six",
"pages/sever/sever",
"pages/nine/nine",
"pages/mission/mission",
"pages/question/question",
"pages/picture/picture",
... ... @@ -27,14 +26,11 @@
"pages/notice/notice",
"pages/task/task",
"pages/account/account",
"pages/trends/trends",
"pages/integral/integral",
"pages/record/record",
"pages/recordto/recordto",
"pages/requre/requre",
"pages/success/success",
"pages/end/end",
"pages/logs/logs"
"pages/end/end"
],
"window":{
"backgroundTextStyle":"light",
... ... @@ -51,12 +47,6 @@
"selectedIconPath": "/img/ic_tabar_home_s@2x.png"
},
{
"pagePath": "pages/eight/eight",
"text": "任务",
"iconPath": "/img/ic_mess@2x.png",
"selectedIconPath": "/img/ic_mess@2x.png"
},
{
"pagePath": "pages/sheet/sheet",
"text": "",
"iconPath": "img/3_1@2x.png",
... ...
... ... @@ -7,7 +7,8 @@
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
}
/**app.wxss**/
.container {
height: 100%;
... ... @@ -17,7 +18,7 @@
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
}
/**app.wxss**/
.container {
... ... @@ -28,20 +29,43 @@
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
page,view,text,swiper,swiper-item,image,navigator {
padding: 0;
margin: 0;
box-sizing: border-box;
}
page,
view,
text,
swiper,
swiper-item,
image,
navigator {
padding: 0;
margin: 0;
box-sizing: border-box;
}
/* 主题颜色通过变量来实现,less存在变量这个知识,原生的css和wxss也支持变量 */
page{
--themeColor:#eb4450 ;
page {
--themeColor: #eb4450;
}
/* 定义统一字体大小,如果设计稿大小是375px
1px=2rpx
14px=28rpx
实现字体大小的变化*/
page{
font-size: 28rpx;
/* page {
font-size: 28rpx;
} */
.fs28{
font-size: 28rpx;
}
.flex_between {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.flex{
display: flex;
align-items: center;
}
\ No newline at end of file
... ...
// componet/zujian.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
<view class="nav">
<image src="/img/ic_mess@2x.png"></image>
<image src="/img/Frame.png"></image>
</view>
<view class="title">一千零一夜阿拉伯民间故事集</view>
<view class="audio">
<text>00:02</text>
<view class="audio-0">
<view class="audio-1"></view>
</view>
<text>00:20</text>
</view>
.nav {
display: flex;
justify-content: space-between;
}
.nav image {
margin: 32rpx 18rpx;
width: 56rpx;
height: 56rpx;
}
.title {
font-size: 36rpx;
text-align: center;
font-weight: 600;
}
.audio {
padding: 32rpx;
display: flex;
margin-top: 54rpx;
justify-content: space-between;
}
.audio-0 {
padding: 0 20rpx;
}
.audio-1 {
width: 240px;
height: 13rpx;
margin-top: 10rpx;
background: #f8f8f8;
}
\ No newline at end of file
const app = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
show: Boolean, //显示隐藏
admin: String, // 账号
pwd: String, // 密码
},
data: {
password: true,
type: 'text',
admin: '', // 账号
pwd: '', // 密码
},
methods: {
// 事件(登录)
gototram() {
// this.triggerEvent('myevent')
let that = this
let params = {
username: that.data.admin,
password: that.data.pwd
}
console.log('33333', params)
app.post("login/Login", params).then(res => {
console.log(res)
if (res.code == 1) {
wx.showToast({
title: '登录成功',
icon: 'none'
})
that.triggerEvent('myevent')
wx.setStorageSync('token',res.data.token)
}
}).catch(err => {
wx.showToast({
title: err.msg,
icon: 'none'
})
})
},
// 账号
bindadmin(e) {
// console.log(e,'11')
// this.triggerEvent('bindadmin', e.detail.value)
this.setData({
admin: e.detail.value
})
},
//,密码
bindpassword(e) {
// this.triggerEvent('bindpassword', e.detail.value)
this.setData({
pwd: e.detail.value
})
},
// 关闭
closeMask() {
this.setData({
show: false
})
},
// 密码
gopassword() {
// console.log('111')
this.setData({
password: !this.data.password,
type: 'safe-password'
})
},
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {}
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!-- 登录 -->
<view class="mask" bindtap="closeMask" wx:if="{{show}}"></view>
<view class="denglu" wx:if="{{show}}">
<view class="deng1">
<image src="/img/ic_close@2x.png" bindtap="closeMask"></image>
</view>
<text>账号登录</text>
<view class="input">
<input type="text" placeholder="请输入账号" bindinput="bindadmin" value="{{admin}}" />
</view>
<view class="input">
<input type="{{type}}" placeholder="请输入密码" bindinput="bindpassword" value="{{pwd}}"/>
<image src="/img/ic_eye_s@2x.png" wx:if="{{password}}" bindtap="gopassword"></image>
<image src="/img/ic_eye_n@2x.png" wx:else bindtap="gopassword"></image>
</view>
<view class="button" bindtap="gototram">登录</view>
</view>
\ No newline at end of file
... ...
/* 登录 */
.mask{
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .6);
position: fixed;
top: 0;
left: 0;
}
.denglu {
position: fixed;
padding: 64rpx 32rpx;
top: 30%;
left: 50%;
transform: translateX(-50%);
text-align: center;
width: 622rpx;
height: 604rpx;
border-radius: 48rpx;
background: #fff;
}
.botm image {
position: fixed;
bottom: 0;
width: 100%;
}
.denglu text {
font-size: 36rpx;
font-weight: 600;
}
.input {
position: relative;
width: 558rpx;
height: 104rpx;
padding: 30rpx 32rpx;
border-radius: 110rpx;
margin-top: 32rpx;
text-align: left;
background: rgb(236, 235, 235);
}
.input image:first-child{
position: absolute;
right: 76rpx;
top: 16rpx;
width: 32rpx;
height: 32rpx;
}
.input image:last-child{
position: absolute;
right: 32rpx;
top: 32rpx;
width: 32rpx;
height: 32rpx;
z-index: 9999;
}
.deng1 image {
position: absolute;
top: 24rpx;
right: 24rpx;
width: 48rpx;
height: 48rpx;
}
.button{
position: absolute;
bottom: 20rpx;
left: 50%;
margin-left: -211rpx;
width: 422rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size:32rpx;
font-weight: 600;
border-radius: 96rpx;
background: rgba(255,200,61,1);
}
... ...
// componet-1/zujian1.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
time:[
'sun',
'Mon',
'web',
'thu',
'fri',
'sat'
]
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="top">
<view class="ttop">April</view>
<view class="top-0">
<view wx:for="{{time}}" wx:key="ids" class="top-1">{{item}}</view>
</view>
</view>
<view class="art"><image src="/img/51.jpg"></image></view>
/* componet-1/zujian1.wxss */
.top{
height: 148rpx;
text-align: center;
border-top: 1px solid rgb(224, 221, 221);
box-shadow: 5rpx 5rpx 5rpx rgba(0, 0, 0, .1);
}
.ttop{
height: 88rpx;
line-height: 88rpx;
font-weight: 600;
}
.top-0{
display: flex;
justify-content: space-around;
}
.art{
margin-top: 15rpx;
padding: 10rpx;
}
.art image{
border-radius: 45rpx;
height: 740rpx;
width: 100%;
}
\ No newline at end of file
... ... @@ -5,26 +5,49 @@ Page({
* 页面的初始数据
*/
data: {
content:'人文学院包括中文、历史、哲学3个系,有2个教育部批准成立的研究所:中国语言文学研究所、历史研究所;1个',
anniu:[
{
style:'rgba(255,200,61,1)',
name:'学院简介'
nav: 1,
anniu: [{
id: 1,
name: '学院简介'
},
{
style:'#f8f8f8',
name:'学院动态'
id: 2,
name: '学院动态'
},
{
style:'#f8f8f8',
name:'学长学姐信息'
id: 3,
name: '学长学姐信息'
},
],
content: '人文学院包括中文、历史、哲学3个系,有2个教育部批准成立的研究所:中国语言文学研究所、历史研究所;1个',
list: [{
id: 1,
name: '孔俊平',
class: '六(1)班',
hobby: '爱好:打球、看电影、玩游戏',
image: '../../img/99.png',
},
{
id: 1,
name: '孔俊平',
class: '六(1)班',
hobby: '爱好:打球、看电影、玩游戏',
image: '../../img/99.png',
}
]
},
gotoday(){
wx.redirectTo({
url: '/pages/trends/trends',
//分类
bindnav(e) {
console.log(e, '3333')
this.setData({
nav: e.currentTarget.dataset.id
})
},
/**
* 生命周期函数--监听页面加载
... ...
... ... @@ -5,17 +5,19 @@
<view class="nav-1">
<image src="/img/img_logo@2x.png"></image>
</view>
<view class="anniu" bindtap="gotoday">当前分数·500</view>
<view class="anniu fs28" >当前分数·500</view>
</view>
<view class="butm-0">
<view class="butm" wx:for="{{anniu}}" style="background:{{item.style}};">{{item.name}}</view>
<!-- 分类 -->
<view class="butm-0 fs28">
<view class="butm {{item.id==nav?'cy':''}}" wx:for="{{anniu}}" wx:key='key' bindtap="bindnav" data-id="{{item.id}}">
{{item.name}}</view>
</view>
<!-- 学院简介 -->
<view class="text">
<view class="text" wx:if="{{nav==1}}">
<rich-text nodes="{{content}}"></rich-text>
</view>
<!-- 学院动态 -->
<view class="box-stu" wx:for="{{art}}">
<view class="box-stu" wx:if="{{nav==2}}">
<view class="stu-1">
<view>与中英小学交流活动</view>
<text>2020-04-30</text>
... ... @@ -24,3 +26,12 @@
<image src="/img/7.jpg"></image>
</view>
</view>
<!-- 学姐学长信息 -->
<view class="sister_wrap flex_between" wx:if="{{nav==3}}">
<view class="sister" wx:for="{{list}}" wx:key='key'>
<image src="{{item.image}}"></image>
<view class="name">{{item.name}}</view>
<view class="aihao">{{item.class}}</view>
<view class="aihao">{{item.hobby}}</view>
</view>
</view>
\ No newline at end of file
... ...
.top image{
.top image {
width: 100%;
}
.nav{
.nav {
position: relative;
text-align:center;
text-align: center;
}
.nav-1 image{
.nav-1 image {
position: absolute;
left:44rpx;
top:-84rpx;
left: 44rpx;
top: -84rpx;
width: 168rpx;
height: 168rpx;
}
.anniu{
.anniu {
width: 258rpx;
height: 73rpx;
line-height: 73rpx;
... ... @@ -21,53 +24,102 @@
border-radius: 86rpx;
background: #f8f8f8;
}
.butm{
.cy {
background: #FFC83D;
color: #000000;
font-weight: 600;
}
.butm {
width: 170rpx;
height: 73rpx;
text-align: center;
line-height: 73rpx;
margin-top: 28rpx;
border-radius: 86rpx;
color: #8B8B8D;
}
.butm-0 .butm:last-child{
.butm-0 .butm:last-child {
width: 228rpx;
}
.butm-0{
.butm-0 {
margin: 48rpx 0rpx 44rpx;
display: flex;
margin-top: 48rpx;
justify-content: space-around;
}
/* 学院简介 */
.text{
font-size: 30rpx;
.text {
padding: 0 32rpx;
font-size: 30rpx;
line-height: 56rpx;
}
/* 学院动态 */
.box-stu{
.box-stu {
display: flex;
width: 670rpx;
height: 224rpx;
height: 224rpx;
border-radius: 32rpx;
margin: 72rpx auto;
padding:32rpx;
padding: 32rpx;
background: #f8f8f8;
justify-content: space-between;
}
.stu-1{
.stu-1 {
display: flex;
font-size: 32rpx;
font-weight: 600;
flex-direction: column;
justify-content: space-between;
}
.stu-1 text{
.stu-1 text {
font-size: 24rpx;
color: rgba(196,196,196,1);
color: rgba(196, 196, 196, 1);
}
.box-stu image{
.box-stu image {
width: 220rpx;
height: 136rpx;
border-radius: 16rpx;
}
}
/* */
.sister_wrap {
margin: 0 32rpx;
}
.sister {
margin-top: 44rpx;
width: 310rpx;
height: 310rpx;
border-radius: 32rpx;
background: rgba(248, 248, 248, 1);
text-align: center;
}
.sister image {
margin-top: -30rpx;
width: 136rpx;
height: 136rpx;
border-radius: 48rpx;
}
.name {
margin: 20rpx 0;
}
.aihao {
padding: 0 32rpx;
color: rgba(196, 196, 196, 1);
font-size: 24rpx;
font-weight: 400;
}
\ No newline at end of file
... ...
{
"usingComponents": {
"zujian1":"../../componets/zujian1"
},
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle":"black",
... ...
<zujian1></zujian1>
<view>日历组件</view>
<view class="line" wx:for="{{sbox}}" wx:key="id">
<view style="display:flex;flex:1;align-items:center">
<image src="{{item.img}}"></image>
<view>{{item.text}}</view>
</view>
<view bindtap="dianji" data-bool="{{item.bool}}" data-index="{{index}}">
<view class="{{item.bool?'buka':' buka yibuka'}}" bindtap="gotoday">{{item.bool?'打卡':'已打卡'}}</view>
</view>
... ...
// index.js
// 获取应用实例
// const app = getApp()
const app = getApp()
Page({
data: {
... ... @@ -9,32 +9,53 @@ Page({
"/img/lunbo.png",
"/img/lunbo.png"
],
box:[
{
num:2,
box_1:'分',
box_2:'阅读时长'
box: [{
num: 0,
box_1: '分',
box_2: '阅读时长'
},
{
num:500,
box_1:'个',
box_2:'阅读单词'
num: 0,
box_1: '个',
box_2: '阅读单词'
},
{
num:2,
box_1:'本',
box_2:'阅读英语书'
num: 0,
box_1: '本',
box_2: '阅读英语书'
}
]
],
admin: "", // 账号
pwd: "", //密码
login: false,
},
goToday(){
onShow() {
let token = wx.getStorageSync('token')
if (token == '') {
this.setData({
login: true
})
}
},
// 关闭
myevent() {
this.setData({
login: false
})
},
//
goToday() {
wx.navigateTo({
url: '/pages/first/first',
})
},
items_jf(){
bindRask() {
wx.navigateTo({
url: '/pages/integral/integral',
url: '/pages/eight/eight',
})
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"usingComponents": {
"login": "../../componets/login/login"
},
"navigationBarBackgroundColor": "#3a3942",
"navigationBarTextStyle":"white",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "B&C HOUSE"
}
\ No newline at end of file
... ...
<!-- 轮播图 -->
<view class="top">
<swiper class="swiper" autoplay="true" interval="3000" circular="true" indicator-dots="true" indicator-color="white">
<swiper-item wx:for="{{lunbo}}" wx:key='key'>
... ... @@ -5,6 +6,7 @@
</swiper-item>
</swiper>
</view>
<!-- 打卡领积分 -->
<view class="box">
<text class="title">您已坚持打卡-15天</text>
<view class="box-z">
... ... @@ -13,21 +15,18 @@
<view class="box-2">{{item.box_2}}</view>
</view>
</view>
<view class="box-end" bindtap="items_jf">打卡领积分</view>
<view class="box-end" bindtap="bindRask">打卡领积分</view>
</view>
<!-- <navigator url="/pages/first" open-type="switch-Tab"> -->
<view class="line" bindtap="goToday">
<view>
<image src="/img/ic_mess@2x.png"></image>
</view>
<view>今日任务</view>
<view>
<image src="/img/ic_arrow@2x.png"></image>
</view>
<!-- 今日任务 -->
<view class="line" bindtap="goToday">
<view>
<image src="/img/ic_mess@2x.png"></image>
</view>
<!-- </navigator> -->
<!-- <view class="footer">
<image src="/img/ic_tabar_my_s@2x.png"></image>
<image src="/img/ic_tabar_home_s@2x.png"></image>
</view> -->
\ No newline at end of file
<view>今日任务</view>
<view>
<image src="/img/ic_arrow@2x.png"></image>
</view>
</view>
<!--登录 -->
<login show="{{login}}" bindmyevent="myevent"></login>
\ No newline at end of file
... ...
... ... @@ -5,26 +5,33 @@ Page({
* 页面的初始数据
*/
data: {
mony:[
{
mon:'234'
},
{
mon:'234'
},
{
mon:'234'
},
{
mon:'234'
}
mony: [{
mon: '234'
},
{
mon: '234'
},
{
mon: '234'
},
{
mon: '234'
}
]
},
gotoday(){
//
gotoday() {
wx.redirectTo({
url: '/pages/record/record',
url: '/pages/record/record',
})
},
// 兑换
duihuan() {
wx.navigateTo({
url: '/pages/requre/requre',
})
},
/**
* 生命周期函数--监听页面加载
*/
... ...
... ... @@ -6,7 +6,7 @@
<view>500</view>
</view>
<view class="moon">
<view class="mony" wx:for="{{mony}}" >
<view class="mony" wx:for="{{mony}}" wx:key='key' >
<view>
<image src="/img/01.png"></image>
</view>
... ... @@ -16,7 +16,7 @@
<view class="mon-4"><image src="/img/ic_jifen@2x.png"></image>
<view>378</view>
</view>
<view class="mon-3">兑换</view>
<view class="mon-3" bindtap="duihuan">兑换</view>
</view>
</view>
</view>
... ...
// logs.js
const util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad() {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(log => {
return {
date: util.formatTime(new Date(log)),
timeStamp: log
}
})
})
}
})
{
"navigationBarTitleText": "查看启动日志",
"usingComponents": {}
}
\ No newline at end of file
<!--logs.wxml-->
<view class="container log-list">
<block wx:for="{{logs}}" wx:key="timeStamp" wx:for-item="log">
<text class="log-item">{{index + 1}}. {{log.date}}</text>
</block>
</view>
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}
... ... @@ -5,88 +5,76 @@ Page({
* 页面的初始数据
*/
data: {
list: [{
name: '头像',
line: '',
bool: true,
look: false,
mask: false,
id: 0,
},
{
name: '昵称',
line: 'Anne 》',
bool: false,
look: false,
id: 1,
mask: false
},
{
name: '所属班级',
bool: false,
look: false,
mask: false,
id: 2,
line: '二(1)班'
},
{
name: '修改密码',
bool: false,
look: false,
mask: false,
id: 3,
line: '》'
},
{
name: '退出登录',
bool: false,
look: true,
mask: false,
id: 4,
line: ''
},
]
show: false,
wordshow: false,
popshow: false,
},
gotoday(){
// wx.navigateTo({
// url: '/pages/petname/petname',
// })
wx.showToast({
title: '确定',
mask:true,
duration:2000
})
setTimeout(()=>{
wx.hideLoading({
success: (res) => {},
})
},2000)
gopop(e) {
console.log(e, '4444')
let id = e.currentTarget.dataset.id
if (id == 1) {
this.setData({
show: true,
popshow: true
})
} else {
this.setData({
wordshow: true,
popshow: true
})
}
},
openMask(e) {
var index = e.currentTarget.dataset.index;
if (index == 1) {
var mask = e.currentTarget.dataset.mask;
var lists = this.data.list
lists[index].mask = true;
goclose(e) {
let id = e.currentTarget.dataset.id
if (id == 1) {
this.setData({
mask: !mask
show: false,
popshow: false
})
} else if (index == 2) {
var mask = e.currentTarget.dataset.mask;
var index = e.currentTarget.dataset.index;
var lists = this.data.list
lists[index].mask = true;
} else {
this.setData({
mask: !this.data.mask
wordshow: false,
popshow: false
})
}
},
/**
* 生命周期函数--监听页面加载
*/
gotoday() {
wx.showToast({
title: '保存成功',
mask: true,
})
setTimeout(() => {
wx.navigateBack({
delta: 0
})
}, 1000)
},
onLoad: function (options) {
console.log(1)
},
/**
... ... @@ -95,7 +83,7 @@ Page({
onReady: function () {
console.log(2)
},
/**
* 生命周期函数--监听页面显示
*/
... ...
<view wx:for="{{list}}" class="means" bindtap="openMask" data-index="{{index}}">
<view class="name" wx:if="{{item.look==true}}" style="color:red;">{{item.name}}</view>
<view class="name" wx:elif="{{item.look==false}}">{{item.name}}</view>
<view wx:if="{{item.bool==true}}" class="img">
<image src="/img/ic_head@2x.png"></image></view>
<view wx:elif="{{item.bool==false}}">
{{item.line}}</view>
<view class="my_m_box" style="border-bottom: 1rpx solid #eeeeee;">
<view class="my_mb_text">头像</view>
<view class="flex">
<image class="my_mb_img" src="/img/ic_head@2x.png">
</image>
<image class="my_mb_next" src="/img/ic_arrow@2x.png"></image>
</view>
</view>
<view class="my_m_box" bindtap="gopop" data-id="{{1}}">
<view class="my_mb_text">昵称</view>
<view class="flex fs28">
<view>昵称</view>
<image class="my_mb_next" src="/img/ic_arrow@2x.png"></image>
</view>
</view>
<view class="my_m_box">
<view class="my_mb_text">所属班级</view>
<view class="flex fs28">
<view>所属班级</view>
<!-- <image class="my_mb_next" src="/img/ic_arrow@2x.png"></image> -->
</view>
</view>
<view class="my_m_box" bindtap="gopop">
<view class="my_mb_text">修改密码</view>
<view class="flex fs28">
<view>昵称</view>
<image class="my_mb_next" src="/img/ic_arrow@2x.png"></image>
</view>
</view>
<view class="my_m_box">
<view class="my_mb_text cy">退出登录</view>
</view>
<!-- 昵称框 -->
<view class="denglu" wx:if="{{mask}}">
<page-container show="{{popshow}}"></page-container>
<view class="denglu" style="height:476rpx" wx:if="{{show}}">
<view class="deng1">
<image src="/img/ic_close@2x.png"></image>
<image src="/img/ic_close@2x.png" bindtap="goclose" data-id="{{1}}"></image>
</view>
<text>修改昵称</text>
<view class="input">请输入昵称
<image src="/img/ic_close@2x.png"></image>
<view class="input">
<input type="text" placeholder="请输入昵称" />
</view>
<view class="button" bindtap="gotoday">确定</view>
</view>
<!-- 密码框 -->
<!-- <view class="denglu" wx:if="{{mask}}">
<view class="denglu" wx:if="{{wordshow}}">
<view class="deng1">
<image src="/img/ic_close@2x.png"></image>
<image src="/img/ic_close@2x.png" bindtap="goclose"></image>
</view>
<text>修改密码</text>
<view class="input">请输入旧密码</view>
<view class="input">请输入新密码</view>
<view class="input">请再次确认密码</view>
<view class="input">
<input type="text" placeholder="请输入旧密码" />
</view>
<view class="input">
<input type="text" placeholder="请输入新密码" />
</view>
<view class="input">
<input type="text" placeholder="请再次确认密码" />
</view>
<view class="button" bindtap="gotoday">保存</view>
</view> -->
</view>
\ No newline at end of file
... ...
.means {
/* */
.my_m_box {
margin: 0 32rpx;
padding: 48rpx 0;
background-color: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 32rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #eeeeee;
}
.name {
font-size: 32rpx;
.my_mb_text {
font-size: 30rpx;
font-weight: 600;
font-family: PingFang SC;
text-align: left;
color: #232323;
}
.img image {
width: 128rpx;
height: 128rpx;
vertical-align: middle;
.my_mb_img {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
}
.means:first-child {
height: 192rpx;
line-height: 192rpx;
border-top: 1px solid black;
}
/* 昵称框 */
.denglu {
position: absolute;
padding: 64rpx 32rpx;
top: 30%;
margin-top: -302rpx;
left: 50%;
text-align: center;
margin-left: -311rpx;
width: 622rpx;
height:476rpx;
border-radius: 48rpx;
background:rgb(221, 219, 191);
}
.botm image {
position: fixed;
bottom: 0;
width: 100%;
}
.denglu text {
font-size: 36rpx;
font-weight: 600;
.my_mb_next {
width: 32rpx;
height: 32rpx;
padding-left: 8rpx;
}
.input {
position: relative;
width: 558rpx;
height: 104rpx;
padding: 30rpx 32rpx;
border-radius: 110rpx;
margin-top: 32rpx;
text-align: left;
background: rgba(248, 248, 248, 1);
color: rgba(196, 196, 196, 1);
.cy {
color: #F44D36;
}
.deng1 image {
position: absolute;
top: 36rpx;
right: 24rpx;
width: 48rpx;
height: 48rpx;
}
.input image{
position: absolute;
background:#f0e8e8;
border-radius:16rpx;
right: 32rpx;
top:32rpx;
width: 32rpx;
height: 32rpx;
}
.button{
position: absolute;
bottom: 64rpx;
left: 50%;
margin-left: -211rpx;
width: 422rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size:32rpx;
font-weight: 600;
border-radius: 96rpx;
background: rgba(255,200,61,1);
}
/* .denglu {
/* 昵称框 */
.denglu {
position: absolute;
padding: 64rpx 32rpx;
top: 30%;
top: 60%;
margin-top: -302rpx;
left: 50%;
text-align: center;
margin-left: -311rpx;
text-align: center;
width: 622rpx;
height:732rpx;
height: 732rpx;
border-radius: 48rpx;
background:rgb(221, 219, 191);
background: rgb(221, 219, 191);
z-index: 9999;
}
.botm image {
... ... @@ -123,7 +73,7 @@
margin-top: 32rpx;
text-align: left;
background: rgba(248, 248, 248, 1);
color: rgba(196, 196, 196, 1);
/* color: rgba(196, 196, 196, 1); */
}
.deng1 image {
... ... @@ -133,16 +83,18 @@
width: 48rpx;
height: 48rpx;
}
.input image{
.input image {
position: absolute;
background:#f0e8e8;
border-radius:16rpx;
background: #f0e8e8;
border-radius: 16rpx;
right: 32rpx;
top:32rpx;
top: 32rpx;
width: 32rpx;
height: 32rpx;
}
.button{
.button {
position: absolute;
bottom: 64rpx;
left: 50%;
... ... @@ -151,8 +103,8 @@
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size:32rpx;
font-size: 32rpx;
font-weight: 600;
border-radius: 96rpx;
background: rgba(255,200,61,1);
} */
\ No newline at end of file
background: rgba(255, 200, 61, 1);
}
\ No newline at end of file
... ...
// pages/nine/nine.js
Page({
/**
* 页面的初始数据
*/
data: {
sbox:[
{
img:'/img/ic_date_dangri@2x.png',
text:'当日任务',
bool:true
},
{
img:'/img/ic_date_dangri@2x.png',
text:'测评任务',
bool:false
},
{
img:'/img/ic_date_dangri@2x.png',
text:'比赛任务',
bool:false
}
]
},
gotoday(){
wx.redirectTo({
url: '/pages/mission/mission',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {
"zujian1":"../../componets/zujian1"
},
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle":"black",
"navigationBarTitleText": "B&C HOUSE"
}
\ No newline at end of file
<zujian1></zujian1>
<view class="line" wx:for="{{sbox}}" wx:key="id">
<view style="display:flex;flex:1;align-items:center">
<image src="{{item.img}}"></image>
<view>{{item.text}}</view>
</view>
<view wx:if="{{item.bool===true}}">
<view class="buka" bindtap="gotoday">已打卡</view>
</view>
</view>
\ No newline at end of file
page {
background: #f8f8f8;
}
.line {
/* position: relative; */
display: flex;
width: 686rpx;
font-size: 36rpx;
font-weight: 600;
line-height: 144rpx;
background: #ffffff;
margin: 0 auto;
margin-top: 24rpx;
border-radius: 32rpx;
align-items: center;
}
.line view:first-child {
padding: 0 32rpx;
}
.line image {
width: 80rpx;
height: 80rpx;
vertical-align: middle;
margin-right: 20rpx;
}
.buka {
font-size: 24rpx;
width: 140rpx;
height: 56rpx;
margin-right: 20rpx;
border-radius: 60rpx;
color:rgba(196,196,196,1);
background: #ebebeb;
text-align: center;
line-height: 56rpx;
}
\ No newline at end of file
... ... @@ -5,6 +5,8 @@ Page({
* 页面的初始数据
*/
data: {
nav: 1,
linet: [{
line: '分享微信',
go: '+10'
... ... @@ -19,9 +21,11 @@ Page({
}
]
},
gotoday(){
wx.redirectTo({
url: '/pages/recordto/recordto',
// 任务栏
bindNav(e) {
var nav = e.currentTarget.dataset.nav
this.setData({
nav
})
},
/**
... ...
<view class="top">
<text>积分收入</text>
<text bindtap="gotoday">积分支出</text>
<view class="navbar">
<view class="item {{nav==1?'choose':''}}" bindtap="bindNav" data-nav="{{1}}">我的一级伙伴</view>
<view class="item {{nav==2?'choose':''}}" bindtap="bindNav" data-nav="{{2}}">我的二级伙伴</view>
</view>
<view class="daohang"></view>
<view class="linet" wx:for="{{linet}}">
<view class="lin-1">
<text>{{item.line}}</text>
<view>11月13日 17:00</view>
<view wx:if="{{nav==1}}">
<view class="linet" wx:for="{{linet}}" wx:key='key'>
<view class="lin-1">
<text>{{item.line}}</text>
<view>11月13日 17:00</view>
</view>
<view>{{item.go}}</view>
</view>
</view>
<view wx:if="{{nav==2}}">
<view class="linet" wx:for="{{linet}}" wx:key='key'>
<view class="lin-1">
<text>{{item.line}}</text>
<view>11</view>
</view>
<view>{{item.go}}</view>
</view>
<view>{{item.go}}</view>
</view>
\ No newline at end of file
... ...
.top{
display: flex;
font-size: 28rpx;
font-weight: 600;
padding: 24rpx;
justify-content: space-around;
page{
padding:32rpx;
}
.daohang{
/* */
/* 任务栏开始 */
.navbar {
height: 88rpx;
margin: 0 32rpx;
/* margin-top: 40rpx; */
display: flex;
/* justify-content: space-around; */
/* background : linear-gradient(136deg,#4e8fff 2%, #55c2fa); */
background-color: #ffffff;
font-size: 30rpx;
color: #969799;
border-radius: 2px 0px 0px 2px;
}
.navbar .item {
/* margin:0 35rpx ; */
width: 346rpx;
height: 71rpx;
line-height: 66rpx;
font-size: 24rpx;
text-align: center;
margin-left: 44rpx;
/* background-color: #FFC909; */
/* border-radius : 19px; */
position: relative;
left: 20%;
}
.navbar .item.choose {
color: black;
/* background: linear-gradient(136deg, #4e8fff 2%, #55c2fa); */
}
.navbar .item.choose:after {
content: "";
display: block;
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 80rpx;
height: 6rpx;
background:rgba(255,200,61,1);
}
page{
padding:32rpx;
}
background: #FFC83D;
margin: 0 auto;
}
/* */
.linet{
height: 144rpx;
line-height: 80rpx;
... ...
... ... @@ -20,8 +20,27 @@ Page({
text1: 'Points mall',
text2: '积分商城'
},
]
],
admin: "", // 账号
pwd: "", //密码
login: false
},
onShow() {
let token = wx.getStorageSync('token')
if (token == '') {
this.setData({
login: true
})
}
},
// 关闭
myevent() {
this.setData({
login: false
})
},
getmy() {
wx.navigateTo({
url: '/pages/means/means',
... ... @@ -40,6 +59,11 @@ Page({
url: '/pages/account/account',
})
} else {
wx.navigateTo({
url: '/pages/integral/integral',
})
}
... ...
{
"usingComponents": {},
"usingComponents": {
"login": "../../componets/login/login"
},
"navigationBarBackgroundColor": "#3A3942",
"navigationBarTextStyle":"white",
"navigationBarTitleText": "B&C HOUSE"
... ...
... ... @@ -10,7 +10,7 @@
<view class="right">积分·500</view>
</view>
<view class="contents">
<view class="cont" wx:for="{{cont}}" wx:key='key' >
<view class="cont" wx:for="{{cont}}" wx:key='key'>
<view class="cont-box" bindtap="getmenu" data-id="{{item.id}}">
<text class="text-1">{{item.text1}}</text>
<view class="text-3">{{item.text2}}</view>
... ... @@ -24,15 +24,7 @@
每天进步一点点!
</view>
</view>
<!-- 登录 -->
<view class="mask" bindtap="closeMask" wx:if="{{show}}"></view>
<view class="denglu" wx:if="{{show}}">
<view class="deng1"><image src="/img/ic_close@2x.png" bindtap="closeMask"></image></view>
<text>账号登录</text>
<view class="input">请输入账号</view>
<view class="input">请输入密码
<image src="/img/ic_eye_s@2x.png"></image>
<image src="/img/ic_eye_n@2x.png"></image>
</view>
<view class="button" bindtap="gototram">登录</view>
</view>
\ No newline at end of file
<!--登录 -->
<login show="{{login}}" bindmyevent="myevent"></login>
... ...
... ... @@ -105,85 +105,4 @@
width: 66rpx;
height: 66rpx;
}
/* */
/* 登录 */
.mask{
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .6);
position: fixed;
top: 0;
left: 0;
}
.denglu {
position: fixed;
padding: 64rpx 32rpx;
top: 30%;
left: 50%;
transform: translateX(-50%);
text-align: center;
width: 622rpx;
height: 604rpx;
border-radius: 48rpx;
background: #fff;
}
.botm image {
position: fixed;
bottom: 0;
width: 100%;
}
.denglu text {
font-size: 36rpx;
font-weight: 600;
}
.input {
position: relative;
width: 558rpx;
height: 104rpx;
padding: 30rpx 32rpx;
border-radius: 110rpx;
margin-top: 32rpx;
text-align: left;
background: rgb(236, 235, 235);
color: rgb(204, 202, 202);
}
.input image:first-child{
position: absolute;
right: 76rpx;
top: 16rpx;
width: 32rpx;
height: 32rpx;
}
.input image:last-child{
position: absolute;
right: 32rpx;
top: 32rpx;
width: 32rpx;
height: 32rpx;
}
.deng1 image {
position: absolute;
top: 24rpx;
right: 24rpx;
width: 48rpx;
height: 48rpx;
}
.button{
position: absolute;
bottom: 20rpx;
left: 50%;
margin-left: -211rpx;
width: 422rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size:32rpx;
font-weight: 600;
border-radius: 96rpx;
background: rgba(255,200,61,1);
}
\ No newline at end of file
\ No newline at end of file
... ...
// pages/27/27.js
Page({
/**
* 页面的初始数据
*/
data: {
/**
* 页面的初始数据
*/
data: {
},
gotoday(){
wx.redirectTo({
url: '/pages/end/end',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
gotoday() {
wx.switchTab({
url: '/pages/sheet/sheet',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}
})
\ No newline at end of file
... ...
// pages/21/21.js
Page({
/**
* 页面的初始数据
*/
data: {
anniu:[
{
style:'#f8f8f8',
name:'学院简介'
},
{
style:'rgba(255,200,61,1)',
name:'学院动态'
},
{
style:'#f8f8f8',
name:'学长学姐信息'
},
],
art:[
{
name:'与中英小学交流活动',
title:'2020-04-30'
},
{
name:'与中英小学交流活动',
title:'2020-04-30'
},
{
name:'与中英小学交流活动',
title:'2020-04-30'
}
]
},
gotoday(){
wx.redirectTo({
url: '/pages/message/message',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarBackgroundColor": "#f8f8f8",
"navigationBarTextStyle":"black",
"navigationBarTitleText": "学院",
"navigationStyle": "custom"
}
\ No newline at end of file
<view class="top">
<image src="/img/img_colloge@2x.png"></image>
</view>
<view class="nav">
<view class="nav-1">
<image src="/img/img_logo@2x.png"></image>
</view>
<view class="anniu" bindtap="gotoday">当前分数·500</view>
</view>
<view class="butm-0">
<view class="butm" wx:for="{{anniu}}" style="background:{{item.style}};">{{item.name}}</view>
</view>
<view class="box-stu" wx:for="{{art}}">
<view class="stu-1">
<view>与中英小学交流活动</view>
<text>2020-04-30</text>
</view>
<view class="stu-2">
<image src="/img/7.jpg"></image>
</view>
</view>
\ No newline at end of file
.top image{
width: 100%;
}
.nav{
position: relative;
text-align:center;
}
.nav-1 image{
position: absolute;
left:44rpx;
top:-84rpx;
width: 168rpx;
height: 168rpx;
}
.anniu{
width: 258rpx;
height: 73rpx;
line-height: 73rpx;
margin: 0 auto;
margin-top: 28rpx;
border-radius: 86rpx;
background: #f8f8f8;
}
.butm{
width: 170rpx;
height: 73rpx;
text-align: center;
line-height: 73rpx;
margin-top: 28rpx;
border-radius: 86rpx;
}
.butm-0 .butm:last-child{
width: 228rpx;
}
.butm-0{
display: flex;
margin-top: 48rpx;
justify-content: space-around;
}
.box-stu{
display: flex;
width: 670rpx;
height: 224rpx;
border-radius: 32rpx;
margin: 72rpx auto;
padding:32rpx;
background: #f8f8f8;
justify-content: space-between;
}
.stu-1{
display: flex;
font-size: 32rpx;
font-weight: 600;
flex-direction: column;
justify-content: space-between;
}
.stu-1 text{
font-size: 24rpx;
color: rgba(196,196,196,1);
}
.box-stu image{
width: 220rpx;
height: 136rpx;
border-radius: 16rpx;
}
\ No newline at end of file
... ... @@ -39,7 +39,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.18.1",
"projectname": "miniprogram-5",
"projectname": "basicEnglish",
"debugOptions": {
"hidedInDevtools": []
},
... ...
... ... @@ -67,12 +67,6 @@
"scene": null
},
{
"name": "pages/nine/nine",
"pathName": "pages/nine/nine",
"query": "",
"scene": null
},
{
"name": "pages/01/01",
"pathName": "pages/01/01",
"query": "",
... ... @@ -439,7 +433,7 @@
"scene": null
},
{
"name": "pages/account/account",
"name": "学院",
"pathName": "pages/account/account",
"query": "",
"scene": null
... ... @@ -475,12 +469,6 @@
"scene": null
},
{
"name": "pages/trends/trends",
"pathName": "pages/trends/trends",
"query": "",
"scene": null
},
{
"name": "pages/sout/sout",
"pathName": "pages/sout/sout",
"query": "",
... ... @@ -499,7 +487,7 @@
"scene": null
},
{
"name": "pages/record/record",
"name": "积分记录",
"pathName": "pages/record/record",
"query": "",
"scene": null
... ... @@ -517,7 +505,7 @@
"scene": null
},
{
"name": "pages/means/means",
"name": "个人资料",
"pathName": "pages/means/means",
"query": "",
"scene": null
... ... @@ -539,6 +527,12 @@
"pathName": "pages/logged/logged",
"query": "",
"scene": null
},
{
"name": "pages/partake/partake",
"pathName": "pages/partake/partake",
"query": "",
"scene": null
}
]
}
... ...
... ... @@ -26,7 +26,7 @@ function postRequest(url, postData, doSuccess) {
if (res.data.msg.indexOf('过期') > -1 || res.data.msg.indexOf('请登录后在操作') > -1) {
} else {
doSuccess(res.data);
}
}
},
fail: function () {
console.log('调接口失败')
... ...