new_article.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <div class="box">
  3. <img src="~@/assets/quan/icon/tip.png" alt />
  4. <div class="tip">请前往web端新建文章</div>
  5. <div class="link">
  6. https://www.proginn.com/topics/create
  7. <span
  8. data-clipboard-text="https://www.proginn.com/topics/create"
  9. @click="copy"
  10. style="cursor:pointer"
  11. >复制</span>
  12. </div>
  13. <div class="btn" @click="back()">我知道了</div>
  14. </div>
  15. </template>
  16. <script>
  17. import WxMixin from "@/mixins/wx";
  18. import Clipboard from "clipboard";
  19. export default {
  20. layout: "opacity_header",
  21. head() {
  22. return {
  23. title: "提示",
  24. script: [
  25. {
  26. src: "https://res.wx.qq.com/open/js/jweixin-1.2.0.js"
  27. },
  28. {
  29. src: "https://hm.baidu.com/hm.js?18455f493c982100e5a82ec978a8d06e"
  30. }
  31. ]
  32. };
  33. },
  34. data() {
  35. return {};
  36. },
  37. created() {
  38. this.needLogin();
  39. },
  40. methods: {
  41. back() {
  42. this.$router.go(-1);
  43. },
  44. copy() {
  45. var clipboard = new Clipboard(".tag-read");
  46. clipboard.on("success", e => {
  47. console.log("复制成功");
  48. // 释放内存
  49. clipboard.destroy();
  50. });
  51. clipboard.on("error", e => {
  52. // 不支持复制
  53. console.log("该浏览器不支持自动复制");
  54. // 释放内存
  55. clipboard.destroy();
  56. });
  57. }
  58. }
  59. };
  60. </script>
  61. <style>
  62. body {
  63. background-color: white;
  64. }
  65. </style>
  66. <style lang='less' scoped>
  67. .box {
  68. margin-top: 25vh;
  69. display: flex;
  70. flex-direction: column;
  71. align-items: center;
  72. }
  73. .btn {
  74. width: 2.8rem;
  75. height: 0.8rem;
  76. background: rgba(48, 142, 255, 1);
  77. box-shadow: 0rem 0.04rem 0.12rem 0rem rgba(48, 142, 255, 0.3);
  78. border-radius: 0.04rem;
  79. line-height: 0.8rem;
  80. text-align: center;
  81. font-size: 0.28rem;
  82. font-family: PingFangSC-Medium, PingFang SC;
  83. font-weight: 500;
  84. color: rgba(255, 255, 255, 1);
  85. margin-top: 0.64rem;
  86. }
  87. .link > span {
  88. font-size: 0.24rem;
  89. font-family: PingFangSC-Medium, PingFang SC;
  90. font-weight: 500;
  91. color: rgba(48, 142, 255, 1);
  92. }
  93. .link {
  94. font-size: 0.26rem;
  95. font-family: PingFangSC-Regular, PingFang SC;
  96. font-weight: 400;
  97. color: rgba(146, 154, 164, 1);
  98. line-height: 0.36rem;
  99. }
  100. .tip {
  101. font-size: 0.3rem;
  102. font-family: PingFangSC-Regular, PingFang SC;
  103. font-weight: 400;
  104. color: rgba(44, 52, 62, 1);
  105. line-height: 0.51rem;
  106. margin-top: 0.36rem;
  107. margin-bottom: 0.07rem;
  108. }
  109. img {
  110. width: 3.28rem;
  111. height: 2.7rem;
  112. }
  113. </style>