作者 刘晓艳

测试

... ... @@ -7,6 +7,8 @@ Page({
data: {
max: 100,
index:'',
url:'',
content:'',
},
getText(e) {
... ... @@ -23,7 +25,7 @@ Page({
goCheck(e){
wx.navigateTo({
url: '/pages/index/release/release?index='+this.data.index,
url: '/pages/index/release/release?index=' + this.data.index + '&content=' + this.data.content,
})
// wx.navigateTo({
... ... @@ -36,7 +38,8 @@ Page({
*/
onLoad: function(options) {
this.setData({
index:options.index
index:options.index,
url:options.url
})
},
... ...
<!--pages/my/draft/draft.wxml-->
<view class='content_box'>
<view class='item_list'>
<image class='list_img' src='/images/img3.png'></image>
<image class='list_img' src='{{url}}'></image>
<view class='list_content_box'>
<textarea class="areas" placeholder='请输入简要描述' minlength="{{min}}" maxlength="{{max}}" bindinput="getText">
<text class="currentWordNumber">{{currentWordNumber|0}}/{{max}}</text>
... ...
... ... @@ -30,6 +30,9 @@ Page({
list: [],
order: 1,
poster_list: [],
img_state:false,
imgUrl:'',
img_text:'',
// https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1534766809331&di=012cc4ad15d457ffa55c6537503eb84a&imgtype=0&src=http%3A%2F%2Fpicture.5068.com%2Fallimg%2F121120%2F4-1211201G920.jpg
cardPath: '',
... ... @@ -47,9 +50,26 @@ Page({
var imgs = list[mindex].img
var current = e.currentTarget.dataset.src
console.log(imgs)
wx.previewImage({
current: current,
urls: imgs,
this.setData({
imgUrl:current,
img_text:e.currentTarget.dataset.text,
img_state:true
})
wx.hideTabBar({
})
// wx.previewImage({
// current: current,
// urls: imgs,
// })
},
cancle_img(){
this.setData({
img_state:false
})
wx.showTabBar({
})
},
... ...
... ... @@ -33,7 +33,7 @@
<view class='list_content'>{{item.title}}</view>
<view class='list_img_box'>
<block wx:for='{{item.img}}' wx:for-item='items' wx:key='' wx:for-index='sindex'>
<image src='{{items.img}}' catchtap='viewImg' data-src='{{items.img}}' data-mindex="{{mindex}}" data-sindex='{{sindex}}'></image>
<image src='{{items.img}}' catchtap='viewImg' data-src='{{items.img}}' data-text='{{items.text}}' data-mindex="{{mindex}}" data-sindex='{{sindex}}'></image>
</block>
</view>
<view class='list_content'>{{item.text}}</view>
... ... @@ -75,14 +75,12 @@
</view>
</view>
<view class='iconfont icon-jia' bindtap='releaseInfo'></view>
<view class='mask_box2' wx:if='{{poster_state}}'>
<view class="canvasBox">
<canvas canvas-id='myCanvas' style=''></canvas>
</view>
<view class="btn" bindtap="saveImage">保存图片</view>
<view class='iconfont icon-quxiao quxiao2' bindtap='canclePopup'></view>
<!-- <view class='popup_box2'>
<view>
<view class='popup_content_box'>
... ... @@ -145,4 +143,11 @@
<view class='classify_btn classify_active' bindtap='confirmData'>确认</view>
</view>
</view>
</view>
<view class='mask_box mask' wx:if='{{img_state}}' catchtap='cancle_img'>
<view class='img_box'>
<image src='{{imgUrl}}'></image>
<text>{{img_text}}</text>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -2,10 +2,6 @@ page {
background: #fafafa;
}
.canvasBox {
}
.canvasBox canvas {
width: 686rpx;
height: 1026rpx;
... ... @@ -17,7 +13,28 @@ page {
.mask_box2 {
position: relative;
}
.mask{
background: rgba(0, 0, 0, 0.8);
font-size: 32rpx;
color: #FFFFFF;
flex-wrap: wrap;
}
.img_box{
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
.img_box image{
margin: 0 auto;
}
.mask text{
display: inline-block;
width: 100%;
margin-top: 30rpx;
text-align: center;
}
.btn {
width: 400rpx;
height: 80rpx;
... ...
// pages/index/release/release.js
const app=getApp()
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
classify: ['11', '22'],
classify: [],
current: 0,
max: 20,
max2: 200,
release_time: ['今天(周三)', '今天(周三)', '今天(周三)'],
max3: 100,
release_time: [],
currentTime: 0,
relsese_state: false,
release_time2: [{
time: '今天(周三)',
relsese_state: false
}, {
time: '今天(周三)',
relsese_state: false
}, , {
time: '今天(周三)',
relsese_state: false
}, ],
more_state:false,
images:[],
styles:[],
title:'',
text:'',
relsese_state1: -1,
release_time2: ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '012:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00', ],
more_state: false,
images: [],
styles: [],
title: '',
text: '',
imgInfo: '',
img_state: false,
tempUrl: [],
time_info: '定时发送',
open_time: '',
temp_time2: '',
temp_time: '',
list_id:0,
},
setTitle(e) {
... ... @@ -47,18 +49,56 @@ Page({
if (len > this.data.max2) return;
this.setData({
number: len,
text:content
text: content
})
},
setImgText(e) {
var content = e.detail.value;
this.setData({
imgInfo: content
})
var len = parseInt(content.length);
if (len > this.data.max) return;
this.setData({
imgInfoNum: len //当前字数
});
},
goCheck() {
var index = wx.getStorageSync('index')
var images = this.data.images
var tempUrl = this.data.tempUrl
var imgInfo = this.data.imgInfo
images[index].text = imgInfo
console.log(images)
this.setData({
img_state: false,
images: images
})
},
//分类
setClassify(e) {
var index=e.currentTarget.dataset.index
var classify=this.data.classify
classify[index].state=!(classify[index].state)
this.setData({
classify:classify
})
var index = e.currentTarget.dataset.index
var classify = this.data.classify
classify[index].state = !(classify[index].state)
this.setData({
classify: classify
})
},
getStyleId(){
var styles = this.data.styles
var classify = this.data.classify
for(var i=0;i<classify;i++){
if(classify[i].state){
styles.push(classify[i].id)
}
}
this.setData({
styles: styles
})
},
getStyle() {
... ... @@ -68,10 +108,10 @@ Page({
app.post(url, param).then((res) => {
if (res.data.code == 20000) {
var classify = res.data.data.list
for(var i=0;i<classify.length;i++){
classify[i].state=false
for (var i = 0; i < classify.length; i++) {
classify[i].state = false
}
that.setData({
that.setData({
classify: classify,
})
}
... ... @@ -80,10 +120,12 @@ Page({
//选择发布时间
selectTime(e) {
const self = this;
const that = this;
const current = e.currentTarget.dataset.index;
self.setData({
currentTime: current
var lastMonth = this.data.lastMonth
that.setData({
currentTime: current,
temp_time2: lastMonth[current]
});
},
... ... @@ -91,9 +133,68 @@ Page({
setTime(e) {
const index = e.currentTarget.dataset.index;
var release_time2 = this.data.release_time2
release_time2[index].relsese_state = !(release_time2[index].relsese_state)
var relsese_state1 = this.data.relsese_state1
if (relsese_state1 == index) {
return false
} else {
this.setData({
relsese_state1: index,
temp_time: release_time2[index]
})
}
},
getTime() {
var date = new Date()
var week = date.getDay()
var info = "";
var year = date.getFullYear()
var month = date.getMonth()
var day = date.getDate()
var hours = date.getHours()
var minutes = date.getMinutes()
var seconds = date.getSeconds()
var release_time = this.data.release_time
if (week == 0) {
info = "周日";
} else if (week == 1) {
info = "周一";
} else if (week == 2) {
info = "周二";
} else if (week == 3) {
info = "周三";
} else if (week == 4) {
info = "周四";
} else if (week == 5) {
info = "周五";
} else if (week == 6) {
info = "周六";
}
var lastMonth = [];
for (var i = 0; i < 30; i++) {
lastMonth.push(new Date(new Date()
.setDate(new Date().getDate() + i))
.toLocaleString().substring(0, 9))
}
this.setData({
release_time2: release_time2
release_time: release_time,
lastMonth: lastMonth,
})
},
tempTime() {
var lastMonth = this.data.lastMonth
var currentTime = this.data.currentTime
var time = lastMonth[currentTime]
var temp_time = this.data.temp_time
var open_time = time + ' ' + temp_time
console.log(open_time)
this.setData({
open_time: open_time
})
},
... ... @@ -107,6 +208,7 @@ Page({
this.setData({
relsese_state: false
})
this.tempTime()
},
//上传图片
... ... @@ -199,39 +301,50 @@ Page({
})
},
goEdit(e){
var index=e.currentTarget.dataset.index
wx.navigateTo({
url: '/pages/index/brief/brief?index='+index,
goEdit(e) {
var index = e.currentTarget.dataset.index
var url = e.currentTarget.dataset.url
wx.setStorageSync('index', index)
this.setData({
img_state: true,
index: index,
url: url
})
// wx.navigateTo({
// url: '/pages/index/brief/brief?index=' + index + '&url=' + url,
// })
},
showMore(){
showMore() {
this.setData({
more_state:!(this.data.more_state)
more_state: !(this.data.more_state)
})
},
setOpen(e){
setOpen(e) {
wx.showToast({
title: '设置成功',
})
this.setData({
open:e.currentTarget.dataset.open
open: e.currentTarget.dataset.open,
more_state:false
})
},
tempClassify(){
tempClassify() {
var classify = this.data.classify
var styles=[]
var styles = []
for (var i = 0; i < classify.length; i++) {
if (classify[i].state){
if (classify[i].state) {
styles.push(classify[i].id)
}
}
this.setData({
styles:styles
styles: styles
})
},
submitInfo(){
submitInfo() {
this.tempClassify()
let url = '/home/index/fashion'
let params = {
... ... @@ -241,7 +354,7 @@ Page({
styles: this.data.styles,
open_time: this.data.open_time,
open: this.data.open,
img: this.data.img
img: JSON.stringify(this.data.images)
}
let header = {
"XX-Token": wx.getStorageSync('token'),
... ... @@ -250,17 +363,23 @@ Page({
app.post(url, params, header).then((res) => {
console.log(res)
if (res.data.code == 20000) {
wx.navigateBack({
dalta:1
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.getStyle()
this.getTime()
},
/**
... ...
... ... @@ -2,7 +2,7 @@
<view class='banner_box'>
<view class='type_box' bindtap="showPicker">
<view>
<input placeholder='标题' value='{{title}}' bindinput='setTitle'></input>
<input placeholder='标题' value='{{title}}' bindinput='setTitle'></input>
</view>
<text class="currentWordNumber">{{currentWordNumber|0}}/{{max}}</text>
</view>
... ... @@ -16,7 +16,7 @@
<view class='upload_img'>
<view class='icon_box'>
<view class='iconfont icon-jian' catchtap="deleteImg" data-index="{{index}}"></view>
<view class="edit_label" catchtap="goEdit" data-index="{{index}}">编辑</view>
<view class="edit_label" catchtap="goEdit" data-index="{{index}}" data-url='{{image.url}}'>编辑</view>
</view>
<image src='{{image.url}}' data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image>
</view>
... ... @@ -26,7 +26,7 @@
</view>
</view>
<view class='hint_box'>
<view class='hint_label' bindtap='showMask'>今天14:00</view>
<view class='hint_label' bindtap='showMask'>{{time_info}}</view>
<view class='hint_label more_box'>
<text catchtap='showMore'>公开</text>
<view class='more_label_box' wx:if='{{more_state}}'>
... ... @@ -58,7 +58,7 @@
</scroll-view>
</view>
<view class='bottom_box'>
<view class='bottom_btn'>确定</view>
<view class='bottom_btn1' bindtap='submitInfo'>确定</view>
</view>
</view>
... ... @@ -67,14 +67,31 @@
<view class='release_title'>选择发布时间</view>
<view class='release_content_box'>
<view class='release_left'>
<view class="relsese_item {{currentTime==index?'relsese_active':''}} " catchtap='selectTime' wx:for='{{release_time}}' wx:key data-index='{{index}}'>{{item}}</view>
<view class="relsese_item {{currentTime==index?'relsese_active':''}} " catchtap='selectTime' wx:for='{{lastMonth}}' wx:key data-index='{{index}}'>
<text wx:if='{{index==0}}'>今天</text>
<text wx:elif='{{index==1}}'>明天</text>
<text wx:else>{{item}} </text>
</view>
</view>
<view class='release_right'>
<view class="right_item" wx:for='{{release_time2}}' wx:key data-index='{{index}}' catchtap='setTime'>
<text>{{item.time}}</text>
<text class='iconfont icon-dui' wx:if='{{item.relsese_state}}'></text>
<text>{{item}}</text>
<text class='iconfont icon-dui' wx:if='{{relsese_state1==index}}'></text>
</view>
</view>
</view>
</view>
</view>
<view class='mask_box2' wx:if='{{img_state}}'>
<view class='item_list2'>
<image class='list_img' src='{{url}}'></image>
<view class='list_content_box'>
<textarea class="areas" placeholder='请输入简要描述' minlength="{{min}}" maxlength="{{max3}}" bindinput="setImgText">
<text class="currentWordNumber">{{imgInfoNum|0}}/{{max3}}</text>
</textarea>
</view>
</view>
<view class='bottom_btn2' bindtap='goCheck'>确定</view>
</view>
\ No newline at end of file
... ...
... ... @@ -208,7 +208,7 @@ page {
left: 0;
}
.bottom_btn {
.bottom_btn1 {
width: 690rpx;
height: 80rpx;
font-size: 36rpx;
... ... @@ -220,9 +220,7 @@ page {
justify-content: center;
}
.bottom_btn:active {
opacity: 0.7;
}
.picker-title {
margin: 50rpx 0 0 0;
... ... @@ -382,7 +380,7 @@ picker-view-column view {
display: inline-block;
position: absolute;
right: 0;
bottom: -200rpx;
bottom: -265rpx;
width: 230rpx;
background: #fff;
box-shadow: 0 8rpx 30rpx 0 #e5e5e5;
... ... @@ -415,6 +413,7 @@ picker-view-column view {
bottom: 0;
left: 0;
background: #fff;
/* overflow: scroll; */
}
.release_title {
... ... @@ -438,6 +437,8 @@ picker-view-column view {
.release_left {
width: 300rpx;
height: 325rpx;
overflow-y: scroll;
background: #f0f0f0;
}
... ... @@ -453,6 +454,8 @@ picker-view-column view {
.release_right {
width: 60%;
height: 325rpx;
overflow-y: scroll;
background: #fff;
}
... ... @@ -469,3 +472,71 @@ picker-view-column view {
font-size: 30rpx;
font-weight: bold;
}
/* */
.mask_box2 {
padding: 30rpx;
box-sizing: border-box;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #fff;
z-index: 90;
}
.list_img {
width: 187rpx;
height: 187rpx;
}
.item_list2 {
display: flex;
align-items: center;
}
.list_content_box {
width: 80%;
height: 187rpx;
background: #f5f6fa;
padding: 20rpx;
box-sizing: border-box;
}
.areas {
width: 100%;
height: 100%;
font-size: 26rpx;
position: relative;
}
.currentWordNumber {
position: absolute;
bottom: 0rpx;
right: 0;
color: #999;
}
.list_content {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
color: #282829;
}
.bottom_btn2 {
width: 320rpx;
height: 80rpx;
background: #000;
box-shadow: 0rpx -8rpx 16rpx 0rpx rgba(0, 0, 0, 0.04);
border-radius: 40rpx;
font-size: 30rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
margin: 350rpx auto 0 auto;
}
... ...
// pages/index/search/search.js
const app=getApp()
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
searchHistory:['111','222'],
searchHistory: ['111', '222'],
imgs: ['/images/img3.png', '/images/img3.png', '/images/img3.png'],
more_state:false,
list:[]
more_state: false,
list: [],
page:1,
keyword:'',
},
getSearch(e){
this.setData({
keyword:e.detail.value
})
},
goSearch(e) {
let that = this;
let url = '/home/index/index';
let param = {
page: this.data.page,
order: '',
sex: '',
style_id: '',
stature: '',
weight: '',
keyword: this.data.keyword,
}
let header = {
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': 'wxapp'
}
app.post(url, param, header).then((res) => {
if (res.data.code == 20000) {
var list = res.data.data.list
if (list != '') {
that.setData({
list: list,
page: res.data.data.page,
})
} else {
wx.showToast({
title: '暂无数据',
icon: 'none'
})
that.setData({
list: list,
page: res.data.data.page,
})
}
}
}).catch((errMsg) => {})
},
previewImg(e) {
const current = e.currentTarget.dataset.index;
var imgs = this.data.imgs;
... ... @@ -35,7 +80,7 @@ Page({
getData() {
let url = '/home/index/history'
let params = { }
let params = {}
let header = {
"XX-Token": wx.getStorageSync('token'),
'XX-Device-Type': 'wxapp'
... ... @@ -44,14 +89,14 @@ Page({
console.log(res)
if (res.data.code == 20000) {
this.setData({
list:res.data.data.list
list: res.data.data.list
})
}
})
},
clearHistory(){
clearHistory() {
let url = '/home/index/historyDelete'
let params = {}
let header = {
... ... @@ -61,7 +106,7 @@ Page({
app.post(url, params, header).then((res) => {
console.log(res)
if (res.data.code == 20000) {
}
})
... ... @@ -71,56 +116,56 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
this.getData()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
... ... @@ -3,13 +3,13 @@
<view class="head_search_box">
<view class="input">
<view class='iconfont icon-search fangdajing'></view>
<input placeholder='请输入搜索相关内容' bindinput="inputKey" value="{{searchValue}}" bindconfirm="startSearch" placeholder-class='input_size' class='search_input' />
<input placeholder='请输入搜索相关内容' bindinput="getSearch" value="{{searchValue}}" bindconfirm="startSearch" placeholder-class='input_size' class='search_input' />
<view class="iconfont icon-jia1 jia1" catchtap="clearInput"></view>
</view>
<view class="search-text" bindtap="startSearch">搜索</view>
<view class="search-text" bindtap="goSearch">搜索</view>
</view>
<view class="history_box">
<!-- <view class="history_box">
<view class="head">
<view class="title">搜索历史</view>
<view class="clear" bindtap="clearHistory">
... ... @@ -19,63 +19,63 @@
</view>
<view class="history_list {{searchHistory.length === 0?'text-center':''}}">
<!-- <text wx:if="{{searchHistory.length === 0}}">暂无搜索历史~</text> -->
<!-- <text wx:if="{{searchHistory.length === 0}}">暂无搜索历史~</text>
<view wx:for="{{searchHistory}}" wx:key="index" bindtap="clickHistory" data-index="{{index}}">{{item}}</view>
</view>
</view>
</view> -->
<!--文章内容-->
<view class='content_box'>
<view class='content_item' wx:for='{{[1,2]}}' wx:key>
<view class='content_item' wx:for='{{list}}' wx:for-index='mindex' wx:key>
<view class='left_box'>
<view class='head_portrait' catchtap='showModal' data-index="{{index}}">
<image src='/images/head.png'></image>
<view class='head_portrait'>
<image src='{{item.avatar}}'></image>
</view>
</view>
<view class='item_list'>
<view class='list_head_box'>
<view class='user_name' catchtap='showModal' data-index="{{index}}">名字</view>
<view class='state_box'>
<block>
<view class='collect_box active' bindtap='collectInfo' data-index="{{index}}" data-id='{{item.id}}' data-hits='{{item.is_hits}}'>
<text class='iconfont icon-shoucang0 star2'></text>
<text class="collect_word">关注TA</text>
</view>
</block>
<view class='user_name'>{{item.user_nickname}}</view>
<view class=' state_box'>
<view class="collect_box {{item.user_host==1?'active':''}}" catchtap='attention' data-index="{{mindex}}" data-id='{{item.open_user_id}}'>
<text class="collect_word">关注TA</text>
</view>
</view>
</view>
<view bindtap='listDetail' data-post_id='{{item.id}}' data-index="{{index}}">
<view class='list_content'>fsdfdsfdsf</view>
<view catchtap='goDetail' data-id='{{item.id}}' data-index="{{index}}">
<view class='list_content'>{{item.title}}</view>
<view class='list_img_box'>
<image src='{{items}}' wx:for='{{imgs}}' wx:for-item='items' wx:key='' bindtap='previewImg' data-index="{{index}}"></image>
<block wx:for='{{item.img}}' wx:for-item='items' wx:key='' wx:for-index='sindex'>
<image src='{{items.img}}' catchtap='viewImg' data-src='{{items.img}}' data-text='{{items.text}}' data-mindex="{{mindex}}" data-sindex='{{sindex}}'></image>
</block>
</view>
<view class='list_content'>fsdfdsfdsf</view>
<view class='list_content'>{{item.text}}</view>
</view>
<view class='list_state_box'>
<view class='time'>2019</view>
<view class='time'>{{item.open_time}}</view>
<view class='list_icon'>
<text bindtap='likeCharge' data-index="{{index}}" data-id='{{item.id}}' data-is_paise='{{item.is_paise}}'>
<text class='iconfont icon-heart xin1' wx:if="{{!item.is_paise}}"></text>
<text class='iconfont icon-dianzan- zan'></text>
<text class=''>0</text>
</text>
<text bindtap='review' data-id='{{item.id}}'>
<text class='iconfont icon-pinglun pinglun1'></text>
<text>0</text>
</text>
<text>
<text class='iconfont icon-shoucang zan'></text>
<text class=''>0</text>
</text>
<view catchtap='likeCharge' data-index="{{mindex}}" data-id='{{item.id}}'>
<text class='iconfont icon-dianzan2 zan' wx:if="{{item.user_support==1}}"></text>
<text class='iconfont icon-huida pinglun1' wx:else></text>
<text class=''>{{item.support}}</text>
</view>
<view catchtap='review' data-id='{{item.id}}' data-type='review'>
<text class='iconfont icon-pinglun pinglun1'></text>
<text>{{item.table_num}}</text>
</view>
<view catchtap='collectInfo' data-index="{{mindex}}" data-id='{{item.id}}'>
<text class='iconfont icon-shoucang2 zan' wx:if='{{item.user_collect==1}}'></text>
<text class='iconfont icon-shoucang4 pinglun1' wx:else></text>
<text class=''>{{item.collect}}</text>
</view>
<view class='more_box'>
<text class='iconfont icon-gengduo' bindtap='showMore'></text>
<view class='more_label_box' wx:if='{{more_state}}'>
<view class='more_item'>
<text class='iconfont icon-gengduo' catchtap='showMore' data-index='{{mindex}}'></text>
<view class='more_label_box' wx:if='{{item.more_state}}'>
<view class='more_item' catchtap='showPoster' data-id="{{item.id}}">
<text class='iconfont icon-haibao more'></text>
<text>生成分享海报</text>
</view>
<view class='more_line'></view>
<view class='more_item' bindtap='complain'>
<view class='more_item' catchtap='complain' data-id='{{item.id}}' data-type='complain'>
<text class='iconfont icon-jubao more'></text>
<text>投诉举报</text>
</view>
... ...
... ... @@ -11,9 +11,11 @@ Page({
tab_current: 1,
open_user_id: '',
look: 0,
look_type: ''
look_type: '',
state: false,
state2: false,
},
cancleMask() {
this.setData({
mask_state: false
... ... @@ -38,13 +40,13 @@ Page({
},
goList(e) {
var status=e.currentTarget.dataset.status
var status = e.currentTarget.dataset.status
wx.navigateTo({
url: '/pages/index/fans/fans?status=' + status,
})
},
goMessage(){
goMessage() {
wx.navigateTo({
url: '/pages/index/message/message',
})
... ... @@ -53,6 +55,16 @@ Page({
chargeTime(e) {
var current = e.currentTarget.dataset.current
var tab_current = this.data.tab_current
if (current == 1) {
this.setData({
state: !(this.data.state)
})
}
if (current == 4) {
this.setData({
state2: !(this.data.state2)
})
}
if (tab_current == current) {
return false
} else {
... ... @@ -76,7 +88,7 @@ Page({
app.post(url, params, header).then((res) => {
if (res.data.code == 20000) {
this.setData({
avatar: res.data.data.avatar,
avatar: res.data.data.avatar,
fans_num: res.data.data.fans_num,
host: res.data.data.host,
host_num: res.data.data.host_num,
... ...
... ... @@ -34,6 +34,25 @@
<view class="tab_item {{tab_current==1?'tab_active':''}}" data-current='1' bindtap='chargeTime'>
<view>从前</view>
<view class="iconfont icon-caret-up {{tab_current==1?'icon_active':''}}"></view>
<view class='more_box' wx:if='{{state}}'>
<view class='more_label_box'>
<view class='more_item' catchtap='showPoster' data-id="{{item.id}}">
<text>删除</text>
</view>
<view class='more_line'></view>
<view class='more_item' catchtap='complain' data-id='{{item.id}}' data-type='complain'>
<text>仅自己可见</text>
</view>
<view class='more_line'></view>
<view class='more_item' catchtap='complain' data-id='{{item.id}}' data-type='complain'>
<text>粉丝可见</text>
</view>
<view class='more_line'></view>
<view class='more_item' catchtap='complain' data-id='{{item.id}}' data-type='complain'>
<text>全部</text>
</view>
</view>
</view>
</view>
<view class="tab_item {{tab_current==2?'tab_active':''}}" data-current='2' bindtap='chargeTime'>
<view>赞过</view>
... ... @@ -46,6 +65,13 @@
<view class="tab_item {{tab_current==4?'tab_active':''}}" data-current='4' bindtap='chargeTime'>
<view>收藏</view>
<view class="iconfont icon-caret-up {{tab_current==4?'icon_active':''}}"></view>
<view class='more_box more_box2' wx:if='{{state2}}'>
<view class='more_label_box'>
<view class='more_item' catchtap='showPoster' data-id="{{item.id}}">
<text>删除</text>
</view>
</view>
</view>
</view>
</view>
<view class='item_list' wx:key='' wx:for='{{list}}' wx:key>
... ...
... ... @@ -247,6 +247,7 @@ page {
font-size: 30rpx;
font-weight: bold;
color: #a5a6a8;
position: relative;
}
.tab_active {
... ... @@ -396,19 +397,25 @@ page {
}
.more_box {
position: relative;
position: absolute;
left: 0;
bottom: -325rpx;
padding: 0 30rpx;
box-sizing: border-box;
}
.more_box2 {
position: absolute;
left: 0;
bottom: -81rpx;
}
.more_label_box {
display: inline-block;
position: absolute;
right: 0;
bottom: -325rpx;
width: 250rpx;
background: #fff;
box-shadow: 0 8rpx 30rpx 0 #e5e5e5;
font-weight: normal;
color: #000;
padding: 20rpx 0;
}
... ...
... ... @@ -37,7 +37,7 @@
"list": []
},
"miniprogram": {
"current": 0,
"current": 1,
"list": [
{
"id": -1,
... ... @@ -45,6 +45,12 @@
"pathName": "pages/index/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "fabu",
"pathName": "pages/index/release/release",
"scene": null
}
]
}
... ...