Sfoglia il codice sorgente

应用市场调整移动端图片大小,将接口连接放在public

lixp11 4 anni fa
parent
commit
768d06a807

+ 1 - 0
2020/appstore/public/index.html

@ -28,5 +28,6 @@
28 28
      <div class="initgif"></div>
29 29
    </div>
30 30
    <!-- built files will be auto injected -->
31
    <script src="service-config.js"></script>
31 32
  </body>
32 33
</html>

+ 1 - 0
2020/appstore/public/service-config.js

@ -0,0 +1 @@
1
window.servicePath = '/display/getAppType';

+ 0 - 25
2020/appstore/src-new/App.vue

@ -1,25 +0,0 @@
1
<template>
2
  <div id="app">
3
    <router-view/>
4
  </div>
5
</template>
6
7
<script>
8
  export default {
9
    name: 'App',
10
    created() {
11
    },
12
    computed: {},
13
  };
14
</script>
15
<style>
16
  #app {
17
    -webkit-font-smoothing: antialiased;
18
    -moz-osx-font-smoothing: grayscale;
19
    text-align: center;
20
    color: #000000;
21
    font-size: 14px;
22
    font-weight: 400;
23
    font-family: PingFangSC, "微软雅黑", Arial, Helvetica, sans-serif;
24
  }
25
</style>

+ 0 - 1
2020/appstore/src-new/assets/img/app-down-android.svg

@ -1 +0,0 @@
1
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1609745206181" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1786" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M229.493567 343.057721h565.073089v409.938453a67.449841 67.449841 0 0 1-67.02828 67.750957h-46.311543v139.717528a63.414895 63.414895 0 1 1-126.82979 0v-139.717528H469.602957v139.717528c0 35.049828-28.42529 63.354672-63.535341 63.354672a63.234226 63.234226 0 0 1-62.752442-63.354672l-0.542007-139.717528h-45.588866a67.570287 67.570287 0 0 1-67.690734-67.750957V343.057721z m-87.443901-11.683276a63.234226 63.234226 0 0 0-63.414895 62.752441v264.740626c0 35.110051 28.365067 63.354672 63.414895 63.354672s62.752441-28.304844 62.752442-63.354672V394.126886c0-34.387374-28.184398-62.752441-62.752442-62.752441z m654.323682-10.478815H227.024422c0-97.862493 58.536826-182.837248 145.318273-227.101206L328.560522 13.215953a8.973238 8.973238 0 0 1 3.071376-12.34573c4.275838-1.866915 9.876584-0.662454 12.34573 3.733831l44.263958 81.240925c37.63942-16.681791 79.494456-25.895921 123.758414-25.895922s86.118993 9.21413 123.758414 25.835698L680.022372 4.543831c2.469146-4.336061 8.069892-5.540523 12.34573-3.733831a8.973238 8.973238 0 0 1 3.071376 12.34573l-43.782173 80.578471c86.23944 44.324181 144.716043 129.298936 144.716043 227.161429zM406.067616 194.126063a23.968783 23.968783 0 0 0-23.90856-24.029006 23.90856 23.90856 0 0 0-23.426775 24.029006c0 12.887737 10.418592 23.968783 23.426775 23.968782a23.90856 23.90856 0 0 0 23.90856-23.968782z m259.200103 0a23.90856 23.90856 0 0 0-23.426775-24.029006 23.968783 23.968783 0 0 0 0 47.997788 23.788114 23.788114 0 0 0 23.426775-23.968782z m216.682615 137.248382a62.631995 62.631995 0 0 0-62.752442 62.752441v264.740626a63.053557 63.053557 0 1 0 126.167337 0V394.126886a62.872888 62.872888 0 0 0-63.414895-62.752441z" p-id="1787" fill="#FFFFFF"></path></svg>

+ 0 - 1
2020/appstore/src-new/assets/img/app-down-iOS.svg

@ -1 +0,0 @@
1
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1609746029473" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3098" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M798.293333 832C762.88 884.906667 725.333333 936.533333 668.16 937.386667 610.986667 938.666667 592.64 903.68 527.786667 903.68 462.506667 903.68 442.453333 936.533333 388.266667 938.666667 332.373333 940.8 290.133333 882.346667 254.293333 830.72 181.333333 725.333333 125.44 531.2 200.533333 400.64 237.653333 335.786667 304.213333 294.826667 376.32 293.546667 430.933333 292.693333 482.986667 330.666667 516.693333 330.666667 549.973333 330.666667 613.12 285.013333 679.253333 291.84 706.986667 293.12 784.64 302.933333 834.56 376.32 830.72 378.88 741.973333 430.933333 742.826667 538.88 744.106667 667.733333 855.893333 710.826667 857.173333 711.253333 855.893333 714.24 839.253333 772.693333 798.293333 832M554.666667 149.333333C585.813333 113.92 637.44 87.04 680.106667 85.333333 685.653333 135.253333 665.6 185.6 635.733333 221.44 606.293333 257.706667 557.653333 285.866667 509.866667 282.026667 503.466667 232.96 527.36 181.76 554.666667 149.333333Z" p-id="3099" fill="#FFFFFF"></path></svg>

