Baozhangchao 3 anni fa
parent
commit
412e7fdd0e

BIN
src/assets/images/1home.png Vedi File


BIN
src/assets/images/2home.png Vedi File


+ 8
- 8
src/utils/wx.js Vedi File

@@ -1,6 +1,6 @@
1 1
 // import request from '@/utils/request'
2 2
 
3
-function request(url, options) {
3
+function request (url, options) {
4 4
   return fetch(url, options)
5 5
     .then(response => response.json())
6 6
     .then(data => {
@@ -19,7 +19,7 @@ const jsApiList = [
19 19
   'onMenuShareQZone'
20 20
 ]
21 21
 
22
-function init(url) {
22
+function init (url) {
23 23
   request(`https://api.h5.njyunzhi.com/mp/jssdk?url=${encodeURIComponent(url)}`).then((res) => {
24 24
     window.wx.config({
25 25
       debug: process.env.NODE_ENV === 'development', // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
@@ -38,8 +38,8 @@ function init(url) {
38 38
  * 分享到好友或者QQ
39 39
  * @param {*} opt
40 40
  */
41
-export function shareData(opt) {
42
-  window.wx.ready(function() {
41
+export function shareData (opt) {
42
+  window.wx.ready(function () {
43 43
     window.wx.updateAppMessageShareData({
44 44
       title: opt.title, // 分享标题
45 45
       desc: opt.desc, // 分享描述
@@ -49,8 +49,8 @@ export function shareData(opt) {
49 49
   })
50 50
 }
51 51
 
52
-export function shareTimeline(opt) {
53
-  window.wx.ready(function() {
52
+export function shareTimeline (opt) {
53
+  window.wx.ready(function () {
54 54
     window.wx.updateTimelineShareData({
55 55
       title: opt.title, // 分享标题
56 56
       link: opt.link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
@@ -63,9 +63,9 @@ export function shareTimeline(opt) {
63 63
  * 分享全部
64 64
  * @param {*} opt
65 65
  */
66
-export function share(opt) {
66
+export function share (opt) {
67 67
   init(opt.link)
68
-  window.wx.ready(function() {
68
+  window.wx.ready(function () {
69 69
     jsApiList.map((apiName) => {
70 70
       const api = window.wx[apiName]
71 71
       api({

+ 11
- 4
src/views/components/IndexImage.vue Vedi File

@@ -4,21 +4,28 @@
4 4
     <div class="index-inner-swiper" :style="swiperItemStyle">
5 5
       <swiper v-if="showSwiper" :options="swiperOptions">
6 6
         <swiper-slide class="index-inner-slide">
7
-          <img :src="require('@/assets/images/按钮-1.png')" alt="" @click="$router.push({ name: 'Apartment' })">
7
+          <img
8
+            :src="require('@/assets/images/1home.png')"
9
+            alt
10
+            @click="$router.push({ name: 'Apartment' })"
11
+          />
8 12
         </swiper-slide>
9 13
         <swiper-slide class="index-inner-slide">
10
-          <img :src="require('@/assets/images/按钮-2.png')" alt="" @click="$router.push({ name: 'Office' })">
14
+          <img
15
+            :src="require('@/assets/images/2home.png')"
16
+            alt
17
+            @click="$router.push({ name: 'Office' })"
18
+          />
11 19
         </swiper-slide>
12 20
       </swiper>
13 21
     </div>
14 22
     <div class="index-pos-hander" :style="handerStyle">
15
-      <img :src="require('@/assets/images/toLeft.png')" alt="">
23
+      <img :src="require('@/assets/images/toLeft.png')" alt />
16 24
     </div>
17 25
   </div>
18 26
 </template>
19 27
 
20 28
 <script>
21
-
22 29
 export default {
23 30
   name: 'IndexImage',
24 31
   data() {