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

2
pages/index/index.vue

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

16
subpkg/about/about.vue

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

31
subpkg/address/address.vue

@ -1,4 +1,9 @@
<template> <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="cart-container">
<!-- 选择收货地址的盒子 --> <!-- 选择收货地址的盒子 -->
<view class="address-choose-box"> <view class="address-choose-box">
@ -32,25 +37,9 @@
</uni-swipe-action-item> </uni-swipe-action-item>
</block> </block>
</uni-swipe-action> </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> </view>
</view>
</template> </template>
<script> <script>
@ -132,6 +121,11 @@
data: res data: res
} = await uni.$http.post('/small/project/address/remove',item.guid) } = await uni.$http.post('/small/project/address/remove',item.guid)
if (!res.success) return uni.$showMsg() if (!res.success) return uni.$showMsg()
},
back(){
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
} }
}, },
computed: { computed: {
@ -142,6 +136,7 @@
</script> </script>
<style lang="scss"> <style lang="scss">
@import url("@/static/base_css.css");
.address-border { .address-border {
display: block; display: block;
width: 100%; width: 100%;
@ -187,6 +182,8 @@
.cart-container { .cart-container {
padding-bottom: 50px; padding-bottom: 50px;
padding: 6% 3%;
} }
.cart-title { .cart-title {

18
subpkg/agreement/agreement.vue

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

19
subpkg/feedback/feedback.vue

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

16
subpkg/knowledgeInfo/knowledgeInfo.vue

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

4
subpkg/login/login.vue

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

86
subpkg/message/message.vue

@ -1,34 +1,60 @@
<template> <template>
<view> <view class="wrap">
<view class="message-list"> <view class="stabar"></view>
<view class="message-item" v-for="(item, i) in messageList" :key="i" @click="navClickHandler(item)"> <view class="secbar"><label class="back" @click="back()"></label></view>
<image src="/static/images/hpic.jpg" class="message-img"></image> <view class="mainwrap2">
<text>{{item.title}}</text> <view class="subwrap">
</view> <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> </view>
</view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
messageList:[] messageList:[],
queryObj:{
pageNum:1,
pageSize:10,
open:0
},
total:0,
isloading:false
}; };
}, },
onLoad() { onLoad() {
this.getMessageList(); 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:{ methods:{
async getMessageList() { async getMessageList() {
this.isloading = true
const { const {
data: res data: res
} = await uni.$http.post('/small/project/message/listAll') } = await uni.$http.post('/small/project/message/listByApp',this.queryObj)
if (!res.success) return uni.$showMsg() 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) { navClickHandler(item) {
uni.navigateTo({ uni.navigateTo({
@ -40,16 +66,32 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.message-list { @import url("@/static/base_css.css");
margin: 12px 0;
.title {
.message-img { margin-top: 0;
width: 99%; padding-top: 16rpx;
height: 140rpx; }
margin-bottom: 10rpx; .mainwrap2 {
border-radius: 10px; 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> </style>

16
subpkg/messageInfo/messageInfo.vue

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

16
subpkg/privacy/privacy.vue

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

Loading…
Cancel
Save