+ 0 - 1
2020/appstore/src-new/assets/img/app-down-qrcode.svg

@ -1 +0,0 @@
1
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1609742906737" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" data-spm-anchor-id="a313x.7781069.0.i1" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M448.443475 67.101257l63.554478 0 0 63.558571-63.554478 0 0-63.558571Z" p-id="2511" data-spm-anchor-id="a313x.7781069.0.i7" class="selected" fill="#ffffff"></path><path d="M448.443475 448.441429 67.103304 448.441429 67.103304 512 130.657782 512 130.657782 575.558571 194.216353 575.558571 194.216353 512 257.770831 512 257.770831 575.558571 511.997953 575.558571 511.997953 512 448.443475 512Z" p-id="2512" data-spm-anchor-id="a313x.7781069.0.i8" class="selected" fill="#ffffff"></path><path d="M766.228145 575.558571 766.228145 448.441429 702.669574 448.441429 702.669574 575.558571 639.111003 575.558571 639.111003 512 575.556525 512 575.556525 639.113049 448.443475 639.113049 448.443475 766.226099 575.556525 766.226099 575.556525 702.671621 639.111003 702.671621 639.111003 639.113049 829.782623 639.113049 829.782623 575.558571Z" p-id="2513" data-spm-anchor-id="a313x.7781069.0.i11" class="selected" fill="#ffffff"></path><path d="M829.782623 448.441429 829.782623 512 893.341195 512 893.341195 575.558571 956.896696 575.558571 956.896696 512 956.896696 448.441429 893.341195 448.441429Z" p-id="2514" data-spm-anchor-id="a313x.7781069.0.i13" class="selected" fill="#ffffff"></path><path d="M829.782623 639.113049l127.113049 0 0 63.558571-127.113049 0 0-63.558571Z" p-id="2515" data-spm-anchor-id="a313x.7781069.0.i14" class="selected" fill="#ffffff"></path><path d="M448.443475 829.78467 448.443475 893.340171 448.443475 956.898743 511.997953 956.898743 511.997953 893.340171 575.556525 893.340171 639.111003 893.340171 639.111003 956.898743 702.669574 956.898743 702.669574 893.340171 702.669574 829.78467 766.228145 829.78467 766.228145 893.340171 766.228145 956.898743 893.341195 956.898743 956.896696 956.898743 956.896696 766.226099 893.341195 766.226099 893.341195 893.340171 829.782623 893.340171 829.782623 766.226099 766.228145 766.226099 766.228145 702.671621 702.669574 702.671621 702.669574 766.226099 575.556525 766.226099 575.556525 829.78467Z" p-id="2516" data-spm-anchor-id="a313x.7781069.0.i12" class="selected" fill="#ffffff"></path><path d="M384.884904 67.101257 67.103304 67.101257l0 317.785693 317.7816 0L384.884904 67.101257zM321.329403 321.328379 130.657782 321.328379 130.657782 130.659829l190.671621 0L321.329403 321.328379z" p-id="2517" data-spm-anchor-id="a313x.7781069.0.i5" class="selected" fill="#ffffff"></path><path d="M194.216353 194.214307l63.554478 0 0 63.558571-63.554478 0 0-63.558571Z" p-id="2518" data-spm-anchor-id="a313x.7781069.0.i6" class="selected" fill="#ffffff"></path><path d="M67.103304 956.898743l317.7816 0L384.884904 639.113049 67.103304 639.113049 67.103304 956.898743zM130.657782 702.671621l190.671621 0 0 190.668551L130.657782 893.340171 130.657782 702.671621z" p-id="2519" data-spm-anchor-id="a313x.7781069.0.i9" class="selected" fill="#ffffff"></path><path d="M194.216353 766.226099l63.554478 0 0 63.558571-63.554478 0 0-63.558571Z" p-id="2520" data-spm-anchor-id="a313x.7781069.0.i10" class="selected" fill="#ffffff"></path><path d="M639.111003 67.101257l0 317.785693 317.785693 0L956.896696 67.101257 639.111003 67.101257zM893.341195 321.328379 702.669574 321.328379 702.669574 130.659829l190.671621 0L893.341195 321.328379z" p-id="2521" data-spm-anchor-id="a313x.7781069.0.i2" class="selected" fill="#ffffff"></path><path d="M766.228145 194.214307l63.554478 0 0 63.558571-63.554478 0 0-63.558571Z" p-id="2522" data-spm-anchor-id="a313x.7781069.0.i3" class="selected" fill="#ffffff"></path><path d="M575.556525 384.886951 575.556525 321.328379 511.997953 321.328379 511.997953 257.772878 575.556525 257.772878 575.556525 130.659829 511.997953 130.659829 511.997953 194.214307 448.443475 194.214307 448.443475 384.886951 511.997953 384.886951 511.997953 448.441429 511.997953 512 575.556525 512 575.556525 448.441429Z" p-id="2523" data-spm-anchor-id="a313x.7781069.0.i0" class="selected" fill="#ffffff"></path></svg>

