Browse Source

Merge branch 'feature/association' of http://git.elinkit.com.cn:7070/r/epdc-resident-mp-js into feature/association

master
ZhaoTongYao 5 years ago
parent
commit
9ea185811e
  1. 3
      app.json
  2. BIN
      subpages/associationNew/images/give_2.png
  3. BIN
      subpages/associationNew/images/ic_dingwei@2x.png
  4. BIN
      subpages/associationNew/images/icon_close.png
  5. BIN
      subpages/associationNew/images/ig_tianjiatupian@2x.png
  6. BIN
      subpages/associationNew/images/loading.gif
  7. 308
      subpages/associationNew/pages/addTopic/addTopic.js
  8. 6
      subpages/associationNew/pages/addTopic/addTopic.json
  9. 31
      subpages/associationNew/pages/addTopic/addTopic.wxml
  10. 143
      subpages/associationNew/pages/addTopic/addTopic.wxss
  11. 4
      subpages/associationNew/pages/community/community.js
  12. 182
      subpages/associationNew/pages/eventlist/eventlist.js
  13. 7
      subpages/associationNew/pages/eventlist/eventlist.json
  14. 60
      subpages/associationNew/pages/eventlist/eventlist.wxml
  15. 42
      subpages/associationNew/pages/eventlist/eventlist.wxss
  16. 41
      subpages/associationNew/utils/api.js
  17. 1123
      subpages/associationNew/utils/qqmap-wx-jssdk.js

3
app.json

