作者 王智

我的活动接口对接

正在显示 81 个修改的文件 包含 3126 行增加352 行删除
... ... @@ -40,7 +40,8 @@ App({
var promise = new Promise((resolve, reject) => {
let that = this;
let postData = data;
let baseUrl = 'https://volunteer.cnpu.org/api/';
let baseUrl = 'http://volunteer.w.bronet.cn/api/';
// let baseUrl = 'https://volunteer.cnpu.org/api/';
//网络请求
let header = {
'content-type': 'application/x-www-form-urlencoded'
... ... @@ -55,6 +56,7 @@ App({
if (res.data.code == '20000') {
resolve(res.data.data);
} else if (res.data.code == '10001') { //用户未登录
wx.reLaunch({
url: "/pages/start/start"
})
... ...
... ... @@ -16,18 +16,25 @@
"pages/Volunteer_dynamic/Volunteer_dynamic",
"pages/getNewsInfo/getNewsInfo",
"pages/Volunteer_group/Volunteer_group",
"pages/Volunteer_group/active/active",
"pages/Volunteer_detail/Volunteer_detail",
"pages/Online_regulations/Online_regulations",
"pages/getStudycontent/getStudycontent",
"pages/getStudycontent/answer/answer",
"pages/guanlitiaoli/guanlitiaoli",
"pages/guangrongpaihang/guangrongpaihang",
"pages/myactivity/myactivity",
"pages/myactivity/myactivity_active/myactivity_active",
"pages/myactivity/myactivity_report/myactivity_report",
"pages/myteam/myteam",
"pages/mytrain/mytrain",
"pages/myfeedback/myfeedback",
"pages/myfeedback/myfeedback_active/myfeedback_active",
"pages/myfeedback/myfeedback_duihuan/myfeedback_duihuan",
"pages/mycertificate/mycertificate",
"pages/myaddress/myaddress",
"pages/myaddcompile/myaddcompile"
... ... @@ -37,7 +44,7 @@
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#21AE59",
"navigationBarTitleText": "志愿者小程序",
"navigationBarTitleText": "白求恩志愿者中心",
"navigationBarTextStyle": "white"
},
"tabBar": {
... ...
// pages/Volunteer_detail/Volunteer_detail.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
id:'',
list:''
},
getLists() {
var id = this.data.id;
console.log(id)
let that = this;
let url = '/index/second/teamInfo';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let d = {
id: id
}
app.post(url,d, head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
getshengqin(e) {
var id =e.currentTarget.dataset.id
console.log(e)
wx.navigateTo({
url: '/pages/Volunteer_group/active/active?id='+id,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
onShow: function () {
let that =this;
that.getLists();
},
/**
... ... @@ -21,15 +61,10 @@ Page({
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
... ...
{
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "志愿团队详情"
}
\ No newline at end of file
... ...
<!--pages/Volunteer_detail/Volunteer_detail.wxml-->
<view class="goods_title">
<view>北京第三小队</view>
<view>{{list.name}}</view>
<view class="goods_list">
<view>
<image src="/imgs/vg_1.png"></image>270小时
<image src="/imgs/vg_1.png"></image>{{list.work_total_time}}小时
</view>
<view>
<image src="/imgs/vg_2.png"></image>北京
<image src="/imgs/vg_2.png"></image>{{list.city}}
</view>
<view>
<image src="/imgs/vg_3.png"></image>50
<image src="/imgs/vg_3.png"></image>{{list.people_num}}
</view>
</view>
</view>
... ... @@ -18,4 +17,11 @@
<view bindtap="getadd">详情介绍</view>
<view class="goods_line"></view>
</view>
<rich-text nodes="{{list.content}}"></rich-text>
<view class="shengqin">
<button wx:if="{{list.user_status ==0}}">未审核</button>
<button wx:if="{{list.user_status ==1}}">审核通过</button>
<button wx:if="{{list.user_status ==-1}}">审核不通过</button>
<button wx:if="{{list.user_status ==3}}" bindtap="getshengqin" data-id="{{id}}">未申请</button>
</view>
... ...
... ... @@ -27,7 +27,7 @@ page {
align-items: center;
margin-right: 42rpx;
}
/* */
.goods_introduce {
height: 88rpx;
display: flex;
... ... @@ -45,4 +45,26 @@ page {
width: 200rpx;
height: 2rpx;
background-color: #d2d2d2;
}
\ No newline at end of file
}
.shengqin {
height: 122rpx;
background-color: #ffffff;
font-size: 32rpx;
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
}
.shengqin button {
width: 622rpx;
height: 88rpx;
color: #ffffff;
border-radius: 22px;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
box-shadow: 0px 9px 19px 0px rgba(0, 116, 45, 0.42);
}
... ...
//index.js
const app = getApp();
Page({
data: {
navbar: ['活动资讯', '媒体报道','通知公告','志愿随笔'],
currentTab: 0,
navbar: [],
currentTab: 1,
list: [],
},
//切换bar
//切换navbar
navbarTap: function (e) {
console.log(e)
this.setData({
currentTab: e.currentTarget.dataset.idx
currentTab: e.currentTarget.dataset.id
})
//全局变量
app.globalData.currentTab = e.currentTarget.dataset.idx;
app.globalData.currentTab = e.currentTarget.dataset.id;
this.getactive();
},
onShow() {
this.setData({
currentTab: app.globalData.currentTab
})
let that = this;
that.getNewsType()
that.getactive();
},
onLoad: function () {
},
// 志愿动态栏目类型
getNewsType() {
let that = this;
let url = '/index/second/getNewsType';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, head).then((res) => {
// console.log(res)
that.setData({
navbar: res
})
}).catch((err) => {
})
},
// 列表
getactive() {
let that = this;
let url = '/index/second/getNewsList';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
page: that.data.currentTab
}
app.post(url, params, head).then((res) => {
// console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
// 列表详情
getNewsInfo(e) {
var id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/getNewsInfo/getNewsInfo?id=' + id,
})
}
... ...
<!-- -->
<view class="goods_index">
<!-- 导航条开始 -->
<!-- 导航条开始data-idx="{{index}}" -->
<view class="navbar">
<view wx:for="{{navbar}}" data-idx="{{index}}" class="item {{currentTab==index ? 'active' : ''}}"
<view wx:for="{{navbar}}" data-id="{{item.id}}" class="item {{currentTab==item.id ? 'active' : ''}}"
wx:key="unique" bindtap="navbarTap">
{{item}}
{{item.name}}
</view>
</view>
<!-- 导航条结束 -->
<!-- 内容 -->
<!-- 活动资讯开始 -->
<view class="display1" wx:if="{{currentTab==0}}">
<view class="goods_wrap">
<image src="/imgs/active.png"></image>
<view class="goods_name">如何才能加入天津市白求恩志愿团队</view>
<view class="goods_time">2020-06-08</view>
<view class="display1" wx:if="{{currentTab==1}}" >
<view class="goods_wrap" wx:for="{{list.data}}" data-id="{{item.id}}" bindtap="getNewsInfo">
<image src="{{item.thumbnail}}"></image>
<view class="goods_name">{{item.activity_name}}</view>
<view class="goods_time">{{item.create_time}}</view>
</view>
</view>
<!--媒体报道 -->
<view class="display1" wx:elif="{{currentTab==1}}">
ss2
<view class="display1" wx:elif="{{currentTab==2}}" >
<view class="goods_wrap" wx:for="{{list.data}}" data-id="{{item.id}}" bindtap="getNewsInfo">
<image src="{{item.thumbnail}}"></image>
<view class="goods_name">{{item.activity_name}}</view>
<view class="goods_time">{{item.create_time}}</view>
</view>
</view>
<!--通知公告 -->
<view class="display1" wx:elif="{{currentTab==2}}">
<view class="display1" wx:elif="{{currentTab==3}}">
ss3
<view class="goods_wrap" wx:for="{{list.data}}" data-id="{{item.id}}" bindtap="getNewsInfo">
<image src="{{item.thumbnail}}"></image>
<view class="goods_name">{{item.activity_name}}</view>
<view class="goods_time">{{item.create_time}}</view>
</view>
</view>
<!--志愿随笔 -->
<view class="display1" wx:elif="{{currentTab==3}}">
ss4
<view class="display1" wx:elif="{{currentTab==4}}">
<view class="goods_wrap" wx:for="{{list.data}}" data-id="{{item.id}}" bindtap="getNewsInfo">
<image src="{{item.thumbnail}}"></image>
<view class="goods_name">{{item.activity_name}}</view>
<view class="goods_time">{{item.create_time}}</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
// pages/Volunteer_group/Volunteer_group.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
list:[]
},
getDetail() {
// 志愿列表
getList() {
let that = this;
let url = '/index/second/teamList';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
city: '北京'
}
app.post(url,params, head).then((res) => {
// console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
// 详情页
getDetail(e) {
console.log(e)
var id = e.currentTarget.dataset.id;
// console.log(id)
wx.navigateTo({
url: '/pages/Volunteer_detail/Volunteer_detail',
url: '/pages/Volunteer_detail/Volunteer_detail?id=' +id,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
... ... @@ -32,6 +57,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that =this;
that.getList();
},
... ...
... ... @@ -6,19 +6,30 @@
<view class='new_box'>
<!-- <navigator wx:for='{{activity}}' wx:key="id" url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none"> -->
<view class='new_cell' bindtap="getDetail">
<view class='new_cellmain'>
<view class='new_cell' data-id="{{list.id}}" bindtap="getDetail" >
<view class='new_cellmain' >
<view class='new_img'>
<image src='/imgs/active.png' mode="aspectFill" />
<image src='{{list.pic}}' mode="aspectFill" />
<!-- <view class="">
<view>300</view>
<view>22</view>
</view> -->
</view>
<view class='new_title'>[福建省]白求恩志愿招募-志愿者</view>
<view class='new_title'>{{list.name}}</view>
<view class='title_box'>
<view class='wz_box'>
<text>2020-06-08</text>
<text>{{list.create_time}}</text>
</view>
<view class='word'>北京</view>
</view>
</view>
</view>
<!-- </navigator> -->
</view>
\ No newline at end of file
... ...
... ... @@ -26,8 +26,8 @@ padding: 0 32rpx;
justify-content: space-between;
align-items: center;
color: #999;
margin-top: 24rpx;
padding: 0 32rpx;
margin-bottom: 24rpx;
font-size: 24rpx;
flex-wrap: wrap;
/* border-bottom: 2rpx solid #e6e6e6; */
... ... @@ -40,11 +40,13 @@ padding: 0 32rpx;
background-color: #ffffff;
border-radius: 7px;
overflow: hidden;
margin-top: 24rpx;
}
.new_cell:nth-child(2n) {
margin: 0 0 0 10rpx;
/* margin: 0 0 0 10rpx;
margin-top: 24rpx; */
}
.new_cellmain {
... ...
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
textareaNum: 0,
join_reason: '', //加入理由
id: '',
wechat: '', //微信号
move_phone: '' //手机号
},
// 微信号
setwechat(e) {
console.log(e)
this.setData({
wechat: e.detail.value
})
},
// 手机号码
setmove_phone(e) {
this.setData({
move_phone: e.detail.value
})
},
//加入理由
textareaIn: function (e) {
this.setData({
textareaNum: e.detail.cursor,
join_reason: e.detail.value
})
},
submit(e) {
let that = this;
// //验证手机号
// var AuglyTest_phone = /^1(3|4|5|6|7|8)\d{9}$/;
// if (that.data.wechat == '') {
// wx.showToast({
// title: '请输入微信号!',
// icon: 'none'
// })
// } else if (!AuglyTest_phone.test(that.data.move_phone)) {
// wx.showToast({
// title: '请输入正确的电话号码!',
// icon: 'none'
// })
// } else if (that.data.join_reason == '') {
// wx.showToast({
// title: '请填写加入理由!',
// icon: 'none'
// })
// }
let url = '/index/second/applyTeam';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
wx_id: that.data.wechat,
mobile: that.data.move_phone,
join_reason: that.data.join_reason,
team_id: that.data.id
}
app.post(url, params, head).then((res) => {
wx.showModal({
title: '提示',
content: '请仔细核对信息,确认无误!',
confirmText: '确认提交',
cancelText: '我再想想',
success(res) {
if (res.confirm) {
wx.showToast({
title: '提交成功,等待审核',
mask: true,
icon: 'none',
// duration: 2000
})
setTimeout(function () {
wx.switchTab({
url: '/pages/index/index'
})
}, 1000)
console.log('用户点击确定')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}).catch(() => {})
},
// 提示
click: function (e) {
this.setData({
hiddenName: !this.data.hiddenName
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "申请加入"
}
\ No newline at end of file
... ...
<!--微信号 -->
<view class='apply_item'>
<view>微信号</view>
<view class='apply_item_input'>
<input placeholder='请输入微信号码' placeholder-class='input_p' bindinput='setwechat' value='{{wechat}}'
disabled="{{page_type}}"></input>
</view>
</view>
<view class="line">
<view></view>
</view>
<!--手机号码 -->
<view class='apply_item'>
<view>手机号码</view>
<view class='apply_item_input'>
<input placeholder='请输入手机号码' type='number' placeholder-class='input_p' bindinput='setmove_phone'
value='{{move_phone}}' disabled="{{page_type}}" maxlength="11"></input>
</view>
</view>
<!-- 加入理由 -->
<view class="doc-listform">
<view>加入理由</view>
<textarea show-confirm-bar="" placeholder="请填写加入理由" maxlength="100" bindinput="textareaIn" value='{{join_reason}}'>
<view style="position:absolute;bottom:20rpx;right:0rpx;color:gray;"><text style="color:#000;">{{textareaNum}}</text> / 100</view>
</textarea>
</view>
<!-- 提示 -->
<view class="tishi_wrap" hidden="{{hiddenName}}">
<view class="tishi">
<view>
<image src="/imgs/tishi-3@2x.png"></image>
提示
</view>
<image bindtap="click" style="width:20rpx;height:20rpx;" src="/imgs/tishiclear.png"></image>
</view>
<view class="tishi_text">“请填写真实信息”以便于志愿团队管理员与您联系 并邀请您加入该团队志愿者管理服务群聊</view>
</view>
<form class="shengqin" bindsubmit="submit" report-submit='true'>
<button form-type="submit">确认申请</button>
</form>
\ No newline at end of file
... ...
/* @import "../../apply//apply.wxss"; */
page {
background-color: rgb(240, 240, 240);
}
.apply_item {
color: #333;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: space-between;
/* margin: 0 32rpx; */
/* border-bottom: 1rpx solid #e6e6e6; */
padding: 30rpx 32rpx;
background-color: #ffffff;
}
.apply_item_input {
display: flex;
align-items: center;
flex-direction: row-reverse;
width: 70%;
color: #333;
font-size: 28rpx;
}
.apply_item_input input {
width: 100%;
}
.apply_item_input .iconfont {
color: #ccc;
}
.big_item .apply_item_input {
width: 60%;
}
.apply_item_input input {
text-align: right;
}
.input_p {
color: #ccc;
font-size: 28rpx;
}
.line view {
margin: 0 32rpx;
background-color: #e6e6e6;
height: 1px;
}
.line {
background-color: #ffffff;
}
/* */
.doc-listform {
margin-top: 30rpx;
padding: 0 32rpx;
padding-top: 16rpx;
background-color: #ffffff;
position: relative;
}
textarea {
font-size: 28rpx;
margin-top: 20rpx;
width: auto;
}
/* 提示 */
.tishi_wrap {
padding: 24rpx 36rpx;
margin: 0 32rpx;
margin-top: 40rpx;
border-radius: 8px;
background-color: #ffffff;
}
.tishi {
display: flex;
align-items: center;
justify-content: space-between;
color: #FF4444;
font-size: 32rpx;
}
.tishi image {
width: 28rpx;
height: 28rpx;
margin-right: 8rpx;
}
.tishi_text {
margin-top: 16rpx;
font-size: 28rpx;
color: #7D7E80;
}
.shengqin {
height: 122rpx;
background-color: #ffffff;
font-size: 32rpx;
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
}
.shengqin button {
width: 622rpx;
height: 88rpx;
color: #ffffff;
border-radius: 22px;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
box-shadow: 0px 9px 19px 0px rgba(0, 116, 45, 0.42);
}
\ No newline at end of file
... ...
... ... @@ -107,7 +107,7 @@ Page({
})
},
// 姓名
setname(e) {
this.setData({
name: e.detail.value
... ... @@ -484,7 +484,9 @@ Page({
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': ''
}
let url = 'https://volunteer.cnpu.org/api/user/upload/one';
// let url = 'https://volunteer.cnpu.org/api/user/upload/one';
let url = 'http://volunteer.w.bronet.cn/api/user/upload/one';
wx.uploadFile({
url: url, //仅为示例,非真实的接口地址
filePath: tempFilePaths[0],
... ... @@ -682,7 +684,10 @@ Page({
duration: 2000
})
}
},
getdatalist() {
let that = this;
let url = '/index/member_center/edit';
... ...
... ... @@ -23,7 +23,7 @@
</view>
</view>
</picker>
<picker mode='date' bindchange="bindbirthdayChange" end='{{enddata}}' disabled="{{page_type}}">
<picker mode='date' bindchange="bindbirthdayChange" value="{{2000-01-01}}" end='{{enddata}}' disabled="{{page_type}}">
<view class='apply_item'>
<view>出生日期</view>
<view class='apply_item_input'>
... ... @@ -215,7 +215,6 @@
为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
</view>
<form wx:if="{{!page_type}}" bindsubmit="submit" report-submit='true' class="apply_btn">
<button class="a_btn" form-type="submit" style="">提交</button>
</form>
... ...
// pages/getNewsInfo/getNewsInfo.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
id: '',
list: ''
},
//
getactive() {
let that = this;
let url = '/index/second/getNewsInfo';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
id: that.data.id
}
app.post(url,params, head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.getactive()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "志愿动态详情"
}
\ No newline at end of file
... ...
<view class="newinfo_banner">
<image src="{{list.thumbnail}}"></image>
</view>
<view class="newinfo_list">
<view class="goods_title">{{list.activity_name}}</view>
<view class="goods_name">
<image src="/imgs/zhiyuan1.png"></image> {{list.author}}
<image class="goods_time" src="/imgs/zhiyuan2.png"></image>{{list.create_time}}
</view>
<view class="newinfo_text">
<rich-text nodes="{{list.content}}"></rich-text>
</view>
</view>
\ No newline at end of file
... ...
image {
width: 100%;
height: 400rpx;
}
.newinfo_list {
/* margin-top: -10rpx; */
/* padding: 0 32rpx; */
/* border-top-left-radius: 10px;
border-top-right-radius: 10px; */
margin: 0 32rpx;
}
.goods_title {
margin-top: 32rpx;
/* height: 52rpx; */
font-size: 36rpx;
font-weight: 600;
}
.goods_name {
padding: 24rpx 0;
display: flex;
align-items: center;
font-size: 28rpx;
color: #7d7e80;
}
.goods_name image {
width: 36rpx;
height: 36rpx;
}
.goods_time {
margin-left: 58rpx;
}
.newinfo_text {
text-align: justify;
color: #5D5D5D;
}
\ No newline at end of file
... ...
// pages/getStudycontent/answer/answer.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "答题详情"
}
\ No newline at end of file
... ...
<view class="answer">
<view class="answer_left {{index<10?0+index:index}}" >01</view>
<view class="answer_right">
<view class="answer_question">成为一个合格的志愿者最重要的品质是什么?</view>
<radio-group>
<view class="flexs">
<view class="answer_answer">
<radio>有一颗高尚的心</radio>
</view>
<view class="answer_answer">
<radio>有一颗高尚的心</radio>
</view>
<view class="answer_answer">
<radio>有一颗高尚的心</radio>
</view>
<view class="answer_answer">
<radio>有一颗高尚的心</radio>
</view>
</view>
</radio-group>
</view>
</view>
<view class="shengqin">
<button bindtap="getshengqin" >确认</button>
</view>
\ No newline at end of file
... ...
page {
background-color: rgb(240, 240, 240);
}
.answer {
padding: 32rpx 24rpx;
margin: 34rpx 32rpx;
border-radius: 16rpx;
background-color: #ffffff;
display: flex;
}
.answer_left {
font-size: 48rpx;
color: #C8C9CC;
margin-right: 20rpx;
}
.answer_right {
font-size: 28rpx;
color: #7D7E80;
}
.answer_question {
font-size: 32rpx;
color: #323233;
}
.answer_answer {
margin-top: 36rpx;
}
.flexs{
display: flex;
flex-direction: column;
}
/*单选框样式修改 */
/* 选中后的 背景样式 (红色背景 无边框 可根据UI需求自己修改) */
radio .wx-radio-input.wx-radio-input-checked {
border-color: #099D43;
background: #099D43;
}
/* 未选中的 背景样式 */
checkbox .wx-checkbox-input{
border-color: #999;
border-radius: 50%;/* 圆角 */
height: 28rpx;
width: 28rpx;
}
/* 自定义样式.... */
radio .wx-radio-input {
height: 28rpx;
width: 28rpx;
margin-top: -4rpx;
border-radius: 50%;
border: 2rpx solid #999;
background: transparent;
}
/* 选中后的 对勾样式 (白色对勾 可根据UI需求自己修改) */
radio .wx-radio-input.wx-radio-input-checked::before {
border-radius: 50%; /* 圆角 */
width: 28rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
height: 28rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
line-height: 28rpx;
text-align: center;
font-size: 28rpx; /* 对勾大小 30rpx */
color: #099D43; /* 对勾颜色 白色 */
background: #ffffff;
transform: translate(-50%, -50%) scale(1);
-webkit-transform: translate(-50%, -50%) scale(1);
}
/* */
.shengqin {
height: 122rpx;
background-color: #ffffff;
font-size: 32rpx;
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
}
.shengqin button {
width: 622rpx;
height: 88rpx;
color: #ffffff;
border-radius: 22px;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
box-shadow: 0px 9px 19px 0px rgba(0, 116, 45, 0.42);
}
\ No newline at end of file
... ...
... ... @@ -7,7 +7,12 @@ Page({
data: {
},
getanswer() {
wx.navigateTo({
url: '/pages/getStudycontent/answer/answer',
})
},
/**
* 生命周期函数--监听页面加载
*/
... ...
<!--pages/getStudycontent/getStudycontent.wxml-->
<view class="answer_text">
<text-rich>
很快适应了当地生活,但对于一个国际中文教学的“新手”来说,走上真正的讲台才是我接下来面临的挑战,不过惊喜也在悄然发生。 造访的第一个学校是Maštolend儿园,第一眼就爱上了这群可爱的孩子们。大班的孩子集体唱《你好歌》
</text-rich>
</view>
<view class="answer">
<view class="answer" bindtap="getanswer">
<button hover-class="none">去答题</button>
</view>
\ No newline at end of file
... ...
... ... @@ -2,36 +2,80 @@
const app = getApp();
Page({
data: {
navbar: ['志愿者', '志愿团队'],
currentTab: 0,
nav: 1,
navs: 1,
list: [],
},
//切换bar
navbarTap: function (e) {
//切换
bindNav(e) {
var nav = e.currentTarget.dataset.nav
console.log(nav)
this.setData({
currentTab: e.currentTarget.dataset.idx
nav
})
//全局变量
app.globalData.currentTab = e.currentTarget.dataset.idx;
this.getaList();
},
onShow() {
bindtype(e) {
var navs = e.currentTarget.dataset.navs
console.log(navs)
this.setData({
currentTab: app.globalData.currentTab
navs
})
this.getaList();
},
onShow() {
let that = this;
this.getaList();
},
onLoad: function () {
},
getaList() {
let that = this;
let url = '/index/second/getRank';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
type: that.data.nav,
star: that.data.navs
}
console.log(params)
app.post(url, params, head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
... ...
<!-- -->
<view class="navbar">
<view class="item {{nav==1?'choose':''}}" bindtap="bindNav" data-nav="{{1}}">志愿者</view>
<view class="item {{nav==2?'choose':''}}" bindtap="bindNav" data-nav="{{2}}">志愿团队</view>
</view>
<view class="goods_index">
<!-- 导航条开始 -->
<view class="navbar">
<view wx:for="{{navbar}}" data-idx="{{index}}" class="item {{currentTab==index ? 'active' : ''}}" wx:key="unique" bindtap="navbarTap">
{{item}}
</view>
</view>
<!-- 导航条结束 -->
<!-- 内容 -->
<view wx:if="{{currentTab==0}}">
ss2
</view>
<view wx:elif="{{currentTab==1}}">
<view class="goods_groups">
<view>1</view>
<view>天津市志愿者之家</view>
<view>3000小时</view>
<view wx:if="{{nav==1}}">
<!-- 星级 -->
<view class="navbar">
<view class="item {{navs==1?'choose':''}}" bindtap="bindtype" data-navs="{{1}}">一星</view>
<view class="item {{navs==2?'choose':''}}" bindtap="bindtype" data-navs="{{2}}">二星</view>
<view class="item {{navs==3?'choose':''}}" bindtap="bindtype" data-navs="{{3}}">三星</view>
<view class="item {{navs==4?'choose':''}}" bindtap="bindtype" data-navs="{{4}}">四星</view>
<view class="item {{navs==5?'choose':''}}" bindtap="bindtype" data-navs="{{5}}">五星</view>
<view class="item {{navs==6?'choose':''}}" bindtap="bindtype" data-navs="{{6}}">金牌</view>
</view>
<view wx:if="{{navs}}">
<view class="goods_groups" wx:for="{{list}}">
<view>{{index+1}}</view>
<view>{{item.name}}</view>
<view>{{item.province}}</view>
<view>{{item.work_time}}</view>
</view>
</view>
</view>
<view wx:elif="{{nav==2}}">
<view class="goods_groups" wx:for="{{list}}">
<view>{{index+1}}</view>
<view>{{item.name}}</view>
<view>{{item.work_time}}</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -4,12 +4,12 @@ page{
background-color: rgb(240, 240, 240);
}
.goods_index {
padding: 20rpx 32rpx;
padding: 20rpx 0;
}
/* 导航条开始 */
.navbar {
/* padding : 10rpx 0; */
padding : 0 62rpx;
display: flex;
justify-content: space-around;
/* background : linear-gradient(136deg,#4e8fff 2%, #55c2fa); */
... ... @@ -31,13 +31,13 @@ page{
}
.navbar .item.active {
.navbar .item.choose {
color: black;
/* background: linear-gradient(136deg, #4e8fff 2%, #55c2fa); */
}
.navbar .item.active:after {
.navbar .item.choose:after {
content: "";
display: block;
position: absolute;
... ... @@ -52,6 +52,7 @@ page{
/* 导航条结束 */
.goods_groups{
padding: 0 72rpx;
height: 88rpx;
line-height: 88rpx;
display:flex;
... ... @@ -59,3 +60,7 @@ justify-content: space-between;
color: #323233;
font-size: 28rpx;
}
.goods_groups view{
}
... ...
// pages/guanlitiaoli/guanlitiaoli.js
const app =getApp()
Page({
/**
* 页面的初始数据
*/
data: {
list:''
},
getList() {
let that = this;
let url = '/index/second/manage';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
... ... @@ -29,6 +49,8 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that =this;
that.getList();
},
... ...
<view class="guanlitiaoli">
<rich-text >
很快适应了当地生活,但对于一个国际中文教学的“新手”来说,
走上真正的讲台才是我接下来面临的挑战,不过惊喜也在悄然发生。
<rich-text nodes="{{list.content}}">
</rich-text>
</view>
... ...
... ... @@ -71,7 +71,7 @@ Page({
}
let params = {
volunteer_page: 0,
volunteer_pageNum: 3,
volunteer_pageNum: 4,
activity_page: that.data.activity_page,
activity_pageNum: 4
}
... ... @@ -103,6 +103,12 @@ Page({
})
},
// 招募活动
get() {
wx.navigateTo({
... ... @@ -126,7 +132,7 @@ Page({
this.getdatalist();
let that = this;
that.getdatalists();
},
//导航跳转
... ...
... ... @@ -34,7 +34,7 @@ Page({
for (let i = 0; i < volunteer.length; i++) {
tem.push(volunteer[i]);
if ((i + 1) != volunteer.length) {
if ((i + 1) % 2 == 0) {
if ((i + 1) % 4 == 0) {
temvolunteer.push(tem);
tem = [];
}
... ...
<bolck wx:for='{{volunteer}}' wx:key>
<bolck wx:for='{{volunteer}}' wx:key >
<view class='volunteerbox'>
<view class='volunteercell' wx:for='{{item}}' wx:key>
<view class='cell_top'>
... ...
@import '../index/index.wxss';
page{
padding-top:32rpx;
}
.volunteerbox {
justify-content: space-between;
... ...
... ... @@ -15,7 +15,7 @@ Page({
'XX-Token': wx.getStorageSync('token')
}
app.post(url, {}, head).then((res) => {
// console.log(res)
console.log(res)
that.setData({
datalist: res
})
... ... @@ -71,21 +71,18 @@ Page({
wx.navigateTo({
url: '/pages/mycertificate/mycertificate',
})
},
// 我的地址
getmyAdd() {
wx.navigateTo({
url: '/pages/myaddress/myaddress',
url: '/pages/myaddress/myaddress?id='+this.data.datalist.id,
})
},
// 管理条例
getRule() {
getRule(e) {
wx.navigateTo({
url: '/pages/guanlitiaoli/guanlitiaoli',
})
... ...
... ... @@ -11,15 +11,15 @@
</view>
<!-- <view class='word'>工时: {{datalist.work_time}}h</view> -->
<view class='star_box'>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>0}}'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>0}}'>
</image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>1}}'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>1}}'>
</image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>2}}'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>2}}'>
</image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>3}}'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>3}}'>
</image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>4}}'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>4}}'>
</image>
</view>
</view>
... ... @@ -120,7 +120,7 @@
<view class='iconfont icon-xiangyou'></view>
</view>
<view class='my_item' bindtap="">
<view class='my_item' bindtap="getfeedback">
<view class='my_itemletf'>
<view class='iconfont '>
<image src="/imgs/ac11.png"></image>
... ...
... ... @@ -44,6 +44,9 @@ page {
.my_headitemname {
width: 260rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
... ...
// pages/myactivity/myactivity.js
const app =getApp()
Page({
/**
* 页面的初始数据
*/
data: {
nav: 1,
navs: 1,
list:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
onShow: function () {
let that = this;
that.getList();
},
// 列表
getList() {
let that = this;
let url = '/index/second/activityList';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let d = {
status:that.data.navs
}
app.post(url, d, head).then((res) => {
// console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
// 导航
bindNav(e) {
var nav = e.currentTarget.dataset.nav
console.log(nav)
this.setData({
nav
})
this.getList();
},
// 导航
bindtype(e) {
var navs = e.currentTarget.dataset.navs
console.log(navs)
this.setData({
navs
})
this.getList();
},
// 打卡
getdaka(e) {
var id =e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/myactivity/myactivity_active/myactivity_active?id='+id,
})
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
// 提交报告
getreport() {
wx.navigateTo({
url: '/pages/myactivity/myactivity_report/myactivity_report',
})
},
/**
* 生命周期函数--监听页面隐藏
*/
... ...
{
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "我的活动"
}
\ No newline at end of file
... ...
<view>
<!-- 任务栏-->
<view class="navbar">
<view class="item {{nav==1?'choose':''}}" bindtap="bindNav" data-nav="{{1}}">活动打卡</view>
<view class="item {{nav==2?'choose':''}}" bindtap="bindNav" data-nav="{{2}}">待提交报告</view>
<view class="item {{nav==3?'choose':''}}" bindtap="bindNav" data-nav="{{3}}">完成的活动</view>
</view>
<view class="line"></view>
<view class="goods_index">
<view wx:if="{{nav==1}}">
<!-- 打卡 -->
<view class="navbar">
<view class="item {{navs==1?'choose':''}}" bindtap="bindtype" data-navs="{{1}}">待打卡</view>
<view class="item {{navs==2?'choose':''}}" bindtap="bindtype" data-navs="{{2}}">已完成打卡</view>
</view>
<!-- 待打卡 -->
<view wx:if="{{navs==1}}" >
<view class="myactive_wrap" bindtap="getdaka" data-id="{{item.id}}" wx:for="{{list}}">
<view class="myactive_time">
<image src="/imgs/shijian-19.png"></image>{{item.date}}
{{item.start_clock_time}}-{{item.end_clock_time}}
</view>
<view class="myactive_list">
<image src="{{item.activity.thumbnail}}"></image>
<view class="myactive_name">
<view>{{item.activity_name}}</view>
<view class="myactive_gps">
<image src="/imgs/didian-14.png"></image> {{item.address}}
</view>
</view>
</view>
<view class="daka">待打卡</view>
</view>
</view>
<!--打卡已完成 -->
<view wx:elif="{{navs==2}}">
<view class="myactive_wrap" wx:for="{{list}}">
<view class="myactive_time">
<image src="/imgs/shijian-19.png"></image>{{item.date}}
{{ item.start_clock_time}}-{{item.end_clock_time}}
</view>
<view class="myactive_list">
<image src="{{item.activity.thumbnail}}"></image>
<view class="myactive_name">
<view>{{item.activity_name}}</view>
<view class="myactive_gps">
<image src="/imgs/didian-14.png"></image> {{item.address}}
</view>
</view>
</view>
<view class="daka">完成打卡</view>
</view>
</view>
</view>
<!--待提交报告 -->
<view wx:elif="{{nav==2}}">
<view class="myactive_wrap" wx:for="{{list}}">
<view class="myactive_time">
<image src="/imgs/shijian-19.png"></image>{{item.date}}
{{ item.start_clock_time}}-{{item.end_clock_time}}
</view>
<view class="myactive_list">
<image src="{{item.activity.thumbnail}}"></image>
<view class="myactive_name">
<view>{{item.activity_name}}</view>
<view class="myactive_gps">
获得5小时工时
</view>
</view>
</view>
<view class="daka dasubmit" bindtap="getreport">提交报告</view>
</view>
</view>
<!-- 完成的活动 -->
<view wx:elif="{{nav==3}}">
<view class="myactive_wrap">
<view class="myactive_time">
<image src="/imgs/shijian-19.png"></image>2020-06-08 8:00-12:00
</view>
<view class="myactive_list">
<image src="/imgs/active.png"></image>
<view class="myactive_name">
<view>[福建省]白求恩志愿者招募-志愿者</view>
<view class="myactive_gps">
<image src="/imgs/didian-14.png"></image> 获得5小时工时
</view>
</view>
</view>
</view>
</view>
活动打卡
</view>
\ No newline at end of file
... ...
/* pages/myactivity/myactivity.wxss */
\ No newline at end of file
page {
background-color: rgb(240, 240, 240);
}
/* 导航条开始 */
.navbar {
height: 88rpx;
padding: 0 62rpx;
display: flex;
justify-content: space-around;
/* background : linear-gradient(136deg,#4e8fff 2%, #55c2fa); */
background-color: #ffffff;
font-size: 30rpx;
color: #969799;
border-radius: 2px 0px 0px 2px;
}
.navbar .item {
width: 346rpx;
height: 64rpx;
line-height: 66rpx;
font-size: 24rpx;
position: relative;
text-align: center;
/* background-color: #FFC909; */
/* border-radius : 19px; */
}
.navbar .item.choose {
color: black;
/* background: linear-gradient(136deg, #4e8fff 2%, #55c2fa); */
}
.navbar .item.choose:after {
content: "";
display: block;
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 80rpx;
height: 6rpx;
background: #21AE58;
margin: 0 auto;
}
.line {
height: 2rpx;
}
.myactive_wrap {
margin: 32rpx 24rpx;
padding: 32rpx 24rpx;
background-color: #ffffff;
border-radius: 16rpx;
}
.myactive_time image {
width: 26rpx;
height: 26rpx;
}
.myactive_name {
width: 434rpx;
padding: 6rpx 0;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.myactive_list {
font-size: 28rpx;
margin-top: 24rpx;
display: flex;
justify-content: space-between;
}
.myactive_list image {
width: 182rpx;
height: 138rpx;
margin-right: 24rpx;
border-radius: 5px;
}
.myactive_gps {
margin-top: 16rpx;
color: #7D7E80;
}
.myactive_gps image {
width: 28rpx;
height: 28rpx;
}
.daka {
margin-top: 32rpx;
padding: 15rpx 0;
width: 160rpx;
text-align: center;
border: 2rpx solid #7d7e80;
border-radius: 22rpx;
color: #7D7E80;
font-size: 28rpx;
margin-left: auto;
}
.dasubmit {
width: 160rpx;
height: 72rpx;
box-sizing: border-box;
color: #21AE58;
border: 2rpx solid #21AE58;
}
\ No newline at end of file
... ...
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
list: '',
id: '',
latitude: '',
longitude: ''
},
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
onReady: function () {
},
onShow: function () {
let that = this;
that.getList();
wx.getLocation({
success: function (res) {
console.log(res);
that.setData({
latitude: res.latitude,
longitude: res.longitude
})
},
})
},
// 详情列表
getList() {
let that = this;
let url = '/index/second/clockInfo';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let d = {
id: that.data.id
}
// console.log(d)
app.post(url, d, head).then((res) => {
// console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
// 打卡
getpunch() {
// var t=this
let that = this;
let url = '/index/second/startClock';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let d = {
id: that.data.id,
long: that.data.latitude,
lat: that.data.longitude
}
console.log(d)
app.post(url, d, head).then((res) => {
console.log(res)
// that.setData({
// list: res
// })
}).catch((err) => {
})
},
// 提示
click: function (e) {
this.setData({
hiddenName: !this.data.hiddenName
})
},
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--pages/myactivity/myactivity_active/myactivity_active.wxml-->
<view class="myactivity_active">
<view class="myactivity_s">参与的活动:{{list.activity_name}}</view>
<view class="myactivity_s"> 时间:{{list.start_clock_time}}-{{list.end_clock_time}}</view>
<view class="myactivity_s">我的当前位置:{{list.address}}</view>
<view class="myactivity_wrap">
<view class="myactivity_starttime">
<view>上岗打卡09:00</view>
<view>未打卡</view>
</view>
<view class="myactivity_starttime">
<view>下岗打卡09:00</view>
<view>未打卡</view>
</view>
</view>
<view class="myactivity_start" bindtap="getpunch">
<view >上岗打卡</view>
<view>12:00</view>
</view>
</view>
<!-- 提示 -->
<view class="tishi_wrap" hidden="{{hiddenName}}">
<view class="tishi">
<view>
<image src="/imgs/tishi-3@2x.png"></image>
提示
</view>
<image bindtap="click" style="width:20rpx;height:20rpx;" src="/imgs/tishiclear.png"></image>
</view>
<view class="tishi_text">活动地址:和平区位置,请在距地址500米内打卡</view>
</view>
\ No newline at end of file
... ...
/* pages/myactivity/myactivity_active/myactivity_active.wxss */
page {
background-color: rgb(240, 240, 240);
}
.myactivity_active {
margin: 24rpx 24rpx;
padding: 24rpx 32rpx;
font-size: 28rpx;
background-color: #ffffff;
border-radius: 16rpx;
}
.myactivity_s {
margin-bottom: 40rpx;
}
.myactivity_wrap {
display: flex;
justify-content: space-between;
}
.myactivity_starttime {
padding: 24rpx 24rpx;
width: 310rpx;
height: 128rpx;
background-color: #F2F4F5;
border-radius: 22rpx;
box-sizing: border-box;
}
.myactivity_start {
margin: 168rpx 202rpx;
width: 282rpx;
height: 282rpx;
color: #ffffff;
text-align: center;
border-radius: 50%;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
box-shadow: 0px 16px 40px 0px rgba(0, 122, 47, 0.46);
display: flex;
flex-direction: column;
justify-content: center;
}
.myactivity_start :nth-child(1) {
font-size: 40rpx;
}
/* 提示 */
.tishi_wrap {
padding: 24rpx 36rpx;
margin: 0 32rpx;
margin-top: 40rpx;
margin-bottom: 154rpx;
border-radius: 8px;
background-color: #ffffff;
}
.tishi {
display: flex;
align-items: center;
justify-content: space-between;
color: #FF4444;
font-size: 32rpx;
}
.tishi image {
width: 28rpx;
height: 28rpx;
margin-right: 8rpx;
}
.tishi_text {
margin-top: 16rpx;
font-size: 28rpx;
color: #7D7E80;
}
\ No newline at end of file
... ...
const app = getApp();
Page({
data: {
textareaNum: 0,
// join_reason: '', //加入理由
// id: '',
// wechat: '', //微信号
// move_phone: '' //手机号
},
// // 微信号
// setwechat(e) {
// console.log(e)
// this.setData({
// wechat: e.detail.value
// })
// },
// // 手机号码
// setmove_phone(e) {
// this.setData({
// move_phone: e.detail.value
// })
// },
// //加入理由
// textareaIn: function (e) {
// this.setData({
// textareaNum: e.detail.cursor,
// join_reason: e.detail.value
// })
// },
// submit(e) {
// let that = this;
// let url = '/index/second/applyTeam';
// let head = {
// 'XX-Token': wx.getStorageSync('token')
// }
// let params = {
// wx_id: that.data.wechat,
// mobile: that.data.move_phone,
// join_reason: that.data.join_reason,
// team_id: that.data.id
// }
// app.post(url, params, head).then((res) => {
// wx.showModal({
// title: '提示',
// content: '请仔细核对信息,确认无误!',
// confirmText: '确认提交',
// cancelText: '我再想想',
// success(res) {
// if (res.confirm) {
// wx.showToast({
// title: '提交成功,等待审核',
// mask: true,
// icon: 'none',
// // duration: 2000
// })
// setTimeout(function () {
// wx.switchTab({
// url: '/pages/index/index'
// })
// }, 1000)
// console.log('用户点击确定')
// } else if (res.cancel) {
// console.log('用户点击取消')
// }
// }
// })
// }).catch(() => {})
// },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--微信号 -->
<view class='apply_item'>
<view>微信号</view>
<view class='apply_item_input'>
<input placeholder='请输入微信号码' placeholder-class='input_p' bindinput='setwechat' value='{{wechat}}'
disabled="{{page_type}}"></input>
</view>
</view>
<view class="line">
<view></view>
</view>
<!--手机号码 -->
<view class='apply_item'>
<view>手机号码</view>
<view class='apply_item_input'>
<input placeholder='请输入手机号码' type='number' placeholder-class='input_p' bindinput='setmove_phone'
value='{{move_phone}}' disabled="{{page_type}}" maxlength="11"></input>
</view>
</view>
<view class="line">
<view></view>
</view>
<view class='apply_item'>
<view>手机号码</view>
<view class='apply_item_input'>
<input placeholder='请输入手机号码' type='number' placeholder-class='input_p' bindinput='setmove_phone'
value='{{move_phone}}' disabled="{{page_type}}" maxlength="11"></input>
</view>
</view>
<view class="line">
<view></view>
</view>
<view class='apply_item'>
<view>手机号码</view>
<view class='apply_item_input'>
<input placeholder='请输入手机号码' type='number' placeholder-class='input_p' bindinput='setmove_phone'
value='{{move_phone}}' disabled="{{page_type}}" maxlength="11"></input>
</view>
</view>
<!-- 感想汇报 -->
<view class="doc-listform">
<view> 感想汇报</view>
<textarea show-confirm-bar="" placeholder="请输入内容,内容最多为500字" maxlength="500" bindinput="textareaIn" value='{{join_reason}}'>
<view style="position:absolute;bottom:20rpx;right:0rpx;color:gray;"><text style="color:#000;">{{textareaNum}}</text> / 100</view>
</textarea>
</view>
<form class="shengqin" bindsubmit="submit" report-submit='true'>
<button form-type="submit">提交</button>
</form>
\ No newline at end of file
... ...
/* @import "../../apply//apply.wxss"; */
page {
background-color: rgb(240, 240, 240);
}
.apply_item {
color: #333;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: space-between;
/* margin: 0 32rpx; */
/* border-bottom: 1rpx solid #e6e6e6; */
padding: 30rpx 32rpx;
background-color: #ffffff;
}
.apply_item_input {
display: flex;
align-items: center;
flex-direction: row-reverse;
width: 70%;
color: #333;
font-size: 28rpx;
}
.apply_item_input input {
width: 100%;
}
.apply_item_input .iconfont {
color: #ccc;
}
.big_item .apply_item_input {
width: 60%;
}
.apply_item_input input {
text-align: right;
}
.input_p {
color: #ccc;
font-size: 28rpx;
}
.line view {
margin: 0 32rpx;
background-color: #e6e6e6;
height: 1px;
}
.line {
background-color: #ffffff;
}
/* */
.doc-listform {
margin-top: 30rpx;
padding: 0 32rpx;
padding-top: 16rpx;
background-color: #ffffff;
position: relative;
}
textarea {
font-size: 28rpx;
margin-top: 20rpx;
width: auto;
}
/* 提示 */
.tishi_wrap {
padding: 24rpx 36rpx;
margin: 0 32rpx;
margin-top: 40rpx;
border-radius: 8px;
background-color: #ffffff;
}
.tishi {
display: flex;
align-items: center;
justify-content: space-between;
color: #FF4444;
font-size: 32rpx;
}
.tishi image {
width: 28rpx;
height: 28rpx;
margin-right: 8rpx;
}
.tishi_text {
margin-top: 16rpx;
font-size: 28rpx;
color: #7D7E80;
}
.shengqin {
height: 122rpx;
background-color: #ffffff;
font-size: 32rpx;
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
}
.shengqin button {
width: 622rpx;
height: 88rpx;
color: #ffffff;
border-radius: 22px;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
box-shadow: 0px 9px 19px 0px rgba(0, 116, 45, 0.42);
}
\ No newline at end of file
... ...
// pages/myaddcompile/myaddcompile.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
data: {
region: [],
name: '',
address: '',
phone: '',
wx_id: '',
mail: '',
isDefault: '',
id: ''
},
onLoad: function (options) {
var that = this
if (options.id) {
that.setData({
id: options.id
})
let head = {
'XX-Token': wx.getStorageSync('token')
}
let url = '/index/second/getAddress'
let params = {
id: options.id
}
app.post(url, params, head).then((res) => {
console.log(res)
// 将对象添加到数组中
let answer = this.data.region;
answer.push(res.province,res.city,res.district);
that.setData({
region: answer,
id: res.is,
name: res.name,
address: res.address,
phone: res.tel,
wx_id: res.wx_id,
mail: res.mail,
isDefault: res.is_default == 0 ? false : true
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
}
},
// 设为默认
switchChange(e) {
var that = this
that.setData({
isDefault: e.detail.value
})
},
//保存
bindsave(e) {
let that = this;
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
name: that.data.name, //姓名
province: that.data.region[0], //省
city: that.data.region[1], //市
district: that.data.region[2], //区
address: that.data.address, //详细地址
tel: that.data.phone, //电话
wx_id: that.data.wx_id, //微信号
mail: that.data.mail, //邮箱
is_default: that.data.isDefault ? 1 : 0 //默认
}
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
wx.showModal({
title: '提示',
content: '请仔细核对信息,确认无误!',
confirmText: '确认提交',
cancelText: '我再想想',
success(res) {
if (res.confirm) {
if (that.data.id) {
let url = '/index/second/editAddress';
app.post(url, params, head).then((res) => {
wx.showToast({
title: '修改成功',
mask: true,
icon: 'none',
// duration: 2000
})
setTimeout(function () {
wx.reLaunch({
url: '/pages/myaddress/myaddress'
})
}, 1000)
})
} else {
let url = '/index/second/addAddress';
app.post(url, params, head).then((res) => {
wx.showToast({
title: '保存成功',
mask: true,
icon: 'none',
// duration: 2000
})
setTimeout(function () {
wx.reLaunch({
url: '/pages/myaddress/myaddress'
})
}, 1000)
})
}
console.log('用户点击确定')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
},
// 姓名
bindName(e) {
this.setData({
name: e.detail.value
})
},
// 地区
bindRegionChange: function (e) {
console.log(e)
this.setData({
region: e.detail.value
})
},
//详细地址
bindAddress(e) {
this.setData({
address: e.detail.value
})
},
//联系方式
bindPhone(e) {
this.setData({
phone: e.detail.value
})
},
//微信号
bindwx_id(e) {
console.log(e)
this.setData({
wx_id: e.detail.value
})
},
//邮箱号
bindmail(e) {
console.log(e)
this.setData({
mail: e.detail.value
})
},
onReady: function () {
},
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}
})
\ No newline at end of file
... ...
<!-- 修改收货地址 -->
<view class="itemInput display">
<view class="itemName" > 姓名</view>
<view class="itemInput displayB">
<view class="itemName"> 姓名</view>
<input placeholder="请输入姓名" value="{{name}}" bindinput="bindName" placeholder-class="plaSty"></input>
</view>
<view class="itemInput display">
<view class="itemName">联系方式</view>
<input placeholder="请输入联系方式" value="{{phone}}" bindinput="bindPhone" maxlength="11" placeholder-class="plaSty"></input>
<view class="itemInput displayB">
<view class="itemName">地区</view>
<picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
<view style="display:flex;align-items:center">
<view wx:if="{{region.length>0}}">
{{region[0]}}{{region[1]}}{{region[2]}}
</view>
<view style="color:#727273;font-size:28rpx;" wx:else>请选择地址</view>
<image src="/imgs/right.png"></image>
</view>
</picker>
</view>
<view class="itemInput display">
<view class="line"></view>
<view class="itemInput displayB">
<view class="itemName">详细地址</view>
<input placeholder="请输入详细地址" value="{{address}}" bindinput="bindAddress" placeholder-class="plaSty"></input>
</view>
<view class="itemInput displayB">
<view class="itemName">联系方式</view>
<input placeholder="请输入联系方式" value="{{phone}}" bindinput="bindPhone" maxlength="11"
placeholder-class="plaSty"></input>
</view>
<view class="itemInput displayB">
<view class="itemName">微信号</view>
<input placeholder="请输入微信号" value="{{wx_id}}" bindinput="bindwx_id" placeholder-class="plaSty"></input>
</view>
<view class="itemInput displayB">
<view class="itemName">邮箱号</view>
<input placeholder="请输入邮箱号" value="{{mail}}" bindinput="bindmail" placeholder-class="plaSty"></input>
</view>
<view class="itemInput center display">
<view class="itemInput center displayB">
<view class="itemName">设为默认</view>
<switch checked="{{addressDetail.delFlag==0?false:true}}" bindchange="switchChange" color="#21AE59"/>
<switch checked="{{isDefault==0?false:true}}" bindchange="switchChange" color="#21AE59" />
</view>
<!-- 编辑结束 -->
<view class="newaddress">
<view class="newaddress_left" bindtap="bindDelete" wx:if="{{type=='change'}}">删除</view>
<view class="newaddress_right" bindtap="save">保存</view>
<!-- <view class="newaddress_left" bindtap="bindDelete" >删除</view> -->
<view class="newaddress_right" bindtap="bindsave">保存</view>
</view>
\ No newline at end of file
... ...
... ... @@ -9,12 +9,17 @@ page {
border-bottom: 2rpx solid #eeeeee;
align-items: center;
}
.itemInput image{
width: 14rpx;
height: 20rpx;
margin-left: 5rpx;
}
.itemName {
font-size: 32rpx;
color: #727273;
margin-right: 32rpx;
min-width: 128rpx;
/* min-width: 128rpx; */
}
.plaSty {
... ... @@ -24,8 +29,12 @@ page {
.itemInput input {
font-size: 32rpx;
color: #333333;
flex: 1;
/* flex: 1; */
text-align: right;
}
.color333 {
color: #333;
}
.center {
align-items: center !important;
... ...
... ... @@ -2,77 +2,154 @@ const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
/**
* 页面的初始数据
*/
data: {
list: []
},
},
//新增地址
getAddress() {
wx.navigateTo({
url: '/pages/myaddcompile/myaddcompile',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
//列表
getList() {
// return
let that = this;
let url = '/index/second/addressList';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, '', head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
// 删除
bindDelete(e) {
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
var that = this
var id = e.currentTarget.dataset.id;
},
let url = '/index/second/deleteAddress';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
address_id: id
}
// console.log(params)
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
wx.showModal({
title: '提示',
content: '确定删除该地址吗?',
success(res) {
if (res.confirm) {
app.post(url, params, head).then((res) => {
wx.showToast({
title: '删除成功',
})
setTimeout(function () {
that.onShow()
}, 1200)
console.log('ss')
},
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
})
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
// 编辑
bindCompile(e) {
var id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/myaddcompile/myaddcompile?id=' + id,
})
},
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
//新增地址
getAddress() {
wx.navigateTo({
url: '/pages/myaddcompile/myaddcompile',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.getList();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
<view class="itemAddress displayB" >
<view class="itemAddress displayB" wx:for="{{list}}" >
<view class="add_left" >
<view class="add_user display">
<!-- <view class="user_name">{{item.name}}</view>
<view class="user_phone">{{item.phone}}</view>
<view class="is_default" wx:if="{{item.delFlag==1}}">默认</view> -->
<view class="user_name">王先生</view>
<view class="user_phone">19609549855</view>
<view class="is_default" >默认</view>
<view class="user_name">{{item.name}}</view>
<view class="user_phone">{{item.tel}}</view>
<view class="is_default" wx:if="{{item.is_default==1}}">默认</view>
</view>
<view class="add_msg">天津市</view>
<view class="add_msg">{{item.province}}{{item.city}}{{item.district}}{{item.address}}</view>
</view>
<view class="add_right">
<view class="item_choose display2" bindtap="bindCompile" data-id="{{item.id}}">
... ... @@ -21,8 +21,6 @@
</view>
</view>
</view>
<view class="addAddress" bindtap="getAddress">
新增收货地址
</view>
\ No newline at end of file
... ...
... ... @@ -64,25 +64,6 @@ page {
margin-right: 8rpx;
}
.newAddress {
width: 100%;
height: 100rpx;
line-height: 100rpx;
text-align: center;
background: linear-gradient(132deg, #1dcaf7 4%, #2e8fcb 98%);
box-shadow: 0 4rpx 8rpx 0 rgba(0, 0, 0, 0.5);
position: fixed;
bottom: 0;
left: 0;
opacity: 0.85;
font-size: 32rpx;
font-weight: 600;
color: #ffffff;
z-index: 111;
}
.addAddress {
height: 88rpx;
line-height: 88rpx;
... ... @@ -90,8 +71,8 @@ page {
color: #ffffff;
text-align: center;
background-color: #21AE59;
position: absolute;
position: fixed;
bottom: 0;
left: 0;
right: 0;
bottom: 0;
}
\ No newline at end of file
... ...
const app = getApp();
Page({
... ... @@ -7,13 +6,15 @@ Page({
* 页面的初始数据
*/
data: {
datalist: ''
datalist: '',
lists: '',
pages: 0
},
// 个人信息
getdatalist() {
let that = this;
let url = 'index/member_center/index';
let url = '/index/second/feedback';
let head = {
'XX-Token': wx.getStorageSync('token')
}
... ... @@ -26,28 +27,52 @@ Page({
})
},
// 商品列表
getdatalists() {
let that = this;
let url = '/index/second/goodsList ';
let head = {
'XX-Token': wx.getStorageSync('token')
}
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let params = {
page: that.data.pages
}
app.post(url, params, head).then((res) => {
console.log(res)
that.setData({
lists: res
})
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
// 商品详情
getbindshop(e) {
var id =e.currentTarget.dataset.id
// console.log(id)
wx.navigateTo({
url: '/pages/myfeedback/myfeedback_active/myfeedback_active?id='+id,
})
},
onLoad: function (options) {
},
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.getdatalist();
that.getdatalists()
},
... ...
{
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "志愿回馈"
}
\ No newline at end of file
... ...
... ... @@ -3,28 +3,28 @@
<view class='my_headitem'>
<view class="my_headitemtop">
<view class='my_headitemimg'>
<image src="{{datalist.avatar?datalist.avatar:'/imgs/icon_59.png'}}"></image>
<image src="{{datalist.user.avatar?datalist.user.avatar:'/imgs/icon_59.png'}}"></image>
</view>
<view class="my_headitemname">
<view class='word'>{{datalist.user_nickname}}</view>
<view class="word1">志愿者(待学习)<image src="/imgs/more_gray.png"></image>
<view class='word'>{{datalist.user.name}}</view>
<view class="word1">{{datalist.user.status}}(待学习)<image src="/imgs/more_gray.png"></image>
</view>
<!-- <view class='word'>工时: {{datalist.work_time}}h</view> -->
<view class='star_box'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill'
wx:if='{{datalist.level>0}}'>
wx:if='{{datalist.user.level>0}}'>
</image>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill'
wx:if='{{datalist.level>1}}'>
wx:if='{{datalist.user.level>1}}'>
</image>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill'
wx:if='{{datalist.level>2}}'>
wx:if='{{datalist.user.level>2}}'>
</image>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill'
wx:if='{{datalist.level>3}}'>
wx:if='{{datalist.user.level>3}}'>
</image>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill'
wx:if='{{datalist.level>4}}'>
wx:if='{{datalist.user.level>4}}'>
</image>
</view>
</view>
... ... @@ -32,15 +32,15 @@
</view>
<view class="my_activebox">
<view class="my_active">
<view>396</view>
<view>{{datalist.user.level_time}}</view>
<view>可用工时</view>
</view>
<view class="my_active">
<view>1000</view>
<view>{{datalist.user.work_time}}</view>
<view>累计总共工时</view>
</view>
<view class="my_active">
<view>176</view>
<view>{{datalist.user.use_time}}</view>
<view>已兑换工时</view>
</view>
</view>
... ... @@ -49,17 +49,17 @@
</view>
</view>
<!-- 礼品 -->
<view class="gift">
<image src="/imgs/shop.png"></image>
<view class="gift" wx:for="{{lists.data}}" data-id="{{item.id}}" bindtap="getbindshop">
<image src="{{item.pic}}"></image>
<view class="gift_message">
<view class="gift_introduce">原装正品Apple AirPods Pro 主动降噪无线蓝兑换志愿回馈礼品不影响总工时,即不影响志愿者排名及星级</view>
<view class="gift_introduce">{{item.good_name}}</view>
<view class="gift_time">
<view>已被兑换:2000</view>
<view>库存:500</view>
<view>已被兑换:{{item.seal_num}}</view>
<view>库存:{{item.num}}</view>
</view>
<view class="gift_time">
<view class="gift_exchange">工时兑换</view>
<view class="gift_exchange_time"><p>20</p>小时</view>
<view class="gift_exchange_time"><p>{{item.work_time}}</p>小时</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
const app = getApp()
Page({
data: {
id: '',
list: ''
},
//
onLoad: function (options) {
// console.log(options)
this.setData({
id: options.id
})
},
onReady: function () {
},
onShow: function () {
let that = this;
that.getdatalist();
},
// 详情内容
getdatalist() {
let that = this;
let url = '/index/second/goodInfo';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params = {
id: that.data.id
}
app.post(url, params, head).then((res) => {
console.log(res)
that.setData({
list: res
})
}).catch((err) => {
})
},
// 积分兑换
getbindbuy(e) {
console.log(e)
var id =e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/myfeedback/myfeedback_duihuan/myfeedback_duihuan?id='+id,
})
},
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "商品详情"
}
\ No newline at end of file
... ...
<!-- 轮播图 -->
<swiper indicator-dots="true" indicator-color='#8C9194' indicator-active-color='#ffffff' class="slide-image">
<swiper-item>
<image src="/imgs/矩形备份.png" mode="widthFix" />
</swiper-item>
</swiper>
<!-- 工时商品名称 -->
<view class="goods_wrap">
<view class="goods_time">需要工时<p>{{list.work_time}}</p>小时</view>
<view class="goods_name">{{list.good_name}} </view>
</view>
<!-- 兑换数量 -->
<view class="goods_wrap">
<view class="displayB margin">
<view>已兑换数量</view>
<view>{{list.seal_num}}</view>
</view>
<view class="displayB">
<view>库存</view>
<view>{{list.num}}</view>
</view>
</view>
<view class="goods_introduce">
<view class="goods_line"></view>
<view bindtap="getadd">产品详情</view>
<view class="goods_line"></view>
</view>
<view class="goods_text">
<rich-text nodes="{{}}">富文本</rich-text>
</view>
<!-- 兑换 -->
<view class="shengqin">
<button bindtap="getbindbuy" data-id="{{id}}">积分兑换</button>
</view>
\ No newline at end of file
... ...
page {
background-color: rgb(240, 240, 240);
}
/* 轮播图 */
swiper {
height: 750rpx;
}
swiper image {
width: 100%;
}
/* */
.goods_wrap{
margin-top: 24rpx;
background-color: #ffffff;
padding: 24rpx 32rpx;
}
.goods_time {
height: 66rpx;
color: #21AE58;
font-size: 28rpx;
}
.goods_name {
line-height: 50rpx;
font-size: 36rpx;
font-weight: 500;
}
.goods_wrap p{
font-size: 44rpx;
}
.margin{
margin-bottom: 48rpx;
}
/* */
.goods_introduce {
height: 88rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28rpx;
color: #969799;
}
.goods_introduce :nth-child(2) {
margin: 0 32rpx;
}
.goods_line {
width: 100rpx;
height: 2rpx;
background-color: #969799;
}
.goods_text{
margin-bottom: 150rpx;
}
/*兑换 */
.shengqin {
height: 120rpx;
background-color: #ffffff;
font-size: 32rpx;
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
}
.shengqin button {
width: 622rpx;
color: #ffffff;
border-radius: 22px;
background: linear-gradient(130deg, #2ed26e 13%, #05983e 98%);
box-shadow: 0px 9px 19px 0px rgba(0, 116, 45, 0.42);
}
\ No newline at end of file
... ...
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
datalist:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
id: options.id
})
},
onReady: function () {
},
onShow: function () {
let that = this;
that.getaddress();
},
getchooseaddress() {
wx.navigateTo({
url: '/pages/myaddress/myaddress',
})
},
// 地址
getaddress() {
let that = this;
let url = '/index/second/getDefaultAddress';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, {}, head).then((res) => {
console.log(res)
that.setData({
datalist: res
})
}).catch((err) => {
})
},
// 兑换
getdatalist() {
let that = this;
let url = '/index/second/commitOrder';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, {}, head).then((res) => {
console.log(res)
// that.setData({
// datalist: res
// })
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "确定兑换信息"
}
\ No newline at end of file
... ...
<!-- 地址 -->
<view class="goods_address" wx:if="{{id==!''}}" bindtap="getchooseaddress">
<image class="goods_tubiao" src="/imgs/dizhigreen.png"></image>
<view>
<view>姓名:{{datalist.name}} {{datalist.tel}}</view>
<view class="goods_add">地址:{{datalist.province}}{{datalist.city}}{{datalist.district}}{{datalist.address}}</view>
</view>
<image class="goods_tubiao1" src="/imgs/right.png"></image>
</view>
<view class="goods_address" wx:else bindtap="getchooseaddress">
<image class="goods_tubiao" src="/imgs/dizhigreen.png"></image>
<view>
<view>请添加收货地址</view>
<view class="goods_add"></view>
</view>
<image class="goods_tubiao1" src="/imgs/right.png"></image>
</view>
<!-- -->
<!-- 订单信息 -->
<view class="goods_shop">
<view>订单信息</view>
<view class="gift">
<image src="/imgs/shop.png"></image>
<view class="gift_message">
<view class="gift_introduce">原装正品Apple AirPods Pro 主动降噪无线蓝机…</view>
<view class="gift_time"> 已选:A款</view>
<view class="gift_exchange_time">
<p>50</p>小时
</view>
</view>
</view>
<view class="shopcarts_car_rightc">
<view class="shopcarts_car_price">购买数量</view>
<view class="shopcarts_car_tool">
<view class="num_edit" catchtap="bindNum" data-type="minus" data-index="{{index}}" data-id="{{item.id}}">-
</view>
<view class="goods_num">1</view>
<view class="num_edit" catchtap="bindNum" data-type="add" data-id="{{item.id}}" data-index="{{index}}">+
</view>
</view>
</view>
<view>订单备注:</view>
<textarea></textarea>
<view class="goods_allnum">
<view>共1件 <p>小计:
<p style="color:#079A40;">50</p>
</p>
</view>
</view>
</view>
<view class="goods_exchange">
<view>共1件 <p>合计:
<p style="color:#079A40;">50小时</p>
</p>
</view>
<button bindtap="getdatalist">提交兑换申请</button>
</view>
\ No newline at end of file
... ...
page {
background-color: #F7F8FA;
}
.goods_address {
margin: 24rpx 34rpx;
padding: 32rpx 24rpx;
height: 196rpx;
box-sizing: border-box;
background-color: #ffffff;
border-radius: 24px;
display: flex;
align-items: center;
}
.goods_tubiao {
width: 64rpx;
height: 64rpx;
margin-right: 24rpx;
}
.goods_tubiao1 {
width: 20rpx;
height: 36rpx;
}
.goods_add {
width: 502rpx;
}
/* */
.goods_shop {
margin: 24rpx 34rpx;
padding: 24rpx;
margin-bottom: 296rpx;
background-color: #ffffff;
border-radius: 7px;
}
.gift {
margin-top: 30rpx;
display: flex;
justify-content: space-between;
}
.gift image {
width: 240rpx;
height: 240rpx;
}
.gift_message {
padding: 18rpx 0;
width: 374rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.gift_introduce {
font-size: 28rpx;
color: #323232;
/* overflow: hidden;
text-overflow: ellipsis; */
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.gift_time {
font-size: 28rpx;
color: #969799;
}
.gift_exchange_time {
color: #21AE58;
}
.gift_exchange_time p {
font-size: 44rpx;
}
/* */
.shopcarts_car_rightc {
display: flex;
justify-content: space-between;
margin-top: 32rpx;
margin-bottom: 48rpx;
}
.shopcarts_car_tool {
display: flex;
}
.goods_num {
margin-left: 32rpx;
margin-right: 32rpx;
}
.num_edit {
width: 42rpx;
height: 42rpx;
line-height: 40rpx;
text-align: center;
border: 1px solid #94999A;
border-radius: 50%;
}
/* */
textarea {
margin-top: 16rpx;
background-color: #f7f8fa;
width: auto;
}
.goods_allnum {
box-sizing: border-box;
padding:25rpx 50rpx ;
font-size: 24rpx;
border-top: 1px solid #eeeeee;
height: 80rpx;
text-align: right;
}
.goods_allnum p{
font-size: 32rpx;
}
.goods_exchange{
box-sizing: border-box;
padding:25rpx 50rpx ;
height: 120rpx;
background-color: #ffffff;
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
}
.goods_exchange button{
width: 272rpx;
height:74rpx;
line-height: 72rpx;
background: linear-gradient(130deg,#2ed26e 13%, #05983e 98%);
border-radius: 8px;
color: #ffffff;
font-size: 28rpx;
}
\ No newline at end of file
... ...
// pages/myteam/myteam.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
list: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.getactive();
},
getactive() {
let that = this;
let url = '/index/second/myTeam';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let city = '北京'
app.post(url, city, head).then((res) => {
console.log(res)
// if (res.code == !20000) {
// that.setData({
// list: res
// })
// }else{
// wx.showToast({
// title: msg,
// icon:'none'
// })
// }
})
},
/**
* 生命周期函数--监听页面隐藏
*/
... ...
{
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "我的团队"
}
\ No newline at end of file
... ...
{
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "我的培训"
}
\ No newline at end of file
... ...
... ... @@ -12,15 +12,15 @@
</view>
<!-- <view class='word'>工时: {{datalist.work_time}}h</view> -->
<view class='star_box'>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>0}}'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>0}}'>
</image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>1}}'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>1}}'>
</image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>2}}'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>2}}'>
</image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>3}}'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>3}}'>
</image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>4}}'>
<image src="/imgs/xingxing_weixuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{datalist.level>4}}'>
</image>
</view>
</view>
... ...
... ... @@ -65,7 +65,9 @@ Page({
}
for (let obj of imgarr) {
wx.uploadFile({
url: "https://volunteer.cnpu.org/api/user/upload/one", //上传图片接口
// url: "https://volunteer.cnpu.org/api/user/upload/one", //上传图片接口
url: "http://volunteer.w.bronet.cn/api/user/upload/one",
filePath: obj,
name: 'file',
header: header,
... ...
... ... @@ -22,7 +22,7 @@
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
... ... @@ -97,8 +97,8 @@
"scene": null
},
{
"id": -1,
"name": "pages/getStudycontent/getStudycontent",
"id": 4,
"name": "学习内容",
"pathName": "pages/getStudycontent/getStudycontent",
"query": "",
"scene": null
... ... @@ -118,8 +118,8 @@
"scene": null
},
{
"id": -1,
"name": "pages/myfeedback/myfeedback",
"id": 7,
"name": "志愿回馈",
"pathName": "pages/myfeedback/myfeedback",
"query": "",
"scene": null
... ... @@ -132,8 +132,8 @@
"scene": null
},
{
"id": -1,
"name": "pages/Volunteer_dynamic/Volunteer_dynamic",
"id": 9,
"name": "志愿动态",
"pathName": "pages/Volunteer_dynamic/Volunteer_dynamic",
"query": "",
"scene": null
... ... @@ -149,6 +149,84 @@
"id": -1,
"name": "pages/mycertificate/mycertificate",
"pathName": "pages/mycertificate/mycertificate",
"query": "",
"scene": null
},
{
"id": 12,
"name": "申请加入",
"pathName": "pages/Volunteer_group/active/active",
"query": "",
"scene": null
},
{
"id": -1,
"name": "志愿团队",
"pathName": "pages/Volunteer_group/Volunteer_group",
"query": "",
"scene": null
},
{
"id": -1,
"name": "我的地址列表",
"pathName": "pages/myaddress/myaddress",
"query": "",
"scene": null
},
{
"id": -1,
"name": "我的收货地址",
"pathName": "pages/myaddcompile/myaddcompile",
"query": "",
"scene": null
},
{
"id": -1,
"name": "我的团队",
"pathName": "pages/myteam/myteam",
"query": "",
"scene": null
},
{
"id": 18,
"name": "商品详情",
"pathName": "pages/myfeedback/myfeedback_active/myfeedback_active",
"query": "",
"scene": null
},
{
"id": -1,
"name": "积分兑换",
"pathName": "pages/myfeedback/myfeedback_duihuan/myfeedback_duihuan",
"query": "",
"scene": null
},
{
"id": -1,
"name": "光荣排行",
"pathName": "pages/guangrongpaihang/guangrongpaihang",
"query": "",
"scene": null
},
{
"id": -1,
"name": "我的活动",
"pathName": "pages/myactivity/myactivity",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/myactivity/myactivity_active/myactivity_active",
"pathName": "pages/myactivity/myactivity_active/myactivity_active",
"query": "",
"scene": null
},
{
"id": -1,
"name": "答题详情",
"pathName": "pages/getStudycontent/answer/answer",
"query": "",
"scene": null
}
]
... ...