BIN
2020/appstore/src-new/assets/img/logo.png


+ 0 - 110
2020/appstore/src-new/components/AppDownload.vue

@ -1,110 +0,0 @@
1
<template>
2
  <div class="black-sheild">
3
    <div class="download-card">
4
      <div v-show="isShow(apkType)" class="splitline"></div>
5
      <div @click="closeDownload" class="close-card">×</div>
6
      <template v-for="apk in apkType">
7
        <div class="download-item" :key="apk.APK_ID">
8
          <app-qr class="download-qrcode"
9
                  :margin="0"
10
                  :text="apk.APK_URL"
11
                  :size="176">
12
          </app-qr>
13
          <div class="download-type">{{apk.APK_TYPE}} 版扫描下载</div>
14
        </div>
15
      </template>
16
    </div>
17
  </div>
18
</template>
19
20
<script>
21
  import vueQr from 'vue-qr';
22
23
  export default {
24
    name: 'Download',
25
    props: ['apkType'],
26
    components: {
27
      'app-qr': vueQr,
28
    },
29
    created() {
30
      console.log("down", this.apkType);
31
    },
32
    methods: {
33
      isShow(apkType) {
34
        return apkType.length === 2;
35
      },
36
      closeDownload() {
37
        this.$emit("onDownClose");
38
      },
39
    },
40
  };
41
</script>
42
43
<style>
44
  .black-sheild {
45
    width: 100%;
46
    height: 100%;
47
    background-color: rgba(0, 0, 0, 0.5);;
48
    position: fixed;
49
    top: 0;
50
    left: 0;
51
  }
52
53
  .download-card {
54
    width: 673px;
55
    height: 378px;
56
    position: absolute;
57
    top: 50%;
58
    left: 50%;
59
    background: #FFFFFF;
60
    border-radius: 8px;
61
    margin-left: -336.5px;
62
    margin-top: -189px;
63
    display: flex;
64
    justify-content: center;
65
    align-items: center;
66
  }
67
68
  .splitline {
69
    position: absolute;
70
    left: 50%;
71
    width: 1px;
72
    height: 298px;
73
    margin: 0px auto;
74
    padding: 0px;
75
    overflow: hidden;
76
    background: #000000;
77
    opacity: 0.09;
78
  }
79
80
  .close-card {
81
    width: 24px;
82
    height: 24px;
83
    position: absolute;
84
    top: 20px;
85
    right: 20px;
86
    font-size: 22px;
87
    line-height: 22px;
88
    cursor: pointer;
89
    opacity: .65;
90
    transition: opacity .2s ease-in-out;
91
  }
92
93
  .close-card:hover {
94
    opacity: .95;
95
  }
96
97
  .download-qrcode {
98
    width: 176px;
99
    height: 176px;
100
    margin: 0 80px;
101
  }
102
103
  .download-type {
104
    font-size: 14px;
105
    font-family: PingFangSC-Regular, PingFang SC;
106
    opacity: .65;
107
    line-height: 22px;
108
    margin-top: 20px;
109
  }
110
</style>

+ 0 - 60
2020/appstore/src-new/components/AppSearch.vue

@ -1,60 +0,0 @@
1
<template>
2
  <div class="app-search">
3
    <el-autocomplete
4
      :fetch-suggestions="querySearchAsync"
5
      v-model="value"
6
      placeholder="请输入搜索内容"
7
      @select="handleSelect"
8
    >
9
      <i
10
        class="el-input__icon el-icon-search"
11
        slot="suffix"
12
        @click="handleIconClick"></i>
13
    </el-autocomplete>
14
  </div>
15
</template>
16
17
<script>
18
export default {
19
  data() {
20
    return {
21
      value: '',
22
      appname: [],
23
      timeout: null,
24
    };
25
  },
26
  methods: {
27
    querySearchAsync() {
28
    },
29
    handleSelect() {
30
    },
31
    handleIconClick() {
32
    },
33
  },
34
};
35
</script>
36
37
<style>
38
.app-search {
39
  width: 200px;
40
  margin: auto 0;
41
}
42
43
/* 自定义搜索框样式 */
44
.el-input__inner {
45
  width: 200px;
46
  height: 32px;
47
  color: #000000;
48
  font-family: PingFangSC-Regular, PingFang SC;
49
  font-weight: 400;
50
  line-height: 22px;
51
  border: 1px solid #000000;
52
  padding: 0 12px;
53
  background-color: #FFFFFF;
54
}
55
56
.el-icon-search {
57
  line-height: 32px;
58
  cursor: pointer;
59
}
60
</style>

