Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
miniprogram
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
曹末
miniprogram
Commits
97dc3950
提交
97dc3950
authored
1月 26, 2025
作者:
曹末
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
password问题 switch问题
上级
501ebf20
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
33 行增加
和
61 行删除
+33
-61
index.js
miniprogram/pages/login/index.js
+7
-55
index.wxml
miniprogram/pages/login/index.wxml
+4
-1
index.js
miniprogram/pages/modify-user/index.js
+13
-1
index.wxml
miniprogram/pages/modify-user/index.wxml
+5
-2
index.js
miniprogram/pages/user-center/index.js
+2
-0
index.wxml
miniprogram/pages/user-center/index.wxml
+2
-2
没有找到文件。
miniprogram/pages/login/index.js
浏览文件 @
97dc3950
...
@@ -9,7 +9,8 @@ Page({
...
@@ -9,7 +9,8 @@ Page({
*/
*/
data
:
{
data
:
{
username
:
""
,
username
:
""
,
password
:
""
password
:
""
,
showPassword
:
false
},
},
login
()
{
login
()
{
if
(
this
.
data
.
username
.
trim
()
===
""
)
{
if
(
this
.
data
.
username
.
trim
()
===
""
)
{
...
@@ -41,59 +42,9 @@ Page({
...
@@ -41,59 +42,9 @@ Page({
}
}
})
})
},
},
/**
iconClick
()
{
* 生命周期函数--监听页面加载
this
.
setData
({
*/
showPassword
:
!
this
.
data
.
showPassword
onLoad
(
options
)
{
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
}
})
})
\ No newline at end of file
miniprogram/pages/login/index.wxml
浏览文件 @
97dc3950
<view>
<view>
<t-input label="账号" model:value="{{username}}" />
<t-input label="账号" model:value="{{username}}" />
<t-input label="密码" type="password" model:value="{{password}}" suffixIcon="{{ { name: 'browse-off', ariaLabel: '密码' } }}" />
<t-input label="密码" type="{{showPassword?'text':'password'}}" model:value="{{password}}">
<t-icon slot="suffix-icon" name="{{showPassword?'browse':'browse-off'}}" ariaLabel="密码" bind:click="iconClick"></t-icon>
</t-input>
<t-button theme="primary" size="large" block t-class="external-class" bind:tap="login">登录</t-button>
<t-button theme="primary" size="large" block t-class="external-class" bind:tap="login">登录</t-button>
</view>
</view>
\ No newline at end of file
miniprogram/pages/modify-user/index.js
浏览文件 @
97dc3950
...
@@ -13,7 +13,8 @@ Page({
...
@@ -13,7 +13,8 @@ Page({
password
:
""
,
password
:
""
,
remark
:
""
,
remark
:
""
,
isAdmin
:
false
,
isAdmin
:
false
,
isModify
:
false
isModify
:
false
,
showPassword
:
false
},
},
/**
/**
...
@@ -62,5 +63,15 @@ Page({
...
@@ -62,5 +63,15 @@ Page({
}).
then
(
res
=>
{
}).
then
(
res
=>
{
wx
.
navigateBack
()
wx
.
navigateBack
()
})
})
},
iconClick
()
{
this
.
setData
({
showPassword
:
!
this
.
data
.
showPassword
})
},
switchChange
(
e
)
{
this
.
setData
({
isAdmin
:
e
.
detail
.
value
})
}
}
})
})
\ No newline at end of file
miniprogram/pages/modify-user/index.wxml
浏览文件 @
97dc3950
<view>
<view>
<t-input label="账号" model:value="{{label}}"></t-input>
<t-input label="账号" model:value="{{label}}"></t-input>
<t-input wx:if="{{!isModify}}" label="密码" model:value="{{password}}" type="password"></t-input>
<t-input wx:if="{{!isModify}}" label="密码" type="{{showPassword?'text':'password'}}" model:value="{{password}}">
<t-icon slot="suffix-icon" name="{{showPassword?'browse':'browse-off'}}" ariaLabel="密码" bind:click="iconClick"></t-icon>
</t-input>
<t-input label="备注" model:value="{{remark}}"></t-input>
<t-input label="备注" model:value="{{remark}}"></t-input>
<t-cell title="管理员" bordered="{{false}}">
<t-cell title="管理员" bordered="{{false}}">
<t-switch
model:value="{{isAdmin}}" slot="note"
/>
<t-switch
value="{{isAdmin}}" slot="note" bind:change="switchChange"
/>
</t-cell>
</t-cell>
<t-button style="margin-top: 64rpx;" theme="primary" size="large" block t-class="external-class" bind:tap="handleClick">{{isModify?"更新":"新建"}}</t-button>
<t-button style="margin-top: 64rpx;" theme="primary" size="large" block t-class="external-class" bind:tap="handleClick">{{isModify?"更新":"新建"}}</t-button>
</view>
</view>
\ No newline at end of file
miniprogram/pages/user-center/index.js
浏览文件 @
97dc3950
...
@@ -50,8 +50,10 @@ Page({
...
@@ -50,8 +50,10 @@ Page({
})
})
},
},
logout
()
{
logout
()
{
if
(
this
.
data
.
username
&&
this
.
data
.
username
!==
""
)
{
ActionSheet
.
show
(
basicListOption
)
ActionSheet
.
show
(
basicListOption
)
}
}
}
});
});
const
basicListOption
=
{
const
basicListOption
=
{
...
...
miniprogram/pages/user-center/index.wxml
浏览文件 @
97dc3950
...
@@ -3,13 +3,13 @@
...
@@ -3,13 +3,13 @@
<t-action-sheet id="t-action-sheet" usingCustomNavbar bind:selected="handleSelected" />
<t-action-sheet id="t-action-sheet" usingCustomNavbar bind:selected="handleSelected" />
<view class="top_bg" />
<view class="top_bg" />
<view class="main_content">
<view class="main_content">
<view class="userinfo_container">
<view class="userinfo_container"
style="width:100%" bind:tap="logout"
>
<image class="avatar" src="../../images/icons/avatar.png" mode="widthFix" />
<image class="avatar" src="../../images/icons/avatar.png" mode="widthFix" />
<block wx:if="{{ username==='' }}">
<block wx:if="{{ username==='' }}">
<view class="username" bind:tap="toLogin">请点击登录</view>
<view class="username" bind:tap="toLogin">请点击登录</view>
</block>
</block>
<block wx:else>
<block wx:else>
<view class="username"
bind:tap="logout"
>{{ username }}</view>
<view class="username">{{ username }}</view>
</block>
</block>
</view>
</view>
<view class="settings_container">
<view class="settings_container">
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论