Skip to content

Commit cdc3426

Browse files
committed
first commit
0 parents  commit cdc3426

File tree

11 files changed

+566
-0
lines changed

11 files changed

+566
-0
lines changed

App.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<script>
2+
export default {
3+
onLaunch: function() {
4+
console.log('App Launch')
5+
},
6+
onShow: function() {
7+
console.log('App Show')
8+
},
9+
onHide: function() {
10+
console.log('App Hide')
11+
}
12+
}
13+
</script>
14+
15+
<style>
16+
/*每个页面公共css */
17+
</style>

components/panel/panel.vue

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<template>
2+
<view class="panel"
3+
@touchmove="touchmoveHandle"
4+
@touchstart="touchstartHandle"
5+
@touchend="touchendHandle"
6+
:style="{height: `${height}rpx`}"
7+
>
8+
<view class="search_wrapper">
9+
<view class="search_content">
10+
<view class="search_content_input">
11+
<uni-icons class="search_icon" type="search" size="22" color="#394353"></uni-icons>
12+
<text class="search_text">请输入搜索内容</text>
13+
</view>
14+
<image class="search_suffix" src="/static/audio.png" mode="aspectFill"></image>
15+
</view>
16+
</view>
17+
</view>
18+
</template>
19+
20+
<script>
21+
export default {
22+
data() {
23+
return {
24+
minHeight: 320,
25+
middleHeight: 800,
26+
maxHeight: 1259,
27+
height: 320,
28+
lastY: 0,
29+
up: true,
30+
direction_flag: true
31+
};
32+
},
33+
methods: {
34+
touchstartHandle(e){
35+
this.lastY = event.touches[0].pageY;
36+
// console.log('START:', this.lastY)
37+
},
38+
touchendHandle(e){
39+
if(this.up){
40+
if(this.height < this.middleHeight){
41+
this.height = this.middleHeight
42+
} else {
43+
this.height = this.maxHeight
44+
}
45+
} else {
46+
if(this.height < this.middleHeight){
47+
this.height = this.minHeight
48+
} else {
49+
this.height = this.middleHeight
50+
}
51+
}
52+
this.direction_flag = true
53+
},
54+
touchmoveHandle(e){
55+
let currentY = event.touches[0].pageY
56+
let transformHeight = currentY - this.lastY
57+
this.height = this.height - (transformHeight / 10)
58+
// if(this.height > this.maxHeight){
59+
// this.height = this.maxHeight
60+
// }
61+
// if(this.height < this.minHeight){
62+
// this.height = this.minHeight
63+
// }
64+
if(this.direction_flag){
65+
this.direction_flag = false
66+
if(transformHeight > 0){
67+
// 下滑
68+
this.up = false
69+
} else {
70+
// 上滑
71+
this.up = true
72+
}
73+
}
74+
75+
}
76+
}
77+
}
78+
</script>
79+
80+
<style lang="scss">
81+
.panel{
82+
z-index: 999;
83+
position: absolute;
84+
bottom: 0;
85+
width: 100vw;
86+
background-color: #ffffff;
87+
border-radius: 20rpx 20rpx 0 0;
88+
padding: 30rpx 20rpx;
89+
box-sizing: border-box;
90+
box-shadow: 0 -8rpx 30rpx rgba(0, 0, 0, 0.1);
91+
.search_wrapper{
92+
display: flex;
93+
justify-content: center;
94+
align-items: center;
95+
.search_content{
96+
height: 74rpx;
97+
width: 100%;
98+
display: flex;
99+
justify-content: space-between;
100+
align-items: center;
101+
background-color: #EBF0F3;
102+
border-radius: 16rpx;
103+
border: 1rpx solid #DFE4E7;
104+
padding: 0 20rpx;
105+
.search_content_input{
106+
flex: 1;
107+
display: flex;
108+
justify-content: flex-start;
109+
align-items: center;
110+
.search_icon{
111+
margin-right: 10rpx;
112+
}
113+
.search_text{
114+
color: #595E5F;
115+
font-size: 32rpx;
116+
letter-spacing: 1.8rpx;
117+
}
118+
}
119+
.search_suffix{
120+
width: 48rpx;
121+
height: 48rpx;
122+
image{
123+
width: 100%;
124+
height: 100%;
125+
}
126+
}
127+
}
128+
}
129+
}
130+
</style>

