更换版本
This commit is contained in:
40
pages/disclaimers/disclaimers.js
Normal file
40
pages/disclaimers/disclaimers.js
Normal file
@@ -0,0 +1,40 @@
|
||||
var t, a;
|
||||
(t = getApp()),
|
||||
(a = 2),
|
||||
Page({
|
||||
data: { notices: [], clicknotice: "", dropdown: 1 },
|
||||
onLoad: function (a) {
|
||||
var e = this;
|
||||
t.util.request({
|
||||
url: "entry/wxapp/Api",
|
||||
data: { m: "monai_market", leftid: "", r: "sale.index.getnotice" },
|
||||
cachetime: "0",
|
||||
success: function (t) {
|
||||
e.setData({ notices: t.data.data });
|
||||
},
|
||||
});
|
||||
},
|
||||
showindexdesc: function (t) {
|
||||
console.log(t.currentTarget.dataset.id),
|
||||
this.setData({ clicknotice: t.currentTarget.dataset.id });
|
||||
},
|
||||
onReachBottom: function () {
|
||||
var e = this,
|
||||
n = e.data.notices;
|
||||
2 != e.data.dropdown &&
|
||||
((e.data.dropdown = 2),
|
||||
t.util.request({
|
||||
url: "entry/wxapp/Api",
|
||||
data: { m: "monai_market", leftid: a, r: "sale.salelist.getnotice" },
|
||||
success: function (t) {
|
||||
var o = t.data.data.length;
|
||||
if ((a++, o > 0))
|
||||
for (var i = 0; i < o; i++) n.push(t.data.data[i]);
|
||||
e.setData({ notices: n });
|
||||
},
|
||||
complete: function () {
|
||||
e.data.dropdown = 1;
|
||||
},
|
||||
}));
|
||||
},
|
||||
});
|
1
pages/disclaimers/disclaimers.json
Normal file
1
pages/disclaimers/disclaimers.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "navigationBarTitleText": " 公告栏", "usingComponents": {} }
|
13
pages/disclaimers/disclaimers.wxml
Normal file
13
pages/disclaimers/disclaimers.wxml
Normal file
@@ -0,0 +1,13 @@
|
||||
<view bindtap="showindexdesc" class="tanchu_miaoshu_border" data-id="{{item.id}}" wx:if="{{notices.length>0}}" wx:for="{{notices}}" wx:key="notices">
|
||||
<view class="tanchu_miaoshu_border_right {{clicknotice==item.id?'':'tanchu_miaoshu_border_right_active'}}">
|
||||
<image class="tanchu_miaoshu_border_dian" src="/pages/image/xiaoxi_btn.png"></image>
|
||||
<view class="miaoshu_border_title">{{item.content?item.content:''}}</view>
|
||||
<text> {{item.desc?item.desc:''}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{notices.length<=0}}">
|
||||
<import src="/pages/data_null/index.wxml"></import>
|
||||
<view>
|
||||
<template is="title" data="{{title:'暂无公告数据'}}"></template>
|
||||
</view>
|
||||
</block>
|
42
pages/disclaimers/disclaimers.wxss
Normal file
42
pages/disclaimers/disclaimers.wxss
Normal file
@@ -0,0 +1,42 @@
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.tanchu_miaoshu_border {
|
||||
background: #fff;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 8rpx 8rpx 8rpx #d0d0d0;
|
||||
margin-left: 5%;
|
||||
margin-top: 20rpx;
|
||||
padding-bottom: 30rpx;
|
||||
padding-top: 10rpx;
|
||||
width: 90%;
|
||||
}
|
||||
.miaoshu_border_title {
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 5rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
width: 90%;
|
||||
}
|
||||
.tanchu_miaoshu_border_right {
|
||||
color: #555;
|
||||
font-size: 28rpx;
|
||||
margin-left: 8%;
|
||||
margin-top: 30rpx;
|
||||
width: 90%;
|
||||
}
|
||||
.tanchu_miaoshu_border_dian {
|
||||
height: 45rpx;
|
||||
margin-left: -50rpx;
|
||||
margin-top: -3rpx;
|
||||
position: absolute;
|
||||
width: 45rpx;
|
||||
}
|
||||
.tanchu_miaoshu_border_right_active {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
}
|
Reference in New Issue
Block a user