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

优化体积

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