index.vue 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <el-row :gutter="20">
  8. <el-col :span="12">
  9. <div class="success">
  10. <h1 class="name">欢迎来到微官网主页</h1>
  11. <div class="tips">您可以手机扫码访问或在右侧预览</div>
  12. <div id="qrcode" class="qrcode"></div>
  13. <router-link to="/site/preview">
  14. <el-button type="primary">进入微官网后台</el-button>
  15. </router-link>
  16. </div>
  17. </el-col>
  18. <el-col :span="12">
  19. <div class="phone">
  20. <div class="phonetwo">9:42</div>
  21. <div class="phonethree">
  22. <img src="static/images/u189.png" style="width:100%;height:100%" />
  23. </div>
  24. <div class="phonefour">
  25. <img src="static/images/u187.png" style="width:100%;height:100%" />
  26. </div>
  27. <div class="phonefive">
  28. <img src="static/images/u188.png" style="width:100%;height:100%" />
  29. </div>
  30. <div class="phoneone">
  31. <iframe
  32. id="myIframe"
  33. :src="this.url"
  34. width="100%"
  35. height="100%"
  36. marginwidth="0"
  37. frameborder="no"
  38. scrolling="no"
  39. ></iframe>
  40. </div>
  41. </div>
  42. </el-col>
  43. </el-row>
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. import BreadCrumb from "../components/bread-crumb";
  49. import QRCode from 'qrcodejs2';
  50. // import {GetDefaultData,GetUserOrgid} from '@/api/site/site';
  51. import Vue from 'vue';
  52. export default {
  53. name: "site",
  54. components: {
  55. BreadCrumb
  56. },
  57. data() {
  58. return {
  59. crumbs: [{ path: false, name: "微网站" }],
  60. codeImg: require("../../assets/home/wei.jpg"),
  61. usreOrgID: "",
  62. // url:"http://microweb.kuyicloud.com/#/microHome?orgid="+this.$store.getters.xt_user.org_id,
  63. url:"http://jk.test.sgjyun.com/#/microHome?orgid="+this.$store.getters.xt_user.org_id,
  64. // url:"http://microweb.kuyicloud.com/#/microHome?orgid=3877",
  65. };
  66. },
  67. methods: {
  68. qrcode() {
  69. let qrcode = new QRCode("qrcode", {
  70. width: 100,
  71. height: 100, // 高度
  72. // text: 'http://microweb.kuyicloud.com/#/microHome?orgid='+this.$store.getters.xt_user.org_id // 二维码内容
  73. text:'http://jk.test.sgjyun.com/#/microHome?orgid='+this.$store.getters.xt_user.org_id,// 二维码内容
  74. // render: 'canvas' // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
  75. // background: '#f0f'
  76. // foreground: '#ff0'
  77. });
  78. console.log(qrcode);
  79. },
  80. GetDefaultData() {
  81. GetDefaultData().then(response => {
  82. if (response.data.state == 1) {
  83. var model = response.data.data.model;
  84. }
  85. });
  86. },
  87. GetUserOrgid() {
  88. GetUserOrgid().then(response => {
  89. if (response.data.state == 1) {
  90. var usreOrgID = response.data.data.usreOrgID;
  91. this.usreOrgID = response.data.data.usreOrgID;
  92. console.log("我的世界我做主", usreOrgID);
  93. }
  94. });
  95. },
  96. OK() {
  97. // 操作iframe中内容的CSS
  98. var iframe = document.getElementById("myIframe");
  99. var body = iframe.contentWindow.document.body;
  100. console.log(
  101. "结案设计师的拉升恐龙当家哈萨克刘德华拉科技好看多了经安徽省科技的哈里数据库蝴蝶结卡时间段哈萨克京东卡SDK"
  102. );
  103. console.log(body);
  104. body.style.borderRadius = 50;
  105. // a.style.margin = 50;
  106. }
  107. },
  108. mounted() {
  109. this.qrcode();
  110. this.OK();
  111. },
  112. created() {
  113. // this.GetUserOrgid();
  114. }
  115. };
  116. </script>
  117. <style rel="stylesheet/scss" lang="scss" scoped>
  118. .success {
  119. text-align: center;
  120. align-items: center;
  121. display: flex;
  122. flex-direction: column;
  123. .name {
  124. font-size: 30px;
  125. font-weight: bold;
  126. color: #333;
  127. margin: 0;
  128. padding-bottom: 10px;
  129. }
  130. .tips {
  131. line-height: 30px;
  132. padding-bottom: 10px;
  133. }
  134. .site-code {
  135. width: 200px;
  136. padding-bottom: 10px;
  137. img {
  138. width: 100%;
  139. }
  140. }
  141. .qrcode {
  142. margin-bottom: 10px;
  143. width: 100px;
  144. height: 100px;
  145. }
  146. }
  147. .phone {
  148. width: 380px;
  149. height: 750px;
  150. background: url(../../assets/img/phone.png) 50% no-repeat;
  151. }
  152. .phoneone {
  153. position: absolute;
  154. width: 320px;
  155. height: 660px;
  156. // border: solid 1px red;
  157. margin-top: 60px;
  158. margin-left: 30px;
  159. text-align: center;
  160. }
  161. .phonetwo {
  162. position: absolute;
  163. width: 50px;
  164. height: 20px;
  165. // border:solid 1px blue;
  166. margin-left: 55px;
  167. margin-top: 40px;
  168. }
  169. .phonethree {
  170. position: absolute;
  171. width: 20px;
  172. height: 20px;
  173. margin-left: 280px;
  174. margin-top: 40px;
  175. }
  176. .phonefour {
  177. position: absolute;
  178. width: 20px;
  179. height: 20px;
  180. margin-left: 300px;
  181. margin-top: 40px;
  182. }
  183. .phonefive {
  184. position: absolute;
  185. width: 20px;
  186. height: 20px;
  187. margin-left: 325px;
  188. margin-top: 40px;
  189. }
  190. </style>