Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online
Commits
e2516771
提交
e2516771
authored
10月 23, 2018
作者:
GOD_ZYX
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加 游客登录,直接写死一个 sessionKey
上级
79af5fa6
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
20 行增加
和
4 行删除
+20
-4
app.js
learnOnline/app.js
+2
-1
index.js
learnOnline/pages/index/index.js
+12
-0
index.wxml
learnOnline/pages/index/index.wxml
+1
-0
index.wxss
learnOnline/pages/index/index.wxss
+3
-2
my.js
learnOnline/pages/learnSystem/my/my.js
+2
-1
没有找到文件。
learnOnline/app.js
浏览文件 @
e2516771
...
...
@@ -2,6 +2,6 @@
App
({
onLaunch
:
function
()
{
wx
.
showLoading
({
title
:
'页面启动中...'
,
mask
:
true
});
wx
.
redirectTo
({
url
:
'/pages/index/index'
});
//
wx.redirectTo({ url: '/pages/index/index' });
}
})
\ No newline at end of file
learnOnline/pages/index/index.js
浏览文件 @
e2516771
...
...
@@ -58,6 +58,18 @@ Page({
}
})
},
guestLogin
:
function
()
{
wx
.
showModal
({
title
:
'提示'
,
content
:
'本账户只适用于“体验学习”,正式学习请点击“登录”按钮'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
wx
.
setStorageSync
(
'userInfo'
,
{
"avatarUrl"
:
"https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJv5HunMDDhpdaTz7aVXniaeOUxyQxwa9clFnJCm7Y8eP8gbUkF7I9NHSXSDJ1KssdYw9vAKb0v8fQ/132"
,
"nickName"
:
"游客账号"
});
wx
.
setStorageSync
(
'userSession'
,
{
"sessionKey"
:
"EOlbKKzWol0meLnDQOZb8g=="
});
this
.
goOutSite
();
}
}
});
},
/* 手机号绑定 方法 */
timer
:
BindPhone
.
BindPhone
.
timer
,
popupShow
:
BindPhone
.
BindPhone
.
popupShow
,
...
...
learnOnline/pages/index/index.wxml
浏览文件 @
e2516771
...
...
@@ -6,6 +6,7 @@
<image class='logo' src='./icons/hd-logo.png' mode='aspectFit'></image>
<view class='text'>清控紫荆课堂</view>
<button class='btn' open-type='getUserInfo' bindgetuserinfo='getUserInfo'>登录</button>
<view class='test-id' bindtap='guestLogin'>游客登录</view>
<view class='userinfo'>
<!-- wx:if='{{!hasUserInfo && canIUse}}' -->
<!-- <block wx:else>
...
...
learnOnline/pages/index/index.wxss
浏览文件 @
e2516771
...
...
@@ -5,4 +5,5 @@
.container .bg { position: absolute; z-index: 0; top: 0; left: 0; width: 100%; height: 100%; }
.container .logo { position: absolute; z-index: 1; top: 233rpx; left: 50%; width: 344rpx; height: 47rpx; -webkit-transform: translateX(-50%); transform: translateX(-50%); }
.container .text { position: absolute; z-index: 1; top: 303rpx; left: 0; width: 100%; color: #fff; font-size: 54rpx; letter-spacing: 14rpx; line-height: 54rpx; text-align: center; font-weight: 300; }
.container .btn { position: absolute; left: 50%; bottom: 253rpx; width: 500rpx; height: 80rpx; line-height: 80rpx; font-size: 30rpx; font-weight: 300; color: #fff; background: #b49441; -webkit-transform: translateX(-50%); transform: translateX(-50%); }
\ No newline at end of file
.container .btn { position: absolute; left: 50%; bottom: 253rpx; width: 500rpx; height: 80rpx; line-height: 80rpx; font-size: 30rpx; font-weight: 300; color: #fff; background: #b49441; -webkit-transform: translateX(-50%); transform: translateX(-50%); }
.test-id { position: absolute; left: 0; bottom: 200rpx; width: 100%; font-size: 28rpx; color: #fff; text-align: center; }
\ No newline at end of file
learnOnline/pages/learnSystem/my/my.js
浏览文件 @
e2516771
...
...
@@ -11,7 +11,7 @@ Page({
/* 我的学分 */
goMyScore
:
function
()
{
wx
.
navigateTo
({
url
:
'/pages/learnSystem/myScore/myScore'
})
},
/* 退出系统 */
outSystem
:
function
()
{
wx
.
reLaunch
({
url
:
'/pages/index/index'
})
},
outSystem
:
function
()
{
wx
.
setStorageSync
(
'userInfo'
,
{});
wx
.
setStorageSync
(
'userSession'
,
{});
wx
.
reLaunch
({
url
:
'/pages/index/index'
})
},
/* 输出信息 */
printMsg
:
function
(
detail
)
{
console
.
log
(
detail
.
status
)
}
})
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论