Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
creatssc committed Mar 5, 2022
1 parent a88d85f commit 4e618e1
Show file tree
Hide file tree
Showing 1,020 changed files with 44,831 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .hbuilderx/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "remote"
},
"h5" :
{
"launchtype" : "remote"
},
"mp-weixin" :
{
"launchtype" : "remote"
},
"type" : "uniCloud"
}
]
}
6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/party_building_v2.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

133 changes: 133 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added .tgitconfig
Empty file.
104 changes: 104 additions & 0 deletions App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<script>
import request from '@/util/request.js';
export default {
globalData: {
site_url:'https://dj.sdwanyue.com', //网站域名
navHeight:0,//导航栏高度
userInfo:'',//用户信息
configInfo:[],//配置信息
front_auth: [], // 前台用户权限
login_score: 0,
first_login: 0,
},
onLaunch: function() {
var _this = this;
//获取本地用户缓存,看看是否登录
uni.getStorage({
key: 'userInfo',
success (res) { //有本地缓存登录过
_this.globalData.userInfo = res.data;
}
})
uni.getSystemInfo({
success: res => {
//导航高度
this.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 97;
}, fail(err) {}
});
},
onShow: function() {
var url = this.globalData.site_url+'/appapi/?s=Home.GetConfig';
request.requestApi(url,{}).then(res=>{
this.globalData.configInfo = res.data.info[0];
})
const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
})
updateManager.onUpdateReady(function () {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function (res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
});
updateManager.onUpdateFailed(function () {
uni.showToast({
title: '新版本下载失败',
icon:'none'
})
})
},
onHide: function() {
}
}
</script>

<style>
/*每个页面公共css */
@import url("/static/dj.css");
@import url("/static/iconfont.css");
/deep/.uni-scroll-view ::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
display: none;
width: 0;
height: 0;
color: transparent;
background: transparent;
}
/deep/::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
background: transparent;
}
/* 弹窗层级设为最高 */
uni-toast{
z-index: 99999;
}
uni-modal {
z-index: 99999;
}
</style>
73 changes: 73 additions & 0 deletions components/active-list/active-list.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<template>
<view>
<block v-for="(item,index) in list" :key="id">
<view class="article-list-li" @click="goH5" :data-url="item.url">
<image class="article-list-li-thumb" :src="item.thumb"></image>
<view class="article-list-li-right">
<view class="article-list-li-right-title">{{item.title}}</view>
<view class="article-list-li-right-date">结束时间:{{item.endtime}}</view>
</view>
</view>
</block>
</view>
</template>

<script>
export default {
props:{
list:{
type:Array,
value:[]
}
},
data() {
return {
}
},
methods: {
goH5(e){
uni.navigateTo({
url:'/pages/webview/index?url='+e.currentTarget.dataset.url
})
}
}
}
</script>

<style>
.article-list-li-right-date{
font-size: 28rpx;
margin-top: 46rpx;
color: #969696;
}
.article-list-li-right-title{
font-size: 36rpx;
letter-spacing: 1rpx;
font-weight: 500;
overflow: hidden;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
height: 94rpx;
}
.article-list-li-right{
float: left;
width: 64%;
margin-left: 4%;
}
.article-list-li{
clear: both;
overflow: hidden;
height: 170rpx;
padding: 40rpx 0 40rpx 0;
border-bottom: 1rpx solid #F0F0F0;
width: 100%;
}
.article-list-li-thumb{
width: 32%;
height: 100%;
float: left;
}
</style>
Loading

0 comments on commit 4e618e1

Please sign in to comment.