setpassword.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <view class="content">
  3. <view class="headbox">
  4. <view class="numbercat">账号 CD45555</view>
  5. </view>
  6. <view class="acountbox" >
  7. <view class="inacount">
  8. <text class="acoutitle">原密码</text>
  9. <input type="text" v-model="form.oldPassword" class="checkword" placeholder="至少6位数的字母数字组合"
  10. placeholder-style="font-size:30rpx;color:#BEBDBB" password="true"/>
  11. </view>
  12. <view class="inacount">
  13. <text class="acoutitle">密码</text>
  14. <input type="text" v-model="form.acountname" class="checkword" placeholder="至少6位数的字母数字组合"
  15. placeholder-style="font-size:30rpx;color:#BEBDBB" password="true"/>
  16. </view>
  17. <view class="inacount">
  18. <text class="acoutitle">确认密码</text>
  19. <input type="text" v-model="form.password" class="checkword" placeholder="至少6位数的字母数字组合"
  20. placeholder-style="font-size:30rpx;color:#BEBDBB" />
  21. </view>
  22. <view class=" fonas">
  23. <text>*密码必须是6-16位的英文字母、数字组合</text>
  24. <text @click="forgetPwd" style="color: #D8AB5A;">忘记原密码?</text>
  25. </view>
  26. <view class="logininbtn" @click="suerChange">
  27. <text>确认修改</text>
  28. </view>
  29. </view>
  30. <u-popup :show="show" @close="close" @open="open" mode="center">
  31. <view class="forgetbox">
  32. <!-- <view class="ciclebg">
  33. <image src="../../static/img/forpwdbg.png" mode="aspectFill"></image>
  34. </view> -->
  35. <view class="keybox">
  36. <image src="../../static/img/foricon.png" mode="aspectFill"></image>
  37. </view>
  38. <text class="keytitle">忘记密码</text>
  39. <text class="remindtitle">请电联系管理员,进行密码确定</text>
  40. <view class="surebtn" @click="close()">好的</view>
  41. </view>
  42. </u-popup>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. data() {
  48. return {
  49. show: false,
  50. form: {
  51. oldPassword:'',
  52. newPassword:''
  53. },
  54. }
  55. },
  56. onLoad(o) {
  57. if (o.checked) {
  58. this.checked = o.checked
  59. }
  60. },
  61. methods: {
  62. close() {
  63. this.show = false
  64. },
  65. suerChange(){
  66. if(this.form.name.length==0){
  67. this.$toast("请输入您的账号")
  68. return
  69. }
  70. if(this.form.name.password==0){
  71. this.$toast("请输入至少6位数的字母数字组合的密码")
  72. return
  73. }
  74. if(this.form.password!=this.form.surepwd){
  75. this.$toast("两次密码输入不一样")
  76. return
  77. }
  78. uni.showLoading()
  79. uni.$u.http.post('/api/Supplier/password',form, {
  80. custom: {
  81. auth: true
  82. }
  83. }).then((res) => {
  84. uni.hideLoading()
  85. this.$toast("修改成功")
  86. }).catch((err) => {
  87. console.log(err)
  88. uni.hideLoading()
  89. this.$toast(err.msg)
  90. })
  91. },
  92. forgetPwd(){
  93. this.show = true
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .content {
  100. padding: 0 30rpx;
  101. box-sizing: border-box;
  102. }
  103. .fonas{
  104. display: flex;
  105. justify-content: space-between;
  106. font-size: 24rpx;
  107. padding-top: 20rpx;
  108. }
  109. .headbox {
  110. display: flex;
  111. justify-content: center;
  112. margin: 60rpx auto;
  113. .numbercat{
  114. padding: 15rpx 20rpx;
  115. border-radius: 50rpx;
  116. background-color: #FFF8E5;
  117. color: #1F242A;
  118. font-size: 28rpx;
  119. }
  120. }
  121. .acountbox {
  122. .upmsg{
  123. margin-top: 20rpx;
  124. background-color: #F6F6F6;
  125. width: 690rpx;
  126. height: 399rpx;
  127. border-radius: 20rpx;
  128. display: flex;
  129. align-items: center;
  130. justify-content: center;
  131. }
  132. .uppic{
  133. display: flex;
  134. align-items: center;
  135. justify-content: center;
  136. width: 500rpx;
  137. height: 250rpx;
  138. background-image: url("@/static/img/upuer.png");
  139. background-size: 100%;
  140. }
  141. .inacount {
  142. flex: 1;
  143. display: flex;
  144. padding: 35rpx 20rpx;
  145. box-sizing: border-box;
  146. // width: 606rpx;
  147. margin-top: 40rpx;
  148. background-color: #F6F6F6;
  149. border-radius: 20rpx;
  150. font-size: 30rpx;
  151. color: #1F242A;
  152. input {
  153. width: 360rpx;
  154. }
  155. }
  156. .acoutitle {
  157. font-weight: 600;
  158. }
  159. .checkword {
  160. padding-left: 20rpx;
  161. color: #1F242A;
  162. font-size: 30rpx;
  163. }
  164. }
  165. .logininbtn {
  166. margin-top: 140rpx;
  167. // width: 606rpx;
  168. box-sizing: border-box;
  169. flex: 1;
  170. border-radius: 20rpx;
  171. border: 1rpx solid #BEBDBB;
  172. height: 100rpx;
  173. text-align: center;
  174. color: #BEBDBB;
  175. line-height: 100rpx;
  176. margin-bottom: 100rpx;
  177. }
  178. .acountall {
  179. display: flex;
  180. justify-content: flex-end;
  181. margin-top: 30rpx;
  182. font-size: 24rpx;
  183. }
  184. .checkag {
  185. margin-top: 200rpx;
  186. font-size: 28rpx;
  187. margin-bottom: 150rpx;
  188. }
  189. .forgetbox{
  190. width: 600rpx;
  191. height: 600rpx;
  192. background-color: #fff;
  193. display: flex;
  194. flex-direction: column;
  195. align-items: center;
  196. position: relative;
  197. background-image: url("@/static/img/forpwdbg.png") ;
  198. background-repeat: no-repeat;
  199. background-position: right 0 top 0;
  200. background-size:367rpx 225rpx;
  201. .ciclebg{
  202. position: relative;
  203. right: 0;
  204. top: 0;
  205. width: 367rpx;
  206. height: 225rpx;
  207. }
  208. .keybox{
  209. margin-top: 84rpx;
  210. width: 196rpx;
  211. height: 161rpx;
  212. image{
  213. width: 100%;
  214. height: 100%;
  215. }
  216. }
  217. .keytitle{
  218. color: #1F242A;
  219. padding-top: 50rpx;
  220. font-size: 36rpx;
  221. font-weight: 600;
  222. }
  223. .remindtitle{
  224. color: #68625B;
  225. font-size: 28rpx;
  226. padding-top: 30rpx;
  227. }
  228. .surebtn{
  229. width: 314rpx;
  230. height: 84rpx;
  231. line-height: 84rpx;
  232. border-radius: 43rpx;
  233. background: linear-gradient(to right,#FFE1AD,#D8AB5A);
  234. color: #412900;
  235. margin-top: 86rpx;
  236. text-align: center;
  237. }
  238. }
  239. </style>