@ -66,7 +66,8 @@
"pages/gMembersList/gMembersList",
"pages/gOfficialsList/gOfficialsList",
"pages/talklist/talklist",
"pages/eventlist/eventlist"
"pages/eventlist/eventlist",
"pages/addTopic/addTopic"
]
},
{

BIN
subpages/associationNew/images/give_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
subpages/associationNew/images/ic_dingwei@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
subpages/associationNew/images/icon_close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
subpages/associationNew/images/ig_tianjiatupian@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
subpages/associationNew/images/loading.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

308
subpages/associationNew/pages/addTopic/addTopic.js

@ -0,0 +1,308 @@
import { $wuxActionSheet } from '../../../../dist/index'
import { addTopic } from '../../utils/api'
const QQMapWX = require('../../utils/qqmap-wx-jssdk')
const config = require('../../../../utils/config')
Page({
data: {
topicValue: '',
imageList: [],
qqmapsdk: '',
addressValue: '',
imageId: 1,
location: {
latitude: '',
longitude: ''
},
partyGroupId: '',
topicType:'',//0:事好儿鼓个掌 1:话对捧个场
addTopicPrevious: 0
},
onShow () {
},
onLoad (options) {
const qqmapsdk = new QQMapWX({
key: 'CMJBZ-4DECI-JXGGN-5B4WU-QLV2H-B5BEJ'
})
this.setData({
qqmapsdk,
partyGroupId: options.partyGroupId,
topicType: options.topicType,
})
if(options.topicType == 0){
wx.setNavigationBarTitle({
title: '事好儿鼓个掌'
})
}else{
wx.setNavigationBarTitle({
title: '话对捧个场'
})
}
this.getLocation()
},
// 话题内容框 值双向绑定
bindTopicValue (e) {
this.setData({
topicValue: e.detail.value
})
console.log(this.data.topicValue)
},
// 地址框 值双向绑定
bindAddressValue (e) {
this.setData({
addressValue: e.detail.value
})
console.log(this.data.addressValue)
},
// 选择图片
chooseImage () {
const that = this
$wuxActionSheet().showSheet({
buttons: [{
text: '拍照'
},
{
text: '从相册中获取'
},
],
buttonClicked(index, item) {
if (index === 0) {
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['camera'],
success (res) {
const imageList = [...that.data.imageList]
imageList.push({
img: res.tempFilePaths[0],
upload: true,
id: that.data.imageId++,
ossUrl: ''
})
that.setData({
imageList
})
wx.uploadFile({
url: config.BASEURL() + 'group/topic/upload',
filePath: res.tempFilePaths[0],
name: 'file',
header: {
'Content-Type': 'multipart/form-data'
},
success (fileres) {
const data = JSON.parse(fileres.data)
if (data.code === 0 && data.msg === 'success') {
imageList[imageList.length - 1].ossUrl = data.data
imageList[imageList.length - 1].upload = false
} else {
imageList.pop()
wx.showToast({
title: '上传图片失败,请重试',
icon: 'none',
duration: 2000
})
}
that.setData({
imageList
})
},
fail (err) {
console.log(err)
imageList.pop()
wx.showToast({
title: '上传图片失败,请重试',
icon: 'none',
duration: 2000
})
that.setData({
imageList
})
}
})
}
})
} else if (index === 1) {
wx.chooseImage({
count: 3 - that.data.imageList.length,
sizeType: ['original', 'compressed'],
sourceType: ['album'],
success (res) {
let imageList = []
res.tempFilePaths.forEach(item => {
imageList.push({
img: item,
upload: true,
id: that.data.imageId++,
ossUrl: ''
})
})
that.setData({
imageList: [...that.data.imageList, ...imageList]
})
imageList.forEach((item, index) => {
(function (index) {
wx.uploadFile({
url: `${config.BASEURL()}group/topic/upload`,
filePath: imageList[index].img,
name: 'file',
header: {
'Content-Type': 'multipart/form-data'
},
success (fileRes) {
const data = JSON.parse(fileRes.data)
if (data.code === 0 && data.msg === 'success') {
imageList[index].ossUrl = data.data
imageList[index].upload = false
} else {
imageList.splice(index, 1)
wx.showToast({
title: '上传图片失败,请重试',
icon: 'none',
duration: 2000
})
}
that.data.imageList = that.data.imageList.slice(0, that.data.imageList.length - res.tempFilePaths.length)
that.setData({
imageList: [...that.data.imageList, ...imageList]
})
},
fail (err) {
console.log(err)
imageList.splice(index, 1)
wx.showToast({
title: '上传图片失败,请重试',
icon: 'none',
duration: 2000
})
that.data.imageList = that.data.imageList.slice(0, that.data.imageList.length - res.tempFilePaths.length)
that.setData({
imageList: [...that.data.imageList, ...imageList]
})
}
})
})(index)
})
}
})
}
return true
},
cancelText: '取消',
cancel() {},
destructiveButtonClicked() {},
})
},
// 获取经纬度
getLocation () {
wx.getLocation({
type: 'gcj02',
success: (res) => {
console.log('经纬度', res)
this.reverseGeocoder(res)
this.setData({
location: {
latitude: res.latitude,
longitude: res.longitude
}
})
}
})
},
// 逆地址解析
reverseGeocoder ({latitude, longitude}) {
this.data.qqmapsdk.reverseGeocoder({
location: {
latitude,
longitude
},
success: (res) => {
console.log('逆地址解析', res)
if (res.message === 'query ok') {
this.setData({
addressValue: res.result.address
})
}
}
})
},
// throttleAddTopic () {
// let now = new Date()
// if (now - this.data.addTopicPrevious > 2000) {
// this.addTopic()
// this.data.addTopicPrevious = now
// }
// },
// 添加话题事件
addTopic () {
if (this.data.topicValue === '') {
wx.showToast({
title: '请输入-话题内容',
icon: 'none',
duration: 2000
})
return false
} else if (this.data.addressValue === '') {
wx.showToast({
title: '请输入-地址',
icon: 'none',
duration: 2000
})
return false
}
const imagesList = []
if (this.data.imageList.length > 0) {
const isUploadingStatus = this.data.imageList.some(item => item.upload)
if (isUploadingStatus) {
wx.showToast({
title: '请等待图片上传完成',
icon: 'none',
duration: 2000
})
return false
}
this.data.imageList.forEach(item => {
imagesList.push(item.ossUrl)
})
}
const para = {
topicType:this.data.topicType,//话题类型:0:事好儿鼓个掌 1:话对捧个场
topicContent: this.data.topicValue,//话题内容
topicAddress: this.data.addressValue,//话题地址
topicLatitude: this.data.location.latitude,//话题位置纬度
topicLongitude: this.data.location.longitude,//话题位置经度
partyGroupId:this.data.partyGroupId,//党群ID
images: imagesList
}
wx.showLoading({
title: '加载中',
})
addTopic(para).then(res => {
wx.hideLoading()
console.log(res)
wx.showToast({
title: '发布成功',
icon: 'none',
duration: 2000
})
var pages = getCurrentPages()
// var prePages = pages[pages.length - 2]
setTimeout(() => {
// prePages.pullRefreshGetTopicList()
wx.navigateBack()
}, 1000)
}).catch(err => {
console.log(err)
})
},
// 删除图片
deleteImage (e) {
const index = this.data.imageList.findIndex((item,index) => index === e.currentTarget.dataset.index)
this.data.imageList.splice(index, 1)
const imageList = this.data.imageList
this.setData({
imageList
})
}
})