components/uni-icons/icons.js

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
export default {
2+
"pulldown": "\ue588",
3+
"refreshempty": "\ue461",
4+
"back": "\ue471",
5+
"forward": "\ue470",
6+
"more": "\ue507",
7+
"more-filled": "\ue537",
8+
"scan": "\ue612",
9+
"qq": "\ue264",
10+
"weibo": "\ue260",
11+
"weixin": "\ue261",
12+
"pengyouquan": "\ue262",
13+
"loop": "\ue565",
14+
"refresh": "\ue407",
15+
"refresh-filled": "\ue437",
16+
"arrowthindown": "\ue585",
17+
"arrowthinleft": "\ue586",
18+
"arrowthinright": "\ue587",
19+
"arrowthinup": "\ue584",
20+
"undo-filled": "\ue7d6",
21+
"undo": "\ue406",
22+
"redo": "\ue405",
23+
"redo-filled": "\ue7d9",
24+
"bars": "\ue563",
25+
"chatboxes": "\ue203",
26+
"camera": "\ue301",
27+
"chatboxes-filled": "\ue233",
28+
"camera-filled": "\ue7ef",
29+
"cart-filled": "\ue7f4",
30+
"cart": "\ue7f5",
31+
"checkbox-filled": "\ue442",
32+
"checkbox": "\ue7fa",
33+
"arrowleft": "\ue582",
34+
"arrowdown": "\ue581",
35+
"arrowright": "\ue583",
36+
"smallcircle-filled": "\ue801",
37+
"arrowup": "\ue580",
38+
"circle": "\ue411",
39+
"eye-filled": "\ue568",
40+
"eye-slash-filled": "\ue822",
41+
"eye-slash": "\ue823",
42+
"eye": "\ue824",
43+
"flag-filled": "\ue825",
44+
"flag": "\ue508",
45+
"gear-filled": "\ue532",
46+
"reload": "\ue462",
47+
"gear": "\ue502",
48+
"hand-thumbsdown-filled": "\ue83b",
49+
"hand-thumbsdown": "\ue83c",
50+
"hand-thumbsup-filled": "\ue83d",
51+
"heart-filled": "\ue83e",
52+
"hand-thumbsup": "\ue83f",
53+
"heart": "\ue840",
54+
"home": "\ue500",
55+
"info": "\ue504",
56+
"home-filled": "\ue530",
57+
"info-filled": "\ue534",
58+
"circle-filled": "\ue441",
59+
"chat-filled": "\ue847",
60+
"chat": "\ue263",
61+
"mail-open-filled": "\ue84d",
62+
"email-filled": "\ue231",
63+
"mail-open": "\ue84e",
64+
"email": "\ue201",
65+
"checkmarkempty": "\ue472",
66+
"list": "\ue562",
67+
"locked-filled": "\ue856",
68+
"locked": "\ue506",
69+
"map-filled": "\ue85c",
70+
"map-pin": "\ue85e",
71+
"map-pin-ellipse": "\ue864",
72+
"map": "\ue364",
73+
"minus-filled": "\ue440",
74+
"mic-filled": "\ue332",
75+
"minus": "\ue410",
76+
"micoff": "\ue360",
77+
"mic": "\ue302",
78+
"clear": "\ue434",
79+
"smallcircle": "\ue868",
80+
"close": "\ue404",
81+
"closeempty": "\ue460",
82+
"paperclip": "\ue567",
83+
"paperplane": "\ue503",
84+
"paperplane-filled": "\ue86e",
85+
"person-filled": "\ue131",
86+
"contact-filled": "\ue130",
87+
"person": "\ue101",
88+
"contact": "\ue100",
89+
"images-filled": "\ue87a",
90+
"phone": "\ue200",
91+
"images": "\ue87b",
92+
"image": "\ue363",
93+
"image-filled": "\ue877",
94+
"location-filled": "\ue333",
95+
"location": "\ue303",
96+
"plus-filled": "\ue439",
97+
"plus": "\ue409",
98+
"plusempty": "\ue468",
99+
"help-filled": "\ue535",
100+
"help": "\ue505",
101+
"navigate-filled": "\ue884",
102+
"navigate": "\ue501",
103+
"mic-slash-filled": "\ue892",
104+
"search": "\ue466",
105+
"settings": "\ue560",
106+
"sound": "\ue590",
107+
"sound-filled": "\ue8a1",
108+
"spinner-cycle": "\ue465",
109+
"download-filled": "\ue8a4",
110+
"personadd-filled": "\ue132",
111+
"videocam-filled": "\ue8af",
112+
"personadd": "\ue102",
113+
"upload": "\ue402",
114+
"upload-filled": "\ue8b1",
115+
"starhalf": "\ue463",
116+
"star-filled": "\ue438",
117+
"star": "\ue408",
118+
"trash": "\ue401",
119+
"phone-filled": "\ue230",
120+
"compose": "\ue400",
121+
"videocam": "\ue300",
122+
"trash-filled": "\ue8dc",
123+
"download": "\ue403",
124+
"chatbubble-filled": "\ue232",
125+
"chatbubble": "\ue202",
126+
"cloud-download": "\ue8e4",
127+
"cloud-upload-filled": "\ue8e5",
128+
"cloud-upload": "\ue8e6",
129+
"cloud-download-filled": "\ue8e9",
130+
"headphones":"\ue8bf",
131+
"shop":"\ue609"
132+
}

