Commit aec93715 by sunerhu

1.分享链接list 页面调整

parent 4e7aaaaf
...@@ -5,8 +5,12 @@ ...@@ -5,8 +5,12 @@
</view> </view>
<view class="listContent"> <view class="listContent">
<view v-for="listItem in lists" :key="listItem.id" class="line"> <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}"> <view v-for="subItem in listItem.children" :key="subItem.no"
<text :style="{borderColor:subItem.link ? '#2D56A7' : 'transparent'}" @click="link(subItem.link)">{{subItem.value}}</text> :style="{color:subItem.link ? '#2D56A7' : '#333',width:subItem.width}">
<view class="" style="overflow: hidden;">
<text :style="{borderColor:subItem.link ? '#2D56A7' : 'transparent'}"
@click="link(subItem.value,listItem)">{{subItem.value}}</text>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -15,79 +19,121 @@ ...@@ -15,79 +19,121 @@
<script> <script>
export default { export default {
name:"listItem", name: "listItem",
props: { props: {
title:{ title: {
type:Array, type: Array,
default:[{no:Number,name:String,width:Number}] default: [{
no: Number,
name: String,
width: Number
}]
}, },
lists:{ lists: {
type:Array, type: Array,
default:[{id:Number,children:[{no:Number,value:String,link:String}]}] default: [{
id: Number,
children: [{
no: Number,
value: String,
link: String
}]
}]
} }
}, },
data() { data() {
return { return {
}; };
}, },
mounted() { mounted() {
console.log(this.lists) console.log(this.lists, 1541515)
}, },
onLoad() { onLoad() {
}, },
methods:{ methods: {
link(val){ cklink() {
if(val){
uni.navigateTo({ },
url:val link(val, value) {
}) console.log(val, value, 1515)
}else{
return false; let dataList = value.children
for (var i = 0; i < dataList.length; i++) {
if (val == dataList[i].value) {
console.log(dataList[i], 54854)
if (val == '阅读明细' || val == '购买明细') {
uni.navigateTo({
url: dataList[i].link
})
} else {
uni.showModal({
title: '分享链接',
content: dataList[i].value,
showCancel: false,
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
} }
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.container{ .container {
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
.titleContent{
.titleContent {
color: #333; color: #333;
font-size: 26rpx; font-size: 26rpx;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 20rpx 36rpx 20rpx 24rpx; padding: 20rpx 36rpx 20rpx 24rpx;
font-weight: bold; font-weight: bold;
view{
view {
text-align: center; text-align: center;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
} }
} }
.listContent{
.listContent {
font-size: 26rpx; font-size: 26rpx;
.line{
.line {
display: flex; display: flex;
align-items: center; align-items: center;
text-align: center; text-align: center;
padding: 20rpx 36rpx 5rpx 24rpx; padding: 20rpx 20rpx 5rpx 20rpx;
text{ border-bottom: 1px solid #F2F2F2;
border-bottom: 1px solid transparent;
text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
view{
border-bottom: 1px solid #F2F2F2; view {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
padding: 0 5rpx;
} }
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
<text @click="viewDetail(item)" class="dropStatus">{{item.orderStatus}}<i class="iconfont icon-youjiantou" style="margin-left: 5rpx;font-size: 26rpx;"></i></text> <text @click="viewDetail(item)" class="dropStatus">{{item.orderStatus}}<i class="iconfont icon-youjiantou" style="margin-left: 5rpx;font-size: 26rpx;"></i></text>
</view> </view>
<view class="ulBox"> <view class="ulBox">
<text>积分来源:</text>
<text>{{item.commissionTypeContent}}</text>
</view>
<view class="ulBox">
<text>退课积分:</text> <text>退课积分:</text>
<text>{{Math.abs(item.commissionAmount)}}</text> <text>{{Math.abs(item.commissionAmount)}}</text>
</view> </view>
<view class="ulBox"> <view class="ulBox">
<text>积分来源:</text>
<text>{{item.commissionTypeContent}}</text>
</view>
<view class="ulBox">
<text>退课时间:</text> <text>退课时间:</text>
<text>{{item.refundTime}}</text> <text>{{item.refundTime}}</text>
</view> </view>
......
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