6
subpages/associationNew/pages/addTopic/addTopic.json

@ -0,0 +1,6 @@
{
"usingComponents": {
"wux-actionsheet": "../../../../dist/actionsheet/index"
},
"navigationBarTitleText": ""
}

31
subpages/associationNew/pages/addTopic/addTopic.wxml

@ -0,0 +1,31 @@
<view class="add-topic">
<view class="topic">
<textarea value="{{topicValue}}" bindinput="bindTopicValue" maxlength="500">
<view wx:if="{{topicValue.length == 0}}" class="placeholder-textarea">
<view>请将事描述清晰</view>
</view>
</textarea>
<view wx:if="{{topicType == '0'}}" class="picture">
<view class="image-box" wx:for="{{imageList}}" wx:key="{{item}}" wx:for-item="item" wx:for-index="index">
<image src="{{item.img}}" />
<image wx:if="{{item.upload}}" class="loading" src="../../images/loading.gif" />
<image bindtap="deleteImage" data-index="{{index}}" wx:else class="delete-image" src="../../images/icon_close.png" />
</view>
<view class="image-box">
<image bindtap="chooseImage" wx:if="{{imageList.length <= 2}}" src="../../images/ig_tianjiatupian@2x.png" />
</view>
</view>
</view>
<view class="address">
<textarea value="{{addressValue}}" bindinput="bindAddressValue" placeholder-class="placeholder-textarea" placeholder="请输入定位地址" />
<view class="tip">
<image src="../../images/ic_dingwei@2x.png" />
<text>话题定位</text>
</view>
</view>
<view class="topic-button">
<button bindtap="addTopic" type="default" size="defaultSize" hover-class="hover-button">发起话题</button>
</view>
</view>
<wux-actionsheet id="wux-actionsheet" />

143
subpages/associationNew/pages/addTopic/addTopic.wxss

@ -0,0 +1,143 @@
page {
width: 100%;
height:100%;
}
.add-topic {
width: 100%;
height: 100%;
background: #f7f7f7;
box-sizing: border-box;
padding: 20rpx;
}
.add-topic .topic {
width: 100%;
height: 640rpx;
background: #fff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 45rpx 20rpx 0;
}
.add-topic .topic textarea {
color: #333;
font-size: 34rpx;
line-height: 46rpx;
width: 100%;
height: 340rpx;
box-sizing: border-box;
padding-bottom: 20rpx;
position: relative;
}
.add-topic .topic textarea .placeholder-textarea {
font-size: 28rpx;
line-height: 46rpx;
color: #999;
position: absolute;
left: 0;
top: 0;
}
.add-topic .topic .picture {
display: flex;
height: 255rpx;
box-sizing: border-box;
padding: 20rpx 0;
}
.add-topic .topic .picture .image-box, .add-topic .topic .picture image {
width: 215rpx;
height: 215rpx;
object-fit:cover;
border-radius: 8rpx;
}
.add-topic .topic .picture .image-box image {
width: 215rpx;
height: 215rpx;
object-fit:cover;
}
.add-topic .topic .picture .image-box {
position: relative;
}
.add-topic .topic .picture .image-box .loading {
position: absolute;
left: 25%;
top: 25%;
width: 50%;
height: 50%;
}
.add-topic .topic .picture .image-box .delete-image {
width: 40rpx;
height: 40rpx;
position: absolute;
right: -20rpx;
top: -20rpx;
}
.add-topic .topic .picture .image-box + .image-box {
margin-left: 10rpx;
}
.add-topic .address {
width: 100%;
height: 210rpx;
background: #fff;
border-radius: 16rpx;
margin-top: 20rpx;
box-sizing: border-box;
padding: 0 20rpx;
}
.add-topic .address textarea {
width: 100%;
height: 122rpx;
box-sizing: border-box;
padding-top: 35rpx;
font-size: 34rpx;
color: #333;
line-height: 46rpx;
}
.add-topic .address .placeholder-textarea {
font-size: 28rpx;
line-height: 46rpx;
color: #999;
}
.add-topic .address .tip {
width: 100%;
height: 78rpx;
display: flex;
align-items: center;
}
.add-topic .address .tip image {
width: 22rpx;
height: 26rpx;
object-fit: cover;
}
.add-topic .address .tip text {
font-size: 26rpx;
color: #999;
margin-left: 14rpx;
}
.add-topic .topic-button {
width: 100%;
height: 85rpx;
display:flex;
justify-content: center;
align-items: center;
position: fixed;
bottom: 100rpx;
left: 0;
}
.add-topic .topic-button button {
width: 560rpx;
height: 85rpx;
line-height: 85rpx;
text-align:center;
color: #fff;
font-size: 36rpx;
border-radius: 16rpx;
background: linear-gradient(to right, #F40C0C, #FF4E4E)
}
.add-topic .topic-button .hover-button {
background: red;
}
.wux-actionsheet__button {
font-size: 34rpx !important;
color: #333 !important;
}

4
subpages/associationNew/pages/community/community.js

@ -55,11 +55,11 @@ Page({
} else if (e.currentTarget.dataset.page === 'gather') {
console.log('/subpages/associationNew/pages/community/community.js')
wx.navigateTo({
url:`/subpages/associationNew/pages/eventlist/eventlist?partyGroupId=${this.data.partyGroupId}&topicType='1'` //`#/话对捧个场`
url:`/subpages/associationNew/pages/eventlist/eventlist?partyGroupId=${this.data.partyGroupId}&topicType=1` //`#/话对捧个场`
})
} else if (e.currentTarget.dataset.page === 'applause') {
wx.navigateTo({
url:`/subpages/associationNew/pages/eventlist/eventlist?partyGroupId=${this.data.partyGroupId}&topicType='0'` //`#/事好鼓个掌`
url:`/subpages/associationNew/pages/eventlist/eventlist?partyGroupId=${this.data.partyGroupId}&topicType=0` //`#/事好鼓个掌`
})
}
}

182
subpages/associationNew/pages/eventlist/eventlist.js

@ -1,5 +1,6 @@
// subpages/associationNew/pages/eventlist/eventlist.js
import { topiclist} from '../../utils/api'
const app = getApp()
import { topiclist, commentSubmit,statement } from '../../utils/api'
import {
getTimestamp
} from '../../../../utils/common'
@ -9,47 +10,89 @@ Page({
* 页面的初始数据
*/
data: {
images:[
"https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png",
"https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png",
"https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png"
],
topiclist:[],
timestamp: getTimestamp(),
topiclist: [],
timestamp: '',
pageIndex: 1,
pageSize: 10,
partyGroupId:'',//党群id
topicType:'',//0:事好儿鼓个掌 1:话对捧个场
partyGroupId: '',//党群id
topicType: '',//0:事好儿鼓个掌 1:话对捧个场
nodata: false,
loadMoreType: 'none',
loadMoreVisible: false,
bannedFlag: '',//是否禁言 0:否 1:是
ifcomment: false,//是否显示评论
focus: false,
topicId: '',//被评论的话题ID
commentContent: '',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
partyGroupId:options.partyGroupId,
topicType:options.topicType,//0:事好儿鼓个掌 1:话对捧个场
partyGroupId: options.partyGroupId,
topicType: options.topicType,//0:事好儿鼓个掌 1:话对捧个场
})
this.topiclist()
},
if(options.topicType == 0){
wx.setNavigationBarTitle({
title: '事好儿鼓个掌'
})
}else{
wx.setNavigationBarTitle({
title: '话对捧个场'
})
}
topiclist(){
},
// 查列表
topiclist() {
let that = this;
const para = {
pageIndex: this.data.pageIndex,
pageSize: this.data.pageSize,
timestamp: this.data.timestamp,
topicType:this.data.topicType,
timestamp: getTimestamp(),
topicType: this.data.topicType,
partyGroupId: this.data.partyGroupId, //党群id
}
topiclist(para).then(res => {
let that = this;
console.log(JSON.stringify(res))
this.setData({
topiclist: that.data.topiclist.concat(res.data),
that.setData({
bannedFlag: res.data.bannedFlag,
nodata: false,
topiclist: that.data.topiclist.concat(res.data.topicList),
loadMoreType: res.data.topicList.length === that.data.pageSize ? 'loading' : 'none',
loadMoreVisible: res.data.topicList.length === that.data.pageSize ? false : true
})
if (that.data.topiclist.length == 0) {//没有值
that.setData({
nodata: true,
loadMoreType: 'none',
loadMoreVisible: false,
})
}
}).catch(err => {
that.setData({
topiclist: [],
nodata: true,
loadMoreType: 'none',
loadMoreVisible: false,
})
console.log(err)
})
},
// 跳转 发布话题
navigateToAddTopic() {
// if (this.data.groupState === '15') {
// wx.showToast({
// title: '该群已禁言,暂不可发布话题',
// icon: 'none',
// duration: 2000
// })
// return false
// }
wx.navigateTo({
url: `/subpages/associationNew/pages/addTopic/addTopic?partyGroupId=${this.data.partyGroupId}&topicType=${this.data.topicType}`
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
@ -61,7 +104,10 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({
topiclist: [],
})
this.topiclist()
},
/**
@ -89,7 +135,95 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.setData({
loadMoreVisible: true
})
if (this.data.loadMoreType === 'loading') {
this.setData({
pageIndex: this.data.pageIndex + 1,
pageSize: this.data.pageSize,
})
this.topiclist()
}
},
//点赞
clicklike(e){
console.log(JSON.stringify(e))
// <!-- 用户是否已点赞 0否;1是 -->
console.log(e.currentTarget.dataset.likeflag)
let attitude =""
if(e.currentTarget.dataset.likeflag == '0'){//点赞
attitude = 0
}else{
attitude = 2
}
let that = this;
const para = {
topicId: e.currentTarget.dataset.id,//被评论的话题ID
attitude: attitude,//表态 0赞;1踩;2取消赞;3取消踩
}
statement(para).then(res => {
that.setData({
topiclist: [],
})
this.topiclist()
console.log('点赞成功' + res)
}).catch(err => {
console.log(err)
})
},
// Textarea获取焦点
clickTextarea(e) {
this.setData({
ifcomment: true,
focus: true,
topicId: e.currentTarget.dataset.id
})
},
// 失去焦点
bindAddressInput(e) {
this.setData({ //失去焦点以后view隐藏
ifcomment: false
})
console.log(this.data.commentContent)
},
// 身份证号 双向绑定
bindIdentity(e) {
this.setData({
commentContent: e.detail.value
})
console.log(this.data.commentContent)
},
// 评论按钮点击事件
commentSubmit() {
let that = this;
const para = {
topicId: this.data.topicId,//被评论的话题ID
faCommentId: '',//父评论(被评论)ID
content: this.data.commentContent,//评论内容
}
commentSubmit(para).then(res => {
that.setData({
topiclist: [],
})
this.topiclist()
console.log('评论成功' + res)
}).catch(err => {
console.log(err)
})
console.log('点击事件')
},
previewImage (e) {
console.log(JSON.stringify(e))
app.globalData.previewImage = true
wx.previewImage({
urls: e.currentTarget.dataset.imgarry,
current: e.currentTarget.dataset.src
})
},
/**

7
subpages/associationNew/pages/eventlist/eventlist.json

@ -1,4 +1,7 @@
{
"usingComponents": {},
"navigationBarTitleText": "事好鼓个掌"
"usingComponents": {
"load-more": "../../../../components/loadMore/loadMore",
"no-data":"../../../../components/nodata/nodata"
},
"navigationBarTitleText": ""
}

60
subpages/associationNew/pages/eventlist/eventlist.wxml

@ -1,50 +1,52 @@
<view class="item-list">
<view class="item-list" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{topiclist}}">
<view class="user-info">
<image src="https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png"></image>
<image src="{{item.userFace}}"></image>
<view class="name-date">
<view class="name">南宁路152号-梁先生</view>
<view class="date">2019-08-26 12:56:02</view>
<view class="name">{{item.nickname}}</view>
<view class="date">{{item.createdTime}}</view>
</view>
</view>
<view class="details-info">庆祝建党97周年“党徽照耀新时代”庆祝建党97周年“党徽照耀新时代”庆祝建党97周年“党徽照耀新时代”庆祝建党97周年“党徽照耀新时代”庆祝建党97周年“党徽照耀新时代”</view>
<view class="details-info">{{item.topicContent}}</view>
<view wx:if="{{images.length > 0}}" class="image-list" style="height: {{images.length === 3 ? '160rpx' : images.length === 2 ? '205rpx' : images.length === 1 ? '350rpx' : '' }}">
<image mode="aspectFill" catchtap="previewImage" data-src="{{item}}" class="image-item" wx:for="{{images}}" wx:key="{{index}}" wx:for-index="index" wx:for-item="item" src="{{item}}" />
<view wx:if="{{item.images.length > 0 && topicType == '0'}}" class="image-list"
style="height: {{item.images.length === 3 ? '160rpx' : item.images.length === 2 ? '205rpx' : item.images.length === 1 ? '350rpx' : '' }}">
<image mode="aspectFill" catchtap="previewImage" data-src="{{_item}}" data-imgArry="{{item.images}}" class="image-item"
wx:for="{{item.images}}" wx:key="{{index}}" wx:for-index="index" wx:for-item="_item" src="{{_item}}" />
</view>
<view class="attitude">
<view class="all">
<image src="../../images/give.png"></image>
<view class="give-data">22222</view>
<view class="all" data-id="{{item.id}}" bindtap="clicklike" data-likeFlag="{{item.likeFlag}}">
<!-- 用户是否已点赞 0否;1是 -->
<image wx:if="{{item.likeFlag == '0'}}" src="../../images/give.png"></image>
<image wx:else src="../../images/give_2.png"></image>
<view class="give-data {{item.likeFlag == '1' ? 'color' : ''}}">{{item.supportNum}}</view>
</view>
<view class="all">
<image src="../../images/comment.png"></image>
<view class="give-data">22222</view>
<view class="give-data">{{item.commentNum}}</view>
</view>
<view class="all">
<view class="all" data-id="{{item.id}}" bindtap="clickTextarea">
<image src="../../images/ic_huifu@2x.png"></image>
<view class="give-data">评论</view>
</view>
</view>
<view class="comment">
<view class="comment-list"><text>张测试:</text>我们这个楼的小区门口也是这中事情我们这个楼的小区门口也是这中事情···我们这个楼的小区门口也是这中事情···</view>
<view class="comment-list"><text>张测试:</text>我们这个楼的小区门口也是这中事情我们这个楼的小区门口也是这中事情···我们这个楼的小区门口也是这中事情···</view>
<view wx:if="{{item.comments.length > 0}}" class="comment">
<view wx:for="{{item.comments}}" wx:key="{{index}}" wx:for-index="index" wx:for-item="item_"
class="comment-list"><text>{{item_.username}}:</text>{{item_.content}}</view>
</view>
</view>
<view class="addIssue" bindtap="addIssue">
<view class="release" wx:if="{{ifcomment}}">
<view class="replyinfo2">
<textarea placeholder-class="input_null" fixed="true" maxlength="-1" show-confirm-bar="false"
cursor-spacing="15" auto-height="true" placeholder="请输入回复" value="{{commentContent}}" focus='{{focus}}' bindblur="bindAddressInput" bindinput="bindIdentity"></textarea>
<button bindtap="commentSubmit" form-type="submit" class="submit">发送</button>
</view>
</view>
<!--加载更多提示-->
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
<no-data isShow="{{nodata}}"></no-data>
<!-- 是否禁言 0:否 1:是 -->
<view wx:if="{{bannedFlag == '0'}}" class="addIssue" bindtap="navigateToAddTopic">
<image wx:if="{{topicType == '0'}}" src="../../images/story.png" />
<image wx:else src="../../images/speack.png" />
</view>
<form bindsubmit="submitForm" report-submit="true">
<view class="release">
<view wx:if="{{reply}}" class="replyinfo1">
回复<text class="text">{{replyUserName}}</text>
<button class="cancel" bindtap="cancleReply">取消回复</button>
</view>
<view class="replyinfo2">
<textarea placeholder-class="input_null" fixed="true" maxlength="-1" show-confirm-bar="false" cursor-spacing="15" auto-height="true" placeholder="请输入回复" name="comment"></textarea>
<button form-type="submit" class="submit">发送</button>
</view>
</view>
</form>

42
subpages/associationNew/pages/eventlist/eventlist.wxss

@ -73,10 +73,12 @@ page {
height: 28rpx;
padding: 0 50rpx;
}
.attitude .all{
.attitude .all {
display: flex;
align-items: center;
}
.attitude .all image {
width: 28rpx;
height: 28rpx;
@ -90,6 +92,10 @@ page {
/* width: 196rpx; */
}
.attitude .all .give-data.color {
color: #FFB103;
}
.comment {
width: calc(100% - 98rpx);
padding: 26rpx 20rpx;
@ -111,7 +117,8 @@ page {
/* 评论样式 */
.release {
align-items: flex-end; /*底部对齐*/
align-items: flex-end;
/*底部对齐*/
box-sizing: border-box;
position: fixed;
left: 0;
@ -122,21 +129,27 @@ page {
font-size: 28rpx;
z-index: 999;
}
.replyinfo1{
.replyinfo1 {
display: flex;
justify-content: space-between; /*两端对齐*/
justify-content: space-between;
/*两端对齐*/
font-size: 35rpx;
}
.replyinfo2{
.replyinfo2 {
display: flex;
justify-content: space-between; /*两端对齐*/
justify-content: space-between;
/*两端对齐*/
}
.release textarea {
width: calc(100% - 200rpx);
min-height: 34rpx;
max-height: 102rpx; /*最多显示三行*/
border-width: 15rpx 20rpx; /*使用padding与预期留白不一致,故使用border*/
max-height: 102rpx;
/*最多显示三行*/
border-width: 15rpx 20rpx;
/*使用padding与预期留白不一致,故使用border*/
border-style: solid;
border-color: #F2F2F2;
line-height: 34rpx;
@ -161,15 +174,20 @@ page {
}
.release .submit {
width: 120rpx;
height: 64rpx;
line-height: 64rpx;
width: 160rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
color: #6c0;
margin: 0 3px;
padding: 0;
font-size: 32rpx;
font-weight: 500;
color: rgba(255, 255, 255, 1);
background: linear-gradient(to right, #e95027, #db1a1f);
border-radius: 50rpx;
}
.pro-box .info .text .delete {
color: #f68135;
border-radius: 50rpx;

41
subpages/associationNew/utils/api.js

@ -78,3 +78,44 @@ export function topiclist({pageIndex,pageSize,timestamp,topicType,partyGroupId})
}
/**
* 发布话题
*/
export function addTopic({topicType, topicContent,topicAddress,topicLatitude,topicLongitude,partyGroupId,images}) {
return request.post('partyGroup/topic/submit',{
topicType,
topicContent,
topicAddress,
topicLatitude,
topicLongitude,
partyGroupId,
images
})
}
/**
* 话题评论
*/
export function commentSubmit({topicId, faCommentId,content}) {
return request.post('partyGroup/comment/submit',{
topicId,
faCommentId,
content
})
}
/**
* 表态话题/
*/
export function statement({attitude, topicId}) {
return request.post('partyGroup/topic/statement',{
topicId,
attitude
})
}

1123
subpages/associationNew/utils/qqmap-wx-jssdk.js

File diff suppressed because it is too large
Loading…
Cancel
Save