123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- // pages/qiyemore/qiyemore.js
- import http from '../../base/httputil'
- Page({
- onLoad() {
- this.getLocation()
- },
- /**
- * 页面的初始数据
- */
- data: {
- longitude: Number,
- form: {
- longitude: Number,
- latitude: Number,
- businessName: null,
- orgCode: null,
- officeAddress: null,
- businessAddress: null,
- supervisor: null,
- tradeDept: null,
- deptId: null,
- mainPerson: null,
- mainPersonPhone: null,
- headSecurity: null,
- headSecurityPhone: null
- }
- },
- //-------------------------------表单数据绑定方法---------------------------------------
- get_businessName(e) {
- this.data.form.businessName = e.detail.value
- },
- get_orgCode(e) {
- this.data.form.orgCode = e.detail.value
- },
- get_officeAddress(e) {
- this.data.form.officeAddress = e.detail.value
- },
- get_businessAddress(e) {
- this.data.form.businessAddress = e.detail.value
- },
- get_supervisor(e) {
- this.data.form.supervisor = e.detail.value
- },
- get_tradeDept(e) {
- this.data.form.tradeDept = e.detail.value
- },
- get_mainPerson(e) {
- this.data.form.mainPerson = e.detail.value
- },
- get_mainPersonPhone(e) {
- this.data.form.mainPersonPhone = e.detail.value
- },
- get_headSecurity(e) {
- this.data.form.headSecurity = e.detail.value
- },
- headSecurityPhone(e) {
- this.data.form.headSecurityPhone = e.detail.value
- },
- //----------------------------------------------------------------------------
- addEnterprise(e) {
- let obj = new Object()
- obj.latitude = this.data.form.latitude
- obj.longitude = this.data.form.longitude
- obj.businessName = this.data.form.businessName
- obj.orgCode = this.data.form.orgCode
- obj.officeAddress = this.data.form.officeAddress
- obj.businessAddress = this.data.form.businessAddress
- obj.supervisor = this.data.form.supervisor
- obj.tradeDept = this.data.form.tradeDept
- obj.mainPerson = this.data.form.mainPerson
- obj.mainPersonPhone = this.data.form.mainPersonPhone
- obj.headSecurity = this.data.form.headSecurity
- obj.headSecurityPhone = this.data.form.headSecurityPhone
- http.post("/system/AppEnterpriseController/addEnterprise", obj, this.addEnterpriseSuccess)
- },
- addEnterpriseSuccess(e) {
- wx.showToast({
- title: e.msg,
- icon: "none"
- })
- if(e.code == 200){
- wx.navigateTo({
- url: '../qiye/qiye',
- })
- }
- },
- getLocation() {
- let that = this
- wx.getLocation({
- type: 'wgs84', //返回可以用于wx.openLocation的经纬度
- success: function (res) {
- that.setData({
- form: {
- longitude: res.longitude,
- latitude: res.latitude
- }
- })
- },
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
- }
- })
|