See999 4 years ago
parent
commit
4314db4d46
4 changed files with 160 additions and 132 deletions
  1. 3 3
      config/dev.env.js
  2. 15 15
      config/index.js
  3. 132 108
      src/scrm_pages/site/index.vue
  4. 10 6
      src/scrm_pages/site/preview.vue

+ 3 - 3
config/dev.env.js View File

@@ -2,13 +2,13 @@ module.exports = {
2 2
   NODE_ENV: '"development"',
3 3
   ENV_CONFIG: '"dev"',
4 4
   BASE_API:'"http://api.test1.sgjyun.com"',//'"http://localhost:9534"'
5
+  // BASE_API: '"http://localhost:9534"'
5 6
   // BASE_API:'"http://api.scrm.kuyicloud.com"',//'"http://localhost:9534"'
6 7
   // BASE_API:'"http://localhost:9536"',
7
-  
8
+
8 9
   //  SSO_HOST: '"http://testsso.sgjyun.com"',
9 10
   //  SRCM_HOST: '"http://test1.sgjyun.com"',
10 11
   //  XT_HOST: '"http://xt.test.sgjyun.com"',
11 12
   //  MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
12 13
   //  CDM_HOST: '"http://cdm.test.sgjyun.com"',
13
-}
14
-
14
+};

+ 15 - 15
config/index.js View File

@@ -1,14 +1,14 @@
1
-'use strict'
1
+"use strict";
2 2
 // Template version: 1.2.6
3 3
 // see http://vuejs-templates.github.io/webpack for documentation.
4 4
 
5
-const path = require('path')
5
+const path = require("path");
6 6
 
7 7
 module.exports = {
8 8
   dev: {
9 9
     // Paths
10
-    assetsSubDirectory: 'static',
11
-    assetsPublicPath: '/',
10
+    assetsSubDirectory: "static",
11
+    assetsPublicPath: "/",
12 12
     proxyTable: {},
13 13
 
14 14
     // Various Dev Server settings
@@ -16,9 +16,9 @@ module.exports = {
16 16
     // can be overwritten by process.env.HOST
17 17
     // if you want dev by ip, please set host: '0.0.0.0'
18 18
 
19
-    host: 'test1.sgjyun.com',
19
+    host: "test1.sgjyun.com",
20 20
     //  host: 'microweb.kuyicloud.com',
21
-    // host: 'localhost',
21
+    // host: "localhost",
22 22
     // host: 'jk.kuyicloud.com',
23 23
     port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
24 24
     // host: 'test1.sgjyun.com',
@@ -41,7 +41,7 @@ module.exports = {
41 41
      */
42 42
 
43 43
     // https://webpack.js.org/configuration/devtool/#development
44
-    devtool: '#cheap-source-map',
44
+    devtool: "#cheap-source-map",
45 45
 
46 46
     // If you have problems debugging vue-files in devtools,
47 47
     // set this to false - it *may* help
@@ -53,16 +53,16 @@ module.exports = {
53 53
     // (https://github.com/webpack/css-loader#sourcemaps)
54 54
     // In our experience, they generally work as expected,
55 55
     // just be aware of this issue when enabling this option.
56
-    cssSourceMap: false,
56
+    cssSourceMap: false
57 57
   },
58 58
 
59 59
   build: {
60 60
     // Template for index.html
61
-    index: path.resolve(__dirname, '../dist/index.html'),
61
+    index: path.resolve(__dirname, "../dist/index.html"),
62 62
 
63 63
     // Paths
64
-    assetsRoot: path.resolve(__dirname, '../dist'),
65
-    assetsSubDirectory: 'static',
64
+    assetsRoot: path.resolve(__dirname, "../dist"),
65
+    assetsSubDirectory: "static",
66 66
 
67 67
     /**
68 68
      * You can set by youself according to actual condition
@@ -72,21 +72,21 @@ module.exports = {
72 72
      * In most cases please use '/' !!!
73 73
      */
74 74
     // assetsPublicPath: '/vue-element-admin/', // If you are deployed on the root path, please use '/'
75
-    assetsPublicPath: './',
75
+    assetsPublicPath: "./",
76 76
 
77 77
     /**
78 78
      * Source Maps
79 79
      */
80 80
     productionSourceMap: false,
81 81
     // https://webpack.js.org/configuration/devtool/#production
82
-    devtool: '#source-map',
82
+    devtool: "#source-map",
83 83
 
84 84
     // Gzip off by default as many popular static hosts such as
85 85
     // Surge or Netlify already gzip all static assets for you.
86 86
     // Before setting to `true`, make sure to:
87 87
     // npm install --save-dev compression-webpack-plugin
88 88
     productionGzip: false,
89
-    productionGzipExtensions: ['js', 'css'],
89
+    productionGzipExtensions: ["js", "css"],
90 90
 
91 91
     // Run the build command with an extra argument to
92 92
     // View the bundle analyzer report after build finishes:
@@ -94,4 +94,4 @@ module.exports = {
94 94
     // Set to `true` or `false` to always turn it on or off
95 95
     bundleAnalyzerReport: process.env.npm_config_report
96 96
   }
97
-}
97
+};

+ 132 - 108
src/scrm_pages/site/index.vue View File

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

+ 10 - 6
src/scrm_pages/site/preview.vue View File

@@ -1453,7 +1453,7 @@
1453 1453
              </el-dialog>
1454 1454
 
1455 1455
               <!-- 手机模拟页面 -->
1456
-               <el-col :span="10">
1456
+               <el-col :span="10" class="one">
1457 1457
                   <div class="phone">
1458 1458
                    <div class="time">9:42</div>
1459 1459
                    <div class="xinhao"></div>
@@ -1791,7 +1791,7 @@
1791 1791
                  </div>
1792 1792
                </el-col>
1793 1793
 
1794
-               <el-col :span="7">
1794
+               <el-col :span="7" >
1795 1795
                  <div class="share"  v-show="navigation">
1796 1796
                   <div class="share2">
1797 1797
                     <span class="share3">导航设置</span>
@@ -5434,6 +5434,7 @@ export default {
5434 5434
     //  margin-left: -10px;
5435 5435
      margin-top: 10px;
5436 5436
 
5437
+    margin-left: 100px;
5437 5438
    }
5438 5439
 
5439 5440
    .share2{
@@ -5462,7 +5463,10 @@ export default {
5462 5463
        margin-left: 220px;
5463 5464
        margin-top: -22px;
5464 5465
      }
5465
-
5466
+.one{
5467
+  display: flex;
5468
+  justify-content: space-around;
5469
+}
5466 5470
   .phone{
5467 5471
    float: left;
5468 5472
    width: 380px;
@@ -5473,12 +5477,12 @@ export default {
5473 5477
   }
5474 5478
   .macgic{
5475 5479
     position: absolute;
5476
-    width: 316px;
5480
+    width: 319px;
5477 5481
     height:60px;
5478 5482
     background-color: white;
5479 5483
     border: solid 1px #333333;
5480
-    margin-left: 32px;
5481
-    margin-top: 650px;
5484
+    // margin-left: 32px;
5485
+    margin-top: 652px;
5482 5486
     z-index: 999;
5483 5487
     // border:solid 1px red;
5484 5488
   }