mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 18:59:36 +08:00
部分页面变更
小程序部分页面文字调整 调整会议预约普通人员选择时间范围(2周) 加入绑定手机号功能,用于接收提醒
This commit is contained in:
parent
22ecf2636f
commit
1bc047c91e
@ -90,7 +90,8 @@
|
||||
"pages/reportRepair/assign/evaluate/evaluate",
|
||||
"pages/reportRepair/repair/index/index",
|
||||
"pages/reportRepair/repair/case/case",
|
||||
"pages/my/info/info"
|
||||
"pages/my/info/info",
|
||||
"pages/my/bindWei/bindWei"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
|
@ -1,7 +1,7 @@
|
||||
const app = getApp()
|
||||
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import Dialog from '@vant/weapp/dialog/dialog'
|
||||
import {
|
||||
callScanUrl
|
||||
} from "../../api/common/scan.js"
|
||||
@ -209,14 +209,29 @@ Page({
|
||||
_this.setData({
|
||||
userDetail
|
||||
})
|
||||
if (!userDetail.gzhOpenid) {
|
||||
// 未绑定公众号
|
||||
Dialog.confirm({
|
||||
title: '提醒',
|
||||
message: '您当前未绑定手机号,为更好提供服务,请绑定号码接收提醒!',
|
||||
})
|
||||
.then(() => {
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/bindWei/bindWei',
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
})
|
||||
}
|
||||
// 查询轮播图
|
||||
getParkRq(userDetail.parkId).then(res => {
|
||||
console.log('getParkRq', res);
|
||||
let bannerList = res.bannerImages.map(item => item.url)
|
||||
_this.setData({
|
||||
bannerList
|
||||
})
|
||||
})
|
||||
// getParkRq(userDetail.parkId).then(res => {
|
||||
// console.log('getParkRq', res);
|
||||
// let bannerList = res.bannerImages.map(item => item.url)
|
||||
// _this.setData({
|
||||
// bannerList
|
||||
// })
|
||||
// })
|
||||
// 查询消息列表
|
||||
repairRemindLatestListRq().then(res => {
|
||||
console.log('repairRemindLatestListRq', res);
|
||||
|
@ -4,6 +4,7 @@
|
||||
"usingComponents": {
|
||||
"van-notify": "@vant/weapp/notify/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
}
|
||||
}
|
@ -57,3 +57,4 @@
|
||||
|
||||
<!-- 消息提示 -->
|
||||
<van-notify id="van-notify" />
|
||||
<van-dialog id="van-dialog" />
|
@ -99,7 +99,7 @@
|
||||
|
||||
.logo {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
z-index: 10;
|
||||
left: 50%;
|
||||
top: 420rpx;
|
||||
transform: translateX(-50%);
|
||||
|
@ -84,13 +84,13 @@ Page({
|
||||
onLoad(options) {
|
||||
let _this = this
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
// 获取一月后时间,默认只能选一个月之后,管理员可以选一年后的
|
||||
// 获取两周后时间,默认只能选两周之后,管理员可以选一年后的
|
||||
const today = new Date()
|
||||
const newDate = new Date(today)
|
||||
if (userDetail.roomRole == 5) {
|
||||
newDate.setFullYear(newDate.getFullYear() + 1)
|
||||
} else {
|
||||
newDate.setMonth(newDate.getMonth() + 1)
|
||||
newDate.setDate(newDate.getDate() + 14)
|
||||
}
|
||||
_this.setData({
|
||||
userDetail,
|
||||
|
@ -19,6 +19,7 @@ Page({
|
||||
dep: '',
|
||||
date: '',
|
||||
dateStr: '',
|
||||
adminTel: '83605343',
|
||||
queryParam: {
|
||||
timeRangeDict: {
|
||||
list: [{
|
||||
@ -45,26 +46,17 @@ Page({
|
||||
text: '人数',
|
||||
value: ''
|
||||
}, {
|
||||
text: '1-10',
|
||||
text: '1-20',
|
||||
value: 1
|
||||
}, {
|
||||
text: '11-20',
|
||||
text: '21-50',
|
||||
value: 2
|
||||
}, {
|
||||
text: '21-30',
|
||||
text: '51-100',
|
||||
value: 3
|
||||
}, {
|
||||
text: '31-40',
|
||||
value: 4
|
||||
}, {
|
||||
text: '41-50',
|
||||
value: 5
|
||||
}, {
|
||||
text: '51-100',
|
||||
value: 6
|
||||
}, {
|
||||
text: '100 以上',
|
||||
value: 7
|
||||
value: 4
|
||||
}],
|
||||
value: '',
|
||||
},
|
||||
@ -261,23 +253,27 @@ Page({
|
||||
let minPerNum = 0
|
||||
let maxPerNum = 1000
|
||||
let perNumValue = queryParam.personDict.value
|
||||
if (perNumValue == 6) {
|
||||
|
||||
if (perNumValue == 1) {
|
||||
// 1-20
|
||||
maxPerNum = 20
|
||||
minPerNum = 1
|
||||
} else if (perNumValue == 2) {
|
||||
// 21-50
|
||||
minPerNum = 21
|
||||
maxPerNum = 50
|
||||
} else if (perNumValue == 3) {
|
||||
// 51-100
|
||||
maxPerNum = 100
|
||||
minPerNum = 51
|
||||
} else if (perNumValue == 7) {
|
||||
// 100以上
|
||||
maxPerNum = 100
|
||||
} else if (perNumValue == 4) {
|
||||
// 51-100
|
||||
minPerNum = 101
|
||||
maxPerNum = 1000
|
||||
} else if (perNumValue == '') {
|
||||
} else {
|
||||
// 全部
|
||||
minPerNum = 1
|
||||
maxPerNum = 1000
|
||||
} else {
|
||||
// 其余,符合规则即可
|
||||
// perNumValue * 10 - 9 ~ perNumValue * 10
|
||||
maxPerNum = parseInt(perNumValue) * 10
|
||||
minPerNum = maxPerNum - 9
|
||||
}
|
||||
let param = {
|
||||
floor: queryParam.meetingTypeDict.value, // 楼层
|
||||
@ -320,7 +316,12 @@ Page({
|
||||
url: "/pages/meeting/meetingRoom/meetingRoom?status=" + e.currentTarget.dataset.status + "&id=" + e.currentTarget.dataset.id + '&time=' + this.data.date + '&timeRange=' + timeRange + '&rId=' + this.data.rId + '&dep=' + this.data.dep + '&depId=' + this.data.depId
|
||||
})
|
||||
},
|
||||
|
||||
callAdmin() {
|
||||
let num = this.data.adminTel
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: num
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
<!-- 筛选条件 -->
|
||||
<view class="queryView">
|
||||
<van-dropdown-menu active-color="#4e96f8">
|
||||
<!-- 时间范围 -->
|
||||
<!-- 时间范围 -->
|
||||
<van-dropdown-item wx:if="{{ userDetail.roomRole != 5 }}" value="{{ queryParam.timeRangeDict.value }}" options="{{ queryParam.timeRangeDict.list }}" bind:change="dictChange" data-type="timeRangeDict" />
|
||||
<!-- 字典-会议室 -->
|
||||
<van-dropdown-item value="{{ queryParam.meetingTypeDict.value }}" options="{{ queryParam.meetingTypeDict.list }}" bind:change="dictChange" data-type="meetingTypeDict" />
|
||||
@ -14,9 +14,9 @@
|
||||
<van-cell title="{{ item.text }}" wx:for="{{queryParam.itemDict.list}}" wx:key="*this">
|
||||
<van-switch slot="right-icon" size="24px" style="height: 26px" checked="{{ item.select }}" active-color="#3c8bf2" bind:change="dictSwitchChange" data-name="{{item.text}}" data-id="{{item.value}}" />
|
||||
</van-cell>
|
||||
<view style="padding:30rpx;">
|
||||
<!-- <view style="padding:30rpx;">
|
||||
<van-button type="danger" block round bind:click="itemDictConfirm" color="#3c8bf2">收起</van-button>
|
||||
</view>
|
||||
</view> -->
|
||||
</van-dropdown-item>
|
||||
<!-- 字典-形式 -->
|
||||
<van-dropdown-item value="{{ queryParam.shapeDict.value }}" options="{{ queryParam.shapeDict.list }}" bind:change="dictChange" data-type="shapeDict" />
|
||||
@ -30,7 +30,7 @@
|
||||
<view class="title">{{room.roomNum}}</view>
|
||||
<view class="priceView">
|
||||
<view class="unit">
|
||||
{{room.capacityNum}}人 {{room.typeName}}
|
||||
{{room.capacityNum}}人 {{room.typeName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -38,7 +38,7 @@
|
||||
<view class="title">{{room.roomNum}}</view>
|
||||
<view class="priceView">
|
||||
<view class="unit">
|
||||
不可预约
|
||||
不可预约
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -49,6 +49,14 @@
|
||||
</view>
|
||||
<view style="clear: both;"></view>
|
||||
</view>
|
||||
<view style="text-align: center;color: grey; margin-top: 30px;line-height: 20px;">
|
||||
<view>
|
||||
请在08:30~17:30内进行预约会议
|
||||
</view>
|
||||
<view bind:tap="callAdmin">
|
||||
有问题请联系工作人员:陆成俊 {{ adminTel }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-notify id="van-notify" />
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<!-- 支付展示 -->
|
||||
<view class="showView">
|
||||
<van-icon name="checked" size="200rpx" color="#4e96f8"/>
|
||||
<view class="title">预约成功</view>
|
||||
<view class="title">预约提交成功</view>
|
||||
</view>
|
||||
|
||||
<!-- 查看预约 -->
|
||||
|
@ -155,8 +155,9 @@ Page({
|
||||
})
|
||||
}
|
||||
let _this = this;
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
_this.setData({
|
||||
userData: wx.getStorageSync('user'),
|
||||
userData: userDetail
|
||||
})
|
||||
// 获取数据
|
||||
let userId = _this.data.userData.id
|
||||
@ -166,10 +167,14 @@ Page({
|
||||
pageNum: _this.data.reservationPageNum,
|
||||
pageSize: _this.data.reservationPageSize,
|
||||
})
|
||||
// 获取一月后时间,默认只能选一个月之后
|
||||
// 获取两周后时间,默认只能选两周之后,管理员可以选一年后的
|
||||
const today = new Date()
|
||||
const newDate = new Date(today)
|
||||
newDate.setMonth(newDate.getMonth() + 1)
|
||||
if (userDetail.roomRole == 5) {
|
||||
newDate.setFullYear(newDate.getFullYear() + 1)
|
||||
} else {
|
||||
newDate.setDate(newDate.getDate() + 14)
|
||||
}
|
||||
_this.setData({
|
||||
maxDate: newDate.getTime()
|
||||
})
|
||||
|
@ -145,8 +145,9 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
_this.setData({
|
||||
userData: wx.getStorageSync('user'),
|
||||
userData: userDetail,
|
||||
})
|
||||
// 获取数据
|
||||
let userId = _this.data.userData.id
|
||||
@ -156,13 +157,18 @@ Page({
|
||||
pageNum: _this.data.reservationPageNum,
|
||||
pageSize: _this.data.reservationPageSize,
|
||||
})
|
||||
// 获取一月后时间,默认只能选一个月之后
|
||||
// 获取两周后时间,默认只能选两周之后,管理员可以选一年后的
|
||||
const today = new Date()
|
||||
const newDate = new Date(today)
|
||||
newDate.setMonth(newDate.getMonth() + 1)
|
||||
if (userDetail.roomRole == 5) {
|
||||
newDate.setFullYear(newDate.getFullYear() + 1)
|
||||
} else {
|
||||
newDate.setDate(newDate.getDate() + 14)
|
||||
}
|
||||
_this.setData({
|
||||
maxDate: newDate.getTime()
|
||||
})
|
||||
|
||||
// 获取参与数据
|
||||
// _this.getParticipateData({
|
||||
// userId,
|
||||
@ -237,7 +243,7 @@ Page({
|
||||
pageSize,
|
||||
// userId,
|
||||
// parkId: 25,
|
||||
name: _this.data.search.title.value, // 会议室名称
|
||||
title: _this.data.search.title.value, // 会议名称
|
||||
status: _this.data.search.status.value // 预约状态
|
||||
}).then(res => {
|
||||
console.log('selectReservationListByUserIdRq', res);
|
||||
|
67
miniprogram/pages/my/bindWei/bindWei.js
Normal file
67
miniprogram/pages/my/bindWei/bindWei.js
Normal file
@ -0,0 +1,67 @@
|
||||
const app = getApp()
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
3
miniprogram/pages/my/bindWei/bindWei.json
Normal file
3
miniprogram/pages/my/bindWei/bindWei.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "绑定手机号"
|
||||
}
|
1
miniprogram/pages/my/bindWei/bindWei.wxml
Normal file
1
miniprogram/pages/my/bindWei/bindWei.wxml
Normal file
@ -0,0 +1 @@
|
||||
<web-view src="https://baoxiu.jsgdha.com/shoot-hand/wxbind/index"></web-view>
|
0
miniprogram/pages/my/bindWei/bindWei.wxss
Normal file
0
miniprogram/pages/my/bindWei/bindWei.wxss
Normal file
@ -3,247 +3,272 @@ let app = getApp()
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
userProfile,
|
||||
getUserInfoRq
|
||||
userProfile,
|
||||
getUserInfoRq
|
||||
} from "../../api/user/user.js"
|
||||
|
||||
import {
|
||||
callScanUrl
|
||||
callScanUrl
|
||||
} from "../../api/common/scan.js"
|
||||
|
||||
import {
|
||||
getUrlParamsObj
|
||||
getUrlParamsObj
|
||||
} from "../../utils/util.js"
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
DOMAIN_NAME: app.IMG_NAME,
|
||||
userDetail: {},
|
||||
parkName: app.parkName,
|
||||
customerName: '',
|
||||
// tabBar param
|
||||
tabBarParam: {
|
||||
selected: 2,
|
||||
color: "#515151",
|
||||
selectedColor: "#217CFF",
|
||||
backgroundColor: "#ffffff",
|
||||
},
|
||||
// tabBar menu
|
||||
tabBarList: [{
|
||||
"pagePath": "/pages/index/index",
|
||||
"iconPath": "/images/tabbar/home.png",
|
||||
"selectedIconPath": "/images/tabbar/home-select.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/reportRepair/report/report",
|
||||
"iconPath": "/images/tabbar/center.png",
|
||||
"selectedIconPath": "/images/tabbar/center.png",
|
||||
"text": "报修",
|
||||
"bulge": true,
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/my/my",
|
||||
"iconPath": "/images/tabbar/my.png",
|
||||
"selectedIconPath": "/images/tabbar/my-select.png",
|
||||
"text": "我的"
|
||||
},
|
||||
],
|
||||
customerPages: [{
|
||||
name: "预约记录",
|
||||
url: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord",
|
||||
},
|
||||
// {
|
||||
// name: "我的活动",
|
||||
// url: "/pages/myActivities/myActivities",
|
||||
// },
|
||||
// {
|
||||
// name: "我的入驻",
|
||||
// url: "/pages/my/serviceApply/serviceApply"
|
||||
// },
|
||||
// {
|
||||
// name: "我的建议",
|
||||
// url: "/pages/complaint/complaint",
|
||||
// },
|
||||
// {
|
||||
// name: "账号设置",
|
||||
// url: "/pages/my/accountSetting/accountSetting",
|
||||
// },
|
||||
// {
|
||||
// name: "我的服务",
|
||||
// url: "/pages/enterpriseServices/myServiceList/myServiceList"
|
||||
// },
|
||||
// {
|
||||
// name: "我的报修",
|
||||
// url: "/pages/parkRepair/parkRepair",
|
||||
// }
|
||||
],
|
||||
qrcodeParam: null,
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
DOMAIN_NAME: app.IMG_NAME,
|
||||
userDetail: {},
|
||||
parkName: app.parkName,
|
||||
customerName: '',
|
||||
// tabBar param
|
||||
tabBarParam: {
|
||||
selected: 2,
|
||||
color: "#515151",
|
||||
selectedColor: "#217CFF",
|
||||
backgroundColor: "#ffffff",
|
||||
},
|
||||
// tabBar menu
|
||||
tabBarList: [{
|
||||
"pagePath": "/pages/index/index",
|
||||
"iconPath": "/images/tabbar/home.png",
|
||||
"selectedIconPath": "/images/tabbar/home-select.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/reportRepair/report/report",
|
||||
"iconPath": "/images/tabbar/center.png",
|
||||
"selectedIconPath": "/images/tabbar/center.png",
|
||||
"text": "报修",
|
||||
"bulge": true,
|
||||
},
|
||||
{
|
||||
"pagePath": "/pages/my/my",
|
||||
"iconPath": "/images/tabbar/my.png",
|
||||
"selectedIconPath": "/images/tabbar/my-select.png",
|
||||
"text": "我的"
|
||||
},
|
||||
],
|
||||
customerPages: [{
|
||||
name: "预约记录",
|
||||
url: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord",
|
||||
},
|
||||
// {
|
||||
// name: "我的活动",
|
||||
// url: "/pages/myActivities/myActivities",
|
||||
// },
|
||||
// {
|
||||
// name: "我的入驻",
|
||||
// url: "/pages/my/serviceApply/serviceApply"
|
||||
// },
|
||||
// {
|
||||
// name: "我的建议",
|
||||
// url: "/pages/complaint/complaint",
|
||||
// },
|
||||
// {
|
||||
// name: "账号设置",
|
||||
// url: "/pages/my/accountSetting/accountSetting",
|
||||
// },
|
||||
// {
|
||||
// name: "我的服务",
|
||||
// url: "/pages/enterpriseServices/myServiceList/myServiceList"
|
||||
// },
|
||||
// {
|
||||
// name: "我的报修",
|
||||
// url: "/pages/parkRepair/parkRepair",
|
||||
// }
|
||||
],
|
||||
qrcodeParam: null,
|
||||
},
|
||||
|
||||
// 切换tabbar
|
||||
switchTab(e) {
|
||||
const data = e.currentTarget.dataset
|
||||
console.log('switchTab', data)
|
||||
const url = data.path
|
||||
if (url == '/pages/reportRepair/report/report') {
|
||||
wx.navigateTo({
|
||||
url
|
||||
})
|
||||
} else {
|
||||
wx.switchTab({
|
||||
url
|
||||
})
|
||||
}
|
||||
},
|
||||
// 切换tabbar
|
||||
switchTab(e) {
|
||||
const data = e.currentTarget.dataset
|
||||
console.log('switchTab', data)
|
||||
const url = data.path
|
||||
if (url == '/pages/reportRepair/report/report') {
|
||||
wx.navigateTo({
|
||||
url
|
||||
})
|
||||
} else {
|
||||
wx.switchTab({
|
||||
url
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
onShow() {
|
||||
let _this = this
|
||||
let userId = wx.getStorageSync('userId');
|
||||
if (userId) {
|
||||
userProfile(userId).then(res => {
|
||||
console.log('userProfile', res);
|
||||
_this.setData({
|
||||
userDetail: res.data
|
||||
})
|
||||
})
|
||||
getUserInfoRq(userId).then(res => {
|
||||
console.log('getUserInfoRq', res);
|
||||
let userDetail = res.data;
|
||||
_this.setData({
|
||||
customerName: userDetail.customerName,
|
||||
// parkName: wx.getStorageSync('parkName')
|
||||
})
|
||||
})
|
||||
} else {
|
||||
app.getlogin()
|
||||
}
|
||||
},
|
||||
|
||||
navigateTo(e) {
|
||||
if (wx.getStorageSync('userId')) {
|
||||
let dataset = e.currentTarget.dataset;
|
||||
wx.navigateTo({
|
||||
url: dataset.url + "?name=" + dataset.name,
|
||||
})
|
||||
} else {
|
||||
app.getlogin()
|
||||
}
|
||||
},
|
||||
|
||||
navpersonalData() {
|
||||
if (wx.getStorageSync('userId')) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/personalData/personalData',
|
||||
})
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转-我的
|
||||
jumpMy() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/personalData/personalData',
|
||||
onShow() {
|
||||
let _this = this
|
||||
let userId = wx.getStorageSync('userId');
|
||||
if (userId) {
|
||||
userProfile(userId).then(res => {
|
||||
console.log('userProfile', res);
|
||||
_this.setData({
|
||||
userDetail: res.data
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转-报修查询
|
||||
jumpRepair(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/reportRepair/query/record/record',
|
||||
})
|
||||
getUserInfoRq(userId).then(res => {
|
||||
console.log('getUserInfoRq', res);
|
||||
let userDetail = res.data;
|
||||
_this.setData({
|
||||
customerName: userDetail.customerName,
|
||||
// parkName: wx.getStorageSync('parkName')
|
||||
})
|
||||
},
|
||||
})
|
||||
} else {
|
||||
app.getlogin()
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转-消息
|
||||
jumpInfo(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/info/info',
|
||||
})
|
||||
},
|
||||
navigateTo(e) {
|
||||
if (wx.getStorageSync('userId')) {
|
||||
let dataset = e.currentTarget.dataset;
|
||||
wx.navigateTo({
|
||||
url: dataset.url + "?name=" + dataset.name,
|
||||
})
|
||||
} else {
|
||||
app.getlogin()
|
||||
}
|
||||
},
|
||||
|
||||
// 扫一扫
|
||||
jumpScan() {
|
||||
let _this = this;
|
||||
wx.scanCode({
|
||||
scanType: 'qrCode',
|
||||
success(res) {
|
||||
console.log('success', res)
|
||||
let url = res.result;
|
||||
// 判断二维码是否符合规范
|
||||
if (url.indexOf(app.DOMAIN_NAME_PREFIX) != -1) {
|
||||
let urlParam = getUrlParamsObj(url);
|
||||
// 判断是否有设备参数
|
||||
if (!urlParam.noParam) {
|
||||
_this.setData({
|
||||
qrcodeParam: urlParam
|
||||
})
|
||||
// 扫码调用地址
|
||||
_this.scanCallUrl()
|
||||
} else {
|
||||
// 危险通知
|
||||
_this.showErrMsg('请预约会议!')
|
||||
}
|
||||
} else {
|
||||
// 危险通知
|
||||
_this.showErrMsg('二维码不正确!')
|
||||
}
|
||||
},
|
||||
fail(res) {
|
||||
console.log('fail', res)
|
||||
// 危险通知
|
||||
_this.showErrMsg('扫码失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
navpersonalData() {
|
||||
if (wx.getStorageSync('userId')) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/personalData/personalData',
|
||||
})
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/login',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 扫码调用地址
|
||||
scanCallUrl() {
|
||||
let _this = this;
|
||||
let qrcodeParam = _this.data.qrcodeParam;
|
||||
qrcodeParam.userId = wx.getStorageSync('userId')
|
||||
callScanUrl(qrcodeParam).then(res => {
|
||||
// 清空扫码数据
|
||||
// 跳转-我的
|
||||
jumpMy() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/personalData/personalData',
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转-报修查询
|
||||
jumpRepair() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/reportRepair/query/record/record',
|
||||
})
|
||||
},
|
||||
// 跳转-报修查询
|
||||
jumpMeeting() {
|
||||
let roomRole = this.data.userDetail.roomRole
|
||||
let url = '/pages/meeting/reservationRecord/meetingRecord/meetingRecord'
|
||||
if (roomRole == 1) {
|
||||
// 普通用户
|
||||
url = '/pages/meeting/reservationRecord/meetingRecord/meetingRecord'
|
||||
}
|
||||
if (roomRole == 3) {
|
||||
// 会务人员
|
||||
url = '/pages/meeting/reservationRecord/service/service'
|
||||
}
|
||||
if (roomRole == 5) {
|
||||
// 管理员
|
||||
url = '/pages/meeting/reservationRecord/approve/approve?act=show'
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: url,
|
||||
})
|
||||
},
|
||||
// 跳转手机号绑定
|
||||
jumpBind() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/bindWei/bindWei',
|
||||
})
|
||||
},
|
||||
// 跳转-消息
|
||||
jumpInfo() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/info/info',
|
||||
})
|
||||
},
|
||||
|
||||
// 扫一扫
|
||||
jumpScan() {
|
||||
let _this = this;
|
||||
wx.scanCode({
|
||||
scanType: 'qrCode',
|
||||
success(res) {
|
||||
console.log('success', res)
|
||||
let url = res.result;
|
||||
// 判断二维码是否符合规范
|
||||
if (url.indexOf(app.DOMAIN_NAME_PREFIX) != -1) {
|
||||
let urlParam = getUrlParamsObj(url);
|
||||
// 判断是否有设备参数
|
||||
if (!urlParam.noParam) {
|
||||
_this.setData({
|
||||
qrcodeParam: null
|
||||
qrcodeParam: urlParam
|
||||
})
|
||||
if (res.code == 0) {
|
||||
// 成功通知
|
||||
_this.showSuccessMsg(res.msg)
|
||||
} else {
|
||||
// 危险通知
|
||||
_this.showErrMsg(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 扫码调用地址
|
||||
_this.scanCallUrl()
|
||||
} else {
|
||||
// 危险通知
|
||||
_this.showErrMsg('请预约会议!')
|
||||
}
|
||||
} else {
|
||||
// 危险通知
|
||||
_this.showErrMsg('二维码不正确!')
|
||||
}
|
||||
},
|
||||
fail(res) {
|
||||
console.log('fail', res)
|
||||
// 危险通知
|
||||
_this.showErrMsg('扫码失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 成功通知
|
||||
showSuccessMsg(msg) {
|
||||
Notify({
|
||||
type: 'success',
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
// 扫码调用地址
|
||||
scanCallUrl() {
|
||||
let _this = this;
|
||||
let qrcodeParam = _this.data.qrcodeParam;
|
||||
qrcodeParam.userId = wx.getStorageSync('userId')
|
||||
callScanUrl(qrcodeParam).then(res => {
|
||||
// 清空扫码数据
|
||||
_this.setData({
|
||||
qrcodeParam: null
|
||||
})
|
||||
if (res.code == 0) {
|
||||
// 成功通知
|
||||
_this.showSuccessMsg(res.msg)
|
||||
} else {
|
||||
// 危险通知
|
||||
_this.showErrMsg(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 危险通知
|
||||
showErrMsg(msg) {
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
// 成功通知
|
||||
showSuccessMsg(msg) {
|
||||
Notify({
|
||||
type: 'success',
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
|
||||
// 危险通知
|
||||
showErrMsg(msg) {
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: msg
|
||||
});
|
||||
},
|
||||
|
||||
})
|
@ -3,7 +3,7 @@
|
||||
<!-- 个人 -->
|
||||
<view class="itemView" bindtap="navpersonalData">
|
||||
<view class="itemData">
|
||||
<image class="avatarImg" src="{{userDetail.avatar? DOMAIN_NAME + userDetail.avatar : DOMAIN_NAME + '/profile/static/user/headImg.png'}}" mode="aspectFill"></image>
|
||||
<!-- <image class="avatarImg" src="{{userDetail.avatar? DOMAIN_NAME + userDetail.avatar : DOMAIN_NAME + '/profile/static/user/headImg.png'}}" mode="aspectFill"></image> -->
|
||||
<view class="label">{{userDetail.username? userDetail.username:'微信用户'}}</view>
|
||||
<view class="propOpen"></view>
|
||||
<van-icon name="arrow" size="40rpx" color="gray" />
|
||||
@ -12,24 +12,36 @@
|
||||
|
||||
<!-- 菜单 -->
|
||||
<view class="itemView">
|
||||
<view class="itemData" bindtap='jumpMy'>
|
||||
<!-- <view class="itemData" bindtap='jumpMy'>
|
||||
<view class="label">性别</view>
|
||||
<view class="propOpen"></view>
|
||||
<view class="content">{{userDetail.gender == 0 ? '男' : '女'}}</view>
|
||||
<van-icon name="arrow" size="40rpx" color="gray" />
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="itemData" bindtap='jumpRepair'>
|
||||
<view class="label">我的报修</view>
|
||||
<view class="propOpen"></view>
|
||||
<view class="content"></view>
|
||||
<van-icon name="arrow" size="40rpx" color="gray" />
|
||||
</view>
|
||||
<view class="itemData" bindtap='jumpMeeting'>
|
||||
<view class="label">会议预约</view>
|
||||
<view class="propOpen"></view>
|
||||
<view class="content"></view>
|
||||
<van-icon name="arrow" size="40rpx" color="gray" />
|
||||
</view>
|
||||
<view class="itemData" bindtap='jumpInfo'>
|
||||
<view class="label">消息通知</view>
|
||||
<view class="propOpen"></view>
|
||||
<view class="content"></view>
|
||||
<van-icon name="arrow" size="40rpx" color="gray" />
|
||||
</view>
|
||||
<view class="itemData" bindtap='jumpBind'>
|
||||
<view class="label">绑定手机号</view>
|
||||
<view class="propOpen"></view>
|
||||
<view class="content"></view>
|
||||
<van-icon name="arrow" size="40rpx" color="gray" />
|
||||
</view>
|
||||
<!-- <view class="itemData" bindtap='jumpMy'>
|
||||
<view class="label">园区</view>
|
||||
<view class="propOpen"></view>
|
||||
|
@ -21,7 +21,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 0 24rpx;background:white;border-radius: 20rpx;margin-top: 24rpx">
|
||||
<view style="padding:4% 0;background:white;display:flex;border-bottom:1rpx solid #E5E5E5;" bindtap="navCropper">
|
||||
<!-- <view style="padding:4% 0;background:white;display:flex;border-bottom:1rpx solid #E5E5E5;" bindtap="navCropper">
|
||||
<view style="font-size:28rpx;width:24%;line-height: 100rpx;">头像</view>
|
||||
<view style="font-size:28rpx;width:70%;text-align:right">
|
||||
<image src="{{memberInfo.avatar? DOMAIN_NAME + memberInfo.avatar : DOMAIN_NAME + '/profile/static/user/headImg.png'}}" mode="widthFix" style="width:100rpx;height:100rpx;border-radius:10rpx;">
|
||||
@ -30,7 +30,7 @@
|
||||
<view style="width:6%;line-height: 100rpx;text-align:right">
|
||||
<text class="iconfont iconyou" style="font-size:32rpx;color:#B2B2B2"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="listBox" bindtap='change' data-name="姓名">
|
||||
<view style="width:24%;">姓名</view>
|
||||
<view style="width:70%;text-align:right;color:#888888">{{memberInfo.username}}</view>
|
||||
@ -38,7 +38,7 @@
|
||||
<text class="iconfont iconyou" style="font-size:28rpx;color:#B2B2B2"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="listBox">
|
||||
<!-- <view class="listBox">
|
||||
<view style="width:24%;">性别</view>
|
||||
<picker bindchange="sexChange" value="{{sexindex}}" range="{{sex}}" style="width:70%;text-align:right;color:#888888">
|
||||
<view>
|
||||
@ -48,7 +48,7 @@
|
||||
<view style="width:6%;text-align:right">
|
||||
<text class="iconfont iconyou" style="font-size:28rpx;color:#B2B2B2"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="listBox" bindtap='change' data-name="职务">
|
||||
<view style="width:24%;">职务</view>
|
||||
<view style="width:70%;text-align:right;color:#888888">{{memberInfo.post? memberInfo.post:'无'}}</view>
|
||||
|
Loading…
x
Reference in New Issue
Block a user