+ 0 - 24
2020/appstore/src-new/main.js

@ -1,24 +0,0 @@
1
import Vue from 'vue';
2
import {
3
  Autocomplete,
4
  Row,
5
  Col,
6
} from 'element-ui';
7
8
import App from './App.vue';
9
import router from './router';
10
import store from './store';
11
import axios from 'axios';
12
13
Vue.config.productionTip = false;
14
Vue.prototype.$http = axios;
15
16
Vue.use(Autocomplete);
17
Vue.use(Row);
18
Vue.use(Col);
19
20
new Vue({
21
  router,
22
  store,
23
  render: (h) => h(App),
24
}).$mount('#app');

+ 0 - 33
2020/appstore/src-new/router/index.js

@ -1,33 +0,0 @@
1
import Vue from 'vue';
2
import VueRouter from 'vue-router';
3
import Home from '../views/Home.vue';
4
import Frame from '../views/Frame.vue';
5
6
Vue.use(VueRouter);
7
8
const routes = [
9
  {
10
    path: '',
11
    name: 'Frame',
12
    component: Frame,
13
    children: [
14
      {
15
        path: '/',
16
        name: 'Home',
17
        component: Home
18
      }, {
19
        path: '/detail',
20
        name: 'Detail',
21
        component: () => import(/* webpackChunkName: "New" */ '../views/Detail.vue'),
22
      }
23
    ]
24
  }
25
];
26
27
const router = new VueRouter({
28
  mode: 'hash',
29
  base: process.env.BASE_URL,
30
  routes,
31
});
32
33
export default router;

+ 0 - 52
2020/appstore/src-new/store/index.js

@ -1,52 +0,0 @@
1
import Vue from 'vue';
2
import Vuex from 'vuex';
3
4
5
Vue.use(Vuex);
6
7
export default new Vuex.Store({
8
  // use Mutation to change state
9
  strict: true,
10
  state: {
11
    appData: null,      // 数据结果集共享
12
    appType: null,      // 当前
13
  },
14
  getters: {
15
    appList: (state) => {
16
      let appData = state.appData;
17
      console.log("appList", appData, state.appType);
18
      if (appData && state.appType) {
19
        let list = appData.find(item => item.APP_CATALOG_ID == state.appType)['APP_LIST'];
20
        console.log("store list", list);
21
        return list;
22
      } else {
23
        return [];
24
      }
25
    },
26
    appType: state => state.appType,
27
    appTypeName: state => {
28
      let appData = state.appData;
29
      if (appData && state.appType) {
30
        let name = appData.find(item => item.APP_CATALOG_ID == state.appType).CATALOG_NAME;
31
        return name;
32
      } else {
33
        return "";
34
      }
35
    }
36
  },
37
  mutations: {
38
    // 加载动画
39
    setAppData(state, data) {
40
      console.log("setData", data);
41
      state.appData = data;
42
      if (state.appType == null && data[0]) {     // 设置默认参数
43
        state.appType = data[0].APP_CATALOG_ID;
44
      }
45
    },
46
    setAppType(state, type) {
47
      console.log("setType", type);
48
      state.appType = type;
49
    }
50
  },
51
  actions: {},
52
});

+ 0 - 261
2020/appstore/src-new/views/Detail.vue

@ -1,261 +0,0 @@
1
<template>
2
  <div class="app-detail">
3
    <div class="catalog">
4
      <div class="main-content">
5
        <div class="front-catalog">{{appTypeName}}<span>></span></div>
6
        <div class="current-catalog">{{appInfo.APP_NAME}}</div>
7
      </div>
8
    </div>
9
    <div class="app-detail-body">
10
      <div class="main-content">
11
        <div class="app-detail-left">
12
          <img :src="appInfo.APP_LOGO_URL" class="app-detail-logo">
13
          <div class="app-detail-info">
14
            <div class="app-detail-name">{{appInfo.APP_NAME}}</div>
15
            <div class="app-detail-type">类型:</div>
16
            <div class="app-detail-version"><span>版本:</span>
17
              <template v-for="v in appInfo.APP_INFO">
18
                <span :key="v.APK_TYPE" :class="v.APK_TYPE">
19
                  {{v.APK_TYPE}}版本: {{v.APK_VERSION}}
20
                  <span v-if="appInfo.APP_INFO.length === 2" class="version-line">|</span>
