银花优选微信小程序修改后的最新版本代码
This commit is contained in:
659
pages/appbusiness0/index.js
Normal file
659
pages/appbusiness0/index.js
Normal file
@@ -0,0 +1,659 @@
|
||||
var app = getApp()
|
||||
var that=null
|
||||
var sopenFrame=null
|
||||
var areas = null;
|
||||
Page( {
|
||||
data: {
|
||||
loadingHidden:false,
|
||||
loading:false,
|
||||
sjname:"",
|
||||
number:"",
|
||||
tel:"",
|
||||
sjimage0:"../../images/add.png",
|
||||
sjimage1:"../../images/add.png",
|
||||
sjimage2:"../../images/add.png",
|
||||
sjimage3:"../../images/add.png",
|
||||
sjimage4:"../../images/add.png",
|
||||
sjimage5:"../../images/add.png",
|
||||
sjimage6:"../../images/add.png",
|
||||
addimage0:"",
|
||||
addimage1:"",
|
||||
addimage2:"",
|
||||
addimage3:"",
|
||||
addimage4:"",
|
||||
addimage5:"",
|
||||
addimage6:"",
|
||||
annotatemap:"",
|
||||
detail:"",
|
||||
fwbody:"",
|
||||
sectionHidden:true,
|
||||
sectionHidden0:true,
|
||||
IFDefault:1,
|
||||
savebutton:"提交",
|
||||
Provinces:[],
|
||||
Citylist:[],
|
||||
Citys:[],
|
||||
Countys:[],
|
||||
hx_index:-1,
|
||||
hx_index0:-1,
|
||||
hx_index1:-1,
|
||||
area:"",
|
||||
addressId:0,
|
||||
clslist:[],
|
||||
hc_index:-1,
|
||||
clsid:0,
|
||||
clsname:"",
|
||||
latitude:0,
|
||||
longitude:0,
|
||||
scale:15,
|
||||
markers: [],
|
||||
bzlatitude:0,
|
||||
bzlongitude:0,
|
||||
uid:0,
|
||||
},
|
||||
onReady: function(e) {
|
||||
// 使用 wx.createMapContext 获取 map 上下文
|
||||
this.mapCtx = wx.createMapContext('myMap');
|
||||
},
|
||||
onLoad: function() {
|
||||
|
||||
that = this
|
||||
areas = require('../../area.js');
|
||||
that.setData({
|
||||
Provinces:areas.areaslist,
|
||||
Citylist:areas.Citylist
|
||||
})
|
||||
that.rdata()
|
||||
},rdata: function() {
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
var userInfodata = wx.getStorageSync("userInfo")
|
||||
if(userId&&LoginId){
|
||||
var userInfo = JSON.parse(userInfodata)
|
||||
that.setData({
|
||||
uid:userInfo.id
|
||||
})
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.apiurl + "/xapiajax.ashx",
|
||||
data: {
|
||||
action:"getbusinessinfo0",
|
||||
userId:(!userId?"":userId),
|
||||
LoginId:(!LoginId?"":LoginId)
|
||||
},
|
||||
method:"GET",
|
||||
dataType:"json",
|
||||
success (res) {
|
||||
if(res.data.status==1){
|
||||
that.setData({
|
||||
clslist:res.data.clslist,
|
||||
loadingHidden:true
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
},clsChange:function(e) {
|
||||
var index=e.detail.value;
|
||||
that.setData({
|
||||
hc_index: index,
|
||||
clsid:that.data.clslist[index].id,
|
||||
clsname:that.data.clslist[index].name,
|
||||
sectionHidden0:true
|
||||
})
|
||||
},onarea:function(e) {
|
||||
that.setData({
|
||||
sectionHidden:false
|
||||
})
|
||||
},ProvinceChange:function(e) {
|
||||
var index=e.detail.value;
|
||||
var citys=that.data.Provinces[index].City
|
||||
that.setData({
|
||||
hx_index: index,
|
||||
hx_index0: -1,
|
||||
hx_index1: -1,
|
||||
Citys:citys
|
||||
})
|
||||
if(citys.length==0){
|
||||
that.setData({
|
||||
sectionHidden:true,
|
||||
area:that.data.Provinces[that.data.hx_index].ProvinceName
|
||||
})
|
||||
}
|
||||
},CityChange:function(e) {
|
||||
var index=e.detail.value
|
||||
var countys=that.data.Citys[index].County
|
||||
that.setData({
|
||||
hx_index0: index,
|
||||
hx_index1: -1,
|
||||
Countys:countys
|
||||
})
|
||||
if(countys.length==0){
|
||||
that.setData({
|
||||
sectionHidden:true,
|
||||
area:that.data.Provinces[that.data.hx_index].ProvinceName+that.data.Citys[that.data.hx_index0].CityName
|
||||
})
|
||||
}
|
||||
},CountyChange:function(e) {
|
||||
that.setData({
|
||||
hx_index1: e.detail.value
|
||||
})
|
||||
that.setData({
|
||||
sectionHidden:true,
|
||||
area:that.data.Provinces[that.data.hx_index].ProvinceName+that.data.Citys[that.data.hx_index0].CityName+that.data.Countys[that.data.hx_index1].CountyName
|
||||
})
|
||||
},onannotatemap:function(e) {
|
||||
if(that.data.hx_index==-1||that.data.hx_index0==-1){
|
||||
wx.showToast({
|
||||
title: "请选选择地区!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}else{
|
||||
//获取经纬度
|
||||
wx.getLocation({
|
||||
type: 'gcj02',
|
||||
success: function (res) {
|
||||
var latitude = res.latitude
|
||||
var longitude = res.longitude
|
||||
that.setData({
|
||||
latitude: latitude,
|
||||
longitude: longitude,
|
||||
})
|
||||
|
||||
},fail: function (res) {
|
||||
wx.showToast({
|
||||
title: "获取定位失败!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
/* var center="";
|
||||
if(that.data.hx_index>-1&&that.data.hx_index0>-1){
|
||||
center=that.data.Citys[that.data.hx_index0].center
|
||||
if(that.data.hx_index1>-1){
|
||||
center=that.data.Countys[that.data.hx_index1].center
|
||||
}
|
||||
if(center!=""){
|
||||
var acenter=center.split(",");
|
||||
that.setData({
|
||||
latitude: acenter[1],
|
||||
longitude: acenter[0],
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
that.setData({
|
||||
sectionHidden0:false,
|
||||
loading:true,
|
||||
savebutton:"标注好了,返回"
|
||||
})
|
||||
var sopenFrame0=setInterval(function (){
|
||||
clearInterval(sopenFrame0);
|
||||
that.setData({
|
||||
loading:false
|
||||
})
|
||||
},1000)
|
||||
}
|
||||
},maptap:function(e) {
|
||||
that.setData({
|
||||
loading:true,
|
||||
bzlatitude: e.detail.latitude,
|
||||
bzlongitude: e.detail.longitude,
|
||||
markers: [{
|
||||
id:8900,
|
||||
latitude: e.detail.latitude,
|
||||
longitude: e.detail.longitude,
|
||||
iconPath: '../../images/position-picker2.png',
|
||||
width: 80,
|
||||
height: 80,
|
||||
enableDragging: true
|
||||
}],
|
||||
annotatemap:"已标注",
|
||||
|
||||
})
|
||||
var sopenFrame0=setInterval(function (){
|
||||
clearInterval(sopenFrame0);
|
||||
that.setData({
|
||||
loading:false
|
||||
})
|
||||
},500)
|
||||
},
|
||||
regionchange(e) {
|
||||
console.log(e)
|
||||
},markertap:function(e) {
|
||||
|
||||
},closesection:function(e) {
|
||||
that.setData({
|
||||
sectionHidden:true,
|
||||
|
||||
})
|
||||
},closesection0:function(e) {
|
||||
that.setData({
|
||||
sectionHidden0:true,
|
||||
savebutton:"提交"
|
||||
})
|
||||
},insection:function(e) {
|
||||
|
||||
},onsjimage:function(e) {
|
||||
var id = e.currentTarget.dataset.id
|
||||
var yimage=that.data.sjimage0
|
||||
if(id==1){
|
||||
yimage=that.data.sjimage1
|
||||
}else if(id==2){
|
||||
yimage=that.data.sjimage2
|
||||
}else if(id==3){
|
||||
yimage=that.data.sjimage3
|
||||
}else if(id==4){
|
||||
yimage=that.data.sjimage4
|
||||
}else if(id==5){
|
||||
yimage=that.data.sjimage5
|
||||
}else if(id==6){
|
||||
yimage=that.data.sjimage6
|
||||
}
|
||||
if(yimage=="../../images/ajaxLoader.gif"){
|
||||
wx.showToast({
|
||||
title: "正在上传中...",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}else{
|
||||
wx.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success (res) {
|
||||
const tempFilePaths = res.tempFilePaths;
|
||||
if(id==0){
|
||||
that.setData({
|
||||
sjimage0:"../../images/ajaxLoader.gif"
|
||||
})
|
||||
}else if(id==1){
|
||||
that.setData({
|
||||
sjimage1:"../../images/ajaxLoader.gif"
|
||||
})
|
||||
}else if(id==2){
|
||||
that.setData({
|
||||
sjimage2:"../../images/ajaxLoader.gif"
|
||||
})
|
||||
}else if(id==3){
|
||||
that.setData({
|
||||
sjimage3:"../../images/ajaxLoader.gif"
|
||||
})
|
||||
}else if(id==4){
|
||||
that.setData({
|
||||
sjimage4:"../../images/ajaxLoader.gif"
|
||||
})
|
||||
}else if(id==5){
|
||||
that.setData({
|
||||
sjimage5:"../../images/ajaxLoader.gif"
|
||||
})
|
||||
}else if(id==6){
|
||||
that.setData({
|
||||
sjimage6:"../../images/ajaxLoader.gif"
|
||||
})
|
||||
}
|
||||
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
wx.uploadFile({
|
||||
url: app.globalData.apiurl + "/xapiajax.ashx", //仅为示例,非真实的接口地址
|
||||
filePath: tempFilePaths[0],
|
||||
name: 'image',
|
||||
formData: {
|
||||
action:"uploadImage",
|
||||
userId:(!userId?"":userId),
|
||||
LoginId:(!LoginId?"":LoginId)
|
||||
},
|
||||
fail: function(err) {
|
||||
wx.showToast({
|
||||
title: "上传出错了",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
})
|
||||
if(id==0){
|
||||
that.setData({
|
||||
sjimage0:yimage
|
||||
})
|
||||
}else if(id==1){
|
||||
that.setData({
|
||||
sjimage1:yimage
|
||||
})
|
||||
}else if(id==2){
|
||||
that.setData({
|
||||
sjimage2:yimage
|
||||
})
|
||||
}else if(id==3){
|
||||
that.setData({
|
||||
sjimage3:yimage
|
||||
})
|
||||
}else if(id==4){
|
||||
that.setData({
|
||||
sjimage4:yimage
|
||||
})
|
||||
}else if(id==5){
|
||||
that.setData({
|
||||
sjimage5:yimage
|
||||
})
|
||||
}else if(id==6){
|
||||
that.setData({
|
||||
sjimage6:yimage
|
||||
})
|
||||
}
|
||||
},
|
||||
success (res0){
|
||||
var data=JSON.parse(res0.data);
|
||||
|
||||
|
||||
if(data.status==1){
|
||||
wx.showToast({
|
||||
title: data.msg,
|
||||
icon: "success",
|
||||
duration: 1000
|
||||
})
|
||||
if(id==0){
|
||||
that.setData({
|
||||
sjimage0:data.url,
|
||||
addimage0:data.pic
|
||||
})
|
||||
}else if(id==1){
|
||||
that.setData({
|
||||
sjimage1:data.url,
|
||||
addimage1:data.pic
|
||||
})
|
||||
}else if(id==2){
|
||||
that.setData({
|
||||
sjimage2:data.url,
|
||||
addimage2:data.pic
|
||||
})
|
||||
}else if(id==3){
|
||||
that.setData({
|
||||
sjimage3:data.url,
|
||||
addimage3:data.pic
|
||||
})
|
||||
}else if(id==4){
|
||||
that.setData({
|
||||
sjimage4:data.url,
|
||||
addimage4:data.pic
|
||||
})
|
||||
}else if(id==5){
|
||||
that.setData({
|
||||
sjimage5:data.url,
|
||||
addimage5:data.pic
|
||||
})
|
||||
}else if(id==6){
|
||||
that.setData({
|
||||
sjimage6:data.url,
|
||||
addimage6:data.pic
|
||||
})
|
||||
}
|
||||
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: data.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
})
|
||||
if(id==0){
|
||||
that.setData({
|
||||
sjimage0:yimage
|
||||
})
|
||||
}else if(id==1){
|
||||
that.setData({
|
||||
sjimage1:yimage
|
||||
})
|
||||
}else if(id==2){
|
||||
that.setData({
|
||||
sjimage2:yimage
|
||||
})
|
||||
}else if(id==3){
|
||||
that.setData({
|
||||
sjimage3:yimage
|
||||
})
|
||||
}else if(id==4){
|
||||
that.setData({
|
||||
sjimage4:yimage
|
||||
})
|
||||
}else if(id==5){
|
||||
that.setData({
|
||||
sjimage5:yimage
|
||||
})
|
||||
}else if(id==6){
|
||||
that.setData({
|
||||
sjimage6:yimage
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
},saveaddress:function(e) {
|
||||
if(that.data.savebutton=="标注好了,返回")
|
||||
{
|
||||
that.setData({
|
||||
sectionHidden0:true,
|
||||
savebutton:"提交"
|
||||
})
|
||||
}else{
|
||||
|
||||
var name = e.detail.value.txtName.replace(/\s+/g, "");
|
||||
var number=e.detail.value.txtnumber.replace(/\s+/g, "");
|
||||
var tel=e.detail.value.txttel.replace(/\s+/g, "");
|
||||
var Province=(that.data.hx_index==-1?"":that.data.Provinces[that.data.hx_index].ProvinceID)
|
||||
var City=(that.data.hx_index0==-1?"":that.data.Citys[that.data.hx_index0].CityID)
|
||||
var County=(that.data.hx_index1==-1?"":that.data.Countys[that.data.hx_index1].CountyID)
|
||||
var detail=e.detail.value.detail.replace(/\s+/g, "");
|
||||
var fwbody=e.detail.value.fwbody
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
var b=true
|
||||
if(that.data.clsid==0){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "商家分类未选择!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
if(b){
|
||||
if(name==""){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "商家名称不能为空!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(number==""){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "信用代码不能为空!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(tel==""){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "联系电话不能为空!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(that.data.addimage0==""){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "预览图片未上传!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(that.data.addimage1==""){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "营业执照未上传!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(that.data.addimage2==""){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "门头照片未上传!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(that.data.addimage3==""){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "身份证正面未上传!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(that.data.addimage4==""){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "身份证反面未上传!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(that.data.hx_index==-1){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "省份必须选择!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(that.data.hx_index0==-1){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "城市必须选择!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(detail==null || detail==""){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "详细地址不能为空!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(that.data.bzlatitude==0||that.data.bzlongitude==0){
|
||||
b=false
|
||||
wx.showToast({
|
||||
title: "未标注地图!",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
if(that.data.savebutton!='提交'){
|
||||
b=false
|
||||
}
|
||||
}
|
||||
if(b){
|
||||
that.setData({
|
||||
savebutton:"请稍候..."
|
||||
})
|
||||
wx.request({
|
||||
url: app.globalData.apiurl + "/xapiajax.ashx",
|
||||
data: {
|
||||
action:"updatebusinessinfo0",
|
||||
userId:(!userId?"":userId),
|
||||
LoginId:(!LoginId?"":LoginId),
|
||||
clsid:that.data.clsid,
|
||||
name:name,
|
||||
number:number,
|
||||
tel:tel,
|
||||
image0:that.data.addimage0,
|
||||
image1:that.data.addimage1,
|
||||
image2:that.data.addimage2,
|
||||
image3:that.data.addimage3,
|
||||
image4:that.data.addimage4,
|
||||
image5:that.data.addimage5,
|
||||
image6:that.data.addimage6,
|
||||
province:Province,
|
||||
city:City,
|
||||
county:County,
|
||||
address:detail,
|
||||
longitude:that.data.bzlongitude,
|
||||
latitude:that.data.bzlatitude,
|
||||
fwbody:fwbody
|
||||
},
|
||||
method:"POST",
|
||||
dataType:"json",
|
||||
header: {
|
||||
"content-type": "application/x-www-form-urlencoded" // 默认值
|
||||
},
|
||||
success (res) {
|
||||
if(res.data.status==1){
|
||||
wx.setStorageSync('userInfo', JSON.stringify(res.data.userInfo))
|
||||
app.globalData.IFRefreshmy=1
|
||||
var sopenFrame0=setInterval(function (){
|
||||
clearInterval(sopenFrame0);
|
||||
wx.showModal({
|
||||
title: "申请提示",
|
||||
content:"您的申请已经提交成功了,请等待审核!",
|
||||
showCancel:false,
|
||||
success (res0) {
|
||||
if (res0.confirm) {
|
||||
|
||||
that.setData({
|
||||
savebutton:"提交"
|
||||
})
|
||||
wx.navigateBack({})
|
||||
}
|
||||
}
|
||||
})
|
||||
}, 2000);
|
||||
}else{
|
||||
that.setData({
|
||||
savebutton:"保存"
|
||||
})
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
3
pages/appbusiness0/index.json
Normal file
3
pages/appbusiness0/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "申请线上供应链"
|
||||
}
|
||||
122
pages/appbusiness0/index.wxml
Normal file
122
pages/appbusiness0/index.wxml
Normal file
@@ -0,0 +1,122 @@
|
||||
<view class="container">
|
||||
<form bindsubmit='saveaddress' wx:if="{{uid>68}}">
|
||||
<view class="myaddress-box">
|
||||
<view class="frombody">
|
||||
|
||||
<view class="area">
|
||||
<picker class="picker_hx" name="picker_hx0" value="{{clslist[hc_index].id}}" data-selecthx="{{clslist[hc_index].name}}" range="{{clslist}}" range-key="{{'name'}}" bindchange="clsChange">
|
||||
<text>商家分类:</text><input name="sjfl" type="text" disabled="disabled" placeholder="请选择商家分类" value="{{clsname}}"/><image src="../../images/icon-arrowdown.png"></image>
|
||||
</picker>
|
||||
</view>
|
||||
<view>
|
||||
<text>商家名称:</text><input name="txtName" type="text" placeholder="请填写商家名称" value="{{sjname}}" />
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<text>信用代码:</text><input name="txtnumber" type="text" placeholder="请填写统一社会信用代码" value="{{number}}" />
|
||||
</view>
|
||||
<view>
|
||||
<text>联系电话:</text><input name="txttel" type="text" placeholder="请填写联系电话" value="{{tel}}" />
|
||||
</view>
|
||||
<view class="upimage_box" style="border-bottom: 0;">
|
||||
<text>上传预览图片:</text><view class="image"><image src='{{sjimage0}}' bindtap="onsjimage" data-id="0"></image></view>
|
||||
</view>
|
||||
|
||||
<view class="upimage0_box">
|
||||
<view class="upimage0_title">上传证件:</view>
|
||||
<view class="upimage0_box_to">
|
||||
<view class="image" bindtap="onsjimage" data-id="1"><image src='{{sjimage1}}'></image><text>营业执照</text></view>
|
||||
<view class="image" bindtap="onsjimage" data-id="2"><image src='{{sjimage2}}'></image><text>门头照片</text></view>
|
||||
<view class="image" bindtap="onsjimage" data-id="3"><image src='{{sjimage3}}'></image><text>身份证正面</text></view>
|
||||
<view class="image" bindtap="onsjimage" data-id="4"><image src='{{sjimage4}}'></image><text>身份证反面</text></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="area" bindtap="onarea">
|
||||
<text>所在地区:</text><input name="area" type="text" disabled="disabled" placeholder="请选择地区" value="{{area}}"/><image src="../../images/icon-arrowdown.png"></image>
|
||||
</view>
|
||||
<view>
|
||||
<text>详细地址:</text><input name="detail" type="text" placeholder="请填写街道、楼牌号等" value="{{detail}}" />
|
||||
</view>
|
||||
<view class="area" bindtap="onannotatemap">
|
||||
<text>标注地图:</text><input name="annotatemap" type="text" disabled="disabled" placeholder="请标注地图" value="{{annotatemap}}"/><image src="../../images/icon-arrowdown.png"></image>
|
||||
</view>
|
||||
<view>
|
||||
<text>服务内容:</text><input name="fwbody" type="text" placeholder="请填写服务内容" value="{{fwbody}}" />
|
||||
</view>
|
||||
<view style="height: 3em;">
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="footer">
|
||||
<button form-type="submit">{{savebutton}}</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<view class="Hidden_box" hidden="{{sectionHidden}}" bindtap="closesection">
|
||||
<view class="section" catchtap="insection">
|
||||
<view class="section-title">省市区选择器</view>
|
||||
<view class="close" bindtap="closesection"><image src="../../images/close.png" /></view>
|
||||
<view class="section-body">
|
||||
<view>
|
||||
<text>省份:</text>
|
||||
<picker class="picker_hx" name="picker_hx" value="{{Provinces[hx_index].ProvinceID}}" data-selecthx="{{Provinces[hx_index].ProvinceName}}" range="{{Provinces}}" range-key="{{'ProvinceName'}}" bindchange="ProvinceChange">
|
||||
<view class="picker">
|
||||
<text hidden='{{Provinces[hx_index].ProvinceName==null}}'>{{Provinces[hx_index].ProvinceName}}</text>
|
||||
<text hidden='{{Provinces[hx_index].ProvinceName!=null}}'>==请选择==</text>
|
||||
<image src="../../images/icon-arrowdown1.png"></image>
|
||||
</view>
|
||||
|
||||
</picker>
|
||||
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<text>城市:</text>
|
||||
<picker class="picker_hx" name="picker_hx" value="{{Citys[hx_index0].CityID}}" data-selecthx="{{Citys[hx_index0].CityName}}" range="{{Citys}}" range-key="{{'CityName'}}" bindchange="CityChange">
|
||||
<view class="picker">
|
||||
<text hidden='{{Citys[hx_index0].CityName==null}}'>{{Citys[hx_index0].CityName}}</text>
|
||||
<text hidden='{{Citys[hx_index0].CityName!=null}}'>==请选择==</text>
|
||||
<image src="../../images/icon-arrowdown1.png"></image>
|
||||
</view>
|
||||
|
||||
</picker>
|
||||
</view>
|
||||
<view>
|
||||
<text>县区:</text>
|
||||
<picker class="picker_hx" name="picker_hx" value="{{Countys[hx_index1].CountyID}}" data-selecthx="{{Countys[hx_index1].CountyName}}" range="{{Countys}}" range-key="{{'CountyName'}}" bindchange="CountyChange">
|
||||
<view class="picker">
|
||||
<text hidden='{{Countys[hx_index1].CountyName==null}}'>{{Countys[hx_index1].CountyName}}</text>
|
||||
<text hidden='{{Countys[hx_index1].CountyName!=null}}'>==请选择==</text>
|
||||
<image src="../../images/icon-arrowdown1.png"></image>
|
||||
</view>
|
||||
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="Hidden_box" hidden="{{sectionHidden0}}" bindtap="closesection0">
|
||||
<view class="section" catchtap="insection" style="margin-top: 0em; width: 100%; height: 100%;padding: 0;">
|
||||
<view class="section-title">点击地图标注</view>
|
||||
<view class="close" bindtap="closesection0"><image src="../../images/close.png" /></view>
|
||||
<view class="section-body">
|
||||
<map id="myMap" latitude="{{latitude}}" longitude="{{longitude}}" scale="{{scale}}" style="width: 100%; height: 86vh;" show-location="{{true}}" bindtap='maptap' bindmarkertap="markertap" bindregionchange="regionchange" markers="{{markers}}">
|
||||
<cover-view class="loading" wx:if="{{loading}}">
|
||||
<cover-view class="loading-to">
|
||||
<cover-image src="../../images/ajaxLoader.gif"></cover-image>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</map>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<loading hidden="{{loadingHidden}}">
|
||||
加载中...
|
||||
</loading>
|
||||
87
pages/appbusiness0/index.wxss
Normal file
87
pages/appbusiness0/index.wxss
Normal file
@@ -0,0 +1,87 @@
|
||||
page{
|
||||
background: #ccc;
|
||||
}
|
||||
.container {
|
||||
position: relative;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-flex-flow: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
|
||||
}
|
||||
.footer{
|
||||
position: fixed;
|
||||
z-index: 10000;
|
||||
bottom:0;
|
||||
left:0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
.footer button{width:100%;height:2.5em; line-height: 2.5em; background:linear-gradient(to right,#00B050,#00B050); color:#fff;border-radius:0;}
|
||||
.myaddress-box{display: flex;flex-direction: column;flex-grow: 1; align-items: center;justify-content: center;width:100%; padding:0; box-sizing: border-box;}
|
||||
.myaddress-item{width:100%; padding:0.8em; box-sizing: border-box;border:1px solid #f1f1f1; background-color:#fff;border-radius:0.5em;}
|
||||
.myaddress-contact{width:100%;}
|
||||
.myaddress-bottom{width:100%;margin-top:0.5em; display: flex;flex-direction: row; align-items: center;justify-content: center;}
|
||||
.myaddress-bottom .myaddress-btn{width:100%;}
|
||||
.myaddress-bottom .myaddress-btn image{width:1.2em;height:1.2em; vertical-align: middle;}
|
||||
.fromtitle{width:100%; background-color:#fff; padding:1em; box-sizing: border-box;}
|
||||
.fromtitle text{float:left;}
|
||||
.fromtitle image{float:left;width:1.2em; height:1.2em;}
|
||||
.fromtitle image.arrowdown{float:right; }
|
||||
.myaddress-box .frombody{padding:0.5em 1em;width:100%; display: flex;flex-direction: column; align-items: center; background-color:#fff;box-sizing: border-box;}
|
||||
.myaddress-box .frombody view{position: relative;float:left; width:100%;display: flex;flex-direction:row;border-bottom:1px solid #f1f1f1;padding:0.5em 0; box-sizing: border-box;}
|
||||
.myaddress-box .frombody view text{padding:0;height:2.5em; line-height: 2.5em;}
|
||||
.myaddress-box .frombody view input{width:14em;height:2.5em; line-height: 2.5em;}
|
||||
.myaddress-box .frombody view.area input{width:12.8em;}
|
||||
.myaddress-box .frombody view.area image{position: absolute; top:1.1em; right:0; width:1.2em;height:1.2em;}
|
||||
|
||||
.myaddress-box .frombody view.upimage_box text{width: 12.8em;}
|
||||
.myaddress-box .frombody view.upimage_box .image{border: 0;}
|
||||
.myaddress-box .frombody view.upimage_box .image image{width:4em;height:4em;border:1px solid #f1f1f1;}
|
||||
.myaddress-box .frombody view.upimage0_box{flex-direction: column;}
|
||||
.myaddress-box .frombody view.upimage0_box view{border: 0;}
|
||||
.myaddress-box .frombody view.upimage0_box .upimage0_box_to{flex-direction:row}
|
||||
.myaddress-box .frombody view.upimage0_box .upimage0_box_to .image{flex-direction:column}
|
||||
.myaddress-box .frombody view.upimage0_box .upimage0_box_to .image text{font-size: 0.85em;}
|
||||
.myaddress-box .frombody view.upimage0_box .upimage0_box_to .image image{width:4em;height:4em;border:1px solid #f1f1f1;}
|
||||
.Hidden_box{ position: fixed;display: flex;align-items: center; justify-content: center; top:0; left:0; width:100%;height:100vh; background:rgba(0, 0, 0, 0.5);z-index: 2;}
|
||||
.section{position: relative; bottom:0; width:90%; height:20em; padding: 0 1em; background-color: #fff; box-sizing: border-box; border-radius:0.5em;}
|
||||
.section .close{position: absolute; right:0.5em; top:0.5em; width:1.5em; height:1.5em; padding:0.15em; background-color:#fff;border:1px solid #f1f1f1;border-radius:50%;box-sizing:border-box;}
|
||||
.section .close image{width:100%;height:100%;}
|
||||
.section-title{width:100%;height:2.5em; line-height: 2.5em; text-align: center; font-weight: 600;border-bottom:1px solid #f1f1f1;}
|
||||
.section-body{width:100%;}
|
||||
.section-body view{width:100%;display: flex;flex-direction: row; align-items: center;border-bottom:1px solid #f1f1f1;padding:0.5em 0; box-sizing: border-box; line-height:1.5em;}
|
||||
.section-body view text{color:#000;}
|
||||
.section-body view .picker_hx{color:#939393;line-height:2.5em;}
|
||||
.section-body view .picker_hx view{ float:left; position: relative; display: block; border:0;min-width:10em; padding-left:1em; box-sizing: border-box;border:1px solid #dfdfdf;border-radius:0.3em;line-height:2em;}
|
||||
.section-body view .picker_hx image{position: absolute; top:1em;right:0.6em; width:1.2em;height:1.2em;}
|
||||
.myaddress-box .frombody view.area .picker_hx{display: flex;flex-direction:row;}
|
||||
.myaddress-box .frombody view.area .picker_hx input{position: absolute; top:0.6em;right:1.6em;}
|
||||
.loading{
|
||||
position: fixed;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
z-index: 10005;
|
||||
}
|
||||
.loading-to{
|
||||
margin: 0 auto;
|
||||
width: 3em;
|
||||
height: 3em;
|
||||
}
|
||||
.loading-to image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.nodata{padding-top:1em; text-align: center; line-height: 1.5em; color:#939393;}
|
||||
.nodata image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
Reference in New Issue
Block a user