trade_password.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view class="page">
  3. <view class="content">
  4. <uni-list class="list">
  5. <uni-list-item ref="uitem" :title="title"
  6. :show-arrow="true"
  7. :showArrow="true"
  8. @tap="goPath(path)"/>
  9. <uni-list-item title="忘记支付密码"
  10. :show-arrow="true"
  11. :showArrow="true"
  12. @tap="goPath('/pages/my/foget_trade_password')"/>
  13. </uni-list>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import _hook from '../../../common/_hook';
  19. import _data from '../../../common/_data';
  20. import _get from '../../../common/_get';
  21. import ulist from '../../../components/uni-list/uni-list'
  22. import uitem from '../../../components/uni-list-item/uni-list-item'
  23. export default {
  24. data() {
  25. return {
  26. set_msg:'请输入交易密码',
  27. set_info:'请输入交易密码,以确认身份',
  28. password:'',
  29. show_key:false,
  30. showCose:true,
  31. user_info:{}
  32. }
  33. },
  34. components:{
  35. ulist,
  36. uitem
  37. },
  38. computed:{
  39. title(){
  40. return this.user_info.trade_password ? '修改支付密码' : '设置支付密码';
  41. },
  42. path(){
  43. return this.user_info.trade_password ? '../set/edit_trade_password' : '../set/set_trade_password';
  44. }
  45. },
  46. onShow(){
  47. _hook.routeSonHook();
  48. let _this = this;
  49. _get.getUserInfo({},function (data) {
  50. _this.user_info = data;
  51. });
  52. if(!_this.user_info.length){
  53. _this.user_info = _data.data('user_info');
  54. }
  55. },
  56. methods: {
  57. goPath(path){
  58. if(path){
  59. uni.navigateTo({
  60. url: path
  61. });
  62. }
  63. }
  64. }
  65. }
  66. </script>
  67. <style>
  68. .content .list{
  69. margin-top: 20upx;
  70. }
  71. </style>