Commit 575fc74a by shijiuyan

1

parent f19d96a4
// pages/memberChange/memberChange.js // pages/memberChange/memberChange.js
const app = getApp();
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
entity:{}
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
var that = this;
var config = wx.getStorage({
key: 'config',
success: function(res) {
console.log(res);
if(res){
that.getInfo(res.data.unionId);
}
},
})
// wx.request({
// url: '',
// })
},
getInfo(unionId){
var that = this;
wx.request({
url: app.url +'ajax_get_member_content.php',
data:{
unionId:unionId
},
success:function(resp){
console.log(resp)
that.setData({
entity:resp.data.result
})
}
})
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
...@@ -62,5 +89,29 @@ Page({ ...@@ -62,5 +89,29 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
},
buy(){
var config = wx.getStorage({
key: 'config',
success: function (res) {
console.log(res);
if (res) {
wx.request({
url: app.url +'ajax_buy_user_member.php',
data:{
unionId: res.data.unionId,
openId: res.data.openId
},
success:function(resp){
console.log(resp)
}
})
}
},
})
},
cancel(){
console.log(1111)
wx.navigateBack({});
} }
}) })
\ No newline at end of file
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<view class='memberChange'> <view class='memberChange'>
<view class='con_memberChange'> <view class='con_memberChange'>
<view class='top_memberChange'> <view class='top_memberChange'>
购买中国志愿者会员,公益视频免费得看! {{entity.title}}
</view> </view>
<view class='money_memberChange'> <view class='money_memberChange'>
金额:<text>200.00元</text> 金额:<text>{{entity.money}}元</text>
</view> </view>
<view class='huiyuan'>您的会员费用会直接xxxx</view> <view class='huiyuan'>{{entity.comment}}</view>
<view class='btn'> <view class='btn'>
<view>购买</view> <view bindtap="buy">购买</view>
<view>放弃</view> <view bindtap="cancel">放弃</view>
</view> </view>
</view> </view>
</view> </view>
// pages/myNewsDetail/myNewsDetail.js // pages/myNewsDetail/myNewsDetail.js
import Toast from '../../dist/toast/toast';
var app = getApp(); var app = getApp();
Page({ Page({
...@@ -8,10 +9,13 @@ Page({ ...@@ -8,10 +9,13 @@ Page({
data: { data: {
// attach_dat_type: "ORGNAZATION", // attach_dat_type: "ORGNAZATION",
// attach_dat_type: "CIRCLE", // attach_dat_type: "CIRCLE",
attach_dat_type: "VOLUNTEER", attach_dat_type: "",
circle:false, circle:false,
volunteer:false, volunteer:false,
orgnazation:false orgnazation:false,
attachDat:{},
messageDat:{},
msgId:0
}, },
/** /**
...@@ -31,42 +35,42 @@ Page({ ...@@ -31,42 +35,42 @@ Page({
volunteer: true volunteer: true
}) })
} }
var config = wx.getStorageSync('config'); var that=this;
wx: wx.request({ var messageId=options.messageId;
this.setData({
msgId:messageId
})
this.getInfo(messageId);
},
getInfo(messageId){
var that=this;
wx.getStorage({
key: 'config',
success: function (res) {
if (res.data.unionId) {
wx.request({
url: app.url + 'ajax_get_user_message_detail.php', url: app.url + 'ajax_get_user_message_detail.php',
header: { 'content-type': 'application/json' }, header: { 'content-type': 'application/json' },
data: { data: {
unionId: config.unionId, unionId: res.data.unionId,
page: 0 messageId: messageId
}, },
method: 'GET',
dataType: 'json',
success: function (res) { success: function (res) {
console.log(res) console.log(res)
if (res.data.status == 'OK') {
console.log(res.data.result.userMessageDat.attach_dat_type)
that.setData({
attach_dat_type: res.data.result.userMessageDat.attach_dat_type,
messageDat: res.data.result.userMessageDat,
attachDat: res.data.result.attachDat
})
}
}, },
fail: function (res) { }, fail: function (res) { },
complete: function (res) { }, complete: function (res) { },
}) })
wx: wx.request({ }
url: app.url + 'ajax_check_user_join_circle.php',
data: {
unionId: config.unionId,
circleId: 7,
msgId: 1
},
header: { 'content-type': 'application/json' },
method: 'GET',
dataType: 'json',
success: function (res) {
console.log(res)
// if (res.statusCode == 200) {
// that.setData({
// userCircleList: res.data.result.userCircleList
// })
// }
}, },
fail: function (res) { },
complete: function (res) { },
}) })
}, },
...@@ -81,7 +85,6 @@ Page({ ...@@ -81,7 +85,6 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
}, },
/** /**
...@@ -118,59 +121,54 @@ Page({ ...@@ -118,59 +121,54 @@ Page({
onShareAppMessage: function () { onShareAppMessage: function () {
}, },
//拒绝加入圈子
jujue() { jujue() {
var that = this; var that = this;
var config = wx.getStorageSync('config');
// var location = wx.getStorageSync('location');
wx: wx.request({ wx: wx.request({
url: app.url + 'ajax_refuse_user_join_circle.php', url: app.url + 'ajax_refuse_user_join_circle.php',
data: { data: {
unionId: config.unionId, userId: that.data.messageDat.user_id,
circleId: 7, circleId: that.data.attachDat.id,
msgId: 1 msgId: that.data.msgId
}, },
header: { 'content-type': 'application/json' },
method: 'GET',
dataType: 'json',
success: function (res) { success: function (res) {
console.log(res) if (res.data.status == 'OK') {
// if (res.statusCode == 200) { Toast.success(res.data.result.message);
// that.setData({ } else {
// userCircleList: res.data.result.userCircleList Toast.fail(res.data.result.message);
// }) }
// } that.getInfo(that.data.msgId);
}, },
fail: function (res) { }, fail: function (res) { },
complete: function (res) { }, complete: function (res) { },
}) })
}, },
//同意加入圈子
tongyi() { tongyi() {
var that = this; var that = this;
var config = wx.getStorageSync('config'); wx.request({
// var location = wx.getStorageSync('location');
wx: wx.request({
url: app.url + 'ajax_accept_user_join_circle.php', url: app.url + 'ajax_accept_user_join_circle.php',
data: { data: {
unionId: config.unionId, userId: that.data.messageDat.user_id,
circleId: 7, circleId: that.data.attachDat.id,
msgId: 1 msgId: that.data.msgId
}, },
header: { 'content-type': 'application/json' },
method: 'GET',
dataType: 'json',
success: function (res) { success: function (res) {
console.log(res) if(res.data.status=='OK'){
// if (res.statusCode == 200) { Toast.success(res.data.result.message);
// that.setData({ }else{
// userCircleList: res.data.result.userCircleList Toast.fail(res.data.result.message);
// }) }
// } that.getInfo(that.data.msgId);
wx.navigateTo({
url: '../circleMembers/circleMembers',
})
}, },
fail: function (res) { }, fail: function (res) { },
complete: function (res) { }, complete: function (res) { },
}) })
},
into(){
var that=this;
wx.navigateTo({
url: '/'+this.data.messageDat.attach_dat_path
})
} }
}) })
\ No newline at end of file
<!--pages/myNewsDetail/myNewsDetail.wxml--> <!--pages/myNewsDetail/myNewsDetail.wxml-->
<view class='myNewsDetail'> <view class='myNewsDetail'>
<view class='firstpage' wx:if="{{orgnazation==true}}"> <view class='firstpage' wx:if="{{attach_dat_type=='ORGNAZATION'}}">
<view class='title_firstpage'>标题</view> <view class='title_firstpage'>{{messageDat.title}}</view>
<view class='content_firstpage'>sfdf</view> <view class='content_firstpage'>{{messageDat.comment}}</view>
<!-- <view class='btn_firstpage'> <!-- <view class='btn_firstpage'>
<view>取消</view> <view>取消</view>
<view style='background:#698FBB'>确认</view> <view style='background:#698FBB'>确认</view>
</view> --> </view> -->
</view> </view>
<view class='con_checkJoinCircle' wx:if="{{circle==true}}"> <view class='con_checkJoinCircle' wx:if="{{attach_dat_type=='CIRCLE'}}">
<view class='btn'> <view style="text-align:center;">
<view bindtap='jujue'>拒绝</view> <view style="font-size:20px;font-weight:600;margin-bottom:10px;">{{messageDat.title}}</view>
<view class='agreen' bindtap='tongyi'>同意</view> <view style="margin-bottom:10px;">{{attachDat.title}}</view>
<view style="margin-bottom:10px;">{{messageDat.comment}}</view>
</view> </view>
<view class='btn' wx:if="{{messageDat.is_operated==false}}" >
<van-button type="primary" bind:click="tongyi" size="large" custom-style="margin-bottom:10px;height:35px;">同意</van-button>
<van-button type="default" bind:click="jujue" size="large" custom-style="height:35px;">拒绝</van-button>
<!-- <view bindtap='jujue'>拒绝</view>
<view class='agreen' bindtap='tongyi'>同意</view> -->
</view> </view>
<view class='listVolunteers' wx:if="{{volunteer==true}}"> </view>
<view class='listVolunteers' bindtap="into" wx:if="{{attach_dat_type=='VOLUNTEER'}}">
<view> <view>
<view class='left_listVolunteers'> <view class='left_listVolunteers'>
<image src='../../img/3.jpg'></image> <image src='{{attachDat.front_image}}'></image>
<text>征集中</text> <text>{{attachDat.status_title}}</text>
<view>(市)</view> <view></view>
</view> </view>
<view class='right_listVolunteers'> <view class='right_listVolunteers'>
<text>周末图书馆清洁活动</text> <text>{{attachDat.title}}</text>
<view> <view>
<text>征集范围:校内\n</text> <text>征集范围:{{attachDat.scope}}\n</text>
<text>征集人数:10人\n</text> <text>征集人数:{{attachDat.max_member}}人\n</text>
<text>发布单位:南京市教育局\n</text> <text>发布单位:{{attachDat.author}}\n</text>
<text>报名截止:2019.10.10</text> <text>报名截止:{{attachDat.enroll_time}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<van-toast id="van-toast" />
...@@ -6,13 +6,14 @@ ...@@ -6,13 +6,14 @@
bottom: 0; bottom: 0;
right: 0; right: 0;
margin: auto; margin: auto;
width: 260px; width: 250px;
height: 260px; height: 400px;
} }
.title_firstpage{ .title_firstpage{
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 14px; font-size: 18px;
font-weight: 600;
} }
.content_firstpage{ .content_firstpage{
width: 100%; width: 100%;
...@@ -41,18 +42,16 @@ ...@@ -41,18 +42,16 @@
bottom: 0; bottom: 0;
right: 0; right: 0;
margin: auto; margin: auto;
width: 200px; width: 300px;
height: 200px; height: 400px;
background: red;
} }
.btn{ .btn{
position: absolute; position: absolute;
bottom: 0; top: 30;
left: 0; left: 0;
width: 100%; width: 100%;
height: 30px;
background: #fff; background: #fff;
display: flex; text-align: center;
} }
.btn>view{ .btn>view{
flex: 1; flex: 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment