Commit aec93715 by sunerhu

1.分享链接list 页面调整

parent 4e7aaaaf
......@@ -5,8 +5,12 @@
</view>
<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 v-for="subItem in listItem.children" :key="subItem.no"
: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>
......@@ -15,15 +19,26 @@
<script>
export default {
name:"listItem",
name: "listItem",
props: {
title:{
type:Array,
default:[{no:Number,name:String,width:Number}]
title: {
type: Array,
default: [{
no: Number,
name: String,
width: Number
}]
},
lists:{
type:Array,
default:[{id:Number,children:[{no:Number,value:String,link:String}]}]
lists: {
type: Array,
default: [{
id: Number,
children: [{
no: Number,
value: String,
link: String
}]
}]
}
},
data() {
......@@ -32,59 +47,90 @@
};
},
mounted() {
console.log(this.lists)
console.log(this.lists, 1541515)
},
onLoad() {
},
methods:{
link(val){
if(val){
methods: {
cklink() {
},
link(val, value) {
console.log(val, value, 1515)
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:val
url: dataList[i].link
})
}else{
return false;
} 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>
<style lang="scss">
.container{
.container {
height: 100%;
background-color: #fff;
.titleContent{
.titleContent {
color: #333;
font-size: 26rpx;
display: flex;
align-items: center;
padding: 20rpx 36rpx 20rpx 24rpx;
font-weight: bold;
view{
view {
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
.listContent{
.listContent {
font-size: 26rpx;
.line{
.line {
display: flex;
align-items: center;
text-align: center;
padding: 20rpx 36rpx 5rpx 24rpx;
text{
border-bottom: 1px solid transparent;
}
view{
padding: 20rpx 20rpx 5rpx 20rpx;
border-bottom: 1px solid #F2F2F2;
text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
view {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
padding: 0 5rpx;
}
}
......
......@@ -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>
</view>
<view class="ulBox">
<text>积分来源:</text>
<text>{{item.commissionTypeContent}}</text>
</view>
<view class="ulBox">
<text>退课积分:</text>
<text>{{Math.abs(item.commissionAmount)}}</text>
</view>
<view class="ulBox">
<text>积分来源:</text>
<text>{{item.commissionTypeContent}}</text>
</view>
<view class="ulBox">
<text>退课时间:</text>
<text>{{item.refundTime}}</text>
</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