Browse Source

导航条

h5_css
yanyan 3 years ago
parent
commit
174be43a83
  1. 27
      pages.json
  2. 2
      pages/index/index.vue
  3. 16
      subpkg/about/about.vue
  4. 31
      subpkg/address/address.vue
  5. 18
      subpkg/agreement/agreement.vue
  6. 19
      subpkg/feedback/feedback.vue
  7. 16
      subpkg/knowledgeInfo/knowledgeInfo.vue
  8. 4
      subpkg/login/login.vue
  9. 86
      subpkg/message/message.vue
  10. 16
      subpkg/messageInfo/messageInfo.vue
  11. 16
      subpkg/privacy/privacy.vue

27
pages.json

@ -49,7 +49,8 @@
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
},
{
@ -57,7 +58,8 @@
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
},
{
@ -65,7 +67,8 @@
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : true
"enablePullDownRefresh" : true,
"navigationStyle": "custom"
}
},
{
@ -82,7 +85,8 @@
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
},
{
@ -90,7 +94,8 @@
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
},
{
@ -98,7 +103,8 @@
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : true
"enablePullDownRefresh" : true,
"navigationStyle": "custom"
}
},
{
@ -133,7 +139,8 @@
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
},
{
@ -141,7 +148,8 @@
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
},
{
@ -176,7 +184,8 @@
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
"enablePullDownRefresh" : false,
"navigationStyle": "custom"
}
}]
}],

2
pages/index/index.vue

@ -67,7 +67,7 @@
},
onLoad() {
this.getSwiperList();
this.checkLogin()
this.checkLogin()
},
onShow() {
this.page= "home"

16
subpkg/about/about.vue

@ -1,7 +1,11 @@
<template>
<view>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="contentContainer">
<view v-html="content"></view>
</view>
</view>
</template>
<script>
@ -28,10 +32,18 @@
// uni.$showMsg('数据请求成功!')
},
back(){
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
}
}
}
</script>
<style lang="scss">
@import url("@/static/base_css.css");
.contentContainer{
padding: 15% 3%;
}
</style>

31
subpkg/address/address.vue

@ -1,4 +1,9 @@
<template>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label>
<!-- <view class="title">消息中心</view> -->
</view>
<view class="cart-container">
<!-- 选择收货地址的盒子 -->
<view class="address-choose-box">
@ -32,25 +37,9 @@
</uni-swipe-action-item>
</block>
</uni-swipe-action>
<!-- <block v-for="(item, i) in addressList" :key="i">
<view class="address-info-box">
<view class="row1">
<view class="row1-left">
<view class="username">收货人:{{item.name}}</view>
</view>
<view class="row1-right">
<view class="phone">电话:{{item.mobile}}</view>
<uni-icons type="arrowright" size="16"></uni-icons>
</view>
</view>
<view class="row2">
<view class="row2-left">收货地址:</view>
<view class="row2-right">{{item.address}}</view>
</view>
</view>
</block> -->
</view>
</view>
</view>
</template>
<script>
@ -132,6 +121,11 @@
data: res
} = await uni.$http.post('/small/project/address/remove',item.guid)
if (!res.success) return uni.$showMsg()
},
back(){
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
}
},
computed: {
@ -142,6 +136,7 @@
</script>
<style lang="scss">
@import url("@/static/base_css.css");
.address-border {
display: block;
width: 100%;
@ -187,6 +182,8 @@
.cart-container {
padding-bottom: 50px;
padding: 6% 3%;
}
.cart-title {

18
subpkg/agreement/agreement.vue

@ -1,7 +1,11 @@
<template>
<view>
<view v-html="content"></view>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="contentContainer">
<view v-html="content"></view>
</view>
</view>
</template>
<script>
@ -28,10 +32,18 @@
// uni.$showMsg('数据请求成功!')
},
back(){
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
}
}
}
</script>
<style lang="scss">
@import url("@/static/base_css.css");
.contentContainer{
padding: 15% 3%;
}
</style>

19
subpkg/feedback/feedback.vue

