
<!--pages/account/organizingdata.wxml-->
<import src="../util/addresstemplate.wxml"/>
<import src="../util/searchaddresstemplate.wxml"/>
<view class="tool-tip " wx:if="{{popMsg}}">
<text class="{{popType}}">{{popMsg}}</text>
</view>
<template wx:if="{{isShowPCC}}" is="address" data="{{addressinfo}}"/>
<template wx:if="{{isShowSearch}}" is="searchaddress" data="{{addresspois}}"/>
<form bindsubmit="organizingdataSubmit" wx:if="{{!(isShowPCC||isShowSearch)}}">
<view class="list">
<view class="item item-input">
<text class=" iconfont icon-changshang placeholder-icon"></text>
<input type="text" bindinput="bindChange" id="shopname" name="shopname"
placeholder="工作单位" maxlength="15"/>
</view>
<view class="item item-input" bindtap="getAddressPCCList">
<text class=" iconfont icon-location placeholder-icon"></text>
<input type="text" disabled value="{{addresspcd}}"
placeholder="单位地址(省市县)"/>
</view>
<view class="item item-input">
<text class=" iconfont icon-location placeholder-icon"></text>
<input type="text" bindinput="bindChange" id="addrdetail" name="addrdetail"
placeholder="详细地址(街道 门牌号等)" value="{{addressname}}"/>
<view bindtap="getCurrentCity" class="positive padding-horizontal">
<text class="iconfont icon-locationfill"></text>
</view>
</view>
<view class="item item-input">
<text class=" iconfont icon-phone placeholder-icon"></text>
<input type="number" bindinput="bindChange" id="user" name="user" maxlength="11"
placeholder="联系电话(固话格式:075523485305)"/>
</view>
<view class="item item-input" bindtap="uploadActionSheet">
<text class=" iconfont icon-pic placeholder-icon"></text>
<input type="text" disabled placeholder="上传工作证(请参考示例 误传请重新传)"/>
<text class="padding-horizontal iconfont icon-add positive"></text>
</view>
</view>
<!-- <view class="list " style="margin-bottom: 5px;">
<view class="item">
<text class=" iconfont icon-yonghuleixing placeholder-icon"></text>
<text class="h3"> 用户类型</text>
<view class="inline ">
<radio-group class="radio-group" data-current="0" bindchange="radioChange">
<label class="radio padding-left" wx:for="{{usertype}}">
<radio value="{{item.value}}" color="#00ACFF" checked="{{item.checked}}"/>
{{item.name}}
</label>
</radio-group>
</view>
<!– <view class="padding-top">
<radio-group class="radio-group row row-horizontal-between" data-current="1" bindchange="radioChange">
<label class="radio " wx:for="{{utitem}}">
<radio value="{{item.value}}" color="#00ACFF" checked="{{item.checked}}"/>{{item.name}}
</label>
</radio-group>
</view>–>
</view>
</view>-->
<view class="padding-horizontal">
<button formType="submit" class="positive-bg light " hover-class="button-hover">提交</button>
</view>
</form>
|
// pages/account/organizingdata.js
var app = getApp();
var util = require('../../utils/util.js');
import WxValidate from '../../utils/validate';
var inputContent = {};//输入内容
Page({
/**
* 页面的初始数据
*/
data: {
filename: 'User',
imageList: [],//本地路径
imgsPicAddr: [],//真实服务器图片信息数组
uploadtype: 4,//上传媒体操作类型 1.卖货单 2 供货单 3 买货单 4身份证 5 头像
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/**
* 获取用户输入
*/
bindChange: function (e) {
inputContent[e.currentTarget.id] = e.detail.value;
//附近搜索
if (e.currentTarget.id == 'serachcontent') {
util.getSearchAddress(this, e.detail.value, function () {
})
}
},
/**
* 获取省市县数据
*/
getAddressPCCList: function (e) {
util.getAddressPCCList(this, e.target.dataset.item, 3, function () {
})
},
/**
* 获取附近地址数据
*/
getCurrentCity: function (e) {
util.getCurrentCity(this, 3, function () {
})
},
/**
* 选择打开附近地址
*/
getAddressPois: function (e) {
this.setData({
isShowSearch: false,
addressname: e.currentTarget.dataset.items.name
})
},
/**
* 上传图片
*/
uploadActionSheet: function (e) {
util.uploadActionSheet(this, function () {
})
},
/**
* 完善资料提交
*/
organizingdataSubmit: function (e) {
var that = this;
//验证表单
that.WxValidate = new WxValidate({
shopname: {
required: true,
},
addrdetail: {
required: true,
},
user: { //验证规则 input name值
required: true,
tel: true
}
},
{
shopname: { //提示信息
required: "请填写工作单位"
},
addrdetail: { //提示信息
required: "请填写详细地址"
},
user: { //提示信息
required: "请填写真实手机号码",
}
})
util.wxValidate(e, that, function () {
util.https(app.globalData.api + "/api/user/set_info", "POST", {
services: [1],
userid: wx.getStorageSync("userid"),
mobile: wx.getStorageSync("user").mobile,
shopname: inputContent.shopname,
addrdetail: inputContent.addrdetail,
addrcode: "",
img: "",
},
function (data) {
if (data.code == 1001) {
} else {
util.toolTip(that, data.message);
}
}
)
})
}
})
|
模板简介:该模板名称为【微信小程序蓝色风格完善资料页面设计制作开发教程】,大小是,文档格式为.,推荐使用打开,作品中的图片,文字等数据均可修改,图片请在作品中选中图片替换即可,文字修改直接点击文字修改即可,您也可以新增或修改作品中的内容,该模板来自用户分享,如有侵权行为请联系网站客服处理。欢迎来懒人模板【小程序教程】栏目查找您需要的精美模板。