Browse Source

更新App图标

DESKTOP-O04BTUJ\muzen 3 years atrás
parent
commit
517efba05c
6 changed files with 69 additions and 39 deletions
  1. 1 0
      public/index.html
  2. 1 0
      src/manifest.json
  3. 43 25
      src/pages/index/detail.vue
  4. 24 14
      src/pages/index/index.vue
  5. BIN
      src/static/favicon.ico
  6. BIN
      src/static/logo.png

+ 1 - 0
public/index.html

@@ -4,6 +4,7 @@
     <head>
         <meta charset="utf-8">
         <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <link rel="icon" href="../src/static/favicon.ico">
         <title>
             <%= htmlWebpackPlugin.options.title %>
         </title>

+ 1 - 0
src/manifest.json

@@ -51,6 +51,7 @@
 		}
 	},
 	"h5":{
+		"template": "../public/index.html",
 		"router":{
 			"mode": "hash",
 			"base": "./"

+ 43 - 25
src/pages/index/detail.vue

@@ -3,17 +3,23 @@
     <uni-nav-bar :title="form.projectName" leftIcon="left" @clickLeft="getBack" />
     <view class="title">Android安装包</view>
     <view class="list" v-for="item in form.android" :key="item.id">
-      <view class="main">
-        <text>{{ item.name }}</text>
-        <text>{{ item.updateTimeText }} 更新 | {{ item.version }}</text>
+      <view class="left">
+        <img :src="item.icon">
+        <view class="main">
+          <text>{{ item.name }}</text>
+          <text>{{ item.updateTimeText }} 更新 | {{ item.version }}</text>
+        </view>
       </view>
       <a :href="item.downUrl">安装</a>
     </view>
     <view class="title">IOS安装包</view>
     <view class="list" v-for="item in form.ios" :key="item.id">
-      <view class="main">
-        <text>{{ item.name }}</text>
-        <text>{{ item.updateTimeText }} 更新 | {{ item.version }}</text>
+      <view class="left">
+        <img :src="item.icon">
+        <view class="main">
+          <text>{{ item.name }}</text>
+          <text>{{ item.updateTimeText }} 更新 | {{ item.version }}</text>
+        </view>
       </view>
       <a :href="item.downUrl">安装</a>
     </view>
@@ -57,29 +63,41 @@ export default {
   padding: 28rpx 20rpx;
   background: #fff;
   border-bottom: 2rpx solid #eee;
-}
 
-.main {
-  display: flex;
-  flex-direction: column;
+  .left {
+    display: flex;
 
-  text:first-child {
-    font-size: 28rpx;
-  }
+    img {
+      width: 100rpx;
+      height: 100rpx;
+      border-radius: 20rpx;
+      margin-right: 20rpx;
+    }
+
+    .main {
+      display: flex;
+      flex-direction: column;
+      justify-content: space-around;
 
-  text:last-child {
-    font-size: 22rpx;
+      text:first-child {
+        font-size: 28rpx;
+      }
+
+      text:last-child {
+        font-size: 22rpx;
+      }
+    }
   }
-}
 
-a {
-  margin: 0;
-  background: none;
-  border: 2rpx solid #f80;
-  padding: 10rpx 30rpx;
-  font-size: 24rpx;
-  color: #f80;
-  border-radius: 10rpx;
-  text-decoration: none;
+  a {
+    margin: 0;
+    background: none;
+    border: 2rpx solid #f80;
+    padding: 10rpx 30rpx;
+    font-size: 24rpx;
+    color: #f80;
+    border-radius: 10rpx;
+    text-decoration: none;
+  }
 }
 </style>

+ 24 - 14
src/pages/index/index.vue

@@ -1,9 +1,9 @@
 <template>
   <view class="content">
-    <uni-list :border="false">
-      <uni-list-item v-for="item in list" :key="item.id" :title="item.projectName" clickable
-        @click="getDetail(item)" />
-    </uni-list>
+    <view class="list" v-for="item in list" :key="item.id" @click="getDetail(item)">
+      <img :src="item.icon">
+      <text>{{ item.projectName }}</text>
+    </view>
   </view>
 </template>
 
@@ -23,7 +23,6 @@ export default {
         url: `https://o3tapi.radio1964.com/device/project/update/list`,
         method: 'get',
         success: (res) => {
-          console.log(res);
           if (res.data.code === 0) {
             this.list = res.data.data
           }
@@ -42,20 +41,31 @@ export default {
 <style lang="scss" scope>
 .content {
   padding: 0 20rpx;
-}
-
-.uni-list {
-  width: 100%;
-  background: none;
   display: flex;
-  flex-direction: row;
-  flex-wrap: wrap;
   justify-content: space-between;
+  flex-wrap: wrap;
 
-  .uni-list-item {
+  .list {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
     width: calc(50% - 10rpx);
+    background: #FFF;
+    padding: 40rpx;
     margin-top: 20rpx;
-    text-align: center;
+    border-radius: 20rpx;
+
+    img {
+      width: 180rpx;
+      height: 180rpx;
+      border-radius: 20rpx;
+    }
+
+    text{
+      font-size: 28rpx;
+      font-weight: bold;
+      margin-top: 20rpx;
+    }
   }
 }
 </style>

BIN
src/static/favicon.ico


BIN
src/static/logo.png