commit
3a105de41e
21 changed files with 410 additions and 0 deletions
@ -0,0 +1,5 @@ |
|||||
|
# maven ignore |
||||
|
unpackage/ |
||||
|
uni_modules/ |
||||
|
node_modules/ |
||||
|
.hbuilderx/ |
||||
@ -0,0 +1,32 @@ |
|||||
|
<script> |
||||
|
export default { |
||||
|
onLaunch: function() { |
||||
|
console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!') |
||||
|
console.log('App Launch') |
||||
|
}, |
||||
|
onShow: function() { |
||||
|
console.log('App Show') |
||||
|
}, |
||||
|
onHide: function() { |
||||
|
console.log('App Hide') |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
/*每个页面公共css */ |
||||
|
@import '@/uni_modules/uni-scss/index.scss'; |
||||
|
/* #ifndef APP-NVUE */ |
||||
|
@import '@/static/customicons.css'; |
||||
|
// 设置整个项目的背景色 |
||||
|
page { |
||||
|
background-color: #f5f5f5; |
||||
|
} |
||||
|
|
||||
|
/* #endif */ |
||||
|
.example-info { |
||||
|
font-size: 14px; |
||||
|
color: #333; |
||||
|
padding: 10px; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,20 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en"> |
||||
|
<head> |
||||
|
<meta charset="UTF-8" /> |
||||
|
<script> |
||||
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || |
||||
|
CSS.supports('top: constant(a)')) |
||||
|
document.write( |
||||
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + |
||||
|
(coverSupport ? ', viewport-fit=cover' : '') + '" />') |
||||
|
</script> |
||||
|
<title></title> |
||||
|
<!--preload-links--> |
||||
|
<!--app-context--> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div id="app"><!--app-html--></div> |
||||
|
<script type="module" src="/main.js"></script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,50 @@ |
|||||
|
|
||||
|
// #ifndef VUE3
|
||||
|
import Vue from 'vue' |
||||
|
import App from './App' |
||||
|
|
||||
|
//导入网络请求的包
|
||||
|
import {$http} from '@escook/request-miniprogram' |
||||
|
|
||||
|
uni.$http = $http |
||||
|
|
||||
|
$http.baseUrl = 'http://localhost:85' |
||||
|
|
||||
|
$http.beforeRequest = function(options) { |
||||
|
uni.showLoading({ |
||||
|
title: "数据加载中..." |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
$http.afterRequest = function(options) { |
||||
|
uni.hideLoading() |
||||
|
} |
||||
|
|
||||
|
uni.$showMsg = function(title = '数据请求失败!', duration = 1500){ |
||||
|
uni.showToast({ |
||||
|
title, |
||||
|
duration, |
||||
|
icon:'none' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
Vue.config.productionTip = false |
||||
|
|
||||
|
App.mpType = 'app' |
||||
|
|
||||
|
const app = new Vue({ |
||||
|
...App |
||||
|
}) |
||||
|
app.$mount() |
||||
|
// #endif
|
||||
|
|
||||
|
// #ifdef VUE3
|
||||
|
import { createSSRApp } from 'vue' |
||||
|
import App from './App.vue' |
||||
|
export function createApp() { |
||||
|
const app = createSSRApp(App) |
||||
|
return { |
||||
|
app |
||||
|
} |
||||
|
} |
||||
|
// #endif
|
||||
@ -0,0 +1,60 @@ |
|||||
|
{ |
||||
|
"name" : "zdxtDrillProgram", |
||||
|
"appid" : "", |
||||
|
"description" : "", |
||||
|
"versionName" : "1.0.0", |
||||
|
"versionCode" : "100", |
||||
|
"transformPx" : false, |
||||
|
"app-plus" : { |
||||
|
/* 5+App特有相关 */ |
||||
|
"usingComponents" : true, |
||||
|
"nvueCompiler" : "uni-app", |
||||
|
"nvueStyleCompiler" : "uni-app", |
||||
|
"splashscreen" : { |
||||
|
"alwaysShowBeforeRender" : true, |
||||
|
"waiting" : true, |
||||
|
"autoclose" : true, |
||||
|
"delay" : 0 |
||||
|
}, |
||||
|
"modules" : {}, |
||||
|
/* 模块配置 */ |
||||
|
"distribute" : { |
||||
|
/* 应用发布信息 */ |
||||
|
"android" : { |
||||
|
/* android打包配置 */ |
||||
|
"permissions" : [ |
||||
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
||||
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
||||
|
"<uses-feature android:name=\"android.hardware.camera\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
||||
|
] |
||||
|
}, |
||||
|
"ios" : {}, |
||||
|
/* ios打包配置 */ |
||||
|
"sdkConfigs" : {} |
||||
|
} |
||||
|
}, |
||||
|
/* SDK配置 */ |
||||
|
"quickapp" : {}, |
||||
|
/* 快应用特有相关 */ |
||||
|
"mp-weixin" : { |
||||
|
/* 小程序特有相关 */ |
||||
|
"appid" : "wxf733c344d8e69a99", |
||||
|
"setting" : { |
||||
|
"urlCheck" : false |
||||
|
}, |
||||
|
"usingComponents" : true |
||||
|
}, |
||||
|
"vueVersion" : "2" |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
{ |
||||
|
"name": "zdxtdrillprogram", |
||||
|
"version": "1.0.0", |
||||
|
"lockfileVersion": 3, |
||||
|
"requires": true, |
||||
|
"packages": { |
||||
|
"": { |
||||
|
"name": "zdxtdrillprogram", |
||||
|
"version": "1.0.0", |
||||
|
"license": "ISC", |
||||
|
"dependencies": { |
||||
|
"@escook/request-miniprogram": "^0.2.1" |
||||
|
} |
||||
|
}, |
||||
|
"node_modules/@escook/request-miniprogram": { |
||||
|
"version": "0.2.1", |
||||
|
"resolved": "https://registry.npmjs.org/@escook/request-miniprogram/-/request-miniprogram-0.2.1.tgz", |
||||
|
"integrity": "sha512-ueWV5YsaEm/ycQZuEjMiA88GFMhfBQSjy9GrP9omy4xAQajkGTbYIlnhzsDfWzRPmRC1fKmAiKMrCVcgS+SHcQ==" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
{ |
||||
|
"name": "zdxtdrillprogram", |
||||
|
"version": "1.0.0", |
||||
|
"description": "", |
||||
|
"main": "main.js", |
||||
|
"scripts": { |
||||
|
"test": "echo \"Error: no test specified\" && exit 1" |
||||
|
}, |
||||
|
"keywords": [], |
||||
|
"author": "", |
||||
|
"license": "ISC", |
||||
|
"dependencies": { |
||||
|
"@escook/request-miniprogram": "^0.2.1" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,67 @@ |
|||||
|
{ |
||||
|
"pages": [{ |
||||
|
"path" : "pages/index/index", |
||||
|
"style" : |
||||
|
{ |
||||
|
"navigationBarTitleText" : "全民演练", |
||||
|
"enablePullDownRefresh" : false |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"path" : "pages/scan/scan", |
||||
|
"style" : |
||||
|
{ |
||||
|
"navigationBarTitleText" : "全民演练", |
||||
|
"enablePullDownRefresh" : false |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"path" : "pages/my/my", |
||||
|
"style" : |
||||
|
{ |
||||
|
"navigationBarTitleText" : "全民演练", |
||||
|
"enablePullDownRefresh" : false |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"path" : "pages/knowledge/knowledge", |
||||
|
"style" : |
||||
|
{ |
||||
|
"navigationBarTitleText" : "全民演练", |
||||
|
"enablePullDownRefresh" : false |
||||
|
} |
||||
|
}], |
||||
|
"globalStyle": { |
||||
|
"navigationBarTextStyle": "white", |
||||
|
"navigationBarTitleText": "全民演练", |
||||
|
"navigationBarBackgroundColor": "#00b6ff", |
||||
|
"backgroundColor": "#F8F8F8", |
||||
|
"app-plus": { |
||||
|
"background": "#efeff4" |
||||
|
} |
||||
|
}, |
||||
|
"tabBar": { |
||||
|
"selectedColor": "#009eff", |
||||
|
"list":[ |
||||
|
{ |
||||
|
"pagePath": "pages/index/index", |
||||
|
"text": "首页", |
||||
|
"iconPath": "static/tab_icons/home.png" |
||||
|
}, |
||||
|
{ |
||||
|
"pagePath": "pages/scan/scan", |
||||
|
"text": "扫一扫", |
||||
|
"iconPath": "static/tab_icons/cate.png" |
||||
|
}, |
||||
|
{ |
||||
|
"pagePath": "pages/knowledge/knowledge", |
||||
|
"text": "知识库", |
||||
|
"iconPath": "static/tab_icons/knownledge.png" |
||||
|
},{ |
||||
|
"pagePath": "pages/my/my", |
||||
|
"text": "我的", |
||||
|
"iconPath": "static/tab_icons/my.png" |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,62 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
<view class="index-background"> |
||||
|
<my-search @click="searchInfo"></my-search> |
||||
|
</view> |
||||
|
<!-- 轮播图 --> |
||||
|
<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" :circular="true"> |
||||
|
<swiper-item v-for="(item, i) in swiperList" :key="i"> |
||||
|
<!-- <view class="swiper-item"> |
||||
|
<image :src="item.image_src"></image> |
||||
|
</view> --> |
||||
|
<navigator class="swiper-item" :url="'/subpackage/detail/detail?goods_id='+item.goods_id"> |
||||
|
<image :src="item.image_src"></image> |
||||
|
</navigator> |
||||
|
</swiper-item> |
||||
|
</swiper> |
||||
|
|
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
//轮播图数据列表 |
||||
|
swiperList: [], |
||||
|
}; |
||||
|
}, |
||||
|
onLoad() { |
||||
|
|
||||
|
this.getSwiperList() |
||||
|
}, |
||||
|
methods: { |
||||
|
async getSwiperList() { |
||||
|
const { |
||||
|
data: res |
||||
|
} = await uni.$http.get('/api/public/v1/home/swiperdata') |
||||
|
if (res.meta.status !== 200) return uni.$showMsg() |
||||
|
|
||||
|
this.swiperList = res.message |
||||
|
uni.$showMsg('数据请求成功!') |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.search-box{ |
||||
|
position: sticky; |
||||
|
top: 0; |
||||
|
z-index: 9999; |
||||
|
} |
||||
|
swiper { |
||||
|
height: 330rpx; |
||||
|
|
||||
|
.swiper-item, |
||||
|
image { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,19 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
知识库页面 |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,19 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
我的 |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,19 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
扫一扫 |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,20 @@ |
|||||
|
@font-face { |
||||
|
font-family: "customicons"; /* Project id 2878519 */ |
||||
|
src:url('/static/customicons.ttf') format('truetype'); |
||||
|
} |
||||
|
|
||||
|
.customicons { |
||||
|
font-family: "customicons" !important; |
||||
|
} |
||||
|
|
||||
|
.youxi:before { |
||||
|
content: "\e60e"; |
||||
|
} |
||||
|
|
||||
|
.wenjian:before { |
||||
|
content: "\e60f"; |
||||
|
} |
||||
|
|
||||
|
.zhuanfa:before { |
||||
|
content: "\e610"; |
||||
|
} |
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
@ -0,0 +1 @@ |
|||||
|
@import '@/uni_modules/uni-scss/variables.scss'; |
||||
Loading…
Reference in new issue