21
                </span>
22
              </template>
23
            </div>
24
            <div class="app-detail-size">大小:</div>
25
            <div class="app-detail-update">
26
              更新:{{formatChange(appInfo.CREATE_DATE)}}
27
            </div>
28
          </div>
29
        </div>
30
        <div class="app-down-info">
31
          <template v-for="v in appInfo.APP_INFO">
32
            <div :key="v.APK_TYPE" :href="v.APK_URL" :class="v.APK_TYPE">
33
              <a><span class="app-down-type"></span>{{changeLang(v.APK_TYPE)}}版下载</a>
34
              <span class="app-down-qrcode"><span class="app-down-qrcode-body"></span></span>
35
            </div>
36
          </template>
37
        </div>
38
      </div>
39
    </div>
40
41
    <div class="app-detail-preview">
42
      <div class="main-content">
43
        <template v-for="(url, index) in getAppPreview(appInfo)">
44
          <img :src="appInfo[url]" :key="index" class="app-preview-img">
45
        </template>
46
      </div>
47
    </div>
48
49
  </div>
50
</template>
51
52
<script>
53
  export default {
54
    name: 'Detail',
55
    data() {
56
      return {
57
        showDownCard: false,
58
      };
59
    },
60
    computed: {
61
      appInfo: function f() {
62
        let appInfo = this.$store.getters.appList.find(item => item.APP_ID == this.$route.query.appID);
63
        console.log('appInfo', appInfo);
64
        if (appInfo) {
65
          return appInfo;
66
        } else {
67
          return {};
68
        }
69
      },
70
      appTypeName: function () {
71
        return this.$store.getters.appTypeName;
72
      }
73
    },
74
    created() {
75
      console.log(this.$route.query.appID);
76
      let appInfo = this.$store.getters.appList.find(item => item.APP_ID == this.$route.query.appID);
77
      console.log('appInfo', appInfo);
78
      if (appInfo) {
79
        this.appInfo = appInfo;
80
      }
81
    },
82
    methods: {
83
      sortApkType(apkType) {
84
        let sortResult = [];
85
86
        if (apkType.length === 1) {
87
          sortResult = [...apkType];
88
        } else if (apkType[0].APK_TYPE === 'iOS') {
89
          sortResult = [...apkType];
90
        } else {
91
          sortResult = [apkType[1], apkType[0]];
92
        }
93
94
        return sortResult;
95
      },
96
      formatChange(e) {
97
        const str = String(e);
98
        return str.substring(0, 10).split('-').join('/');
99
      },
100
      getAppPreview(app) {
101
        const appPreview = [];
102
        Object.keys(app).forEach((el) => {
103
          if (/APP_PREVIEW\d_URL/.test(el) && app[el] !== null) {
104
            console.log(el);
105
            appPreview.push(el);
106
          }
107
        });
108
        return appPreview;
109
      },
110
      changeLang(e) {
111
        if (e === 'iOS') return '苹果';
112
        if (e === 'android') return '安卓';
113
        return 0;
114
      },
115
    },
116
  };
117
</script>
118
119
<style>
120
  .catalog {
121
    height: 40px;
122
    background: #f5f5f5;
123
  }
124
125
  .catalog .main-content {
126
    justify-content: flex-start;
127
  }
128
129
  .catalog .main-content div {
130
    line-height: 40px;
131
    font-family: PingFangSC-Regular, PingFang SC;
132
  }
133
134
  .front-catalog {
135
    opacity: .65;
136
  }
137
138
  .front-catalog span {
139
    margin: 0 10px;
140
  }
141
142
  .app-detail-body .main-content {
143
    padding-top: 50px;
144
    padding-bottom: 28px;
145
    border-bottom: 1px solid #e8e8e8;
146
    align-items: flex-end;
147
  }
148
149
  .app-detail-left {
150
    display: flex;
151
    justify-content: flex-start;
152
    text-align: left;
153
  }
154
155
  .app-detail-logo {
156
    width: 130px;
157
    height: 130px;
158
  }
159
160
  .app-detail-info {
161
    font-family: PingFangSC-Regular, PingFang SC;
162
    margin-left: 23px;
163
  }
164
165
  .app-detail-info .app-detail-name {
166
    font-size: 24px;
167
    opacity: .85;
168
    line-height: 24px;
169
    margin-bottom: 22px;
170
  }
171
172
  .app-detail-info div {
173
    font-size: 14px;
174
    line-height: 20px;
175
    opacity: .45;
176
  }
177
178
  .android .version-line {
179
    display: none;
180
  }
181
182
  .app-down-info div {
183
    display: flex;
184
    justify-content: space-between;
185
    align-items: center;
186
    color: #FFFFFF;
187
    width: 153px;
188
    height: 32px;
189
    border-radius: 4px;
190
    margin-top: 8px;
191
  }
