text.vue 864 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <app-layout>
  3. <view @click="navigate">123</view>
  4. <view @click="copy">{{url}}</view>
  5. </app-layout>
  6. </template>
  7. <script>
  8. export default {
  9. name: "index",
  10. data() {
  11. return {
  12. url: 'http://asdu83.natappfree.cc/zjhj_mall_v4/web/statics/html/index.html',
  13. }
  14. },
  15. methods: {
  16. navigate() {
  17. uni.navigateTo({url: `/pages/web/web?url=` + this.url});
  18. },
  19. copy() {
  20. uni.setClipboardData({
  21. data: this.url,
  22. success() {
  23. //#ifndef MP-WEIXIN
  24. uni.showToast({title: '复制成功'});
  25. // #endif
  26. }
  27. });
  28. },
  29. }
  30. }
  31. </script>
  32. <style scoped>
  33. </style>