9e651f80fe9fe769d5f6fdc5a7bac42a89aeab3b.svn-base 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <div>
  3. <yd-popup v-model="rgShow" position="center" width="90%margin:0;">
  4. <div class="reg-box">
  5. <div class="reg-top row allAlignment item-center">
  6. <span>修改支付密码</span>
  7. <img :src="url1" alt @click="closeRg()">
  8. </div>
  9. <div class="reg-mian">
  10. <div>
  11. <span>原密码</span>
  12. <br>
  13. <input
  14. type="password"
  15. maxlength="15"
  16. v-model="password"
  17. onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"
  18. @blur="pwd()"
  19. placeholder="请输入你的原密码"
  20. >
  21. <br>
  22. <i :class="pwdInfo?'infoRed':''">*使用6-15位数字或字母,不能使用特殊字符</i>
  23. </div>
  24. <div>
  25. <span>新密码</span>
  26. <br>
  27. <input
  28. type="password"
  29. v-model="again_password"
  30. maxlength="15"
  31. onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"
  32. placeholder="请输入你的新密码"
  33. >
  34. <br>
  35. <i :class="suerPwdInfo?'infoRed':''">*使用6-15位数字或字母,不能使用特殊字符</i>
  36. </div>
  37. </div>
  38. <div class="row vertical-center">
  39. <yd-button @click.native="reg()">修改密码</yd-button>
  40. </div>
  41. </div>
  42. </yd-popup>
  43. </div>
  44. </template>
  45. <script>
  46. import "@/css/index.css";
  47. export default {
  48. name: "register",
  49. data() {
  50. return {
  51. pwdInfo: false, //密码提醒
  52. suerPwdInfo: false, //确认密码
  53. userInfo: false, //用户信息提醒
  54. password: "",
  55. again_password: "",
  56. rgShow:true,//this.$store.state.rgShow,
  57. url1: require("@/assets/st-imges/guanbi.png"),
  58. docmHeight: '0', //默认屏幕高度
  59. showHeight: '0', //实时屏幕高度
  60. hidshow:true, //显示或者隐藏footer,
  61. isResize:false, //默认屏幕高度是否已获取
  62. };
  63. },
  64. methods: {
  65. closeRg(){
  66. this.$store.dispatch('GETRGSHOW', false);
  67. },
  68. reg() {
  69. if (
  70. this.password != "" &&
  71. this.again_password != ""
  72. ) {
  73. this.$http.post(this.$ports.login.ChangePayPassword,{oldPassword:this.password,newPassword:this.again_password,token:localStorage.getItem('token')}).then(res =>{
  74. console.log(res)
  75. if(res.data){
  76. this.$dialog.alert({mes:res.data.msg});
  77. (res.data)
  78. if(res.data.status!=1){
  79. this.password='';
  80. this.again_password='';
  81. }else{
  82. this.password='';
  83. this.again_password='';
  84. this.$router.push('/')
  85. }
  86. }
  87. })
  88. }else{
  89. this.$dialog.alert({mes: '请完善您的信息!' });
  90. }
  91. },
  92. pwd() {
  93. if (/^[a-zA-Z0-9]{6,15}$/.test(this.password)) {
  94. this.pwdInfo = false;
  95. }
  96. else {
  97. this.password = "";
  98. this.pwdInfo = true;
  99. }
  100. },
  101. },
  102. computed:{
  103. Isshow:function(){
  104. this.$store.dispatch('GETRGSHOW',this.rgShow)
  105. return {
  106. isshow_code:this.$store.state.rgShow
  107. }
  108. },
  109. },
  110. watch:{
  111. Isshow(obj){
  112. this.rgShow=obj.isshow_code
  113. },
  114. isshow:{
  115. istrue(val){
  116. }
  117. }
  118. },
  119. mounted(){
  120. }
  121. };
  122. </script>
  123. <style scoped>
  124. .reg-box {
  125. width: 6.75rem;
  126. /* height: 8.26rem; */
  127. background: #f8f8f8;
  128. border-radius: 0.52rem;
  129. padding: 0 0.54rem;
  130. }
  131. .reg-top {
  132. font-size: 0.32rem;
  133. padding-top: 0.58rem;
  134. padding-bottom: 0.6rem;
  135. color: #f76649;
  136. }
  137. .reg-top img {
  138. width: 0.26rem;
  139. height: 0.26rem;
  140. }
  141. .reg-mian {
  142. /* height: 5.46rem; */
  143. }
  144. .reg-mian div {
  145. padding-bottom: 0.27rem;
  146. }
  147. .reg-mian span {
  148. font-size: 0.28rem;
  149. }
  150. .reg-mian i {
  151. font-size: 0.22rem;
  152. color: #aaaaaa;
  153. }
  154. .reg-mian input {
  155. width: 90%;
  156. height: 0.46rem;
  157. border: none;
  158. outline: none;
  159. border-bottom: 1px solid #aaaaaa;
  160. margin: 0.14rem auto 0.1rem;
  161. font-size: 0.24rem;
  162. }
  163. button {
  164. width: 1.9rem;
  165. height: 0.7rem;
  166. border-radius: 0.35rem;
  167. border: none;
  168. background: #aaaaaa;
  169. color: #f8f8f8;
  170. margin-bottom: 0.5rem;
  171. }
  172. input {
  173. font-size: 0.2rem;
  174. }
  175. .reg-mian .infoRed {
  176. color: #f76649;
  177. }
  178. div.row .btnCor {
  179. background: #f76649;
  180. }
  181. .yd-btn-primary:not(.yd-btn-loading) {
  182. background: #aaaaaa;
  183. }
  184. div /deep/ .yd-popup-center {
  185. margin: 0;
  186. overflow-y: scroll;
  187. -webkit-overflow-scrolling: touch;
  188. position: absolute;
  189. }
  190. </style>