Commit b58b1adc by yanglang123

新增首页

parent e5a4efd8
...@@ -9,7 +9,17 @@ ...@@ -9,7 +9,17 @@
{ {
"path": "pages/home/home", "path": "pages/home/home",
"style": { "style": {
"navigationBarTitleText": "首页" "navigationBarTitleText": "智慧党建",
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"app-plus": {
"titleNView": false,
"bounce": "none",
"pullToRefresh": {
"style": "circle",
"offset": "70px"
}
}
} }
}, },
{ {
...@@ -56,8 +66,7 @@ ...@@ -56,8 +66,7 @@
} }
], ],
"tabBar": { "tabBar": {
"list": [ "list": [{
{
"pagePath": "pages/home/home", "pagePath": "pages/home/home",
"text": "首页" "text": "首页"
}, },
......
<template> <template>
<view class=""> <view class="">
联系我们 联系我们
<rich-text nodes="{{htmlContent}}"></rich-text>
</view> </view>
</template> </template>
<script> <script>
</script> // import wxParse from '../../wxParse/wxParse.js'
// export default {
// data() {
// return {
// htmlContent: "",
// }
// },
// onLoad: function() {
// // 假设你有一段Markdown文本
// var markdownContent = "## Hello\nThis is a *markdown* example.";
// // 将Markdown转换为HTML
// var htmlContent = wxParse.md2Html(markdownContent);
// // 将转换后的HTML设置到data中以供template使用
// this.setData({
// htmlContent: htmlContent
// });
// }
// }
</script>
<style> <style>
</style> </style>
\ No newline at end of file
<template> <template>
<view class="content"> <view class="content">
<image class="logo" src="/static/logo.png"></image> <view class="navbar" :style="{ height: navHeight + 'px' }">
<view class="text-area"> <view class="topInfo" :style="{
<text class="title">{{title}}</text> marginTop: customTop + 'px',
height: customHeight + 'px',
}">
<view class="joinCocelal">
<text>智慧党建</text>
</view> </view>
<view class="searchCoceral">
<uni-icons class="input-uni-icon" style="margin-right: 3px;" type="search" size="18" color="#fff" />
<input confirm-type="search" class="nav-bar-input" type="text" placeholder="输入搜索关键词" placeholder-class="title_input"
@confirm="confirm" />
</view>
</view>
</view>
<view class="uni-margin-wrap">
<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="2000" :duration="500">
<swiper-item>
<view class="swiper-item uni-bg-red">A</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-green">B</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-blue">C</view>
</swiper-item>
</swiper>
</view>
<view class="nav-list">
<view class="nav-out" v-for="(item,index) in navLists" :key="index" :id="item">
<view class="nav-item">
<image :src="item.imgsrc" mode="" class="imgi"></image>
<text>{{item.name}}</text>
</view>
</view>
</view>
<uni-section title="精选资讯" more="true" moreUrl="/pages/mine/development/development" type="line">
<view class="news-out" v-for="(item,index) in newsList" :key="index" :id="item">
<view class="news-item">
<image :src="item.imgsrc" mode="" class="news-img"></image>
</view>
<view class="news-time-out">
<view class="">
<text>{{item.news}}</text>
</view>
<view class="news-time">
<text class="news-auth">{{item.auth}}</text>
<text>{{item.time}}</text>
</view>
</view>
</view>
</uni-section>
</view> </view>
</template> </template>
...@@ -11,42 +60,209 @@ ...@@ -11,42 +60,209 @@
export default { export default {
data() { data() {
return { return {
title: 'Hello Uni-app 123' navHeight: '',
customTop: '',
customHeight: '',
findCoceralVal: '',
background: ['color1', 'color2', 'color3'],
navLists: [{
id: 1,
imgsrc: '../../static/c1.png',
name: '活动服务'
},
{
id: 2,
imgsrc: '../../static/c2.png',
name: '培训测试'
},
{
id: 3,
imgsrc: '../../static/c3.png',
name: '问卷调查'
},
{
id: 4,
imgsrc: '../../static/c4.png',
name: '我要投稿'
},
{
id: 5,
imgsrc: '../../static/c5.png',
name: '党务直通'
},
{
id: 6,
imgsrc: '../../static/c6.png',
name: '廉洁作风'
},
{
id: 7,
imgsrc: '../../static/c7.png',
name: '机电视窗'
},
{
id: 8,
imgsrc: '../../static/c1.png',
name: '支部风采'
},
{
id: 9,
imgsrc: '../../static/c1.png',
name: '年度专栏'
},
{
id: 10,
imgsrc: '../../static/c1.png',
name: '工团快讯'
},
{
id: 11,
imgsrc: '../../static/c1.png',
name: '学习栏目'
},
],
newsList: [{
news: '手段和封建时代看看的身份那是肯定JFK四年',
imgsrc: '../../static/c1.png',
time: '2020-09-21',
auth: '新华社北京'
},
{
news: '手段和封建时代看看的身份那是肯定JFK四年',
imgsrc: '../../static/c1.png',
time: '2020-09-21',
auth: '新华社北京'
},
{
news: '手段和封建时代看看的身份那是肯定JFK四年',
imgsrc: '../../static/c1.png',
time: '2020-09-21',
auth: '新华社北京'
}
]
} }
}, },
onLoad() { onLoad() {
let custom = uni.getMenuButtonBoundingClientRect(); // 小程序右上角胶囊信息
let system = uni.getSystemSetting(); // 获取设备信息
this.navHeight = system.statusBarHeight + 44; // 导航栏的高度
this.customTop = custom.top; // 胶囊按钮与顶部的距离
this.customHeight = custom.height; // 胶囊按钮与右侧的距离
}, },
methods: { methods: {
confirm() {
uni.showToast({
title: '搜索'
})
}
} }
} }
</script> </script>
<style> <style lang="less">
.navbar {
width: 100%;
display: flex;
align-items: center;
background-color: #C02B1E;
.title_input{
color: #fff;
}
.joinCocelal {
font-size: 14px;
color: #fff;
margin-right: 20px;
}
.topInfo {
width: 100%;
display: flex;
align-items: center;
padding-bottom: 8px;
padding-left: 10px;
.searchCoceral {
display: flex;
margin-top: 4px;
}
}
}
.content { .content {
background-color: #fff;
}
.uni-margin-wrap {
width: 690rpx;
width: 100%;
}
.swiper {
height: 400rpx;
}
.swiper-item {
display: block;
height: 380rpx;
line-height: 400rpx;
text-align: center;
}
.swiper-list {
margin-top: 40rpx;
margin-bottom: 0;
}
.nav-list {
display: flex;
flex-wrap: wrap;
}
.nav-out {
width: 25%;
margin-top: 4px;
}
.nav-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
justify-content: center; justify-content: center;
align-items: center;
} }
.logo { .imgi {
height: 200rpx; width: 32px;
width: 200rpx; height: 32px;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
} }
.text-area { .news-out {
width: 98%;
margin: 0 auto;
display: flex; display: flex;
justify-content: center; margin-top: 10px;
}
.news-time-out {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.news-img {
width: 120px;
height: 70px;
}
.news-auth {
margin-right: 5px;
} }
.title { .news-time {
font-size: 36rpx; font-size: 10px;
color: #8f8f94; color: #999;
} }
</style> </style>
\ No newline at end of file
<template>
<view class="content">
<scroll-view id="tab-bar" class="scroll-h" :scroll-x="true" :show-scrollbar="false"
:scroll-into-view="scrollInto">
<view v-for="(tab,index) in tabBars" :key="tab.id" class="uni-tab-item" :id="tab.id" :data-current="index"
@click="ontabtap">
<text class="uni-tab-item-title"
:class="tabIndex==index ? 'uni-tab-item-title-active' : ''">{{tab.name}}</text>
</view>
</scroll-view>
<view class="line-h"></view>
</view>
</template>
<script>
export default {
data() {
return {
tabIndex: 0,
tabBars: [{
name: '全部',
id: 'all'
}, {
name: '支部党员大会',
id: 'tuijian'
}, {
name: '支部委员会',
id: 'tiyu'
}, {
name: '党小组会',
id: 'redian'
}, {
name: '财经',
id: 'caijing'
}, {
name: '娱乐',
id: 'yule'
}, {
name: '军事',
id: 'junshi'
}, {
name: '历史',
id: 'lishi'
}, {
name: '本地',
id: 'bendi'
}],
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
/* #ifndef APP-PLUS */
page {
width: 100%;
min-height: 100%;
display: flex;
}
/* #endif */
.tabs {
flex: 1;
flex-direction: column;
overflow: hidden;
background-color: #ffffff;
/* #ifndef APP-PLUS */
height: 100vh;
/* #endif */
}
.scroll-h {
width: 750rpx;
/* #ifdef H5 */
width:100%;
/* #endif */
height: 80rpx;
flex-direction: row;
/* #ifndef APP-PLUS */
white-space: nowrap;
/* #endif */
/* flex-wrap: nowrap; */
/* border-color: #cccccc;
border-bottom-style: solid;
border-bottom-width: 1px; */
}
.line-h {
height: 1rpx;
background-color: #cccccc;
}
.uni-tab-item {
/* #ifndef APP-PLUS */
display: inline-block;
/* #endif */
flex-wrap: nowrap;
padding-left: 34rpx;
padding-right: 34rpx;
}
.uni-tab-item-title {
color: #555;
font-size: 30rpx;
height: 80rpx;
line-height: 80rpx;
flex-wrap: nowrap;
/* #ifndef APP-PLUS */
white-space: nowrap;
/* #endif */
}
.uni-tab-item-title-active {
color: #007AFF;
}
.swiper-box {
flex: 1;
}
.swiper-item {
flex: 1;
flex-direction: row;
}
.scroll-v {
flex: 1;
/* #ifndef MP-ALIPAY */
flex-direction: column;
/* #endif */
width: 750rpx;
width:100%;
}
.update-tips {
position: absolute;
left: 0;
top: 41px;
right: 0;
padding-top: 5px;
padding-bottom: 5px;
background-color: #FDDD9B;
align-items: center;
justify-content: center;
text-align: center;
}
.update-tips-text {
font-size: 14px;
color: #ffffff;
}
.refresh {
width: 750rpx;
width:100%;
height: 64px;
justify-content: center;
}
.refresh-view {
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
.refresh-icon {
width: 30px;
height: 30px;
transition-duration: .5s;
transition-property: transform;
transform: rotate(0deg);
transform-origin: 15px 15px;
}
.refresh-icon-active {
transform: rotate(180deg);
}
.loading-icon {
width: 20px;
height: 20px;
margin-right: 5px;
color: #999999;
}
.loading-text {
margin-left: 2px;
font-size: 16px;
color: #999999;
}
.loading-more {
align-items: center;
justify-content: center;
padding-top: 10px;
padding-bottom: 10px;
text-align: center;
}
.loading-more-text {
font-size: 28rpx;
color: #999;
}
</style>
\ No newline at end of file
<template> <template>
</template> </template>
<script> <script>
......
...@@ -4,9 +4,11 @@ ...@@ -4,9 +4,11 @@
<view class="uni-section-header__decoration" v-if="type" :class="type" /> <view class="uni-section-header__decoration" v-if="type" :class="type" />
<slot v-else name="decoration"></slot> <slot v-else name="decoration"></slot>
<view class="uni-section-header__content"> <view class="uni-section-own">
<text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text> <text :style="{'font-size':titleFontSize,'color':titleColor,'font-weight':titleFontWeight}"
<text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text> class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
<navigator :url="moreUrl" v-if="more" :style="{'font-size':subTitleFontSize,'color':subTitleColor}">更多>>
</navigator>
</view> </view>
<view class="uni-section-header__slot-right"> <view class="uni-section-header__slot-right">
...@@ -21,7 +23,6 @@ ...@@ -21,7 +23,6 @@
</template> </template>
<script> <script>
/** /**
* Section 标题栏 * Section 标题栏
* @description 标题栏 * @description 标题栏
...@@ -32,6 +33,7 @@ ...@@ -32,6 +33,7 @@
* @property {String} title 主标题 * @property {String} title 主标题
* @property {String} titleFontSize 主标题字体大小 * @property {String} titleFontSize 主标题字体大小
* @property {String} titleColor 主标题字体颜色 * @property {String} titleColor 主标题字体颜色
* @property {String} titleFontWeight 主标题字体
* @property {String} subTitle 副标题 * @property {String} subTitle 副标题
* @property {String} subTitleFontSize 副标题字体大小 * @property {String} subTitleFontSize 副标题字体大小
* @property {String} subTitleColor 副标题字体颜色 * @property {String} subTitleColor 副标题字体颜色
...@@ -40,7 +42,7 @@ ...@@ -40,7 +42,7 @@
export default { export default {
name: 'UniSection', name: 'UniSection',
emits:['click'], emits: ['click'],
props: { props: {
type: { type: {
type: String, type: String,
...@@ -55,9 +57,13 @@ ...@@ -55,9 +57,13 @@
type: String, type: String,
default: '14px' default: '14px'
}, },
titleColor:{ titleColor: {
type: String,
default: '#000'
},
titleFontWeight: {
type: String, type: String,
default: '#333' default: '600'
}, },
subTitle: { subTitle: {
type: String, type: String,
...@@ -74,15 +80,23 @@ ...@@ -74,15 +80,23 @@
padding: { padding: {
type: [Boolean, String], type: [Boolean, String],
default: false default: false
}
}, },
computed:{ more: {
_padding(){ type: [Boolean, String],
if(typeof this.padding === 'string'){ default: false
},
moreUrl: {
type:String,
default: ''
},
},
computed: {
_padding() {
if (typeof this.padding === 'string') {
return this.padding return this.padding
} }
return this.padding?'10px':'' return this.padding ? '10px' : ''
} }
}, },
watch: { watch: {
...@@ -99,11 +113,12 @@ ...@@ -99,11 +113,12 @@
} }
} }
</script> </script>
<style lang="scss" > <style lang="scss">
$uni-primary: #2979ff !default; $uni-primary: red !default;
.uni-section { .uni-section {
background-color: #fff; background-color: #fff;
.uni-section-header { .uni-section-header {
position: relative; position: relative;
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
...@@ -114,9 +129,10 @@ ...@@ -114,9 +129,10 @@
padding: 12px 10px; padding: 12px 10px;
font-weight: normal; font-weight: normal;
&__decoration{ &__decoration {
margin-right: 6px; margin-right: 6px;
background-color: $uni-primary; background-color: $uni-primary;
&.line { &.line {
width: 4px; width: 4px;
height: 12px; height: 12px;
...@@ -150,18 +166,26 @@ ...@@ -150,18 +166,26 @@
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
&-sub { &-sub {
margin-top: 2px; margin-top: 2px;
} }
} }
&__slot-right{ &__slot-right {
font-size: 14px; font-size: 14px;
} }
} }
.uni-section-content{ .uni-section-content {
font-size: 14px; font-size: 14px;
} }
} }
.uni-section-own {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
</style> </style>
\ No newline at end of file
{
"hash": "a75e9d83",
"configHash": "ac438810",
"lockfileHash": "e3b0c442",
"browserHash": "bb9fcb96",
"optimized": {},
"chunks": {}
}
\ No newline at end of file
"use strict";
const _imports_0 = "/static/logo.png";
exports._imports_0 = _imports_0;
...@@ -335,8 +335,8 @@ const E = function() { ...@@ -335,8 +335,8 @@ const E = function() {
}; };
E.prototype = { E.prototype = {
on: function(name, callback, ctx) { on: function(name, callback, ctx) {
var e = this.e || (this.e = {}); var e2 = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({ (e2[name] || (e2[name] = [])).push({
fn: callback, fn: callback,
ctx ctx
}); });
...@@ -362,8 +362,8 @@ E.prototype = { ...@@ -362,8 +362,8 @@ E.prototype = {
return this; return this;
}, },
off: function(name, callback) { off: function(name, callback) {
var e = this.e || (this.e = {}); var e2 = this.e || (this.e = {});
var evts = e[name]; var evts = e2[name];
var liveEvents = []; var liveEvents = [];
if (evts && callback) { if (evts && callback) {
for (var i = evts.length - 1; i >= 0; i--) { for (var i = evts.length - 1; i >= 0; i--) {
...@@ -374,7 +374,7 @@ E.prototype = { ...@@ -374,7 +374,7 @@ E.prototype = {
} }
liveEvents = evts; liveEvents = evts;
} }
liveEvents.length ? e[name] = liveEvents : delete e[name]; liveEvents.length ? e2[name] = liveEvents : delete e2[name];
return this; return this;
} }
}; };
...@@ -549,8 +549,8 @@ function tryCatch(fn) { ...@@ -549,8 +549,8 @@ function tryCatch(fn) {
return function() { return function() {
try { try {
return fn.apply(fn, arguments); return fn.apply(fn, arguments);
} catch (e) { } catch (e2) {
console.error(e); console.error(e2);
} }
}; };
} }
...@@ -732,8 +732,8 @@ function promisify$1(name, fn) { ...@@ -732,8 +732,8 @@ function promisify$1(name, fn) {
if (hasCallback(args)) { if (hasCallback(args)) {
return wrapperReturnValue(name, invokeApi(name, fn, args, rest)); return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
} }
return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => { return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
invokeApi(name, fn, extend(args, { success: resolve, fail: reject }), rest); invokeApi(name, fn, extend(args, { success: resolve2, fail: reject }), rest);
}))); })));
}; };
} }
...@@ -991,7 +991,7 @@ let enabled; ...@@ -991,7 +991,7 @@ let enabled;
function normalizePushMessage(message) { function normalizePushMessage(message) {
try { try {
return JSON.parse(message); return JSON.parse(message);
} catch (e) { } catch (e2) {
} }
return message; return message;
} }
...@@ -1031,7 +1031,7 @@ function invokeGetPushCidCallbacks(cid2, errMsg) { ...@@ -1031,7 +1031,7 @@ function invokeGetPushCidCallbacks(cid2, errMsg) {
getPushCidCallbacks.length = 0; getPushCidCallbacks.length = 0;
} }
const API_GET_PUSH_CLIENT_ID = "getPushClientId"; const API_GET_PUSH_CLIENT_ID = "getPushClientId";
const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, reject }) => { const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve: resolve2, reject }) => {
Promise.resolve().then(() => { Promise.resolve().then(() => {
if (typeof enabled === "undefined") { if (typeof enabled === "undefined") {
enabled = false; enabled = false;
...@@ -1040,7 +1040,7 @@ const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, re ...@@ -1040,7 +1040,7 @@ const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, re
} }
getPushCidCallbacks.push((cid2, errMsg) => { getPushCidCallbacks.push((cid2, errMsg) => {
if (cid2) { if (cid2) {
resolve({ cid: cid2 }); resolve2({ cid: cid2 });
} else { } else {
reject(errMsg); reject(errMsg);
} }
...@@ -1105,9 +1105,9 @@ function promisify(name, api) { ...@@ -1105,9 +1105,9 @@ function promisify(name, api) {
if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) { if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) {
return wrapperReturnValue(name, invokeApi(name, api, options, rest)); return wrapperReturnValue(name, invokeApi(name, api, options, rest));
} }
return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => { return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
invokeApi(name, api, extend({}, options, { invokeApi(name, api, extend({}, options, {
success: resolve, success: resolve2,
fail: reject fail: reject
}), rest); }), rest);
}))); })));
...@@ -1267,8 +1267,8 @@ function populateParameters(fromRes, toRes) { ...@@ -1267,8 +1267,8 @@ function populateParameters(fromRes, toRes) {
appVersion: "1.0.0", appVersion: "1.0.0",
appVersionCode: "100", appVersionCode: "100",
appLanguage: getAppLanguage(hostLanguage), appLanguage: getAppLanguage(hostLanguage),
uniCompileVersion: "4.24", uniCompileVersion: "4.28",
uniRuntimeVersion: "4.24", uniRuntimeVersion: "4.28",
uniPlatform: "mp-weixin", uniPlatform: "mp-weixin",
deviceBrand, deviceBrand,
deviceModel: model, deviceModel: model,
...@@ -2963,6 +2963,9 @@ function isReadonly(value) { ...@@ -2963,6 +2963,9 @@ function isReadonly(value) {
function isShallow(value) { function isShallow(value) {
return !!(value && value["__v_isShallow"]); return !!(value && value["__v_isShallow"]);
} }
function isProxy(value) {
return isReactive(value) || isReadonly(value);
}
function toRaw(observed) { function toRaw(observed) {
const raw = observed && observed["__v_raw"]; const raw = observed && observed["__v_raw"];
return raw ? toRaw(raw) : observed; return raw ? toRaw(raw) : observed;
...@@ -3757,6 +3760,47 @@ function setCurrentRenderingInstance(instance) { ...@@ -3757,6 +3760,47 @@ function setCurrentRenderingInstance(instance) {
instance && instance.type.__scopeId || null; instance && instance.type.__scopeId || null;
return prev; return prev;
} }
const COMPONENTS = "components";
function resolveComponent(name, maybeSelfReference) {
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
}
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
const instance = currentRenderingInstance || currentInstance;
if (instance) {
const Component2 = instance.type;
if (type === COMPONENTS) {
const selfName = getComponentName(
Component2,
false
);
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
return Component2;
}
}
const res = (
// local registration
// check instance[type] first which is resolved for options API
resolve(instance[type] || Component2[type], name) || // global registration
resolve(instance.appContext[type], name)
);
if (!res && maybeSelfReference) {
return Component2;
}
if (warnMissing && !res) {
const extra = type === COMPONENTS ? `
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
}
return res;
} else {
warn$1(
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
);
}
}
function resolve(registry, name) {
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
}
const INITIAL_WATCHER_VALUE = {}; const INITIAL_WATCHER_VALUE = {};
function watch(source, cb, options) { function watch(source, cb, options) {
if (!isFunction(cb)) { if (!isFunction(cb)) {
...@@ -5364,6 +5408,12 @@ const Static = Symbol.for("v-stc"); ...@@ -5364,6 +5408,12 @@ const Static = Symbol.for("v-stc");
function isVNode(value) { function isVNode(value) {
return value ? value.__v_isVNode === true : false; return value ? value.__v_isVNode === true : false;
} }
const InternalObjectKey = `__vInternal`;
function guardReactiveProps(props) {
if (!props)
return null;
return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
}
const emptyAppContext = createAppContext(); const emptyAppContext = createAppContext();
let uid = 0; let uid = 0;
function createComponentInstance(vnode, parent, suspense) { function createComponentInstance(vnode, parent, suspense) {
...@@ -6548,6 +6598,11 @@ function initApp(app) { ...@@ -6548,6 +6598,11 @@ function initApp(app) {
} }
} }
const propsCaches = /* @__PURE__ */ Object.create(null); const propsCaches = /* @__PURE__ */ Object.create(null);
function renderProps(props) {
const { uid: uid2, __counter } = getCurrentInstance();
const propsId = (propsCaches[uid2] || (propsCaches[uid2] = [])).push(guardReactiveProps(props)) - 1;
return uid2 + "," + propsId + "," + __counter;
}
function pruneComponentPropsCache(uid2) { function pruneComponentPropsCache(uid2) {
delete propsCaches[uid2]; delete propsCaches[uid2];
} }
...@@ -6711,8 +6766,10 @@ function vFor(source, renderItem) { ...@@ -6711,8 +6766,10 @@ function vFor(source, renderItem) {
} }
const o = (value, key) => vOn(value, key); const o = (value, key) => vOn(value, key);
const f = (source, renderItem) => vFor(source, renderItem); const f = (source, renderItem) => vFor(source, renderItem);
const e = (target, ...sources) => extend(target, ...sources);
const n = (value) => normalizeClass(value); const n = (value) => normalizeClass(value);
const t = (val) => toDisplayString(val); const t = (val) => toDisplayString(val);
const p = (props) => renderProps(props);
function createApp$1(rootComponent, rootProps = null) { function createApp$1(rootComponent, rootProps = null) {
rootComponent && (rootComponent.mpType = "app"); rootComponent && (rootComponent.mpType = "app");
return createVueApp(rootComponent, rootProps).use(plugin); return createVueApp(rootComponent, rootProps).use(plugin);
...@@ -7546,8 +7603,11 @@ const createSubpackageApp = initCreateSubpackageApp(); ...@@ -7546,8 +7603,11 @@ const createSubpackageApp = initCreateSubpackageApp();
} }
exports._export_sfc = _export_sfc; exports._export_sfc = _export_sfc;
exports.createSSRApp = createSSRApp; exports.createSSRApp = createSSRApp;
exports.e = e;
exports.f = f; exports.f = f;
exports.index = index; exports.index = index;
exports.n = n; exports.n = n;
exports.o = o; exports.o = o;
exports.p = p;
exports.resolveComponent = resolveComponent;
exports.t = t; exports.t = t;
"use strict"; "use strict";
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
const _sfc_main = {}; const _sfc_main = {};
function _sfc_render(_ctx, _cache) { function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {}; return {};
} }
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
......
<view class=""> 联系我们 </view> <view class=""> 联系我们 <rich-text nodes="{{htmlContent}}"></rich-text></view>
\ No newline at end of file \ No newline at end of file
"use strict"; "use strict";
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const _sfc_main = { const _sfc_main = {
data() { data() {
return { return {
title: "Hello Uni-app 123" navHeight: "",
customTop: "",
customHeight: "",
findCoceralVal: "",
background: ["color1", "color2", "color3"],
navLists: [
{
id: 1,
imgsrc: "../../static/c1.png",
name: "活动服务"
},
{
id: 2,
imgsrc: "../../static/c2.png",
name: "培训测试"
},
{
id: 3,
imgsrc: "../../static/c3.png",
name: "问卷调查"
},
{
id: 4,
imgsrc: "../../static/c4.png",
name: "我要投稿"
},
{
id: 5,
imgsrc: "../../static/c5.png",
name: "党务直通"
},
{
id: 6,
imgsrc: "../../static/c6.png",
name: "廉洁作风"
},
{
id: 7,
imgsrc: "../../static/c7.png",
name: "机电视窗"
},
{
id: 8,
imgsrc: "../../static/c1.png",
name: "支部风采"
},
{
id: 9,
imgsrc: "../../static/c1.png",
name: "年度专栏"
},
{
id: 10,
imgsrc: "../../static/c1.png",
name: "工团快讯"
},
{
id: 11,
imgsrc: "../../static/c1.png",
name: "学习栏目"
}
],
newsList: [
{
news: "手段和封建时代看看的身份那是肯定JFK四年",
imgsrc: "../../static/c1.png",
time: "2020-09-21",
auth: "新华社北京"
},
{
news: "手段和封建时代看看的身份那是肯定JFK四年",
imgsrc: "../../static/c1.png",
time: "2020-09-21",
auth: "新华社北京"
},
{
news: "手段和封建时代看看的身份那是肯定JFK四年",
imgsrc: "../../static/c1.png",
time: "2020-09-21",
auth: "新华社北京"
}
]
}; };
}, },
onLoad() { onLoad() {
let custom = common_vendor.index.getMenuButtonBoundingClientRect();
let system = common_vendor.index.getSystemSetting();
this.navHeight = system.statusBarHeight + 44;
this.customTop = custom.top;
this.customHeight = custom.height;
}, },
methods: {} methods: {
confirm() {
common_vendor.index.showToast({
title: "搜索"
});
}
}
}; };
if (!Array) {
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
const _easycom_uni_section2 = common_vendor.resolveComponent("uni-section");
(_easycom_uni_icons2 + _easycom_uni_section2)();
}
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
const _easycom_uni_section = () => "../../uni_modules/uni-section/components/uni-section/uni-section.js";
if (!Math) {
(_easycom_uni_icons + _easycom_uni_section)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return { return {
a: common_assets._imports_0, a: common_vendor.p({
b: common_vendor.t($data.title) type: "search",
size: "18",
color: "#fff"
}),
b: common_vendor.o((...args) => $options.confirm && $options.confirm(...args)),
c: $data.customTop + "px",
d: $data.customHeight + "px",
e: $data.navHeight + "px",
f: common_vendor.f($data.navLists, (item, index, i0) => {
return {
a: item.imgsrc,
b: common_vendor.t(item.name),
c: index,
d: item
};
}),
g: common_vendor.f($data.newsList, (item, index, i0) => {
return {
a: item.imgsrc,
b: common_vendor.t(item.news),
c: common_vendor.t(item.auth),
d: common_vendor.t(item.time),
e: index,
f: item
};
}),
h: common_vendor.p({
title: "精选资讯",
more: "true",
moreUrl: "/pages/mine/development/development",
type: "line"
})
}; };
} }
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
......
{ {
"navigationBarTitleText": "首页", "navigationBarTitleText": "智慧党建",
"usingComponents": {} "navigationStyle": "custom",
"enablePullDownRefresh": true,
"usingComponents": {
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
"uni-section": "../../uni_modules/uni-section/components/uni-section/uni-section"
}
} }
\ No newline at end of file
<view class="content"><image class="logo" src="{{a}}"></image><view class="text-area"><text class="title">{{b}}</text></view></view> <view class="content"><view class="navbar" style="{{'height:' + e}}"><view class="topInfo" style="{{'margin-top:' + c + ';' + ('height:' + d)}}"><view class="joinCocelal"><text>智慧党建</text></view><view class="searchCoceral"><uni-icons wx:if="{{a}}" class="input-uni-icon" style="margin-right:3px" u-i="6a7ebde3-0" bind:__l="__l" u-p="{{a}}"/><input confirm-type="search" class="nav-bar-input" type="text" placeholder="输入搜索关键词" placeholder-class="title_input" bindconfirm="{{b}}"/></view></view></view><view class="uni-margin-wrap"><swiper class="swiper" circular indicator-dots="{{true}}" autoplay="{{true}}" interval="{{2000}}" duration="{{500}}"><swiper-item><view class="swiper-item uni-bg-red">A</view></swiper-item><swiper-item><view class="swiper-item uni-bg-green">B</view></swiper-item><swiper-item><view class="swiper-item uni-bg-blue">C</view></swiper-item></swiper></view><view class="nav-list"><view wx:for="{{f}}" wx:for-item="item" wx:key="c" class="nav-out" id="{{item.d}}"><view class="nav-item"><image src="{{item.a}}" mode="" class="imgi"></image><text>{{item.b}}</text></view></view></view><uni-section wx:if="{{h}}" u-s="{{['d']}}" u-i="6a7ebde3-1" bind:__l="__l" u-p="{{h}}"><view wx:for="{{g}}" wx:for-item="item" wx:key="e" class="news-out" id="{{item.f}}"><view class="news-item"><image src="{{item.a}}" mode="" class="news-img"></image></view><view class="news-time-out"><view class=""><text>{{item.b}}</text></view><view class="news-time"><text class="news-auth">{{item.c}}</text><text>{{item.d}}</text></view></view></view></uni-section></view>
\ No newline at end of file \ No newline at end of file
.navbar {
width: 100%;
display: flex;
align-items: center;
background-color: #C02B1E;
}
.navbar .title_input {
color: #fff;
}
.navbar .joinCocelal {
font-size: 14px;
color: #fff;
margin-right: 20px;
}
.navbar .topInfo {
width: 100%;
display: flex;
align-items: center;
padding-bottom: 8px;
padding-left: 10px;
}
.navbar .topInfo .searchCoceral {
display: flex;
margin-top: 4px;
}
.content { .content {
background-color: #fff;
}
.uni-margin-wrap {
width: 690rpx;
width: 100%;
}
.swiper {
height: 400rpx;
}
.swiper-item {
display: block;
height: 380rpx;
line-height: 400rpx;
text-align: center;
}
.swiper-list {
margin-top: 40rpx;
margin-bottom: 0;
}
.nav-list {
display: flex;
flex-wrap: wrap;
}
.nav-out {
width: 25%;
margin-top: 4px;
}
.nav-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
justify-content: center; justify-content: center;
align-items: center;
} }
.logo { .imgi {
height: 200rpx; width: 32px;
width: 200rpx; height: 32px;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
} }
.text-area { .news-out {
width: 98%;
margin: 0 auto;
display: flex; display: flex;
justify-content: center; margin-top: 10px;
}
.news-time-out {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.news-img {
width: 120px;
height: 70px;
}
.news-auth {
margin-right: 5px;
} }
.title { .news-time {
font-size: 36rpx; font-size: 10px;
color: #8f8f94; color: #999;
} }
"use strict";
const uni_modules_uniIcons_components_uniIcons_icons = require("./icons.js");
const common_vendor = require("../../../../common/vendor.js");
const getVal = (val) => {
const reg = /^[0-9]*$/g;
return typeof val === "number" || reg.test(val) ? val + "px" : val;
};
const _sfc_main = {
name: "UniIcons",
emits: ["click"],
props: {
type: {
type: String,
default: ""
},
color: {
type: String,
default: "#333333"
},
size: {
type: [Number, String],
default: 16
},
customPrefix: {
type: String,
default: ""
}
},
data() {
return {
icons: uni_modules_uniIcons_components_uniIcons_icons.icons.glyphs
};
},
computed: {
unicode() {
let code = this.icons.find((v) => v.font_class === this.type);
if (code) {
return unescape(`%u${code.unicode}`);
}
return "";
},
iconSize() {
return getVal(this.size);
}
},
methods: {
_onClick() {
this.$emit("click");
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $props.color,
b: $options.iconSize,
c: common_vendor.n("uniui-" + $props.type),
d: common_vendor.n($props.customPrefix),
e: common_vendor.n($props.customPrefix ? $props.type : ""),
f: common_vendor.o((...args) => $options._onClick && $options._onClick(...args))
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<text style="{{'color:' + a + ';' + ('font-size:' + b)}}" class="{{['uni-icons', c, d, e]}}" bindtap="{{f}}"></text>
\ No newline at end of file
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "UniSection",
emits: ["click"],
props: {
type: {
type: String,
default: ""
},
title: {
type: String,
required: true,
default: ""
},
titleFontSize: {
type: String,
default: "14px"
},
titleColor: {
type: String,
default: "#000"
},
titleFontWeight: {
type: String,
default: "600"
},
subTitle: {
type: String,
default: ""
},
subTitleFontSize: {
type: String,
default: "12px"
},
subTitleColor: {
type: String,
default: "#999"
},
padding: {
type: [Boolean, String],
default: false
},
more: {
type: [Boolean, String],
default: false
},
moreUrl: {
type: String,
default: ""
}
},
computed: {
_padding() {
if (typeof this.padding === "string") {
return this.padding;
}
return this.padding ? "10px" : "";
}
},
watch: {
title(newVal) {
if (common_vendor.index.report && newVal !== "") {
common_vendor.index.report("title", newVal);
}
}
},
methods: {
onClick() {
this.$emit("click");
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $props.type
}, $props.type ? {
b: common_vendor.n($props.type)
} : {}, {
c: common_vendor.t($props.title),
d: $props.titleFontSize,
e: $props.titleColor,
f: $props.titleFontWeight,
g: !$props.subTitle ? 1 : "",
h: $props.more
}, $props.more ? {
i: $props.moreUrl,
j: $props.subTitleFontSize,
k: $props.subTitleColor
} : {}, {
l: common_vendor.o((...args) => $options.onClick && $options.onClick(...args)),
m: $options._padding
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="uni-section"><view class="uni-section-header" bindtap="{{l}}"><view wx:if="{{a}}" class="{{['uni-section-header__decoration', b]}}"/><slot wx:else name="decoration"></slot><view class="uni-section-own"><text style="{{'font-size:' + d + ';' + ('color:' + e) + ';' + ('font-weight:' + f)}}" class="{{['uni-section__content-title', g && 'distraction']}}">{{c}}</text><navigator wx:if="{{h}}" url="{{i}}" style="{{'font-size:' + j + ';' + ('color:' + k)}}">更多>> </navigator></view><view class="uni-section-header__slot-right"><slot name="right"></slot></view></view><view class="uni-section-content" style="{{'padding:' + m}}"><slot/></view></view>
\ No newline at end of file
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.uni-section {
background-color: #fff;
}
.uni-section .uni-section-header {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
padding: 12px 10px;
font-weight: normal;
}
.uni-section .uni-section-header__decoration {
margin-right: 6px;
background-color: red;
}
.uni-section .uni-section-header__decoration.line {
width: 4px;
height: 12px;
border-radius: 10px;
}
.uni-section .uni-section-header__decoration.circle {
width: 8px;
height: 8px;
border-top-right-radius: 50px;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
border-bottom-right-radius: 50px;
}
.uni-section .uni-section-header__decoration.square {
width: 8px;
height: 8px;
}
.uni-section .uni-section-header__content {
display: flex;
flex-direction: column;
flex: 1;
color: #333;
}
.uni-section .uni-section-header__content .distraction {
flex-direction: row;
align-items: center;
}
.uni-section .uni-section-header__content-sub {
margin-top: 2px;
}
.uni-section .uni-section-header__slot-right {
font-size: 14px;
}
.uni-section .uni-section-content {
font-size: 14px;
}
.uni-section-own {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment