作者 liaolinfeng

first commit

// pages/consult/adminrecommend_detail/adminrecommend_detail.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
listdata:[],
id:''
},
//getrecommend_info
getrecommend_info() {
let that = this;
let url = '/home/consult/admin_recommend_info';
let header = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
id: that.data.id
}
app.post(url, params, header).then((res) => {
that.setData({
listdata:res
})
}).catch((errMsg) => {
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
that.setData({
id:options.id
})
that.getrecommend_info();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{"navigationBarTitleText": "文章详情"}
\ No newline at end of file
... ...
<!--pages/consult/adminrecommend_detail/adminrecommend_detail.wxml-->
<view class='banner_box'>
<image src='{{listdata.thumbnail}}'></image>
</view>
<view class='content_box'>
<view class='content_item'>
<view class='content_title'>{{listdata.title}}</view>
<view>{{listdata.content}}</view>
</view>
</view>
... ...
/* pages/consult/adminrecommend_detail/adminrecommend_detail.wxss */
page {
background: #fafafa;
}
.banner_box {
width: 100%;
height: 500rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
left: 0;
top: 0;
z-index: -1;
}
.banner_box image {
width: 100%;
height: 100%;
}
.content_box {
padding: 0 30rpx;
margin-top: -50rpx;
}
.content_title{
text-align: center;
font-size: 30rpx;
}
.content_item {
font-size: 26rpx;
line-height: 50rpx;
color: #1a1a1a;
background: #fff;
border-radius: 20rpx 20rpx 0 0;
padding: 50rpx;
}
... ...
// pages/consult/consult.js
const app = getApp()
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
tabcurrent: 1,
listdata:[],//数据列表
mianshow_mask: false
},
//跳转详情页
listDetail() {
listDetail(e) {
console.log(e)
wx.navigateTo({
url: '../consult/consultDetail/consultDetail',
url: '../consult/consultDetail/consultDetail?id='+e.currentTarget.id,
})
},
//导航点击
... ... @@ -43,8 +46,6 @@ Page({
})
}
},
//底部咨询导航点击事件
consult(e) {
var tindex = e.currentTarget.dataset.tindex
... ... @@ -60,7 +61,6 @@ Page({
})
}
},
//底部导航发布点击事件
release(e) {
let that = this;
... ... @@ -77,23 +77,9 @@ Page({
},
//发布服务跳转
releaseService() {
wx.navigateTo({
url: '/pages/service/release/release',
})
},
//发布资讯跳转
releaseMessage() {
wx.showToast({title:'该功能正在开发中',icon: 'none'})
// wx.navigateTo({
// url: '/pages/service/release/release',
// })
},
//发布心愿跳转
releaseWish() {
wx.showToast({title:'该功能正在开发中',icon: 'none'})
// wx.navigateTo({
// url: '/pages/wish/release/release',
// })
wx.navigateTo({
url: '../release/release',
})
},
//底部导航心愿点击事件
wish(e) {
... ... @@ -126,22 +112,36 @@ Page({
})
}
},
//接口:首页,得到资讯首页
getindex(){
let that=this;
let url ='/home/consult/index';
let header={
"XX-Token":wx.getStorageSync('token')
}
app.post(url, {}, header).then((res)=>{
that.setData({
listdata: res
})
}).catch((errMsg)=>{
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
// app.globalData.template.tabbar("tabBar", 0, this) //0表示第一个tabbar
// app.globalData.template.tabbar("tabBar", 0, this) //0表示第一个tabbar
let that=this;
that.getindex();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
... ...
... ... @@ -8,12 +8,12 @@
</view>
<view class=''>
<view class='item_list' wx:for='{{[1,1,1,1,1]}}' wx:key='' bindtap='listDetail'>
<view class='item_list' style='background-image:url({{item.thumbnail}})' wx:for='{{listdata}}' wx:key='' bindtap='listDetail' id='{{item.id}}'>
<view class='list_box'>
<view class='list_sub_box'>
<view class='list_title'>
<view class='line'></view>
<view class='info_title'>旅游</view>
<view class='info_title'>{{item.name}}</view>
<view class='line'></view>
</view>
<view class='list_info'>全球趣玩任你挑选</view>
... ... @@ -33,11 +33,11 @@
<view class='iconfont icon-zonghe popup_zonghe'></view>
<view class='mianpopup_title'>发布服务</view>
</view>
<view class='mianpopup_item' bindtap='releaseMessage'>
<view class='mianpopup_item' bindtap='releaseService'>
<view class='iconfont icon-pinglun popup_pinglun'></view>
<view class='mianpopup_title'>发布资讯</view>
</view>
<view class='mianpopup_item' bindtap='releaseWish'>
<view class='mianpopup_item' bindtap='releaseService'>
<view class='iconfont icon-xiangqu popup_pinglun'></view>
<view class='mianpopup_title'>发布心愿</view>
</view>
... ...
// pages/consult/consultDetail/consultDetail.js
const app=getApp();
Page({
/**
... ... @@ -7,25 +8,174 @@ Page({
data: {
current: 0,
moudel:false,
id:'',//进入界面的id
listdata:[],//用户推荐
listdata2:[]//平台推荐
},
//tab点击事件
chargeTab(e) {
this.setData({
current: e.currentTarget.dataset.current
})
},
//设置收藏(收藏)
sethits_yes(e){
let that=this;
let index=e.currentTarget.dataset.index;
let listdata=that.data.listdata;
let url = 'home/home/collect';
let params = {
id: listdata[index].id
}
let header = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, params, header).then((res) => {
if (listdata[index].is_hits == 0) {
listdata[index].is_hits = 1
} else {
listdata[index].is_hits = 0
}
that.setData({
listdata: listdata
})
}).catch((errMsg) => {
console.log(errMsg)
})
},
//设置收藏(取消收藏)
sethits_no(e) {
let that = this;
let index = e.currentTarget.dataset.index;
let listdata = that.data.listdata;
let url = 'home/home/collect_del';
let params = {
id: listdata[index].id
}
let header = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, params, header).then((res) => {
if (listdata[index].is_hits == 0) {
listdata[index].is_hits = 1
} else {
listdata[index].is_hits = 0
}
that.setData({
listdata: listdata
})
}).catch((errMsg) => {
console.log(errMsg)
})
},
//设置点赞
setpaise(e){
let that=this;
let index = e.currentTarget.dataset.index;
let listdata = that.data.listdata;
let url = '/home/home/like';
let params = {
id: listdata[index].id
}
let header = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url,params,header).then((res)=>{
console.log(res)
if (listdata[index].is_paise == 0) {
listdata[index].is_paise = 1
} else {
listdata[index].is_paise = 0
}
that.setData({
listdata: listdata
})
}).catch((errMsg)=>{
console.log(errMsg)
})
},
//点击评论
gopost(e){
let post_id=e.currentTarget.id;
wx.navigateTo({
url: '../../my/comment/comment?post_id=' + post_id,
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
//显示个人信息
showInfo() {
this.setData({
moudel:true
})
},
//获取用户推荐
getuser_recommend(){
let that=this;
let url ='/home/consult/user_recommend';
let params={
id:that.data.id
}
let header={
'XX-Token':wx.getStorageSync('token')
}
app.post(url,params,header).then((res)=>{
that.setData({
listdata:res
})
}).catch((errMsg)=>{
console.log(errMsg)
})
},
//获取平台推荐
getadmin_recommend(){
let that=this;
let url ='/home/consult/admin_recommend';
let params={
id:that.data.id
}
let header={
"XX-Token": wx.getStorageSync('token')
}
app.post(url,params,header).then((res)=>{
that.setData({
listdata2:res
})
}).catch((errMsg)=>{
console.log(errMsg)
})
},
//到用户推荐详情
gouserrecommend_detail(e){
wx.navigateTo({
url: '../userrecommend_detail/userrecommend_detail?id='+e.currentTarget.id,
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
//到平台推荐详情
goadminrecommend_detail(e){
wx.navigateTo({
url: '../adminrecommend_detail/adminrecommend_detail?id=' + e.currentTarget.id,
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let that=this;
that.setData({
id:options.id
})
that.getuser_recommend();
that.getadmin_recommend();
},
/**
... ...
{}
\ No newline at end of file
{"navigationBarTitleText": "推荐"}
\ No newline at end of file
... ...
... ... @@ -14,12 +14,14 @@
<view class="tab_item {{current==1?'active':''}}" data-current='1' bindtap='chargeTab'>平台推荐</view>
</view>
</view>
<!--用户推荐-->
<view class='content_box' wx:if='{{current==0}}'>
<view class='content_item'>
<view class='content_item' wx:for='{{listdata}}' wx:for-item='items' wx:key id='{{items.id}}' bindtap='gouserrecommend_detail'>
<view class='left_box'>
<view class='head_portrait' bindtap='showInfo'>
<image src='/images/head.png'></image>
<view class='head_portrait'catchtap='showInfo'>
<image src='{{items.avatar}}'></image>
</view>
<!--弹窗1-->
<view class='label_box' wx:if='{{moudel}}'>
<view class='triangle'></view>
<view class='wx_num'>微信号:
... ... @@ -38,6 +40,7 @@
<text>举报</text>
</view>
</view>
<!--弹窗2-->
<view class='label_box2' wx:if='{{moudel1}}'>
<view class='triangle'></view>
<view class='wx_num'>微信号:
... ... @@ -59,17 +62,19 @@
</view>
<view class='item_list'>
<view class='list_head_box'>
<view class='user_name'>匿名</view>
<view class='user_name'>{{items.user_nickname}}</view>
<view class='state_box'>
<view class='collect_box '>
<text class='iconfont icon-eye ' bindtap='Stick'></text>
<text>1688</text>
<text>{{items.post_hits}}</text>
</view>
<view class='collect_box' bindtap='delArticles'>
<!--未收藏-->
<view class='collect_box' catchtap='sethits_yes' data-index='{{index}}' wx:if='{{items.is_hits==0}}'>
<text class='iconfont icon-shoucang1 '></text>
<text>收藏</text>
</view>
<view class='collect_box active'>
<!--已收藏-->
<view class='collect_box active' catchtap='sethits_no' data-index='{{index}}' wx:else>
<text class='iconfont icon-shoucang0 star2'></text>
<text>收藏</text>
</view>
... ... @@ -80,20 +85,21 @@
<text> 大一 </text>
<text>男生 </text>
</view> -->
<view class='list_content'>隐·学 明快且充满朝气的房间风格使用面积8-12平米,面积虽小但功能齐备,陈设营造读书学习氛围,实惠经济的租金减轻租客压力专为学生、毕业生设计的简约空间轻松家修</view>
<view class='list_content'>{{items.post_content}}</view>
<view class='list_img_box'>
<image src='/images/img3.png'></image>
<!--wx:for='{{items.more}}' wx:key -->
<!-- <image src='{{item.url}}'></image> -->
<image src='/images/img3.png'></image>
<image src='/images/img3.png'></image>
</view>
<view class='list_state_box'>
<view class='time'>20分钟前</view>
<view>
<text>
<text class='iconfont icon-heart xin1'></text>
<text class=''>赞</text>
<text catchtap='setpaise' data-index='{{index}}'>
<text class="iconfont icon-heart xin1 "></text>
<text class=''>{{items.is_paise==0?'赞':'取消'}}</text>
</text>
<text>
<text catchtap='gopost' id='{{items.id}}'>
<text class='iconfont icon-pinglun pinglun1'></text>
<text>评论</text>
</text>
... ... @@ -107,28 +113,23 @@
</view> -->
<view class='comment_list'>
<text class='iconfont icon-heart xin2'></text>
<view class='head_img_cell'>
<image src='/images/head.png'></image>
</view>
<view class='head_img_cell'>
<image src='/images/head.png'></image>
</view>
<view class='head_img_cell'>
<image src='/images/head.png'></image>
<view class='head_img_cell' wx:for='{{items.paise_user}}' wx:key >
<image src='{{item}}'></image>
</view>
</view>
</view>
</view>
</view>
</view>
<!--平台推荐-->
<view class='content_box' wx:elif='{{current==1}}'>
<view class='list_item'>
<view class='list_item' wx:for='{{listdata2}}' wx:key id='{{item.id}}' bindtap='goadminrecommend_detail'>
<view class='list_box'>
<view class='list_title'>出门旅行,登机箱也要好...</view>
<view>德国进口PC材质,好看轻巧有耐摔</view>
<view class='list_title'>{{item.title}}</view>
<view>{{item.content}}</view>
</view>
<view class='list_img'>
<image class='img' src='/images/img3.png'></image>
<image class='img' src='{{item.thumbnail}}'></image>
</view>
</view>
</view>
\ No newline at end of file
... ...
// pages/consult/release_consult/release_consult.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
classify:[],//分类
content:'',//发布内容
number:'',//微信号
file:'',//图片文件
bannerimgs:[]//上传图片imgarr
},
//设置内容
setcontent(e){
let that=this;
that.setData({
content:e.detail.value
})
},
//设置微信号
setnumber(e){
let that = this;
that.setData({
number: e.detail.value
})
},
//选择分类
choosetab(e){
console.log(e);
let that = this;
let index=e.currentTarget.dataset.index;
let classify = that.data.classify;
classify[index].state = !classify[index].state;
that.setData({
classify: classify
})
},
//发布咨询页面分类
getclassify(){
let that=this;
let header={
'XX-Token':wx.getStorageSync('token')
}
let url ='/home/consult/form_consult';
app.post(url,{},header).then((res)=>{
for(let obj of res){
obj.state=false
}
that.setData({
classify:res
})
}).catch((errMsg)=>{
console.log(errMsg)
})
},
//发布资讯表单 --Wang
submit_consult(){
let that=this;
let classify = that.data.classify;
let category_id='';//标签ID
for (let obj of classify){
if (obj.state){
category_id +=obj.id+','
}
}
if (that.data.content==''){
wx.showToast({
title: '请输入内容',
icon:'none',
duration:2000
})
}
// else if (that.data.file==''){
// wx.showToast({
// title: '请上传图片',
// icon: 'none',
// duration: 2000
// })
// } else if (category_id==''){
else if (category_id == '') {
wx.showToast({
title: '请选择标签',
icon: 'none',
duration: 2000
})
}else if (that.data.number==''){
wx.showToast({
title: '请填写微信号',
icon: 'none',
duration: 2000
})
}else{//调接口
let url = '/home/consult/submit_consult';
let header = {
"XX-Token": wx.getStorageSync('token')
}
let params = {
category_id: category_id,
number: that.data.number,
content: that.data.content,
file:that.data.file
}
app.post(url,params,header).then((res)=>{
console.log(res)
}).catch((errMsg)=>{
console.log(errMsg)
})
}
},
//上传图片
//上传多个文件的方法
uploadImages() {
let that = this;
wx.chooseImage({
count: 8 - that.data.bannerimgs.length,
sizeType: ['original', 'compressed'],
success: function (res) {
console.log(res);
let successUp = 0; //成功个数
let failUp = 0; //失败个数
let i = 0; //第几个
let tempFilePaths = res.tempFilePaths //总文件
let length = res.tempFilePaths.length //总共个数
wx.showNavigationBarLoading()
wx.showLoading({
title: '上传中',
})
console.log(tempFilePaths)
that.uploadAllfile(tempFilePaths, successUp, failUp, i, length)
},
fail: function (res) {
console.log(res);
}
})
},
uploadAllfile(filePaths, successUp, failUp, i, length) {
let that = this
let url = 'http://informationxcx.w.bronet.cn/api/home/home/upload'
wx.uploadFile({
url: url, //仅为示例,非真实的接口地址
filePath: filePaths[i],
name: 'file',
formData: {},
success: function (res) {
wx.hideNavigationBarLoading()
wx.hideLoading()
},
fail: function (res) {
wx.hideNavigationBarLoading()
wx.hideLoading()
console.log(res);
},
complete: () => {
i++;
if (i == length) {
console.log('总共' + successUp + '张上传成功,' + failUp + '张上传失败!');
} else { //递归调用uploadDIY函数
this.uploadAllfile(filePaths, successUp, failUp, i, length);
}
},
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
that.getclassify();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{"navigationBarTitleText": "发布资讯"}
\ No newline at end of file
... ...
<!--pages/consult/release_consult/release_consult.wxml-->
<!--pages/release/release.wxml-->
<view class='banner_box'>
<view class='textarea_box'>
<textarea class='textarea' placeholder='详细描述会为您带来最快速的成交哦' placeholder-class='textarea_size' value='{{content}}' bindinput='setcontent'></textarea>
</view>
<view class='upload_box' bindtap='uploadImages'>
<view class='upload_img'>
<view class='iconfont icon-jia'></view>
</view>
<view class='upload_img'>
<view class='icon_box'> <view class='iconfont icon-jia1'></view>
</view>
<image src='/images/img4.png'></image>
</view>
</view>
</view>
<view class='content_box'>
<view class='tab_box'>
<scroll-view scroll-x>
<view class="tab_item {{item.state?'active':''}}" wx:for='{{classify}}' wx:key='' bindtap='choosetab' data-index='{{index}}'>{{item.name}}</view>
</scroll-view>
</view>
<view class='item_list'>
<view class='list_input'>
<text>微信号 :</text>
<view class='input_box'>
<input placeholder='请输入您的微信号' value='{{number}}' placeholder-class='input_size' bindinput='setnumber'></input>
</view>
</view>
</view>
<view class='bottom_box'>
<view class='bottom_btn' bindtap='submit_consult'>确定</view>
</view>
</view>
... ...
/* pages/consult/release_consult/release_consult.wxss */
page {
background: #fafafa;
}
.banner_box {
background: #fff;
padding: 30rpx;
}
.textarea_box {
width: 100%;
min-height: 200rpx;
}
.textarea {
width: 100%;
min-height: 200rpx;
}
.textarea_size {
font-size: 26rpx;
color: #808080;
}
.upload_box {
display: flex;
align-items: center;
}
.upload_img {
width: 120rpx;
height: 119rpx;
background: rgba(250, 250, 250, 1);
display: flex;
align-items: center;
justify-content: center;
position: relative;
margin-right: 20rpx;
}
.upload_img image {
width: 100%;
height: 100%;
}
.icon_box {
display: block;
align-items: center;
justify-content: center;
border-radius: 50%;
width: 24rpx;
height: 24rpx;
background-color: #fff;
position: absolute;
left: -12rpx;
top: -12rpx;
}
.icon-jia1 {
display: block;
font-size: 30rpx;
color: #53a6fa;
}
.content_box {
background: #fff;
margin-top: 20rpx;
}
.tab_box {
overflow: hidden;
white-space: nowrap;
margin-top: 20rpx;
}
.tab_item {
display: inline-block;
width: 160rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
border: 1px solid rgba(83, 166, 250, 1);
border-radius: 4rpx;
font-size: 26rpx;
color: #53a6fa;
margin-left: 19rpx;
}
.tab_box .active{
background-color:#53a6fa;
color:#fff;
}
.item_list {
font-size: 26rpx;
color: #666;
border: 1rpx solid #ebebeb;
padding: 0 30rpx;
margin-top: 20rpx;
}
.type_box {
width: 100%;
height: 86rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #ebebeb;
}
.type_info {
font-size: 26rpx;
color: RGBA(102, 102, 102, 0.6);
}
.list_input {
width: 100%;
height: 86rpx;
display: flex;
align-items: center;
}
.input_box {
margin-left: 25rpx;
}
.input_size {
color: RGBA(102, 102, 102, 0.6);
}
.bottom_box {
width: 100%;
height: 134rpx;
background: rgba(255, 255, 255, 1);
box-shadow: 0rpx -1rpx 0rpx 0rpx rgba(235, 235, 235, 1);
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0;
left: 0;
}
.bottom_btn {
width: 690rpx;
height: 80rpx;
font-size: 36rpx;
color: #fff;
background: rgba(83, 166, 250, 1);
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
}
.bottom_btn:active {
opacity: 0.7;
}
... ...
// pages/consult/userrecommend_detail/userrecommend_detail.js
const app=getApp();
Page({
/**
* 页面的初始数据
*/
data: {
id:'',//用户推荐id
listdata:[]
},
//设置收藏
sethits(e) {
let that = this;
let index = e.currentTarget.dataset.index;
let listdata = that.data.listdata;
// let url ='/home/home/like';
// let params={
// id: listdata[index].id
// }
// let header={
// 'XX-Token':wx.getStorageSync('token')
// }
if (listdata[index].is_hits == 0) {
listdata[index].is_hits = 1
} else {
listdata[index].is_hits = 0
}
that.setData({
listdata: listdata
})
},
//点击评论
gopost(e) {
let post_id = e.currentTarget.id;
wx.navigateTo({
url: '../../my/comment/comment?post_id=' + post_id,
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
})
},
//设置点赞
setpaise(e) {
let that = this;
let index = e.currentTarget.dataset.index;
let listdata = that.data.listdata;
let url = '/home/home/like';
let params = {
id: listdata[index].id
}
let header = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, params, header).then((res) => {
console.log(res)
if (listdata[index].is_paise == 0) {
listdata[index].is_paise = 1
} else {
listdata[index].is_paise = 0
}
that.setData({
listdata: listdata
})
}).catch((errMsg) => {
console.log(errMsg)
})
},
//点击评论
gopost(e) {
let post_id = e.currentTarget.id;
wx.navigateTo({
url: '../../my/comment/comment?post_id=' + post_id,
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
})
},
//获取详情信息
getdata_detail(){
let that=this;
let url ='/home/consult/post_info';
let header={
'XX-Token':wx.getStorageSync('token')
}
let params={
id: that.data.id
}
app.post(url,params,header).then((res)=>{
that.setData({
listdata:res
})
}).catch((errMsg)=>{
console.log(errMsg)
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
that.setData({
id:options.id
})
that.getdata_detail();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{"navigationBarTitleText": "推荐详情"}
\ No newline at end of file
... ...
<view class='content_box'>
<view class='content_item' wx:for='{{listdata}}' wx:key>
<view class='left_box'>
<view class='head_portrait'>
<image src='{{item.avatar}}'></image>
</view>
<!--弹框1-->
<view class='label_box' wx:if='{{showlabel_box}}'>
<view class='triangle'></view>
<view class='wx_num'>微信号:
<text>961110</text>
</view>
<view class='line'>|</view>
<view class='label'>复制</view>
<view class='line'>|</view>
<view class='label'>
<text class='iconfont icon-jubao0201'></text>
<text>举报</text>
</view>
<view class='line'>|</view>
<view class='label'>
<text class='iconfont icon-jubao0201'></text>
<text>举报</text>
</view>
</view>
<!--弹框2-->
<view class='label_box2' wx:if='{{showlabel_box2}}'>
<view class='triangle'></view>
<view class='wx_num'>微信号:
<text>961110</text>
</view>
<view class='line'>|</view>
<view class='label'>复制</view>
<view class='line'>|</view>
<view class='label'>
<text class='iconfont icon-zhuye'></text>
<text>进入主页</text>
</view>
<view class='line'>|</view>
<view class='label'>
<text class='iconfont icon-jubao0201'></text>
<text>举报</text>
</view>
</view>
</view>
<view class='item_list'>
<view class='list_head_box'>
<view class='user_name'>{{item.user_nickname}}</view>
<view class='state_box'>
<view class='collect_box '>
<text class='iconfont icon-eye ' bindtap='Stick'></text>
<text>{{item.post_hits}}</text>
</view>
<view class='collect_box' bindtap='delArticles' wx:if='{{item.is_hits==0}}' data-index='{{index}}' catchtap='sethits'>
<text class='iconfont icon-shoucang1 '></text>
<text>收藏</text>
</view>
<view class='collect_box active' data-index='{{index}}' catchtap='sethits' wx:else>
<text class='iconfont icon-shoucang0 star2'></text>
<text>收藏</text>
</view>
</view>
</view>
<view class='list_content'>{{item.post_content}}</view>
<view class='list_img_box'><!--wx:for='{{item.more}}' wx:key-->
<!-- <image src='{{item.url}}'></image> -->
<image src='/images/img3.png'></image>
<image src='/images/img3.png'></image>
</view>
<view class='list_state_box'>
<view class='time'>20分钟前</view>
<view>
<text catchtap='setpaise' data-index='{{index}}'>
<text class='iconfont icon-heart xin1'></text>
<text class=''>{{item.is_paise==0?'赞':'取消'}}</text>
</text>
<text catchtap='gopost' id='{{item.id}}'>
<text class='iconfont icon-pinglun pinglun1'></text>
<text>评论</text>
</text>
</view>
</view>
<view class='list_comment_box'>
<view class='comment_list'>
<text class='iconfont icon-heart xin2'></text>
<view class='head_img_cell' wx:for='{{item.paise_user}}'
wx:key wx:for-item='{{item1}}'>
<image src='{{item1}}'></image>
</view>
<!-- <view class='head_img_cell'>
<image src='/images/head.png'></image>
</view>
<view class='head_img_cell'>
<image src='/images/head.png'></image>
</view> -->
</view>
<view class='comment_list'>
<view class='iconfont icon-pinglun pinglun2'></view>
<view class='comment_box'>
<view class='comment_content' wx:for='{{item.comments}}' wx:key=' ' wx:for-item='item2'>
<view class='comment_info'>
<view class='head_portrait'>
<image src='/images/head.png'></image>
</view>
<view class='comment_content_info'>
<view class='comment_name'>巴布亚bbay:</view>
<view class=''>{{item2.content}}</view>
</view>
</view>
<!-- <view class='reply'>回复</view> -->
</view>
</view>
</view>
</view>
</view>
</view>
</view>
... ...
/* pages/consult/userrecommend_detail/userrecommend_detail.wxss */
@import '../../service/renting/renting.wxss';
page{
padding:0 0 0 0;
}
\ No newline at end of file
... ...