mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-11 06:07:24 +08:00
上线版本
This commit is contained in:
parent
83003c4324
commit
84ff500724
2
app.json
2
app.json
@ -22,8 +22,6 @@
|
||||
"pages/familyList/familyList",
|
||||
"pages/complaintList/complaintList",
|
||||
"pages/viewApplicationKeyUser/viewApplicationKeyUser",
|
||||
"pages/viewHeadImg/viewHeadImg",
|
||||
"pages/collectHeaderImg/collectHeaderImg",
|
||||
"pages/complaint/complaint",
|
||||
"pages/viewComplaint/viewComplaint",
|
||||
"pages/payParkingFeeList/payParkingFeeList",
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
"pages/complaintList/complaintList",
|
||||
"pages/viewApplicationKeyUser/viewApplicationKeyUser",
|
||||
"pages/viewHeadImg/viewHeadImg",
|
||||
"pages/collectFace/collectFace",
|
||||
"pages/collectHeaderImg/collectHeaderImg",
|
||||
"pages/complaint/complaint",
|
||||
"pages/viewComplaint/viewComplaint",
|
||||
"pages/payParkingFeeList/payParkingFeeList",
|
||||
|
||||
@ -1,146 +0,0 @@
|
||||
// pages/collectFace/collectFace.js
|
||||
const context = require("../../context/Java110Context.js");
|
||||
const constant = context.constant;
|
||||
const factory = context.factory;
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
src:'',
|
||||
uploadFlag:false
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
takePhoto:function() {
|
||||
let _that = this;
|
||||
_that.setData({
|
||||
uploadFlag: true
|
||||
})
|
||||
const ctx = wx.createCameraContext();
|
||||
ctx.takePhoto({
|
||||
quality: 'high',
|
||||
success: (res) => {
|
||||
wx.getFileSystemManager().readFile({
|
||||
filePath: res.tempImagePath,
|
||||
encoding: 'base64',
|
||||
success: (photoRes) => {
|
||||
let _baseInfo = photoRes.data;
|
||||
_that.setData({
|
||||
src: _baseInfo
|
||||
});
|
||||
_that._uploadOwnerPhoto();
|
||||
wx.hideLoading()
|
||||
}
|
||||
});
|
||||
},
|
||||
fail:(e)=>{
|
||||
_that.setData({
|
||||
uploadFlag:false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
_uploadOwnerPhoto:function(){
|
||||
let _that = this;
|
||||
context.getOwner(function (_owner) {
|
||||
let _memberId = _owner.memberId;
|
||||
let _communityId = _owner.communityId;
|
||||
let obj = {
|
||||
memberId: _memberId,
|
||||
communityId: _communityId,
|
||||
photo: _that.data.src
|
||||
};
|
||||
context.request({
|
||||
url: constant.url.uploadOwnerPhoto,
|
||||
header: context.getHeaders(),
|
||||
method: "POST",
|
||||
data: obj, //动态数据
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.statusCode != 200) {
|
||||
wx.showToast({
|
||||
title: '头像上传失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
_that.setData({
|
||||
uploadFlag: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
//成功情况下跳转
|
||||
wx.navigateBack({
|
||||
delta:1
|
||||
});
|
||||
},
|
||||
fail: function (e) {
|
||||
wx.showToast({
|
||||
title: "服务器异常了",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
_that.setData({
|
||||
uploadFlag: false
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "设置头像"
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
<view>
|
||||
<camera mode="normal" device-position="front" flash="off" binderror="error" style="width: 100%; height: 800rpx;">
|
||||
<cover-view >
|
||||
<cover-image class="img" src="../../images/camera.png" style="width:100%; height:800rpx"/>
|
||||
</cover-view>
|
||||
<cover-view class="cf_text_na">拿起手机,面向手机</cover-view>
|
||||
</camera>
|
||||
|
||||
<view class="cf_btn">
|
||||
<view class="cf_btn_v" wx:if="{{uploadFlag == false}}">
|
||||
<van-button type="primary" block bind:click="takePhoto">采集人脸</van-button>
|
||||
</view>
|
||||
<view class="cf_btn_v" wx:else>
|
||||
<van-button loading type="primary" block loading-text="人脸上传中..."/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
@ -1,31 +0,0 @@
|
||||
.controls {
|
||||
position: relative;
|
||||
display: flex;
|
||||
}
|
||||
.cf_text_na{
|
||||
|
||||
font-size: 48rpx;
|
||||
margin:80rpx 0rpx;
|
||||
font-display: 700;
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cf_btn{
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
padding:40rpx 0;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.cf_btn .cf_btn_v{
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.noticeTXT{
|
||||
font-size: 10PX;
|
||||
color: rgb(12, 242, 240);
|
||||
text-align: center
|
||||
}
|
||||
@ -30,19 +30,14 @@
|
||||
url="/pages/visitorApplicationKey/visitorApplicationKey"
|
||||
text="访客钥匙"
|
||||
/>
|
||||
</van-grid>
|
||||
</van-grid><!--
|
||||
<van-grid clickable column-num="2">
|
||||
|
||||
<van-grid-item
|
||||
icon="home-o"
|
||||
link-type="navigateTo"
|
||||
url="/pages/viewHeadImg/viewHeadImg"
|
||||
text="采集人脸"
|
||||
/>
|
||||
<!-- <van-grid-item
|
||||
icon="home-o"
|
||||
link-type="navigateTo"
|
||||
url="/pages/applicationKey/applicationKey"
|
||||
text="二维码开门"
|
||||
/> -->
|
||||
</van-grid>
|
||||
/>
|
||||
</van-grid>-->
|
||||
</view>
|
||||
|
||||
@ -1,90 +0,0 @@
|
||||
// pages/viewPersonHeaderImg/viewPersonHeaderImg.js
|
||||
const context = require("../../context/Java110Context.js");
|
||||
const constant = context.constant;
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
headerImg:null,
|
||||
btnValue:"上传人脸"
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.setData({
|
||||
headerImg:''
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.loadOwnerHeaderImg();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
},
|
||||
collectHeadImg:function(){
|
||||
//上传头像
|
||||
console.log('上传头像');
|
||||
wx.navigateTo({
|
||||
url: '/pages/collectHeaderImg/collectHeaderImg',
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 查询业主人脸
|
||||
*/
|
||||
loadOwnerHeaderImg:function(){
|
||||
let _that = this;
|
||||
context.getOwner(function(_owner){
|
||||
let _headerImg = constant.url.getOwnerPhotoPath + "?objId=" + _owner.memberId+"&communityId="+_owner.communityId+"&fileTypeCd=10000&time=" + new Date();
|
||||
_that.setData({
|
||||
headerImg: _headerImg
|
||||
});
|
||||
});
|
||||
}
|
||||
})
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的头像"
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
<view class="vpf_context">
|
||||
<view class="vpf_row">
|
||||
<view class="vpf_row_black">
|
||||
</view>
|
||||
<view class="vpf_row_title">
|
||||
<text>人脸信息</text>
|
||||
</view>
|
||||
<view class="vpf_row_black_01"/>
|
||||
|
||||
<view class="vpf_image">
|
||||
<van-image
|
||||
round
|
||||
width="15rem"
|
||||
height="15rem"
|
||||
src="{{headerImg}}"
|
||||
/>
|
||||
</view>
|
||||
<view class="vpf_row_black_03"/>
|
||||
|
||||
<view class="vpf_btn">
|
||||
<van-button type="primary" block bind:click="collectHeadImg">{{btnValue}}</van-button>
|
||||
</view>
|
||||
|
||||
<view class="vpf_row_black_04"/>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -1,51 +0,0 @@
|
||||
.vpf_context{
|
||||
padding: 30rpx 20rpx;
|
||||
}
|
||||
.vpf_context .vpf_row{
|
||||
background-color: #fff;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.vpf_row_black{
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.vpf_row_title{
|
||||
padding-left: 40rpx;
|
||||
font-size: 31rpx;
|
||||
font-weight: 700;
|
||||
|
||||
}
|
||||
.vpf_row_col{
|
||||
text-align: center;
|
||||
}
|
||||
.vpf_row_top{
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
.vpf_row_black_01{
|
||||
height: 80rpx;
|
||||
}
|
||||
.vpf_row_black_02{
|
||||
height: 100rpx;
|
||||
}
|
||||
.vpf_row_black_03{
|
||||
height: 140rpx;
|
||||
}
|
||||
.vpf_row_black_04{
|
||||
height: 40rpx;
|
||||
}
|
||||
.vpf_icon_text{
|
||||
font-size: 100rpx;
|
||||
color: #00AA00;
|
||||
}
|
||||
.vpf_row_col_t text{
|
||||
font-size: 30rpx;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
.vpf_btn{
|
||||
width: 80%;
|
||||
margin:0 auto;
|
||||
}
|
||||
.vpf_image{
|
||||
text-align: center
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user