@ -1,4 +1,9 @@
<template>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="mainwrap2">
<view class="subwrap">
<view class="table_index">
<uni-section title="建议与反馈" type="line"></uni-section>
<uni-forms :modelValue="formData">
@ -11,6 +16,9 @@
<button class="uni-button" size="mini" type="primary" @click="toTable">提交</button>
</uni-forms>
</view>
</view>
</view>
</view>
</template>
<script>
import { mapMutations, mapState } from 'vuex'
@ -48,20 +56,27 @@
this.formData.content =''
return uni.$showMsg('非常感谢您提出宝贵的建议。我们非常重视您的反馈,会尽快对相关内容进行改进。')
},
back(){
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
}
}
}
</script>
<style scoped>
@import url("@/static/base_css.css");
.table_index {
background-color: #fff;
height: 100%;
padding: 20px 30px;
padding: 50px 30px;
border-radius: 3%;
}
.uni-button{
font-size: 18px;
width: 100%;
height: 80rpx;
height: 70rpx;
display: flex;
align-items: center;
justify-content: center;

16
subpkg/knowledgeInfo/knowledgeInfo.vue

@ -1,7 +1,11 @@
<template>
<view>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="contentContainer">
<view v-html="content"></view>
</view>
</view>
</template>
<script>
@ -27,10 +31,18 @@
this.content = res.data.content
},
back(){
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
}
}
}
</script>
<style lang="scss">
@import url("@/static/base_css.css");
.contentContainer{
padding: 15% 3%;
}
</style>

4
subpkg/login/login.vue

@ -1,9 +1,9 @@
<template>
<view class="login-container">
<view class="login-container">
<uni-icons type="contact-filled" size="100" color="#AFAFAF"></uni-icons>
<button type="primary" class="btn-login" open-type="getUserInfo" @getuserinfo="getUserInfo">一键登录</button>
<text class="tips-text">登录后尽享更多权益</text>
</view>
</view>
</template>
<script>

86
subpkg/message/message.vue

@ -1,34 +1,60 @@
<template>
<view>
<view class="message-list">
<view class="message-item" v-for="(item, i) in messageList" :key="i" @click="navClickHandler(item)">
<image src="/static/images/hpic.jpg" class="message-img"></image>
<text>{{item.title}}</text>
</view>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="mainwrap2">
<view class="subwrap">
<view class="message-list">
<view class="artlist" v-for="(item, i) in messageList" :key="i" @click="navClickHandler(item)">
<view class="txtlist">{{item.title}}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
messageList:[]
messageList:[],
queryObj:{
pageNum:1,
pageSize:10,
open:0
},
total:0,
isloading:false
};
},
onLoad() {
this.getMessageList();
},
onReachBottom(){
if(this.queryObj.pageNum * this.queryObj.pageSize >= this.total) return uni.$showMsg('已展示所有内容')
if(this.isloading) return
this.queryObj.pageNum++
this.getMessageList()
},
methods:{
async getMessageList() {
this.isloading = true
const {
data: res
} = await uni.$http.post('/small/project/message/listAll')
if (!res.success) return uni.$showMsg()
} = await uni.$http.post('/small/project/message/listByApp',this.queryObj)
this.isloading = false
this.messageList = res.data
res.rows.forEach(item=>{
item.uploadPath = uni.$http.baseUrl +item.uploadPath
})
this.messageList =[...this.messageList,...res.rows]
this.total = res.total
},
back(){
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
},
navClickHandler(item) {
uni.navigateTo({
@ -40,16 +66,32 @@
</script>
<style lang="scss">
.message-list {
margin: 12px 0;
.message-img {
width: 99%;
height: 140rpx;
margin-bottom: 10rpx;
border-radius: 10px;
}
}
@import url("@/static/base_css.css");
.title {
margin-top: 0;
padding-top: 16rpx;
}
.mainwrap2 {
height: calc(100% - 300rpx);
}
.artlist {
margin: 2% 0 3.5%;
padding: 4% 3%;
width: 100%;
font-size: 1.05rem;
box-shadow: 0 0 10rpx #ddd;
background: #fff;
border-radius: 20rpx;
box-sizing: border-box;
}
.timetop {
margin: 0 0 3%;
/* padding: 0 0 2%;
border-bottom: 1px solid #eee; */
color: #999;
font-size: 0.9rem;
}
</style>

16
subpkg/messageInfo/messageInfo.vue

@ -1,7 +1,11 @@
<template>
<view>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="contentContainer">
<view v-html="content"></view>
</view>
</view>
</template>
<script>
@ -28,10 +32,18 @@
this.content = res.data.content
// uni.$showMsg('数据请求成功!')
},
back(){
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
}
}
}
</script>
<style lang="scss">
@import url("@/static/base_css.css");
.contentContainer{
padding: 15% 3%;
}
</style>

16
subpkg/privacy/privacy.vue

@ -1,7 +1,11 @@
<template>
<view>
<view class="wrap">
<view class="stabar"></view>
<view class="secbar"><label class="back" @click="back()"></label></view>
<view class="contentContainer">
<view v-html="content"></view>
</view>
</view>
</template>
<script>
@ -28,10 +32,18 @@
// uni.$showMsg('数据请求成功!')
},
back(){
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
}
}
}
</script>
<style lang="scss">
@import url("@/static/base_css.css");
.contentContainer{
padding: 4% 3%;
}
</style>

Loading…
Cancel
Save