192
193
  .app-down-info a {
194
    width: 121px;
195
    height: 100%;
196
    text-align: left;
197
    text-decoration: none;
198
    line-height: 32px;
199
    display: flex;
200
    align-items: center;
201
  }
202
203
  .app-down-info .android {
204
    background: #FF7404;
205
  }
206
207
  .app-down-info .iOS {
208
    background: #19BB21;
209
  }
210
211
  .app-down-info a span {
212
    width: 18px;
213
    height: 18px;
214
    background-size: 100%;
215
    background-repeat: no-repeat;
216
  }
217
218
  .app-down-info a span {
219
    margin: 0 7px 0 16px;
220
  }
221
222
  .app-down-info .android a span {
223
    background-image: url(../assets/img/app-down-android.svg);
224
  }
225
226
  .app-down-info .iOS a span {
227
    background-image: url(../assets/img/app-down-iOS.svg);
228
  }
229
230
  .app-down-qrcode {
231
    width: 31px;
232
    height: 100%;
233
    background-size: 18px;
234
    background-repeat: no-repeat;
235
    background-position: center;
236
    background-image: url(../assets/img/app-down-qrcode.svg);
237
  }
238
239
  .app-down-qrcode-body {
240
    width: 100%;
241
    height: 100%;
242
    opacity: .09;
243
    border-left: 1px solid #000000;
244
  }
245
246
  .app-detail-preview {
247
    padding: 28px 0;
248
  }
249
250
  .app-detail-preview .main-content {
251
    width: 990px;
252
    justify-content: flex-start;
253
  }
254
255
  .app-preview-img {
256
    width: 217px;
257
    height: auto;
258
    margin: 0 15px;
259
  }
260
261
</style>

+ 0 - 146
2020/appstore/src-new/views/Frame.vue

@ -1,146 +0,0 @@
1
<template>
2
  <div>
3
    <div class="app-head">
4
      <div class="main-content">
5
        <div class="app-logo">{{appTitle}}</div>
6
        <app-search></app-search>
7
      </div>
8
    </div>
9
    <!-- 框架页部分 -->
10
    <div class="app-nav">
11
      <div class="main-content">
12
        <template v-for="appType in appTypes">
13
          <div class="app-nav-item" :class="{active: isActive(appType.APP_CATALOG_ID)}"
14
               :key="appType.APP_CATALOG_ID">
15
            <router-link :to="{ name: 'Home', query: { appTypeId: appType.APP_CATALOG_ID }}">
16
              {{appType.CATALOG_NAME}}
17
            </router-link>
18
          </div>
19
        </template>
20
      </div>
21
    </div>
22
    <router-view/>
23
  </div>
24
</template>
25
<script>
26
  export default {
27
    name: 'App',
28
    components: {
29
      'app-search': () => import('../components/AppSearch.vue'),
30
    },
31
    created() {
32
      let appType = this.$route.query.appTypeId;
33
      if (appType) {
34
        this.$store.commit('setAppType', appType);
35
      }
36
37
      this.$http.get('/display/getAppType').then((res) => {
38
        this.appTypes = res.data.APP_TYPE;
39
        this.$store.commit('setAppData', res.data.APP_TYPE);
40
      });
41
    },
42
    data() {
43
      return {
44
        appTypes: [],
45
        appTitle: 'IPU App Store'
46
      }
47
    },
48
    computed: {
49
      appTypeId: function () {
50
        return this.$store.getters.appType;
51
      }
52
    },
53
    methods: {
54
      isActive(appType) {
55
        return this.appTypeId == appType;
56
      }
57
    },
58
    beforeRouteUpdate(to, from, next) {  // 进入之前,更新state信息
59
      if (to.query.appTypeId) {
60
        this.$store.commit('setAppType', to.query.appTypeId);
61
      }
62
      next();
63
    }
64
  };
65
</script>
66
67
<style>
68
  html,
69
  body {
70
    position: relative;
71
  }
72
73
  html {
74
    overflow-x: hidden;
75
    overflow-y: scroll;
76
  }
77
78
  body {
79
    height: 100%;
80
    margin: 0 auto;
81
    overflow-x: hidden;
82
  }
83
84
  .main-content {
85
    width: 960px;
86
    margin: 0 auto;
87
    display: flex;
88
    justify-content: space-between;
89
    align-content: center;
90
  }
91
92
  .app-head {
93
    height: 60px;
94
    background: #1F2230;
95
    font-size: 20px;
96
    font-family: PingFangSC-Medium, PingFang SC;
97
    font-weight: 500;
98
    color: #FFFFFF;
99
    line-height: 28px;
100
  }
