提交 b3519382 编写于 作者: study夏羽's avatar study夏羽

优化体积

上级 549a760c
......@@ -44,12 +44,12 @@
"style": {
"navigationStyle": "custom"
}
}, {
},
// #ifdef APP-PLUS
{
"path": "pages/ucenter/about/about",
"style": {
"navigationBarTitleText": "关于"
// #ifdef APP-PLUS
,
"navigationBarTitleText": "关于",
"app-plus": {
"titleNView": {
"buttons": [{
......@@ -57,11 +57,8 @@
}]
}
}
// #endif
}
},
// #ifdef APP-PLUS
{
"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
"style": {
......@@ -78,6 +75,34 @@
}
}
},
{
"path": "pages/ucenter/invite/invite",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate",
"style": {
"navigationBarTitleText": "注销账号"
}
},
// #endif
// #ifdef H5
{
"path": "uni_modules/uni-id-pages/pages/userinfo/cropImage/cropImage",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "uni_modules/uni-id-pages/pages/register/register-admin",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "注册管理员账号"
}
},
// #endif
{
"path": "pages/uni-agree/uni-agree",
......@@ -92,14 +117,6 @@
"style": {
"navigationBarTitleText": "设置"
}
}, {
"path": "pages/common/webview/webview",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/ucenter/read-news-log/read-news-log",
......@@ -107,24 +124,13 @@
"navigationBarTitleText": "阅读记录",
"enablePullDownRefresh": true
}
}, {
"path": "pages/ucenter/invite/invite",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}, {
},
{
"path": "uni_modules/uni-feedback/pages/opendb-feedback/opendb-feedback",
"style": {
"navigationBarTitleText": "意见反馈",
"enablePullDownRefresh": false
}
}, {
"path": "uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate",
"style": {
"navigationBarTitleText": "注销账号"
}
},
{
"path": "uni_modules/uni-id-pages/pages/userinfo/userinfo",
......@@ -136,11 +142,6 @@
"style": {
"navigationBarTitleText": "绑定手机号码"
}
}, {
"path": "uni_modules/uni-id-pages/pages/userinfo/cropImage/cropImage",
"style": {
"navigationBarTitleText": ""
}
}, {
"path": "uni_modules/uni-id-pages/pages/login/login-withoutpwd",
"style": {
......@@ -188,20 +189,14 @@
"style": {
"navigationBarTitleText": "通过邮箱重置密码"
}
}, {
"path": "uni_modules/uni-id-pages/pages/register/register-admin",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "注册管理员账号"
}
}
,{
},
{
"path": "uni_modules/uni-id-pages/pages/userinfo/set-pwd/set-pwd",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "设置密码"
}
}
}
],
"globalStyle": {
// #ifdef H5
......
<template>
<view>
<web-view v-if="url" :src="url"></web-view>
</view>
</template>
<script>
export default {
onLoad({url,title}) {
if(url.substring(0, 4) != 'http'){
uni.showModal({
title:"错误",
content: '不是一个有效的网站链接,'+'"'+url+'"',
showCancel: false,
confirmText:"知道了",
complete: () => {
uni.navigateBack()
}
});
title = "页面路径错误"
}else{
console.log(url,title);
this.url = url;
}
if(title){
uni.setNavigationBarTitle({title});
}
},
data() {
return {
url:null
};
}
}
</script>
<style lang="scss">
</style>
<template>
<view class="warp">
<!-- #ifdef APP-PLUS -->
<status-bar />
<statusBar></statusBar>
<!-- #endif -->
<!-- banner -->
<unicloud-db ref="bannerdb" v-slot:default="{data, loading, error, options}" collection="opendb-banner"
field="_id,bannerfile,open_url,title" @load="onqueryload">
<!-- 当无banner数据时显示占位图 -->
<image v-if="!(loading||data.length)" class="banner-image" src="/static/grid/empty.png" mode="aspectFill" :draggable="false" />
<uni-swiper-dot v-else class="uni-swiper-dot-box" @clickItem="clickItem" :info="data"
:current="current" field="content">
<swiper class="swiper-box" @change="changeSwiper" :current="swiperDotIndex">
<image v-if="!(loading||data.length)" class="banner-image" src="/static/uni-center/headers.png" mode="aspectFill" :draggable="false" />
<swiper v-else class="swiper-box" @change="changeSwiper" :current="current" indicator-dots>
<swiper-item v-for="(item, index) in data" :key="item._id">
<view class="swiper-item" @click="clickBannerItem(item)">
<image class="banner-image" :src="item.bannerfile.url" mode="aspectFill" :draggable="false" />
</view>
</swiper-item>
</swiper>
</uni-swiper-dot>
</unicloud-db>
<!-- 宫格 -->
<uni-section :title="$t('grid.grid')" style="margin: 0;" type="line"></uni-section>
<view class="section-box">
<text class="decoration"></text>
<text class="section-text">{{$t('grid.grid')}}</text>
</view>
<view class="example-body">
<uni-grid :column="3" :highlight="true" @change="change">
<template v-for="(item,i) in gridList">
......@@ -42,16 +44,19 @@
</template>
<script>
// #ifdef APP-PLUS
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
// #endif
export default {
// #ifdef APP-PLUS
components: {
statusBar
},
// #endif
data() {
return {
gridList: [],
current: 0,
swiperDotIndex: 0,
hasLogin:false
}
},
......@@ -86,9 +91,6 @@
changeSwiper(e) {
this.current = e.detail.current
},
clickItem(e) {
this.swiperDotIndex = e
},
/**
* 点击banner的处理
*/
......@@ -96,7 +98,7 @@
// 有外部链接-跳转url
if (item.open_url) {
uni.navigateTo({
url: '/pages/common/webview/webview?url=' + item.open_url + '&title=' + item.title,
url: '/uni_modules/uni-id-pages/pages/common/webview/webview?url=' + item.open_url + '&title=' + item.title,
success: res => {},
fail: () => {},
complete: () => {}
......@@ -135,6 +137,23 @@
}
/* #endif */
.section-box{
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx;
}
.decoration{
width: 4px;
height: 12px;
border-radius: 10px;
background-color: #2979ff;
}
.section-text{
color: #333;
margin-left: 15rpx;
}
/* #ifdef APP-NVUE */
.warp {
background-color: #fff;
......
......@@ -52,12 +52,16 @@
<script>
// #ifdef APP
import UniShare from '@/uni_modules/uni-share/js_sdk/uni-share.js';
import uniNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue';
const uniShare = new UniShare()
// #endif
const db = uniCloud.database();
const readNewsLog = db.collection('read-news-log')
export default {
// #ifdef APP
components:{
"uni-nav-bar":uniNavBar
},
onBackPress({from}) {
if(from == 'backbutton'){
if(uniShare.isShow){
......
......@@ -49,7 +49,6 @@
},
computed: {
uniStarterConfig() {
console.log(getApp());
return getApp().globalData.config
},
agreements() {
......@@ -150,7 +149,7 @@
title
}) {
uni.navigateTo({
url: '/pages/common/webview/webview?url=' + url + '&title=' + title,
url: '/uni_modules/uni-id-pages/pages/common/webview/webview?url=' + url + '&title=' + title,
success: res => {},
fail: () => {},
complete: () => {}
......
......@@ -54,12 +54,10 @@
this.$refs.udb.loadData({
clear: true
}, (res) => {
console.log(res);
uni.stopPullDownRefresh()
})
},
handleItemClick(item) {
console.log(item);
uni.navigateTo({
url: '/pages/list/detail?id=' + item._id + '&title=' + item.title
})
......
......@@ -59,7 +59,6 @@
// #ifdef APP-PLUS || MP-WEIXIN
uni.checkIsSupportSoterAuthentication({
success: (res) => {
console.log(res);
this.supportMode = res.supportMode
},
fail: (err) => {
......
......@@ -3,7 +3,11 @@
<uni-sign-in ref="signIn"></uni-sign-in>
<view class="userInfo" @click.capture="toUserInfo">
<cloud-image width="150rpx" height="150rpx" v-if="hasLogin&&userInfo.avatar_file&&userInfo.avatar_file.url" :src="userInfo.avatar_file.url"></cloud-image>
<image v-else class="logo-img" src="@/static/uni-center/defaultAvatarUrl.png"></image>
<view v-else class="defaultAvatarUrl">
<uni-icons color="#ffffff" size="50" type="person-filled" />
</view>
<view class="logo-title">
<text class="uer-name" v-if="hasLogin">{{userInfo.nickname||userInfo.username||userInfo.mobile}}</text>
<text class="uer-name" v-else>{{$t('mine.notLogged')}}</text>
......@@ -90,7 +94,7 @@
{
"title": this.$t('mine.toEvaluate'),
"event": 'gotoMarket',
"icon": "hand-thumbsup"
"icon": "star"
},
//#endif
{
......@@ -121,11 +125,13 @@
"to": '/pages/ucenter/settings/settings',
"icon": "gear"
}],
// #ifdef APP-PLUS
[{
"title": this.$t('mine.about'),
"to": '/pages/ucenter/about/about',
"icon": "info"
}]
// #endif
],
listStyles: {
"height": "150rpx", // 边框高度
......@@ -363,17 +369,19 @@
}
.userInfo {
padding: 20rpx;
padding-top: 50px;
// padding: 20rpx;
padding-top: 60px;
background-image: url(../../static/uni-center/headers.png);
flex-direction: column;
align-items: center;
}
.logo-img {
.defaultAvatarUrl{
width: 150rpx;
height: 150rpx;
border-radius: 150rpx;
background-color: rgb(0, 122, 255);
border-radius: 100%;
justify-content: center;
align-items: center;
}
.logo-title {
......
......@@ -50,12 +50,12 @@ const { about } = config
methods: {
openprotocol(e) {
uni.navigateTo({
url: "/pages/common/webview/webview?url="+about.agreements[0].url
url: "/uni_modules/uni-id-pages/pages/common/webview/webview?url="+about.agreements[0].url
})
},
openPrivacyPolicy(e) {
uni.navigateTo({
url: "/pages/common/webview/webview?url="+about.agreements[1].url
url: "/uni_modules/uni-id-pages/pages/common/webview/webview?url="+about.agreements[1].url
})
},
agree(e) {
......
static/h5/download-app/ios.png

1.6 KB | W: | H:

static/h5/download-app/ios.png

1.2 KB | W: | H:

static/h5/download-app/ios.png
static/h5/download-app/ios.png
static/h5/download-app/ios.png
static/h5/download-app/ios.png
  • 2-up
  • Swipe
  • Onion skin
static/h5/download-app/openImg.png

12.7 KB | W: | H:

static/h5/download-app/openImg.png

12.6 KB | W: | H:

static/h5/download-app/openImg.png
static/h5/download-app/openImg.png
static/h5/download-app/openImg.png
static/h5/download-app/openImg.png
  • 2-up
  • Swipe
  • Onion skin
static/tabbar/grid.png

2.8 KB | W: | H:

static/tabbar/grid.png

2.6 KB | W: | H:

static/tabbar/grid.png
static/tabbar/grid.png
static/tabbar/grid.png
static/tabbar/grid.png
  • 2-up
  • Swipe
  • Onion skin
static/tabbar/grid_active.png

2.6 KB | W: | H:

static/tabbar/grid_active.png

2.5 KB | W: | H:

static/tabbar/grid_active.png
static/tabbar/grid_active.png
static/tabbar/grid_active.png
static/tabbar/grid_active.png
  • 2-up
  • Swipe
  • Onion skin
static/tabbar/list.png

2.9 KB | W: | H:

static/tabbar/list.png

2.8 KB | W: | H:

static/tabbar/list.png
static/tabbar/list.png
static/tabbar/list.png
static/tabbar/list.png
  • 2-up
  • Swipe
  • Onion skin
static/tabbar/list_active.png

3.1 KB | W: | H:

static/tabbar/list_active.png

3.0 KB | W: | H:

static/tabbar/list_active.png
static/tabbar/list_active.png
static/tabbar/list_active.png
static/tabbar/list_active.png
  • 2-up
  • Swipe
  • Onion skin
static/tabbar/me.png

3.4 KB | W: | H:

static/tabbar/me.png

3.3 KB | W: | H:

static/tabbar/me.png
static/tabbar/me.png
static/tabbar/me.png
static/tabbar/me.png
  • 2-up
  • Swipe
  • Onion skin
static/tabbar/me_active.png

3.4 KB | W: | H:

static/tabbar/me_active.png

3.4 KB | W: | H:

static/tabbar/me_active.png
static/tabbar/me_active.png
static/tabbar/me_active.png
static/tabbar/me_active.png
  • 2-up
  • Swipe
  • Onion skin
static/uni-center/headers.png

31.5 KB | W: | H:

static/uni-center/headers.png

19.9 KB | W: | H:

static/uni-center/headers.png
static/uni-center/headers.png
static/uni-center/headers.png
static/uni-center/headers.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册