password-lli.vue 956 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view style="visibility: hidden;">
  3. <view class="phone-password-lli" :myflag="myflag" :change:myflag="PSLLI.doPasswordlli(password)"></view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. name: "password-lli",
  9. props: {
  10. password: {
  11. type: [String,Number],
  12. default: ''
  13. }
  14. },
  15. data() {
  16. return {
  17. myflag: 0
  18. };
  19. },
  20. methods: {
  21. lliPassword() {
  22. this.myflag++
  23. },
  24. getPassword(data) {
  25. this.$emit('lli-password',data);
  26. }
  27. }
  28. }
  29. </script>
  30. <script module="PSLLI" lang="renderjs">
  31. export default {
  32. methods: {
  33. doPasswordlli(password) {
  34. if (window.lli) {
  35. this.$ownerInstance.callMethod('getPassword', window.lli.encode(password))
  36. }
  37. }
  38. },
  39. mounted() {
  40. if (window.lli && typeof window.lli.encode === 'function') {
  41. } else {
  42. const script = document.createElement('script')
  43. script.src = '/mdist/static/encode.js'
  44. document.head.appendChild(script)
  45. }
  46. },
  47. }
  48. </script>