作者 刘晓艳

穿搭小程序bug 修改

... ... @@ -2,9 +2,9 @@
App({
post: function (url, data, headerParams) {
wx.showNavigationBarLoading()
wx.showLoading({
title: '',
})
// wx.showLoading({
// title: '',
// })
var promise = new Promise((resolve, reject) => {
let that = this;
let postData = data;
... ... @@ -40,6 +40,15 @@ App({
wx.hideLoading()
return promise;
},
nowDate(later) {
let date = new Date();
date.setDate(date.getDate() + later);
let month = date.getMonth() + 1;
let day = date.getDate();
return date.getFullYear() + '/' + (month > 9 ? month : ('0' + month)) + '/' + (day > 9 ? day : ('0' + day));
},
globalData: {
userInfo: null
}
... ...
... ... @@ -14,7 +14,18 @@ Page({
list: [],
state: false,
name: '',
comment_text: ''
comment_text: '',
user_id: '',
},
//评论
review(e) {
var id = e.currentTarget.dataset.id
var type = e.currentTarget.dataset.type
wx.navigateTo({
url: '/pages/index/comment/comment?id=' + id + '&type=' + type,
})
},
showPoster(e) {
... ... @@ -22,19 +33,12 @@ Page({
var that = this
var list = that.data.list
list.showMore = false
wx.hideTabBar({})
wx.showToast({
title: '加载中',
icon: 'loading',
// success: (res) => {
// setTimeout((res) => {
// }, 2000)
// },
duration: 2000
})
that.setData({
poster_state: true,
this.setData({
more_state: false
})
this.getPoster(id)
... ... @@ -70,6 +74,22 @@ Page({
this.setData({
poster: res.data.data.url,
})
setTimeout((res) => {
that.setData({
poster_state: true
})
wx.hideTabBar({})
})
} else if (res.data.code == 30001) {
wx.showToast({
title: '上传图片才可生成海报',
icon: 'none',
duration: 2000
})
that.setData({
poster_state: false
})
wx.showTabBar({})
}
})
... ... @@ -273,9 +293,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
options.id ? (this.setData({
id: options.id
}), this.getData()) : ''
this.setData({
id: options.id ? options.id : '',
user_id: wx.getStorageSync('user_id')
})
},
/**
... ... @@ -289,7 +310,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.getData()
},
/**
... ...
... ... @@ -9,8 +9,8 @@
<view class='list_head_box2'>
<view class='user_name' catchtap='showModal' data-index="{{index}}">{{list.user_nickname}}</view>
<view class='state_box'>
<block>
<view class="collect_box {{list.user_host==1?'active':''}}" bindtap='attention' data-id='{{list.open_user_id}}'>
<block wx:if='{{list.open_user_id!=user_id}}'>
<view class="collect_box {{list.user_host==1?'active':''}}" bindtap='attention' data-id='{{list.open_user_id}}'>
<text class='iconfont icon-shoucang0 star2'></text>
<text class="collect_word">{{list.user_host==1?'取消关注':'关注TA'}}</text>
</view>
... ... @@ -38,7 +38,7 @@
<text class='iconfont icon-huida pinglun1' wx:else></text>
<text class=''>{{list.support}}</text>
</view>
<view >
<view catchtap='review' data-id='{{list.id}}' data-type='review'>
<text class='iconfont icon-pinglun pinglun1'></text>
<text>{{list.table_num}}</text>
</view>
... ...
... ... @@ -10,8 +10,14 @@
</view>
</view>
</view>
<view class="list_label" catchtap='showMask' data-id='{{item.id}}' data-status='1' wx:if='{{status==2}}'>添加关注</view>
<view class="list_label list_active" catchtap='showMask' data-id='{{item.id}}' data-status='2' wx:if='{{status==1}}'>取消关注</view>
<block wx:if='{{status==2}}'>
<view class="list_label" catchtap='showMask' data-id='{{item.id}}' data-status='1' wx:if='{{item.status!=1}}'>添加关注</view>
<view class="list_label list_active" catchtap='showMask' data-id='{{item.id}}' data-status='2' wx:if='{{item.status==1}}'>取消关注</view>
</block>
<block wx:else>
<view class="list_label" catchtap='showMask' data-id='{{item.id}}' data-status='1' wx:if='{{status==2}}'>添加关注</view>
<view class="list_label list_active" catchtap='showMask' data-id='{{item.id}}' data-status='2' wx:if='{{status==1}}'>取消关注</view>
</block>
</view>
</view>
... ...
... ... @@ -37,7 +37,21 @@ Page({
list2: [],
last_page: '',
state: true,
tempHeight: ''
release_state: false,
release_state1: false,
user_id:''
},
goInfo() {
wx.navigateTo({
url: '/pages/index/info/info',
})
},
cancleInfo() {
this.setData({
release_state1: false
})
},
saveImg(e) {
... ... @@ -70,9 +84,16 @@ Page({
goUserInfo(e) {
var id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/my/userInfo/userInfo?id=' + id,
})
var user_id = wx.getStorageSync('user_id')
if (id != user_id) {
wx.navigateTo({
url: '/pages/my/userInfo/userInfo?id=' + id,
})
} else {
wx.switchTab({
url: '/pages/my/my',
})
}
},
viewImg(e) {
... ... @@ -81,7 +102,6 @@ Page({
var list = this.data.list
var imgs = list[mindex].img
var current = e.currentTarget.dataset.src
// console.log(imgs)
this.setData({
imgUrl: current,
img_text: e.currentTarget.dataset.text,
... ... @@ -208,7 +228,7 @@ Page({
}
app.post(url, params, header).then((res) => {
if (res.data.code == 20000) {
var page = parseInt(this.data.page)-1
var page = parseInt(this.data.page) - 1
that.setData({
list: [],
page: page,
... ... @@ -248,7 +268,6 @@ Page({
'XX-Device-Type': 'wxapp'
}
app.post(url, params, header).then((res) => {
console.log(res)
if (res.data.code == 20000) {
this.setData({
list: [],
... ... @@ -274,6 +293,7 @@ Page({
classify_state: !(this.data.classify_state)
})
},
cancleClassify() {
this.setData({
classify_state: false
... ... @@ -293,13 +313,16 @@ Page({
showPoster(e) {
var id = e.currentTarget.dataset.id
var that = this
wx.hideTabBar({})
var index = e.currentTarget.dataset.index
var list = this.data.list
list[index].more_state = false
this.setData({
list: list
})
wx.showToast({
title: '加载中',
icon: 'loading'
})
that.setData({
poster_state: true
icon: 'loading',
duration: 2000
})
this.getPoster(id)
},
... ... @@ -327,35 +350,29 @@ Page({
'XX-Device-Type': 'wxapp'
}
app.post(url, param, header).then((res) => {
console.log(res)
if (res.data.code == 20000) {
that.setData({
poster: res.data.data.url,
})
that.setData({
state: true
setTimeout((res) => {
that.setData({
poster_state: true
})
wx.hideTabBar({})
})
} else if (res.data.code == 30001) {
wx.showToast({
title: '上传图片才可生成海报',
icon: 'none'
icon: 'none',
duration: 2000
})
setTimeout(function() {
that.setData({
poster_state: false
})
wx.showTabBar({
})
}, 2000)
that.setData({
state: false
poster_state: false
})
wx.showTabBar({})
}
})
},
},
complain(e) {
var id = e.currentTarget.dataset.id
... ... @@ -379,10 +396,9 @@ Page({
},
releaseInfo() {
if (this.data.tempHeight == '') {
wx.showToast({
title: '请去完善身份信息',
icon: 'none'
if (this.data.release_state) {
this.setData({
release_state1: true
})
} else {
wx.navigateTo({
... ... @@ -445,10 +461,14 @@ Page({
},
confirmData() {
this.getData()
this.setData({
classify_state: false
classify_state: false,
list:[],
page:1
})
this.getData()
},
getStyle() {
... ... @@ -490,9 +510,6 @@ Page({
console.log('data', res)
if (res.data.code == 20000) {
var list = this.data.list
// for (var i = 0; i < list.length; i++) {
// list[i].more_state = false
// }
if (res.data.data.list != '') {
that.setData({
list: list.concat(res.data.data.list),
... ... @@ -526,34 +543,36 @@ Page({
'XX-Device-Type': 'wxapp'
}
app.post(url, params, header).then((res) => {
console.log('userinfo', res)
if (res.data.code == 20000) {
this.setData({
// avatar: res.data.data.avatar,
// birthday: birthday,
// constellation: res.data.data.constellation,
// sex_index: sex_index,
// signature: res.data.data.signature,
tempHeight: res.data.data.stature,
// user_name: res.data.data.user_nickname,
// weight: res.data.data.weight,
})
var height = res.data.data.stature
var weight = res.data.data.weight
var sex_index = res.data.data.sex
if (height == null || weight == null) {
this.setData({
release_state: true
})
}
}
})
},
onLoad: function() {
// this.getData()
this.getStyle()
this.getUserInfo()
this.setData({
user_id:wx.getStorageSync('user_id')
})
},
onShow() {
this.setData({
list: [],
page: 1
page: 1,
user_id: wx.getStorageSync('user_id')
})
this.getData()
this.getUserInfo()
},
onReachBottom: function() {
... ...
... ... @@ -23,7 +23,7 @@
<view class='item_list'>
<view class='list_head_box'>
<view class='user_name'>{{item.user_nickname}}</view>
<view class=' state_box'>
<view class=' state_box' wx:if='{{item.open_user_id!=user_id}}'>
<view class="collect_box {{item.user_host==1?'active':''}}" catchtap='showMask' data-index="{{mindex}}" data-id='{{item.open_user_id}}' data-host='{{item.user_host}}'>
<text class="collect_word">{{item.user_host==1?'取消关注':'关注TA'}}</text>
</view>
... ... @@ -61,7 +61,7 @@
<view class='more_box'>
<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}}">
<view class='more_item' catchtap='showPoster' data-id="{{item.id}}" data-index='{{mindex}}'>
<text class='iconfont icon-haibao more'></text>
<text>生成分享海报</text>
</view>
... ... @@ -78,7 +78,8 @@
</view>
</view>
<view class='iconfont icon-jia' bindtap='releaseInfo'></view>
<view class="mask_box2 {{!state?'mask3':''}}" wx:if='{{poster_state}}'>
<!-- {{!state?'mask3':''}} -->
<view class="mask_box2" wx:if='{{poster_state}}'>
<!-- <view class="canvasBox"> -->
<!-- <canvas canvas-id='myCanvas' style=''></canvas> -->
<!-- </view> -->
... ... @@ -101,7 +102,7 @@
<view class='popup_img'>
<image src='{{poster}}'></image>
</view>
<view class='popup_icon_box' wx:if='{{state}}'>
<view class='popup_icon_box'>
<view class='popup_btn_box2' bindtap='saveImg' data-src='{{poster}}'>
<view class='popup_btn2'>保存图片</view>
</view>
... ... @@ -110,7 +111,7 @@
</view>
</view>
</view>
<view class='iconfont icon-quxiao' bindtap='canclePopup' wx:if='{{state}}'></view>
<view class='iconfont icon-quxiao' bindtap='canclePopup'></view>
</view>
</view>
... ... @@ -170,4 +171,14 @@
<view class='popup_btn' bindtap='attentionInfo'>确定</view>
</view>
</view>
</view>
<view class='mask_box' wx:if='{{release_state1}}' catchtap='cancleInfo'>
<view class='popup_box'>
<view class='popup_title'>完善资料</view>
<view>请先完善资料再进行发布</view>
<view class='popup_btn_box'>
<view class='popup_btn' style='margin:0 auto;' bindtap='goInfo'>去完善</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -294,7 +294,7 @@ page {
.user_name {
font-size: 30rpx;
color: #000;
width: 40%;
/* width: 40%; */
}
.collect_box {
... ... @@ -502,7 +502,7 @@ page {
margin-top: 30rpx;
position: absolute;
left: 0;
bottom: 0;
bottom:30rpx;
}
.popup_title2 {
... ...
... ... @@ -21,11 +21,34 @@ Page({
})
},
goDetail(e){
goDetail(e) {
var id = e.currentTarget.dataset.id
var news_id = e.currentTarget.dataset.news_id
this.setData({
news_id: news_id
})
wx.navigateTo({
url: '/pages/index/detail/detail?id=' + id,
})
},
checkInfo(id) {
let url = '/home/index/checkNewsType'
let params = {
status: this.data.status,
news_id: this.data.news_id
}
let header = {
"XX-Token": wx.getStorageSync('token'),
'XX-Device-Type': 'wxapp'
}
app.post(url, params, header).then((res) => {
console.log(res)
if (res.data.code == 20000) {
this.getData()
}
})
},
readState(e) {
... ... @@ -38,7 +61,6 @@ Page({
} else {
this.getData2()
}
console.log(this.data.status)
},
getData() {
... ... @@ -52,7 +74,7 @@ Page({
'XX-Device-Type': 'wxapp'
}
app.post(url, params, header).then((res) => {
console.log(res)
console.log('1',res)
if (res.data.code == 20000) {
this.setData({
list1: res.data.data.list,
... ... @@ -101,7 +123,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.checkInfo()
},
/**
... ...
... ... @@ -14,11 +14,11 @@
<view>
<text wx:if='{{status==1}}'>评论了你的</text>
<text wx:elif='{{status==2}}'>点赞了你的</text>
<text class='list_hint' catchtap='goDetail' data-id='{{item.list_id}}' >{{item.title}}</text>
<text class='list_hint' catchtap='goDetail' data-id='{{item.list_id}}' data-news_id='{{item.news_id}}'>{{item.title}}</text>
</view>
</view>
</view>
<view class='point' wx:if='{{status==2}}'></view>
<view class='point' wx:if='{{item.status!=1}}'></view>
</view>
</block>
<!-- <block wx:if='{{status==2}} '>
... ...
... ... @@ -159,8 +159,6 @@ Page({
var minutes = date.getMinutes()
var seconds = date.getSeconds()
var release_time = this.data.release_time
console.log(release_time)
if (week == 0) {
info = "周日";
} else if (week == 1) {
... ... @@ -178,18 +176,14 @@ Page({
}
var lastMonth = [];
for (var i = 0; i < 30; i++) {
lastMonth.push(new Date(new Date()
.setDate(new Date().getDate() + i))
.toLocaleString().substring(0, 9))
for (var i = 0; i < 8; i++) {
lastMonth.push(app.nowDate(i))
// new Date(new Date().setDate(new Date().getDate() + i)).toLocaleString().substring(0, 9)
}
this.setData({
release_time: release_time,
lastMonth: lastMonth,
// open_time: year + '/' + month + '/' + day + ' ' + hours + ':00',
})
},
tempTime() {
... ... @@ -206,10 +200,17 @@ Page({
var open_time = time + ' ' + temp_time
var open_time2 = time2 + ' ' + temp_time
console.log(open_time)
this.setData({
open_time: open_time,
time_info: open_time2 + ' 发送'
})
if (temp_time == '') {
wx.showToast({
title: '请选择具体时间段',
icon: 'none'
})
} else {
this.setData({
open_time: open_time,
time_info: open_time2 + ' 发送'
})
}
},
showMask1() {
... ...
<!--pages/release/release.wxml-->
<view class='banner_box'>
<view>
<view class='type_box' bindtap="showPicker">
<input placeholder='标题' value='{{title}}' bindinput='setTitle' maxlength="{{max}}"></input>
<text class="input_num">{{currentWordNumber|0}}/{{max}}</text>
</view>
<view class='textarea_box'>
<textarea class='textarea' placeholder='同大家分享一下你的穿搭秘籍吧~' maxlength='{{max2}}' value='{{text}}' bindinput='setText'>
<text class="number">{{number|0}}/{{max2}}</text>
</textarea>
<block wx:if='{{!img_state}}'>
<view class='banner_box'>
<view>
<view class='type_box' bindtap="showPicker">
<input placeholder='标题' value='{{title}}' bindinput='setTitle' maxlength="{{max}}"></input>
<text class="input_num">{{currentWordNumber|0}}/{{max}}</text>
</view>
<view class='textarea_box'>
<textarea class='textarea' placeholder='同大家分享一下你的穿搭秘籍吧~' maxlength='{{max2}}' value='{{text}}' bindinput='setText'>
<text class="number">{{number|0}}/{{max2}}</text>
</textarea>
</view>
</view>
</view>
<view class='upload_box'>
<block wx:for="{{images}}" wx:for-item="image" wx:key="index">
<view class='upload_img'>
<view class='icon_box'>
<view class='iconfont icon-jian' catchtap="showMask" data-index="{{index}}"></view>
<view class="edit_label" catchtap="goEdit" data-index="{{index}}" data-url='{{image.url}}'>编辑</view>
<view class='upload_box'>
<block wx:for="{{images}}" wx:for-item="image" wx:key="index">
<view class='upload_img'>
<view class='icon_box'>
<view class='iconfont icon-jian' catchtap="showMask" 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>
<image src='{{image.url}}' data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image>
</block>
<view class='upload_img' bindtap="choose">
<view class='iconfont icon-jia2'></view>
</view>
</block>
<view class='upload_img' bindtap="choose">
<view class='iconfont icon-jia2'></view>
</view>
</view>
<view class='hint_box'>
<view class='hint_label' bindtap='showMask1'>{{time_info}}</view>
<view class='hint_label more_box'>
<text catchtap='showMore'>{{more_info}}</text>
<view class='more_label_box' wx:if='{{more_state}}'>
<view class='more_item' bindtap='setOpen' data-open='1'>
<text>公开</text>
</view>
<!-- <view class='more_line'></view> -->
<view class='more_item' catchtap='setOpen' data-open='3'>
<text>仅自己可见</text>
</view>
<!-- <view class='more_line'></view> -->
<view class='more_item' catchtap='setOpen' data-open='2'>
<text>粉丝可见</text>
</view>
<!-- <view class='more_line'></view> -->
<view class='more_item' catchtap='setOpen' data-open='4'>
<text>草稿箱</text>
<view class='hint_box'>
<view class='hint_label' bindtap='showMask1'>{{time_info}}</view>
<view class='hint_label more_box'>
<text catchtap='showMore'>{{more_info}}</text>
<view class='more_label_box' wx:if='{{more_state}}'>
<view class='more_item' bindtap='setOpen' data-open='1'>
<text>公开</text>
</view>
<!-- <view class='more_line'></view> -->
<view class='more_item' catchtap='setOpen' data-open='3'>
<text>仅自己可见</text>
</view>
<!-- <view class='more_line'></view> -->
<view class='more_item' catchtap='setOpen' data-open='2'>
<text>粉丝可见</text>
</view>
<!-- <view class='more_line'></view> -->
<view class='more_item' catchtap='setOpen' data-open='4'>
<text>草稿箱</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class='content_box'>
<view class='tab_box'>
<scroll-view scroll-x>
<text class='classify_title'>风格</text>
<view class="tab_item {{item.state?'bgc-active':''}}" wx:for='{{classify}}' wx:key='index' data-index="{{index}}" bindtap="setClassify">{{item.name}}</view>
</scroll-view>
<view class='content_box'>
<view class='tab_box'>
<scroll-view scroll-x>
<text class='classify_title'>风格</text>
<view class="tab_item {{item.state?'bgc-active':''}}" wx:for='{{classify}}' wx:key='index' data-index="{{index}}" bindtap="setClassify">{{item.name}}</view>
</scroll-view>
</view>
<view class='null_box'></view>
<view class='bottom_box'>
<view class='bottom_btn1' bindtap='submitInfo'>确定发布</view>
</view>
</view>
<view class='null_box'></view>
<view class='bottom_box'>
<view class='bottom_btn1' bindtap='submitInfo'>确定发布</view>
</block>
<!-- 编辑图片信息 -->
<view class='mask_box2' wx:else>
<view class='item_list2'>
<image class='list_img' src='{{url}}'></image>
<view class='list_content_box'>
<textarea class="areas" placeholder='请输入简要描述' minlength="{{min}}" value='{{imgInfo}}' maxlength="{{max3}}" bindinput="setImgText">
<text class="currentWordNumber">{{imgInfoNum}}/{{max3}}</text>
</textarea>
</view>
</view>
<view class='bottom_btn2' bindtap='goCheck'>确定</view>
</view>
<!-- 定时发送 -->
<view class='mask_box' wx:if='{{relsese_state}}' catchtap='cancleMask1'>
<view class='release_box'>
... ... @@ -86,18 +99,7 @@
</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}}" value='{{imgInfo}}' maxlength="{{max3}}" bindinput="setImgText">
<text class="currentWordNumber">{{imgInfoNum}}/{{max3}}</text>
</textarea>
</view>
</view>
<view class='bottom_btn2' bindtap='goCheck'>确定</view>
</view>
<!-- 草稿箱 -->
<view class='mask_box' wx:if='{{box_state}}' catchtap='cancleMask3'>
... ...
... ... @@ -94,7 +94,6 @@ Page({
})
},
goDetail(e) {
var id = e.currentTarget.dataset.id
wx.navigateTo({
... ... @@ -117,15 +116,11 @@ Page({
'XX-Device-Type': 'wxapp'
}
app.post(url, params, header).then((res) => {
console.log('sz', res)
if (res.data.code == 20000) {
if (status == 3) {
list[index].secret_state = true
console.log(list)
this.setData({
list: list
})
}
this.getData()
wx.showToast({
title: '设置成功',
})
}else{
wx.showToast({
title: '设置失败',
... ... @@ -175,44 +170,6 @@ Page({
})
},
// likeCharge(e) {
// var id = e.currentTarget.dataset.id
// var status = e.currentTarget.dataset.status
// let url = '/home/index/support'
// let params = {
// list_id: id,
// status: status
// }
// let header = {
// "XX-Token": wx.getStorageSync('token'),
// 'XX-Device-Type': 'wxapp'
// }
// app.post(url, params, header).then((res) => {
// if (res.data.code == 20000) {
// this.getData()
// }
// })
// },
// collectInfo(e) {
// var id = e.currentTarget.dataset.id
// var status = e.currentTarget.dataset.status
// let url = '/home/index/collect'
// let params = {
// list_id: id,
// status: status
// }
// let header = {
// "XX-Token": wx.getStorageSync('token'),
// 'XX-Device-Type': 'wxapp'
// }
// app.post(url, params, header).then((res) => {
// if (res.data.code == 20000) {
// this.getData()
// }
// })
// },
//评论
review(e) {
var id = e.currentTarget.dataset.id
... ... @@ -263,13 +220,14 @@ Page({
'XX-Device-Type': 'wxapp'
}
app.post(url, params, header).then((res) => {
var user_id = res.data.data.open_user_id
wx.setStorageSync('user_id', user_id)
if (res.data.code == 20000) {
this.setData({
avatar: res.data.data.avatar,
fans_num: res.data.data.fans_num,
host: res.data.data.host,
host_num: res.data.data.host_num,
// list: res.data.data.list,
signature: res.data.data.signature,
user_nickname: res.data.data.user_nickname
})
... ...
... ... @@ -8,7 +8,7 @@
<text class='iconfont icon-xiaoxi'></text>
<text>消息</text>
</view>
</view>
</view>
<view class='head_img'>
<image class='banner_img' src='{{avatar}}'></image>
<view class='edit_box' bindtap='editInfo'>
... ... @@ -49,7 +49,8 @@
</view>
</view>
<block wx:if='{{list.length==0}}'>
<text class='no_data'>暂无信息</text>
<!-- <text class='no_data' wx:if='{{tab_current==1}}'>该用户还未发布信息哦~</text> -->
<text class='no_data'>暂无数据</text>
</block>
<block wx:else>
<view class='item_list' wx:key='' wx:for='{{list}}' wx:key bindtap='goDetail' data-id='{{item.list_id}}'>
... ... @@ -64,18 +65,18 @@
</block>
<view class='content_item_box' data-id='{{item.id}}' bindtap='messageDetail'>
<view class='list_content_box'>
<view class='list_img'>
<view class='list_img' wx:if="{{item.img!=''}}">
<image src='{{item.img.img}}' wx:key=''></image>
</view>
<view class='list_content'>
<view class='list_content' style="{{item.img==''?'width:100%;':''}}">
<view class='content'>
<view class='content_info'>{{item.title}}</view>
<view class='list_label'>{{item.style}}</view>
</view>
<view class='list_state_box'>
<view class='list_state_box' style="{{item.img==''?'margin-top:20rpx;':''}}">
<view class='time'>{{item.open_time}}</view>
<view class='list_icon'>
<view catchtap='likeCharge' data-index="{{index}}" data-id='{{item.list_id}}' wx:if='{{status!=4}}'>
<view catchtap='likeCharge' data-index="{{index}}" data-id='{{item.list_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>
... ... @@ -84,7 +85,7 @@
<text class='iconfont icon-pinglun pinglun1'></text>
<text>{{item.table}}</text>
</view>
<view catchtap='collectInfo' data-index="{{index}}" data-id='{{item.list_id}}'>
<view catchtap='collectInfo' data-index="{{index}}" data-id='{{item.list_id}}' wx:if='{{status!=4}}'>
<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>
... ... @@ -118,7 +119,7 @@
</view>
</block>
</view>
<text class='iconfont icon-suo' wx:if='{{item.secret_state}}'></text>
<text class='iconfont icon-suo' wx:if='{{item.open==3}}'></text>
</view>
</view>
</view>
... ... @@ -128,14 +129,3 @@
</block>
</view>
<view class='mask_box' wx:if='{{}}' catchtap='cancleMask'>
<view class='popup_box'>
<view class='popup_title'>取消关注</view>
<view>确认取消关注?</view>
<view class='popup_btn_box'>
<view class='popup_btn'>再想想</view>
<view class='popup_btn'>再想想</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -138,7 +138,7 @@ page {
}
.list_title {
width: 25%;
width: 18%;
font-size: 32rpx;
font-weight: bold;
color: #010000;
... ... @@ -179,16 +179,14 @@ page {
width: 100%;
}
.content_item_box {
width: 100%;
height: 100%;
}
.add-bg {
background: #f2f2f2;
padding: 10rpx 10rpx 0 10rpx;
}
.content_item_box{
width: 80%;
}
.list_content_box {
display: flex;
align-items: flex-start;
... ... @@ -206,7 +204,7 @@ page {
}
.content_info {
width: 74%;
width: 60%;
height: 85rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
... ... @@ -293,7 +291,7 @@ page {
background: #f5f5f5;
border-radius: 8rpx;
height: 40rpx;
padding: 0 20rpx;
padding: 0 10rpx;
display: flex;
align-items: center;
justify-content: center;
... ... @@ -369,7 +367,7 @@ page {
justify-content: space-between;
font-size: 26rpx;
color: #999;
margin-top: 70rpx;
margin-top: 35rpx;
}
.time {
... ...
... ... @@ -142,7 +142,6 @@ Page({
wx.navigateTo({
url: '/pages/index/comment/comment?id=' + id + '&type=' + type,
})
},
getData() {
let url = '/home/index/userPage'
... ...
... ... @@ -31,7 +31,8 @@
</view>
</view>
<block wx:if='{{list.length==0}}'>
<text class='no_data'>暂无信息</text>
<!-- <text class='no_data' wx:if='{{status==1}}'>该用户还未发布信息哦~</text> -->
<text class='no_data'>暂无数据</text>
</block>
<block wx:else>
<block wx:if='{{status==1}}'>
... ... @@ -39,23 +40,23 @@
<view class='list_title'>{{item.open_time}}</view>
<view class='content_item_box'>
<view class='list_content_box'>
<view class='list_img'>
<view class='list_img' wx:if="{{item.img!=''}}">
<image src='{{item.img.img}}' wx:key=''></image>
</view>
<view class='list_content'>
<view class='list_content' style="{{item.img==''?'width:100%;':''}}">
<view class='content'>
<view class='content_info'>{{item.title}}</view>
<view class='list_label'>{{item.style}}</view>
</view>
<view class='list_state_box'>
<view class='list_state_box' style="{{item.img==''?'margin-top:20rpx;':''}}">
<view class='time'>{{item.open_time}}</view>
<view class='list_icon'>
<view bindtap='likeCharge' data-index="{{index}}" data-id='{{item.list_id}}' wx:if='{{status!=4}}'>
<view catchtap='likeCharge' data-index="{{index}}" data-id='{{item.list_id}}' wx:if='{{status!=4}}'>
<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 bindtap='review' data-id='{{item.list_id}}' data-type='review'>
<view catchtap='review' data-id='{{item.list_id}}' data-type='review'>
<text class='iconfont icon-pinglun pinglun1'></text>
<text>{{item.table}}</text>
</view>
... ... @@ -84,11 +85,14 @@
</view>
<view catchtap='goDetail' data-id='{{item.id}}' data-index="{{index}}">
<view class='list_content1'>{{item.title}}</view>
<view class='list_img_box'>
<view class='list_img_box' wx:if="{{item.img!=''}}">
<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_img' wx:if="{{item.img!=''}}">
<image src='{{item.img.img}}' wx:key=''></image>
</view> -->
<view class='list_content'>
<!-- {{item.text}} -->
<text wx:for='{{item.styles}}' wx:for-item='its' wx:key>#{{its}}</text>
... ... @@ -104,7 +108,7 @@
</view>
<view bindtap='review' data-id='{{item.id}}' data-type='review'>
<text class='iconfont icon-pinglun pinglun1'></text>
<text>{{item.table_num}}</text>
<text>{{item.table}}</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>
... ... @@ -119,7 +123,6 @@
</block>
</view>
<view class='mask_box' wx:if='{{mask_state}}' catchtap='cancleMask'>
<view class='popup_box'>
<view class='popup_title'>提示</view>
... ...
... ... @@ -8,6 +8,9 @@ page {
align-items: flex-start;
margin-bottom: 16rpx;
background: #fff;
border-bottom: 1rpx solid #ebebeb;
padding: 0 10rpx;
padding-bottom: 20rpx;
}
.content_item:last-child {
... ... @@ -47,6 +50,7 @@ page {
font-size: 30rpx;
color: #000;
width: 40%;
margin-bottom: 10rpx;
}
.collect_box {
... ... @@ -342,7 +346,7 @@ page {
}
.content_info {
width: 74%;
width: 66%;
height: 85rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
... ... @@ -512,7 +516,7 @@ page {
justify-content: space-between;
font-size: 26rpx;
color: #999;
margin-top: 70rpx;
margin-top: 38rpx;
}
.time {
... ...
... ... @@ -29,9 +29,7 @@ Page({
url: '/pages/index/index',
})
}
}).catch((errMsg) => { })
},
//获取启动页图片
... ...
<!--pages/topic/topic.wxml-->
<view class='content_box'>
<view class='item_list'>
<image src='{{img}}'></image>
<!-- <image src='{{img}}'></image> -->
<view class='list_title'>{{title}}</view>
<view class='list_content'>
<import src="../../../wxParse/wxParse.wxml" />
... ...
... ... @@ -47,3 +47,20 @@
color: #999;
text-align: right;
}
.list_content {
display: inline-block !important;
}
.wxParse-p {
text-indent: 0 !important;
word-spacing: normal;
word-wrap: normal;
display: block !important;
}
.wxParse-img {
width: 100% !important;
height: 100%;
margin-top: 16rpx!important;
}
... ...