Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online
Commits
2f8fd703
提交
2f8fd703
authored
10月 31, 2018
作者:
GOD_ZYX
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master' into enterprise
# Conflicts: # learnOnline/pages/index/index.wxml
上级
1b054220
9e9980ba
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
114 行增加
和
8 行删除
+114
-8
README.md
README.md
+8
-0
bindAccount.js
learnOnline/pages/index/bindAccount/bindAccount.js
+51
-0
bindAccount.wxml
learnOnline/pages/index/bindAccount/bindAccount.wxml
+15
-0
bindAccount.wxss
learnOnline/pages/index/bindAccount/bindAccount.wxss
+11
-0
bindPhone.js
learnOnline/pages/index/bindPhone/bindPhone.js
+5
-0
bindPhone.wxml
learnOnline/pages/index/bindPhone/bindPhone.wxml
+4
-2
bindPhone.wxss
learnOnline/pages/index/bindPhone/bindPhone.wxss
+4
-3
index.js
learnOnline/pages/index/index.js
+11
-2
index.wxml
learnOnline/pages/index/index.wxml
+4
-1
index.wxss
learnOnline/pages/index/index.wxss
+1
-0
没有找到文件。
README.md
浏览文件 @
2f8fd703
...
...
@@ -13,3 +13,10 @@
*
打开小程序 “微信开发者工具” 预览、调试、发布、上传都可以。
-
`微信开发者工具`
:
<a
href=
"https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html"
target=
"_blank"
>
下载地址
</a>
-
`微信开发者工具`
:
<a
href=
"https://developers.weixin.qq.com/miniprogram/dev/devtools/devtools.html?t=18090718"
target=
"_blank"
>
使用说明地址
</a>
## 小程序审核
```
python
本系统是
内部付费人员使用,需要绑定手机号(你们肯定不愿意提供手机号)。但为了
照顾你们
测试人员,所以在
登录下方已经增加
“游客登录”入口,你测试
为啥不试试就给我拒绝了?
再次重申,我已经增加
“游客登录”入口,就是方便
你们测试人员测试使用。你为啥不用呢?
我已经申请过多次,多次出现这种情况,你们测试人员之间没有沟通吗?
麻烦以后你们测试之间
多沟通一下,不要再让我天天加备注解释,好吗?
```
\ No newline at end of file
learnOnline/pages/index/bindAccount/bindAccount.js
0 → 100644
浏览文件 @
2f8fd703
const
util
=
require
(
'../../../utils/util.js'
)
/* 手机 验证码 相关内容 */
const
BindAccount
=
{
/* 跳转 手机登录 */
phoneLogin
:
function
()
{
this
.
setData
({
'bindaccount.isShow'
:
""
});
this
.
setData
({
'bindphone.isShow'
:
"on"
});
},
/* 账号输入 离开 input blur事件监听 */
inputAccount
:
function
(
e
)
{
this
.
setData
({
'bindaccount.account'
:
e
.
detail
.
value
});
},
/* 密码输入 离开 input blur事件监听 */
inputPwd
:
function
(
e
)
{
this
.
setData
({
'bindaccount.pwd'
:
e
.
detail
.
value
});
},
/* 点击确定 */
accountConfirm
:
function
(
e
)
{
const
_that
=
this
,
_bind
=
_that
.
data
.
bindaccount
/* 调用接口 - 使用账号登录 */
wx
.
request
({
url
:
util
.
config
.
URL_PATH
+
'/tenant/user/account-login'
,
data
:
{
username
:
_bind
.
account
,
password
:
_bind
.
pwd
},
method
:
'POST'
,
header
:
{
skey
:
wx
.
getStorageSync
(
'userSession'
).
sessionKey
,
tenant
:
'sofia'
},
success
:
function
(
res
)
{
if
(
res
.
statusCode
&&
res
.
statusCode
!=
200
)
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
});
return
;
}
wx
.
hideToast
()
/* 获取用户信息 */
wx
.
request
({
url
:
util
.
config
.
URL_PATH
+
'/tenant/user/getinfo'
,
data
:
{},
method
:
'GET'
,
header
:
{
skey
:
wx
.
getStorageSync
(
'userSession'
).
sessionKey
,
tenant
:
'sofia'
},
success
:
res
=>
{
if
(
res
.
statusCode
!=
200
)
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
});
return
;
}
let
_userInfo
=
{
avatarUrl
:
res
.
data
.
avatar
||
_that
.
tempUserInfo
.
avatarUrl
||
'无'
,
nickName
:
res
.
data
.
nickname
||
_that
.
tempUserInfo
.
nickName
||
'无'
}
wx
.
setStorageSync
(
'userInfo'
,
_userInfo
);
_that
.
setData
({
userInfo
:
_userInfo
,
hasUserInfo
:
true
})
_that
.
popupClose
()
_that
.
goOutSite
()
}
})
},
fail
:
function
(
res
)
{
wx
.
hideToast
();
wx
.
showToast
({
title
:
res
,
icon
:
'none'
});
}
})
}
}
module
.
exports
=
{
BindAccount
:
BindAccount
,
}
\ No newline at end of file
learnOnline/pages/index/bindAccount/bindAccount.wxml
0 → 100644
浏览文件 @
2f8fd703
<template name="bindAccount">
<view wx:if="{{bindaccount.isShow}}" class="bind-account {{bindaccount.isShow}}">
<view class="box">
<view class="hdr">
<text>绑定账号</text>
<image src="./icons/user-close.png" bindtap="popupClose"></image>
</view>
<input maxlength="30" type="text" class="input-account" placeholder="输入账号" bindinput="inputAccount" bindblur="inputAccount" value="{{bindaccount.account}}" />
<input maxlength="30" type="text" password="true" class="input-pwd" placeholder="输入密码" bindinput="inputPwd" bindblur="inputPwd" value="{{bindaccount.pwd}}" />
<view class="confirm" bindtap="accountConfirm">确定</view>
<view class="other-login" bindtap="phoneLogin">手机号登录</view>
</view>
</view>
</template>
\ No newline at end of file
learnOnline/pages/index/bindAccount/bindAccount.wxss
0 → 100644
浏览文件 @
2f8fd703
.bind-account { opacity: 0; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; background: rgba(0, 0, 0, 0.6); }
.bind-account.on { opacity: 1; z-index: 999; }
.bind-account .box { position: absolute; left: 50%; top: 50%; padding: 40rpx; width: 630rpx; background: #fafafc; border-radius: 10rpx; font-size: 28rpx; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); }
.bind-account .box .hdr { display: block; width: 100%; height: 46rpx; overflow: hidden; margin-bottom: 40rpx; -webkit-box-sizing: border-box; box-sizing: border-box; }
.bind-account .box .hdr image { float: right; width: 46rpx; height: 46rpx; }
.bind-account .box .input-account { display: block; width: 100%; height: 90rpx; border: 1rpx solid #eee; border-radius: 10rpx; padding: 0 20rpx; -webkit-box-sizing: border-box; box-sizing: border-box; }
.bind-account .box .input-pwd { display: block; width: 100%; height: 90rpx; margin: 20rpx 0 40rpx 0; border: 1rpx solid #eee; border-radius: 10rpx; padding: 0 20rpx; -webkit-box-sizing: border-box; box-sizing: border-box; }
.bind-account .box .confirm { height: 90rpx; width: 100%; background: #4b0; color: #fff; line-height: 90rpx; text-align: center; border-radius: 10rpx; }
.bind-account .box .other-login { margin-top: 40rpx; line-height: 60rpx; text-align: center; color: #576b95; }
\ No newline at end of file
learnOnline/pages/index/bindPhone/bindPhone.js
浏览文件 @
2f8fd703
...
...
@@ -9,7 +9,12 @@ const BindPhone = {
clearInterval
(
this
.
timer
);
// 关闭定时器
let
bindphone
=
{
isShow
:
''
,
getCode
:
true
,
countDown
:
60
,
phone
:
''
,
code
:
''
}
this
.
setData
({
'bindphone'
:
bindphone
})
/* 账号弹框关闭,也用这个方法 */
let
bindaccount
=
{
isShow
:
''
,
account
:
''
,
pwd
:
''
}
this
.
setData
({
'bindaccount'
:
bindaccount
})
},
/* 跳转 账号登录 */
accountLogin
:
function
()
{
this
.
setData
({
'bindphone.isShow'
:
"off"
});
this
.
setData
({
'bindaccount.isShow'
:
"on"
});
},
/* 电话输入 离开 input blur事件监听 */
inputPhone
:
function
(
e
)
{
this
.
setData
({
'bindphone.phone'
:
e
.
detail
.
value
});
},
/* 验证码输入 离开 input blur事件监听 */
...
...
learnOnline/pages/index/bindPhone/bindPhone.wxml
浏览文件 @
2f8fd703
...
...
@@ -5,13 +5,14 @@
<text>绑定手机号</text>
<image src="./icons/user-close.png" bindtap="popupClose"></image>
</view>
<input maxlength="11" type=
'number'
class="input-phone" placeholder="输入手机号" bindinput="inputPhone" bindblur="inputPhone" value="{{bindphone.phone}}" />
<input maxlength="11" type=
"number"
class="input-phone" placeholder="输入手机号" bindinput="inputPhone" bindblur="inputPhone" value="{{bindphone.phone}}" />
<view class="box-verify">
<input maxlength="6" type=
'number'
class="code" placeholder="输入验证码" bindinput="inputCode" bindblur="inputCode" value="{{bindphone.code}}" />
<input maxlength="6" type=
"number"
class="code" placeholder="输入验证码" bindinput="inputCode" bindblur="inputCode" value="{{bindphone.code}}" />
<view wx:if="{{bindphone.getCode}}" class="button" bindtap="getCode">获取验证码</view>
<view wx:else class="countdown">已发送({{bindphone.countDown}}s)</view>
</view>
<view class="confirm" bindtap="codeConfirm">确定</view>
<view class="other-login" bindtap="accountLogin">账号登录</view>
</view>
</view>
</template>
\ No newline at end of file
learnOnline/pages/index/bindPhone/bindPhone.wxss
浏览文件 @
2f8fd703
.bind-phone { opacity: 0; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; background: rgba(0, 0, 0, 0.6); }
.bind-phone.on { opacity: 1; z-index: 999; }
.bind-phone .box { position: absolute; left: 50%; top: 50%; padding: 40rpx; width: 630rpx;
height: 450rpx;
background: #fafafc; border-radius: 10rpx; font-size: 28rpx; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); }
.bind-phone .box { position: absolute; left: 50%; top: 50%; padding: 40rpx; width: 630rpx; background: #fafafc; border-radius: 10rpx; font-size: 28rpx; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); }
.bind-phone .box .hdr { display: block; width: 100%; height: 46rpx; overflow: hidden; margin-bottom: 40rpx; -webkit-box-sizing: border-box; box-sizing: border-box; }
.bind-phone .box .hdr image { float: right; width: 46rpx; height: 46rpx; }
.bind-phone .box .input-phone { display: block; width: 100%; height: 90rpx; border: 1rpx solid #eee; border-radius: 10rpx; padding: 0 20rpx; -webkit-box-sizing: border-box; box-sizing: border-box; }
...
...
@@ -10,4 +10,5 @@
.bind-phone .box .box-verify .button { float: right; width: 220rpx; height: 90rpx; line-height: 90rpx; text-align: center; border: 1rpx solid #4b0; color: #4b0; border-radius: 10rpx; -webkit-box-sizing: border-box; box-sizing: border-box; }
.bind-phone .box .box-verify .countdown { float: right; width: 220rpx; height: 90rpx; line-height: 90rpx; text-align: center; background: #ccc; color: #fff; border-radius: 10rpx; -webkit-box-sizing: border-box; box-sizing: border-box; }
.bind-phone .box .confirm { height: 90rpx; width: 100%; background: #4b0; color: #fff; line-height: 90rpx; text-align: center; border-radius: 10rpx; }
\ No newline at end of file
.bind-phone .box .confirm { height: 90rpx; width: 100%; background: #4b0; color: #fff; line-height: 90rpx; text-align: center; border-radius: 10rpx; }
.bind-phone .box .other-login { margin-top: 40rpx; line-height: 60rpx; text-align: center; color: #576b95; }
\ No newline at end of file
learnOnline/pages/index/index.js
浏览文件 @
2f8fd703
...
...
@@ -3,6 +3,7 @@
const
app
=
getApp
()
const
util
=
require
(
'../../utils/util.js'
)
const
BindPhone
=
require
(
'./bindPhone/bindPhone.js'
)
const
BindAccount
=
require
(
'./bindAccount/bindAccount.js'
)
Page
({
data
:
{
...
...
@@ -11,7 +12,9 @@ Page({
hasUserInfo
:
false
,
canIUse
:
wx
.
canIUse
(
'button.open-type.getUserInfo'
),
// 绑定手机号 相关
bindphone
:
{
isShow
:
''
,
getCode
:
true
,
countDown
:
60
,
phone
:
''
,
code
:
''
}
bindphone
:
{
isShow
:
''
,
getCode
:
true
,
countDown
:
60
,
phone
:
''
,
code
:
''
},
// 绑定账号 相关
bindaccount
:
{
isShow
:
''
,
account
:
''
,
pwd
:
''
}
},
goOutSite
:
function
()
{
// wx.navigateTo({
...
...
@@ -71,11 +74,17 @@ Page({
});
},
/* 手机号绑定 方法 */
accountLogin
:
BindPhone
.
BindPhone
.
accountLogin
,
timer
:
BindPhone
.
BindPhone
.
timer
,
popupShow
:
BindPhone
.
BindPhone
.
popupShow
,
popupClose
:
BindPhone
.
BindPhone
.
popupClose
,
inputPhone
:
BindPhone
.
BindPhone
.
inputPhone
,
inputCode
:
BindPhone
.
BindPhone
.
inputCode
,
getCode
:
BindPhone
.
BindPhone
.
getCode
,
codeConfirm
:
BindPhone
.
BindPhone
.
codeConfirm
codeConfirm
:
BindPhone
.
BindPhone
.
codeConfirm
,
/* 账号绑定 方法 */
phoneLogin
:
BindAccount
.
BindAccount
.
phoneLogin
,
inputAccount
:
BindAccount
.
BindAccount
.
inputAccount
,
inputPwd
:
BindAccount
.
BindAccount
.
inputPwd
,
accountConfirm
:
BindAccount
.
BindAccount
.
accountConfirm
})
learnOnline/pages/index/index.wxml
浏览文件 @
2f8fd703
<!--index.wxml-->
<import src='bindPhone/bindPhone.wxml' />
<import src='bindAccount/bindAccount.wxml' />
<view class='container'>
<image class='bg' src='./icons/bg.png' mode='aspectFill'></image>
<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='test-id' bindtap='guestLogin'>游客登录</view> -->
<view class='userinfo'>
<!-- wx:if='{{!hasUserInfo && canIUse}}' -->
<!-- <block wx:else>
...
...
@@ -15,4 +16,5 @@
</block> -->
</view>
<template is='bindPhone' data='{{bindphone}}'></template>
<template is='bindAccount' data='{{bindaccount}}'></template>
</view>
\ No newline at end of file
learnOnline/pages/index/index.wxss
浏览文件 @
2f8fd703
/**index.wxss**/
@import "bindPhone/bindPhone.wxss";
@import "bindAccount/bindAccount.wxss";
.container { position: fixed; top: 0; left: 0; bottom: 0; right: 0; background: #e5e5e5; }
.container .bg { position: absolute; z-index: 0; top: 0; left: 0; width: 100%; height: 100%; }
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论