101
102
  .app-logo {
103
    width: 180px;
104
    height: 100%;
105
    background: url('../assets/img/logo.png') center left/auto 32px no-repeat;
106
    text-align: right;
107
    line-height: 60px;
108
  }
109
110
111
  .app-nav {
112
    height: 40px;
113
    background: #3A4556;
114
  }
115
116
  /* 定制菜单 */
117
  .app-nav .app-nav-item {
118
    height: 38px;
119
    color: #FFFFFF;
120
    font-family: PingFangSC-Regular, PingFang SC;
121
    line-height: 1;
122
    flex: 1;
123
    transition: background .2s ease-in-out;
124
  }
125
126
  .app-nav .app-nav-item.active {
127
    color: #19BB21;
128
    border-bottom: 2px solid #19BB21;
129
  }
130
131
  .app-nav .app-nav-item:hover {
132
    background-color: #424c58;
133
  }
134
135
  .app-nav .app-nav-item.active:hover {
136
    background-color: transparent;
137
  }
138
139
  .app-nav .app-nav-item a {
140
    display: inline-block;
141
    color: inherit;
142
    text-decoration: none;
143
    width: 100%;
144
    line-height: 40px;
145
  }
146
</style>

+ 0 - 171
2020/appstore/src-new/views/Home.vue

@ -1,171 +0,0 @@
1
<template>
2
3
  <div>
4
    <div class="app-list">
5
      <el-row :gutter="49.5">
6
        <el-col :span="8" :key=app.APP_ID v-for="app in appList">
7
          <div class="app-item" @click="toAppDetail(app.APP_ID)">
8
            <div class="main-content">
9
              <img class="app-img" :src="app.APP_LOGO_URL">
10
              <div class="app-info">
11
                <div class="app-name">
12
                  {{app.APP_NAME}}
13
                </div>
14
                <div class="main-content">
15
                  <div class="app-version">
16
                    <div :title="v.APK_VERSION" :key="v.APK_TYPE"
17
                         v-for="v in sortApkType(app.APP_INFO)">
18
                      {{v.APK_TYPE}}版本: {{v.APK_VERSION}}
19
                    </div>
20
                  </div>
21
                  <a class="app-download"
22
                     :active="isActive"
23
                     @click.stop="toDownload(app)">下载</a>
24
                </div>
25
              </div>
26
            </div>
27
            <div class="app-desc">{{app.APP_BRIEF}}</div>
28
          </div>
29
        </el-col>
30
      </el-row>
31
    </div>
32
33
    <app-download v-if="showDownload" :apkType="downApkInfo" @onDownClose="closeDownload"></app-download>
34
  </div>
35
36
</template>
37
38
<script>
39
  export default {
40
    name: 'Home',
41
    components: {
42
      'app-download': () => import('../components/AppDownload.vue')
43
    },
44
    data() {
45
      return {
46
        showDownload: false,
47
        downApkInfo: []
48
      }
49
    },
50
    computed: {
51
      appList() {
52
        console.log(this.$store.getters.appList);
53
        return this.$store.getters.appList;
54
      }
55
    },
56
    methods: {
57
      sortApkType(apkType) {
58
        if (apkType.length == 2 && apkType[0].APK_TYPE == 'iOS') {
59
          return apkType.reverse();  // 反序
60
        } else{
61
          return apkType;
62
        }
63
      },
64
      toAppDetail(appId) {  // 进入app详情页
65
        this.$router.push({
66
          name: 'Detail', query: {
67
            appTypeId: this.$store.state.appType, appID: appId
68
          }
69
        });
70
      },
71
      toDownload(app) {
72
        console.log('toDownload', app);
73
        this.showDownload = true;
74
        this.downApkInfo = app.APP_INFO;
75
      },
76
      closeDownload(){
77
        this.showDownload = false;
78
      },
79
      isActive() {
80
81
      },
82
    }
83
  };
84
</script>
85
86
<style>
87
  .app-list {
88
    width: 960px;
89
    margin: 50px auto 0;
90
  }
91
92
  .app-item {
93
    width: 287px;
94
    text-align: left;
95
    margin-bottom: 62px;
96
    cursor: pointer;
97
  }
98
99
  .app-item .main-content {
100
    width: 100%;
101
    justify-content: flex-start;
102
  }
103
104
  .app-item a {
105
    text-decoration: none;
106
  }
107
108
  .app-img {
109
    width: 80px;
110
    height: 80px;
111
  }
112
113
  .app-info {
114
    flex: 1;
115
    margin-left: 14px;
116
  }
117
118
  .app-info .main-content {
119
    justify-content: space-between;
120
  }
121
122
  .app-name {
123
    color: #000000;
124
    font-size: 16px;
125
    font-weight: 500;
126
    line-height: 16px;
127
    margin-bottom: 20px;
128
    opacity: .85;
129
  }