components/uni-icons/uni-icons.vue

Lines changed: 67 additions & 0 deletions
Large diffs are not rendered by default.

main.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Vue from 'vue'
2+
import App from './App'
3+
4+
Vue.config.productionTip = false
5+
6+
App.mpType = 'app'
7+
8+
const app = new Vue({
9+
...App
10+
})
11+
app.$mount()

manifest.json

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"name" : "panel-ui",
3+
"appid" : "__UNI__AEEF262",
4+
"description" : "",
5+
"versionName" : "1.0.0",
6+
"versionCode" : "100",
7+
"transformPx" : false,
8+
/* 5+App特有相关 */
9+
"app-plus" : {
10+
"usingComponents" : true,
11+
"nvueCompiler" : "uni-app",
12+
"compilerVersion" : 3,
13+
"splashscreen" : {
14+
"alwaysShowBeforeRender" : true,
15+
"waiting" : true,
16+
"autoclose" : true,
17+
"delay" : 0
18+
},
19+
/* 模块配置 */
20+
"modules" : {},
21+
/* 应用发布信息 */
22+
"distribute" : {
23+
/* android打包配置 */
24+
"android" : {
25+
"permissions" : [
26+
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
27+
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
28+
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
29+
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
30+
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
31+
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
32+
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
33+
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
34+
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
35+
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
36+
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
37+
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
38+
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
39+
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
40+
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
41+
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
42+
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
43+
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
44+
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
45+
"<uses-feature android:name=\"android.hardware.camera\"/>",
46+
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
47+
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
48+
]
49+
},
50+
/* ios打包配置 */
51+
"ios" : {},
52+
/* SDK配置 */
53+
"sdkConfigs" : {}
54+
}
55+
},
56+
/* 快应用特有相关 */
57+
"quickapp" : {},
58+
/* 小程序特有相关 */
59+
"mp-weixin" : {
60+
"appid" : "",
61+
"setting" : {
62+
"urlCheck" : false
63+
},
64+
"usingComponents" : true
65+
},
66+
"mp-alipay" : {
67+
"usingComponents" : true
68+
},
69+
"mp-baidu" : {
70+
"usingComponents" : true
71+
},
72+
"mp-toutiao" : {
73+
"usingComponents" : true
74+
},
75+
"uniStatistics": {
76+
"enable": false
77+
}
78+
}

pages.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
3+
{
4+
"path": "pages/index/index",
5+
"style": {
6+
"navigationBarTitleText": "uni-app"
7+
}
8+
}
9+
],
10+
"globalStyle": {
11+
"navigationBarTextStyle": "black",
12+
"navigationBarTitleText": "uni-app",
13+
"navigationBarBackgroundColor": "#F8F8F8",
14+
"backgroundColor": "#F8F8F8"
15+
}
16+
}

0 commit comments

Comments
 (0)