erweimaRegister.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view style="text-align: center;height: 100%;position: absolute;width:100%;background: #F8F8F8;">
  3. <image style="width: 60px;height: 60px;margin-top: 70px;border-radius:10px" src="/static/logo.png">
  4. </image>
  5. <view style="font-size: 18px;margin-top: 8px;font-weight: 600">{{content}}</view>
  6. <image style="width: 150px;height: 150px;margin-top: 40px" :src="erweima">
  7. </image>
  8. <view v-if="isWeiXin" style="font-size: 28upx;color: grey;margin-top: 20px">长按识别上方二维码</view>
  9. <view v-if="!isWeiXin" style="font-size: 16px;margin-top: 10px">微信扫描或搜索关注【{{name}}】访问</view>
  10. <view v-if="isWeiXin" style="font-size: 16px;margin-top: 10px">微信关注【{{name}}】访问</view>
  11. <view v-if="isWeiXin" style="font-size: 28upx;color: grey;margin-top: 40px" @click="rests">无法识别?</view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. isWeiXin: false,
  19. name: '',
  20. content: '',
  21. erweima: '',
  22. webviewStyles: {
  23. progress: {
  24. color: '#FF3333'
  25. }
  26. }
  27. }
  28. },
  29. onLoad() {
  30. this.$Request.getT("/app/common/type/2").then(res => {
  31. if (res.code == 0) {
  32. if (res.data && res.data.value) {
  33. this.erweima = res.data.value;
  34. }
  35. }
  36. });
  37. this.$Request.getT("/app/common/type/3").then(res => {
  38. if (res.code == 0) {
  39. if (res.data && res.data.value) {
  40. this.name = res.data.value;
  41. }
  42. }
  43. });
  44. this.$Request.getT("/app/common/type/4").then(res => {
  45. if (res.code == 0) {
  46. if (res.data && res.data.value) {
  47. this.content = res.data.value;
  48. }
  49. }
  50. });
  51. },
  52. onPullDownRefresh: function() {
  53. uni.stopPullDownRefresh(); // 停止刷新
  54. },
  55. onShow() {
  56. //#ifdef H5
  57. this.follow()
  58. //#endif
  59. },
  60. methods: {
  61. follow() {
  62. if (this.$queue.getData("openid")) {
  63. this.$Request.get("/tao/wx/follow/" + this.$queue.getData("openid")).then(res => {
  64. if (res === true) {
  65. window.location.replace(this.$queue.publicYuMing());
  66. }
  67. });
  68. }
  69. },
  70. rests() {
  71. uni.showToast({
  72. title: "已刷新请再次长按识别",
  73. mask: false,
  74. duration: 1500,
  75. icon: "none"
  76. });
  77. window.location.reload();
  78. }
  79. },
  80. }
  81. </script>
  82. <style>
  83. @import "../../static/css/index.css";
  84. </style>