Commit a8753ed2 by kyle

订单详情和各种详情页面

parent 24298af0
<template> <template>
<view> <view class="container">
<view class="titleContent"> <view class="titleContent">
<view v-for="item in title" :key="item.no" :style="{width:item.width}">{{item.name}}</view>
</view> </view>
<view class="listContent"> <view class="listContent">
<view v-for="listItem in lists" :key="listItem.id" class="line">
<view v-for="subItem in listItem.children" :key="subItem.no" :style="{color:subItem.link ? '#2D56A7' : '#333',width:subItem.width}">
<text :style="{borderColor:subItem.link ? '#2D56A7' : 'transparent'}" @click="link(subItem.link)">{{subItem.value}}</text>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -13,17 +17,78 @@ ...@@ -13,17 +17,78 @@
export default { export default {
name:"listItem", name:"listItem",
props: { props: {
title:Array<any>, title:{
lists:Array<any> type:Array,
default:[{no:Number,name:String,width:Number}]
},
lists:{
type:Array,
default:[{id:Number,children:[{no:Number,value:String,link:String}]}]
}
}, },
data() { data() {
return { return {
}; };
},
mounted() {
console.log(this.title,this.lists)
},
onLoad() {
},
methods:{
link(val){
if(val){
console.log(val)
uni.navigateTo({
url:val
})
}else{
return false;
}
}
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.container{
height: 100%;
background-color: #fff;
.titleContent{
color: #333;
font-size: 26rpx;
display: flex;
align-items: center;
padding: 20rpx 36rpx 20rpx 24rpx;
font-weight: bold;
view{
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
.listContent{
font-size: 26rpx;
.line{
display: flex;
align-items: center;
text-align: center;
padding: 20rpx 36rpx 5rpx 24rpx;
text{
border-bottom: 1px solid transparent;
}
view{
border-bottom: 1px solid #F2F2F2;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
}
}
</style> </style>
\ No newline at end of file
...@@ -157,6 +157,23 @@ ...@@ -157,6 +157,23 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
,{
"path" : "pages/commonDetail/commonDetail",
"style" :
{
"navigationBarTitleText": "明细",
"enablePullDownRefresh": false
}
},{
"path" : "pages/orderDetail/orderDetail",
"style" :
{
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false
}
}
], ],
// "tabBar": { // "tabBar": {
// "color": "#7A7E83", // tab 上的文字默认颜色 // "color": "#7A7E83", // tab 上的文字默认颜色
......
<template>
<view>
<template v-if="title">
<view><list-item :title="title" :lists="lists"></list-item></view>
</template>
<!-- -->
</view>
</template>
<script>
import listItem from "@/components/listItem/listItem.vue";
export default {
components:{
listItem
},
data() {
return {
title:[],
lists:[],
fileId:'',
type:'1',
}
},
methods: {
},
onLoad(option) {
console.log(option)
this.fileId = option.fileId;
// type 1为分享明细 2阅读明细 3购买明细
this.type = option.type;
},
mounted() {
console.log('mounted')
if(this.type=='1'){
this.title = [
{no:1,name:'分享时间',width: '40%'},
{no:2,name:'分享链接',width: '35%'},
{no:3,name:'阅读明细',width: '25%'},
];
this.lists = [
{id:1,children:[{no:1,value:'XXXXX',link:'',width: '40%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '35%'},{no:3,value:'查看明细',link:`/pages/commonDetail/commonDetail?fileId=${this.fileId}&type=2`,width: '25%'}]},
{id:2,children:[{no:1,value:'XXXXX',link:'',width: '40%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '35%'},{no:3,value:'查看明细',link:`/pages/commonDetail/commonDetail?fileId=${this.fileId}&type=2`,width: '25%'}]},
{id:3,children:[{no:1,value:'XXXXX',link:'',width: '40%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '35%'},{no:3,value:'查看明细',link:`/pages/commonDetail/commonDetail?fileId=${this.fileId}&type=2`,width: '25%'}]},
{id:4,children:[{no:1,value:'XXXXX',link:'',width: '40%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '35%'},{no:3,value:'查看明细',link:`/pages/commonDetail/commonDetail?fileId=${this.fileId}&type=2`,width: '25%'}]},
{id:5,children:[{no:1,value:'XXXXX',link:'',width: '40%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '35%'},{no:3,value:'查看明细',link:`/pages/commonDetail/commonDetail?fileId=${this.fileId}&type=2`,width: '25%'}]},
]
}else if(this.type=='2'){
this.title = [
{no:1,name:'用户',width: '20%'},
{no:2,name:'阅读链接',width: '30%'},
{no:3,name:'阅读时间',width: '25%'},
{no:4,name:'购买明细',width: '25%'}
];
this.lists = [
{id:1,children:[{no:1,value:'XXXXX',link:'',width: '20%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '30%'},{no:3,value:'2022-10-12',link:'',width: '25%'},{no:4,value:'查看明细',link:'/pages/commonDetail/commonDetail?fileId=${this.fileId}&type=3',width: '25%'}]},
{id:2,children:[{no:1,value:'XXXXX',link:'',width: '20%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '30%'},{no:3,value:'2022-10-12',link:'',width: '25%'},{no:4,value:'查看明细',link:'/pages/commonDetail/commonDetail?fileId=${this.fileId}&type=3',width: '25%'}]},
{id:3,children:[{no:1,value:'XXXXX',link:'',width: '20%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '30%'},{no:3,value:'2022-10-12',link:'',width: '25%'},{no:4,value:'查看明细',link:'/pages/commonDetail/commonDetail?fileId=${this.fileId}&type=3',width: '25%'}]},
{id:4,children:[{no:1,value:'XXXXX',link:'',width: '20%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '30%'},{no:3,value:'2022-10-12',link:'',width: '25%'},{no:4,value:'查看明细',link:'/pages/commonDetail/commonDetail?fileId=${this.fileId}&type=3',width: '25%'}]},
]
}else if(this.type=='3'){
this.title = [
{no:1,name:'用户',width: '30%'},
{no:2,name:'阅读链接',width: '30%'},
{no:3,name:'购买订单',width: '40%'},
];
this.lists = [
{id:1,children:[{no:1,value:'XXXXX',link:'',width: '30%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '30%'},{no:4,value:'查看明细',link:'/pages/orderDetail/orderDetail',width: '40%'}]},
{id:2,children:[{no:1,value:'XXXXX',link:'',width: '30%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '30%'},{no:4,value:'查看明细',link:'/pages/orderDetail/orderDetail',width: '40%'}]},
{id:3,children:[{no:1,value:'XXXXX',link:'',width: '30%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '30%'},{no:4,value:'查看明细',link:'/pages/orderDetail/orderDetail',width: '40%'}]},
{id:4,children:[{no:1,value:'XXXXX',link:'',width: '30%'},{no:2,value:'https://mdev.zuihuibi.cn/cffp/pages/commonDetail/commonDetail',link:'',width: '30%'},{no:4,value:'查看明细',link:'/pages/orderDetail/orderDetail',width: '40%'}]},
]
}
}
}
</script>
<style>
</style>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
{ key: '02', name: '申请加盟', icon: 'applyJoin', link: '../application-process/basic-info', isOpen: true }, { key: '02', name: '申请加盟', icon: 'applyJoin', link: '../application-process/basic-info', isOpen: true },
{ key: '03', name: '学习认证', icon: 'learningCertify', link: '../learnCertify/learnCertify', isOpen: true }, { key: '03', name: '学习认证', icon: 'learningCertify', link: '../learnCertify/learnCertify', isOpen: true },
{ key: '04', name: '邀请加盟', icon: 'shareJoin', link: '../inviteJoin/inviteJoin', isOpen: true }, { key: '04', name: '邀请加盟', icon: 'shareJoin', link: '../inviteJoin/inviteJoin', isOpen: true },
{ key: '05', name: '我的分享', icon: 'share', link: '', isOpen: false }, { key: '05', name: '我的分享', icon: 'share', link: '../myShare/myShare', isOpen: true },
{ key: '06', name: '我的团队', icon: 'team', link: '', isOpen: false }, { key: '06', name: '我的团队', icon: 'team', link: '', isOpen: false },
{ key: '07', name: '更多功能', icon: 'more', link: '../personalCenter/personalCenter', isOpen: true } { key: '07', name: '更多功能', icon: 'more', link: '../personalCenter/personalCenter', isOpen: true }
], ],
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<text>{{coursesCountInfos.shareFrequencyMonth}}</text> <text>{{coursesCountInfos.shareFrequencyMonth}}</text>
<text>本月分享(频次)</text> <text>本月分享(频次)</text>
</view> </view>
<view class="statisticItem"> <view class="statisticItem" @click="viewIntegral()">
<text class="colorText">{{coursesCountInfos.integralMonth}}</text> <text class="colorText">{{coursesCountInfos.integralMonth}}</text>
<text>本月获得积分</text> <text>本月获得积分</text>
</view> </view>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<text>{{coursesCountInfos.shareFrequencyCount}}</text> <text>{{coursesCountInfos.shareFrequencyCount}}</text>
<text>累计分享(频次)</text> <text>累计分享(频次)</text>
</view> </view>
<view class="statisticItem"> <view class="statisticItem" @click="viewIntegral()">
<text class="colorText">{{coursesCountInfos.integralCount}}</text> <text class="colorText">{{coursesCountInfos.integralCount}}</text>
<text>累计获得积分</text> <text>累计获得积分</text>
</view> </view>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="countsContent"> <view class="countsContent" @click="goDetail(item.fileId)">
<view> <view>
<i class="iconfont icon-zhuanfa"></i> <i class="iconfont icon-zhuanfa"></i>
<text>分享</text> <text>分享</text>
...@@ -125,8 +125,16 @@ ...@@ -125,8 +125,16 @@
// }) // })
}, },
// 查看详情 // 查看详情
goDetail(){ goDetail(val){
uni.navigateTo({
url:`/pages/commonDetail/commonDetail?fileId=${val}&type=1`
})
},
// 查看积分
viewIntegral(){
uni.navigateTo({
url:`/pages/myPoints/myPoints`
})
} }
}, },
onLoad() { onLoad() {
......
<template>
<view class="container">
<view class="orderInfoContent">
<ul>
<li v-for="item in orderInfoList" :key="item.id">
<text>{{item.name}}:</text>
<text :style="{color:item.color ? item.color : '#666'}">{{item.value}}</text>
</li>
</ul>
<ul>
<li v-for="item in orderStatusInfoList" :key="item.id">
<text>{{item.name}}:</text>
<text :style="{color:item.color ? item.color : '#666'}">{{item.value}}</text>
</li>
</ul>
</view>
</view>
</template>
<script>
export default {
data() {
return {
orderInfoList:[
{id:1,name:'订单编号',value:'111111',type:'string'},
{id:2,name:'购买时间',value:'111111',type:'string'},
{id:3,name:'课程类型',value:'111111',type:'string'},
{id:4,name:'课程名称',value:'111111',type:'string'},
{id:5,name:'购买人',value:'111111',type:'string'},
{id:6,name:'课程讲师',value:'111111',type:'string'},
{id:7,name:'课程现价',value:'111111',type:'currency'},
{id:8,name:'积分抵扣',value:'111111',color:'#FA6900',type:'currency'},
{id:9,name:'实际支付',value:'111111',type:'currency'}
],
orderStatusInfoList:[
{id:1,name:'获得积分',value:'111111',type:'currency',color:'#F15A1F'},
{id:2,name:'积分来源',value:'111111',type:'string'},
{id:3,name:'课程状态',value:'111111',type:'string'},
{id:4,name:'观看截至',value:'111111',type:'string'},
]
};
}
}
</script>
<style lang="scss">
.container{
height: 100%;
.orderInfoContent{
ul{
background-color: #fff;
margin: 20rpx 22rpx;
padding: 20rpx;
li{
margin-bottom: 20rpx;
display: flex;
justify-content: space-between;
text{
&:first-child{
font-size: 24rpx;
color: #333;
}
&:last-child{
font-size: 28rpx;
}
}
}
}
}
}
</style>
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