mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-24 05:46:04 +08:00
Merge branch 'master' of https://github.com/java110/WechatOwnerService
This commit is contained in:
commit
38da74d1e5
1
app.json
1
app.json
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
"pages/index/index",
|
"pages/index/index",
|
||||||
|
"pages/family/family",
|
||||||
"pages/circle/circle",
|
"pages/circle/circle",
|
||||||
"pages/location/location",
|
"pages/location/location",
|
||||||
"pages/books/books",
|
"pages/books/books",
|
||||||
|
|||||||
@ -24,7 +24,9 @@ const urlInfo = {
|
|||||||
//报修接口
|
//报修接口
|
||||||
saveOwnerRepair: baseUrl + 'appApi/ownerRepair.saveOwnerRepair',
|
saveOwnerRepair: baseUrl + 'appApi/ownerRepair.saveOwnerRepair',
|
||||||
//查看报修
|
//查看报修
|
||||||
listOwnerRepairs: baseUrl + 'appApi/ownerRepair.listOwnerRepairs'
|
listOwnerRepairs: baseUrl + 'appApi/ownerRepair.listOwnerRepairs',
|
||||||
|
//家庭成员
|
||||||
|
saveOwner: baseUrl + 'appApi/owner.saveOwner',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
145
pages/family/family.js
Normal file
145
pages/family/family.js
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
// pages/enterCommunity/enterCommunity.js
|
||||||
|
const {
|
||||||
|
appInfo,
|
||||||
|
urlInfo
|
||||||
|
} = require("../../config/config.js");
|
||||||
|
const util = require('../../utils/util.js');
|
||||||
|
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
"sexArr":["男","女"],
|
||||||
|
"sex": "0",
|
||||||
|
"name": "",
|
||||||
|
"link": "",
|
||||||
|
"remark": "",
|
||||||
|
"ownerId": "",
|
||||||
|
"userId": "",
|
||||||
|
"ownerTypeCd": "1002",
|
||||||
|
"age": "",
|
||||||
|
"memberId": ""
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad: function(options) {},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
bindSexChange: function(e) {
|
||||||
|
this.setData({
|
||||||
|
sex: e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
bindOwnerId: function(e) {
|
||||||
|
this.setData({
|
||||||
|
ownerId: e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
bindName: function(e) {
|
||||||
|
this.setData({
|
||||||
|
name: e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
bindAge: function(e) {
|
||||||
|
this.setData({
|
||||||
|
age: e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
bindRemark: function(e) {
|
||||||
|
this.setData({
|
||||||
|
remark: e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitRepair: function(e) {
|
||||||
|
let obj = {
|
||||||
|
"sex": this.data.sex,
|
||||||
|
"name": this.data.name,
|
||||||
|
"link": this.data.link,
|
||||||
|
"remark": this.data.remark,
|
||||||
|
"ownerId": this.data.ownerId,
|
||||||
|
"userId": this.data.userId,
|
||||||
|
"ownerTypeCd": this.data.ownerTypeCd,
|
||||||
|
"age": this.data.age,
|
||||||
|
"memberId": this.data.memberId
|
||||||
|
}
|
||||||
|
let msg = "";
|
||||||
|
if (obj.ownerId == "") {
|
||||||
|
msg = "请填写业主";
|
||||||
|
} else if (obj.name == "") {
|
||||||
|
msg = "请填写姓名";
|
||||||
|
} else if (obj.sex == "") {
|
||||||
|
msg = "请填写性别";
|
||||||
|
} else if (obj.age == "") {
|
||||||
|
msg = "请填写年龄";
|
||||||
|
}
|
||||||
|
if (msg != "") {
|
||||||
|
wx.showToast({
|
||||||
|
title: msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log("提交数据", obj);
|
||||||
|
wx.request({
|
||||||
|
url: urlInfo.saveOwner, // http://hc.demo.winqi.cn:8012/appApi/ownerRepair.saveOwnerRepair
|
||||||
|
header: util.getHeaders(),
|
||||||
|
method: "POST",
|
||||||
|
data: {
|
||||||
|
"sex": "1",
|
||||||
|
"name": "1",
|
||||||
|
"link": "1",
|
||||||
|
"remark": "1",
|
||||||
|
"ownerId": "1",
|
||||||
|
"userId": "1",
|
||||||
|
"ownerTypeCd": "1002",
|
||||||
|
"age": "11",
|
||||||
|
"memberId": "1"
|
||||||
|
},
|
||||||
|
// data:obj, //动态数据
|
||||||
|
success: function(res) {
|
||||||
|
console.log(res, 99999);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
1
pages/family/family.json
Normal file
1
pages/family/family.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
99
pages/family/family.wxml
Normal file
99
pages/family/family.wxml
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
<view class="page">
|
||||||
|
<view class="weui-form">
|
||||||
|
<view class="">
|
||||||
|
<view class="weui-cells__group weui-cells__group_form">
|
||||||
|
<view class="weui-cells weui-cells_after-title">
|
||||||
|
|
||||||
|
|
||||||
|
<view class="weui-cell">
|
||||||
|
<view class="weui-cell__hd">
|
||||||
|
<label class="weui-label">业
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text> 主
|
||||||
|
</label>
|
||||||
|
</view>
|
||||||
|
<view class="weui-cell__bd">
|
||||||
|
<input bindinput="bindOwnerId" class="weui-input" type="text" placeholder="请输入业主" value="{{ownerId}}" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="weui-cell">
|
||||||
|
<view class="weui-cell__hd">
|
||||||
|
<label class="weui-label">姓
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text> 名
|
||||||
|
</label>
|
||||||
|
</view>
|
||||||
|
<view class="weui-cell__bd">
|
||||||
|
<input bindinput="bindName" class="weui-input" type="text" placeholder="请输入姓名" value="{{name}}" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="weui-cell_select weui-cell ">
|
||||||
|
<view class="weui-cell__hd ">
|
||||||
|
<label class="weui-label" style="margin-left:64rpx">性
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text> 别</label>
|
||||||
|
</view>
|
||||||
|
<view class="weui-cell__bd">
|
||||||
|
|
||||||
|
<picker bindchange="bindSexChange" value="{{index}}" range="{{sexArr}}">
|
||||||
|
<view class="weui-select" style="margin-left:-48rpx">
|
||||||
|
{{sexArr[sex]}}
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="weui-cell">
|
||||||
|
<view class="weui-cell__hd">
|
||||||
|
<label class="weui-label">
|
||||||
|
年
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text> 龄
|
||||||
|
</label>
|
||||||
|
</view>
|
||||||
|
<view class="weui-cell__bd">
|
||||||
|
<input bindinput="bindAge" class="weui-input" type="text" placeholder="请输入年龄" value="{{age}}" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class="weui-cell">
|
||||||
|
<view class="weui-cell__hd">
|
||||||
|
<label class="weui-label">
|
||||||
|
备<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text>
|
||||||
|
<text decode="{{true}}"> </text> 注
|
||||||
|
</label>
|
||||||
|
</view>
|
||||||
|
<view class="weui-cell__bd">
|
||||||
|
<textarea bindblur="bindRemark" class="repair_textarea" value="{{remark}}" rows="3" placeholder="备注" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<button type="primary" catchtap="submitRepair">确认报修</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
17
pages/family/family.wxss
Normal file
17
pages/family/family.wxss
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
.user-container {
|
||||||
|
padding: 25rpx 10rpx;
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
/*border: 1px solid black;*/
|
||||||
|
}
|
||||||
|
.form{
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 10rpx 7rpx;
|
||||||
|
}
|
||||||
|
.repair_textarea{
|
||||||
|
width: 100%;
|
||||||
|
height: 150rpx;
|
||||||
|
}
|
||||||
|
.repair_image{
|
||||||
|
width: 150rpx;
|
||||||
|
height: 150rpx;
|
||||||
|
}
|
||||||
@ -42,7 +42,8 @@ Page({
|
|||||||
src: "/images/3.png"
|
src: "/images/3.png"
|
||||||
}, {
|
}, {
|
||||||
name: "家庭成员",
|
name: "家庭成员",
|
||||||
src: "/images/4.png"
|
src: "/images/4.png",
|
||||||
|
href: "/pages/family/family"
|
||||||
}, {
|
}, {
|
||||||
name: "报修",
|
name: "报修",
|
||||||
src: "/images/5.png",
|
src: "/images/5.png",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user