diff --git a/app.json b/app.json
index ca23d1b..2d2a015 100644
--- a/app.json
+++ b/app.json
@@ -3,6 +3,7 @@
"pages/login/index",
"pages/index/index",
"pages/home/mobile/index",
+ "pages/home/password/index",
"pages/home/employee/index",
"pages/home/customer-list/index",
"pages/home/customer-info/index",
diff --git a/colorui/main.wxss b/colorui/main.wxss
index 1961bf8..2950283 100644
--- a/colorui/main.wxss
+++ b/colorui/main.wxss
@@ -1439,3 +1439,296 @@ swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active {
flex: 1;
}
+
+/* ==================
+ 列表
+ ==================== */
+ .grayscale {
+ filter: grayscale(1);
+}
+
+.cu-list+.cu-list {
+ margin-top: 30rpx
+}
+
+.cu-list>.cu-item {
+ transition: all .6s ease-in-out 0s;
+ transform: translateX(0rpx)
+}
+
+.cu-list>.cu-item.move-cur {
+ transform: translateX(-260rpx)
+}
+
+.cu-list>.cu-item .move {
+ position: absolute;
+ right: 0;
+ display: flex;
+ width: 260rpx;
+ height: 100%;
+ transform: translateX(100%)
+}
+
+.cu-list>.cu-item .move view {
+ display: flex;
+ flex: 1;
+ justify-content: center;
+ align-items: center
+}
+
+.cu-list.menu-avatar {
+ overflow: hidden;
+}
+
+.cu-list.menu-avatar>.cu-item {
+ position: relative;
+ display: flex;
+ padding-right: 10rpx;
+ height: 140rpx;
+ background-color: var(--white);
+ justify-content: flex-end;
+ align-items: center
+}
+
+.cu-list.menu-avatar>.cu-item>.cu-avatar {
+ position: absolute;
+ left: 30rpx
+}
+
+.cu-list.menu-avatar>.cu-item .flex .text-cut {
+ max-width: 510rpx
+}
+
+.cu-list.menu-avatar>.cu-item .content {
+ position: absolute;
+ left: 146rpx;
+ width: calc(100% - 96rpx - 60rpx - 120rpx - 20rpx);
+ line-height: 1.6em;
+}
+
+.cu-list.menu-avatar>.cu-item .content.flex-sub {
+ width: calc(100% - 96rpx - 60rpx - 20rpx);
+}
+
+.cu-list.menu-avatar>.cu-item .content>view:first-child {
+ font-size: 30rpx;
+ display: flex;
+ align-items: center
+}
+
+.cu-list.menu-avatar>.cu-item .content .cu-tag.sm {
+ display: inline-block;
+ margin-left: 10rpx;
+ height: 28rpx;
+ font-size: 16rpx;
+ line-height: 32rpx
+}
+
+.cu-list.menu-avatar>.cu-item .action {
+ width: 100rpx;
+ text-align: center
+}
+
+.cu-list.menu-avatar>.cu-item .action view+view {
+ margin-top: 10rpx
+}
+
+.cu-list.menu-avatar.comment>.cu-item .content {
+ position: relative;
+ left: 0;
+ width: auto;
+ flex: 1;
+}
+
+.cu-list.menu-avatar.comment>.cu-item {
+ padding: 30rpx 30rpx 30rpx 120rpx;
+ height: auto
+}
+
+.cu-list.menu-avatar.comment .cu-avatar {
+ align-self: flex-start
+}
+
+.cu-list.menu>.cu-item {
+ position: relative;
+ display: flex;
+ padding: 0 30rpx;
+ min-height: 100rpx;
+ background-color: var(--white);
+ justify-content: space-between;
+ align-items: center
+}
+
+.cu-list.menu>.cu-item:last-child:after {
+ border: none
+}
+
+.cu-list.menu>.cu-item:after {
+ position: absolute;
+ top: 0;
+ left: 0;
+ box-sizing: border-box;
+ width: 200%;
+ height: 200%;
+ border-bottom: 1rpx solid #ddd;
+ border-radius: inherit;
+ content: " ";
+ transform: scale(.5);
+ transform-origin: 0 0;
+ pointer-events: none
+}
+
+.cu-list.menu>.cu-item.grayscale {
+ background-color: #f5f5f5
+}
+
+.cu-list.menu>.cu-item.cur {
+ background-color: #fcf7e9
+}
+
+.cu-list.menu>.cu-item.arrow {
+ padding-right: 90rpx
+}
+
+.cu-list.menu>.cu-item.arrow:before {
+ position: absolute;
+ top: 0;
+ right: 30rpx;
+ bottom: 0;
+ display: block;
+ margin: auto;
+ width: 30rpx;
+ height: 30rpx;
+ color: var(--grey);
+ content: "\e6a3";
+ text-align: center;
+ font-size: 34rpx;
+ font-family: "cuIcon";
+ line-height: 30rpx
+}
+
+.cu-list.menu>.cu-item button.content {
+ padding: 0;
+ background-color: transparent;
+ justify-content: flex-start
+}
+
+.cu-list.menu>.cu-item button.content:after {
+ display: none
+}
+
+.cu-list.menu>.cu-item .cu-avatar-group .cu-avatar {
+ border-color: var(--white)
+}
+
+.cu-list.menu>.cu-item .content>view:first-child {
+ display: flex;
+ align-items: center
+}
+
+.cu-list.menu>.cu-item .content>text[class*=cuIcon] {
+ display: inline-block;
+ margin-right: 10rpx;
+ width: 1.6em;
+ text-align: center
+}
+
+.cu-list.menu>.cu-item .content>image {
+ display: inline-block;
+ margin-right: 10rpx;
+ width: 1.6em;
+ height: 1.6em;
+ vertical-align: middle
+}
+
+.cu-list.menu>.cu-item .content {
+ font-size: 30rpx;
+ line-height: 1.6em;
+ flex: 1
+}
+
+.cu-list.menu>.cu-item .content .cu-tag.sm {
+ display: inline-block;
+ margin-left: 10rpx;
+ height: 28rpx;
+ font-size: 16rpx;
+ line-height: 32rpx
+}
+
+.cu-list.menu>.cu-item .action .cu-tag:empty {
+ right: 10rpx
+}
+
+.cu-list.menu {
+ display: block;
+ overflow: hidden
+}
+
+.cu-list.menu.sm-border>.cu-item:after {
+ left: 30rpx;
+ width: calc(200% - 120rpx)
+}
+
+.cu-list.grid>.cu-item {
+ position: relative;
+ display: flex;
+ padding: 20rpx 0 30rpx;
+ transition-duration: 0s;
+ flex-direction: column
+}
+
+.cu-list.grid>.cu-item:after {
+ position: absolute;
+ top: 0;
+ left: 0;
+ box-sizing: border-box;
+ width: 200%;
+ height: 200%;
+ border-right: 1px solid rgba(0, 0, 0, .1);
+ border-bottom: 1px solid rgba(0, 0, 0, .1);
+ border-radius: inherit;
+ content: " ";
+ transform: scale(.5);
+ transform-origin: 0 0;
+ pointer-events: none
+}
+
+.cu-list.grid>.cu-item text {
+ display: block;
+ margin-top: 10rpx;
+ color: #888;
+ font-size: 26rpx;
+ line-height: 40rpx
+}
+
+.cu-list.grid>.cu-item [class*=cuIcon] {
+ position: relative;
+ display: block;
+ margin-top: 20rpx;
+ width: 100%;
+ font-size: 48rpx
+}
+
+.cu-list.grid>.cu-item .cu-tag {
+ right: auto;
+ left: 50%;
+ margin-left: 20rpx
+}
+
+.cu-list.grid {
+ background-color: var(--white);
+ text-align: center
+}
+
+.cu-list.grid.no-border>.cu-item {
+ padding-top: 10rpx;
+ padding-bottom: 20rpx
+}
+
+.cu-list.grid.no-border>.cu-item:after {
+ border: none
+}
+
+.cu-list.grid.no-border {
+ padding: 20rpx 10rpx
+}
\ No newline at end of file
diff --git a/pages/home/index/index.wxml b/pages/home/index/index.wxml
index 9be9569..4a6e461 100644
--- a/pages/home/index/index.wxml
+++ b/pages/home/index/index.wxml
@@ -73,9 +73,9 @@
-
+
-
+
修改密码
diff --git a/pages/home/mobile/index.js b/pages/home/mobile/index.js
index e78aa19..2a8b1be 100644
--- a/pages/home/mobile/index.js
+++ b/pages/home/mobile/index.js
@@ -54,18 +54,6 @@ Page({
}
wx.showLoading({ title: '正在获取', mask: true })
var form = {account: this.data.form.mobile, accountType: 'MOBILE', purpose: 'RECYCLE_CLIENT_UPDATE_MOBILE' }
- // /send/captcha 发送验证码
- // request.post('/cloud-print-user-center/send/captcha', form).then(result => {
- // wx.hideLoading()
- // this.setData({ codeEnable: false })
- // util.showToast('验证码已经发送')
- // this.countDown = this.countDown || this.selectComponent('#count-down')
- // this.countDown.reset()
- // this.countDown.start()
- // }).catch(error => {
- // wx.hideLoading()
- // util.showToast(error)
- // })
},
onChange: function(e) {
this.setData({ second: e.detail.seconds + ' 秒 ' })
diff --git a/pages/home/password/index.js b/pages/home/password/index.js
new file mode 100644
index 0000000..f5b73bf
--- /dev/null
+++ b/pages/home/password/index.js
@@ -0,0 +1,96 @@
+// pages/home/password/index.js
+// 页面已经废弃,因为UEC的修改,暂时不会提供修改密码的功能
+import { postCaptcha, setPassword } from "../../../api/user"
+const util = require('../../../utils/util')
+const app = getApp()
+
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ second: '获取验证码',
+ codeEnable: false,
+ pwdType: 'password',
+ pwd_icon: 'attention',
+ form: {
+ mobile: null,
+ password: null,
+ verifyCode: null
+ },
+ requesting: false,
+ first: false
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({ ['form.mobile']: app.userInfo.mobile })
+ if(options.from){
+ this.setData({ first: true })
+ }
+ },
+ bindForm: function (e) {
+ this.data.form[e.target.id] = e.detail.value
+ },
+ changePwd: function (e) {
+ if (this.data.pwdType === 'password') {
+ this.setData({ pwdType: 'text', pwd_icon: 'attentionforbid' })
+ } else {
+ this.setData({ pwdType: 'password', pwd_icon: 'attention' })
+ }
+ },
+ fetchCode: function () {
+ if (util.isEmpty(this.data.form.mobile)) {
+ util.showToast('请输入手机号码')
+ return
+ }
+ if (this.second && this.second.interval) return !1
+ wx.showLoading({ title: '正在获取', mask: true })
+ postCaptcha({ verifiableAccount: this.data.form.mobile, verifiableAccountType: 1, purpose: 2 }).then(result => {
+ wx.hideLoading()
+ this.setData({ codeEnable: true })
+ util.showToast('验证码已经发送')
+ this.countDown = this.countDown || this.selectComponent('.count-down')
+ this.countDown.reset()
+ this.countDown.start()
+ }).catch(error => {
+ wx.hideLoading()
+ util.showToast(error)
+ })
+ },
+ onChange: function(e) {
+ this.setData({ second: e.detail.seconds + ' 秒 ' })
+ },
+ onFinished: function(){
+ this.setData({ second: '重新获取验证码', codeEnable: false })
+ },
+ submitForm: function () {
+ if (this.data.requesting) {
+ return
+ }
+ if (util.isEmpty(this.data.form.mobile) && !this.data.first) {
+ util.showToast('请输入手机号码')
+ return
+ }
+ if (util.isEmpty(this.data.form.password)) {
+ util.showToast('请输入密码')
+ return
+ }
+ if (util.isEmpty(this.data.form.verifyCode) && !this.data.first) {
+ util.showToast('请输入验证码')
+ return
+ }
+ wx.showLoading({ title: '处理中', mask: true })
+ this.data.requesting = true
+ setPassword(this.data.form).then(res => {
+ wx.hideLoading()
+ util.showBackToast('设置成功')
+ }).catch(error => {
+ wx.hideLoading()
+ this.data.requesting = false
+ util.showToast(error)
+ })
+ }
+
+})
\ No newline at end of file
diff --git a/pages/home/password/index.json b/pages/home/password/index.json
new file mode 100644
index 0000000..346e5d4
--- /dev/null
+++ b/pages/home/password/index.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "van-button": "/components/button/index",
+ "van-count-down": "/components/count-down/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/home/password/index.wxml b/pages/home/password/index.wxml
new file mode 100644
index 0000000..c6ea4e9
--- /dev/null
+++ b/pages/home/password/index.wxml
@@ -0,0 +1,39 @@
+
+
+ {{first ? '设置密码' : '密码重置'}}
+
+
+
+
+
+
+
+
+
+ 提交
+
diff --git a/pages/home/password/index.wxss b/pages/home/password/index.wxss
new file mode 100644
index 0000000..7eae635
--- /dev/null
+++ b/pages/home/password/index.wxss
@@ -0,0 +1,6 @@
+/* pages/home/password/index.wxss */
+.content-box {
+ background-color: #fff;
+ margin: 30rpx;
+ border-radius: 10rpx
+}
diff --git a/pages/login/index.js b/pages/login/index.js
index 821490f..4bc762d 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -111,7 +111,7 @@ Page({
}
this.setData({ loging: false, metaData: this.data.metaData })
} else {
- if(!app.userInfo.factoryId){
+ if(app.userInfo.factoryId){
wx.redirectTo({ url: '/pages/index/index' })
} else {
wx.redirectTo({ url: '/pages/client/index/index' })