130
131
  .app-version {
132
    width: 127px;
133
    line-height: 20px;
134
    opacity: .25;
135
  }
136
137
  .app-version div,
138
  .app-desc {
139
    overflow: hidden;
140
    white-space: nowrap;
141
    text-overflow: ellipsis;
142
  }
143
144
  .app-download {
145
    display: block;
146
    width: 47px;
147
    height: 26px;
148
    color: #31C971;
149
    line-height: 28px;
150
    background: #FFFFFF;
151
    border: 1px solid #00CD66;
152
    border-radius: 4px;
153
    margin-top: 6px;
154
    text-align: center;
155
    transition: all .233s ease-in-out;
156
  }
157
158
  .app-download.active,
159
  .app-download:hover {
160
    color: #FFFFFF;
161
    opacity: .8;
162
    background: #31C971;
163
  }
164
165
  .app-desc {
166
    height: 48px;
167
    line-height: 24px;
168
    opacity: .45;
169
    margin-top: 10px;
170
  }
171
</style>

+ 0 - 13
2020/appstore/src-new/views/Search.vue

@ -1,13 +0,0 @@
1
<template>
2
  
3
</template>
4
5
<script>
6
export default {
7
8
};
9
</script>
10
11
<style>
12
13
</style>

+ 1 - 1
2020/appstore/src/assets/css/index-mobile.css

@ -547,7 +547,7 @@
547 547
  .no-data-img {
548 548
    width: 3.2rem;
549 549
    height: 2.8rem;
550
    background: url(../img/no-data-mobile.png) center no-repeat;
550
    background: url(../img/no-data-mobile.png) center/2.5rem no-repeat;
551 551
    margin: 0 auto;
552 552
  }
553 553
  

BIN
2020/appstore/src/assets/img/error500-mobile.png


BIN
2020/appstore/src/assets/img/no-data-mobile.png


+ 1 - 1
2020/appstore/src/views/Detail.vue

@ -29,7 +29,7 @@
29 29
                </span>
30 30
              </template>
31 31
            </div>
32
            <div class="app-detail-size">大小:</div>
32
            <div class="app-detail-size">大小:{{app.APP_SIZE}}</div>
33 33
            <div class="app-detail-update">
34 34
              更新:{{dateChange(app.DONE_DATE)}}
35 35
            </div>

+ 1 - 1
2020/appstore/src/views/Error.vue

@ -64,7 +64,7 @@ export default {
64 64
  .error-img {
65 65
    width: 2.5rem;
66 66
    height: 2.19rem;
67
    background: url(../assets/img/error500-mobile.png) center no-repeat;
67
    background: url(../assets/img/error500-mobile.png) center/2.5rem no-repeat;
68 68
  }
69 69
70 70
  .error-text {

+ 1 - 2
2020/appstore/src/views/Frame.vue

@ -87,8 +87,7 @@ export default {
87 87
      this.$store.commit('setAppTypeId', typeId);
88 88
    }
89 89
90
    // 测试环境 /display/getAppType  /ipu-home/wlwdata?action=appStore.getAppType
91
    this.$http.get('/display/getAppType')
90
    this.$http.get(servicePath)
92 91
      .then((res) => {
93 92
        this.appTypes = res.APP_TYPE;
94 93
        this.$store.commit('setAppData', res.APP_TYPE);

+ 1 - 19
2020/appstore/vue.config.js

@ -15,27 +15,9 @@ module.exports = {
15 15
      // 提取出来的通用 chunk 和 vendor chunk。
16 16
      // chunks: ['chunk-vendors', 'chunk-common', 'index']
17 17
    },
18
    // 当使用只有入口的字符串格式时,
19
    // 模板会被推导为 `public/subpage.html`
20
    // 并且如果找不到的话,就回退到 `public/index.html`。
21
    // 输出文件名会被推导为 `subpage.html`。
22
//     newindex: {
23
//       // page 的入口
24
//       entry: 'src-new/main.js',
25
//       // 模板来源
26
//       template: 'public/index-new.html',
27
//       // 在 dist/index.html 的输出
28
//       filename: 'newindex.html',
29
//       // 当使用 title 选项时,
30
//       // template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
31
//       title: 'Index Page new',
32
//       // 在这个页面中包含的块,默认情况下会包含
33
//       // 提取出来的通用 chunk 和 vendor chunk。
34
// /*      chunks: ['chunk-vendors-new', 'chunk-common-new', 'index-new']*/
35
//     }
36 18
  },
37 19
  publicPath: './',
38 20
  devServer: {
39
    proxy: 'http://121.42.183.206:9070' // http://121.42.183.206:9070  http://appstore.aiipu.com
21
    proxy: 'http://121.42.183.206:9070'
40 22
  }
41 23
}