Browse Source

[报名活动][修改]:[删除地址]

tags/河北版C.8.1.01
meo 5 years ago
parent
commit
1b2c4db0cb
2 changed files with 24 additions and 24 deletions
  1. +22
    -22
      pages/radetail/joinActivity/edit.js
  2. +2
    -2
      pages/radetail/joinActivity/edit.wxml

+ 22
- 22
pages/radetail/joinActivity/edit.js View File

@@ -58,21 +58,21 @@ Page({
index1: e.detail.value
})
},
address: function() {
let that = this;
wx.chooseLocation({
success: function(res) {
that.setData({
address: res.name + '(' + res.address + ')',
addressStr: JSON.stringify(res)
})
},
fail: function(error) {
console.log(error)
},
complete: function(data) {}
})
},
// address: function() {
// let that = this;
// wx.chooseLocation({
// success: function(res) {
// that.setData({
// address: res.name + '(' + res.address + ')',
// addressStr: JSON.stringify(res)
// })
// },
// fail: function(error) {
// console.log(error)
// },
// complete: function(data) {}
// })
// },
change(value){
console.log(value)
},
@@ -89,11 +89,11 @@ Page({
} else {
var sex = that.data.sex;
}
if (that.data.addressStr) {
var address = that.data.addressStr;
} else {
var address = null;
}
// if (that.data.addressStr) {
// var address = that.data.addressStr;
// } else {
// var address = null;
// }
if (e.detail.value.username) {
var username = e.detail.value.username;
} else if (that.data.username) {
@@ -134,7 +134,7 @@ Page({
});
}

if (username == null || address == null || sex == 0 || birthday == null) {
if (username == null || sex == 0 || birthday == null) {
wx.showToast({
title: '请输入完整的用户信息',
icon: "none"
@@ -148,7 +148,7 @@ Page({
let data ={};
data = {
sex: sex,
address: address,
// address: address,
name: username,
birthday: birthday,
answer: JSON.stringify(that.data.answer),


+ 2
- 2
pages/radetail/joinActivity/edit.wxml View File

@@ -20,11 +20,11 @@
</radio>
</radio-group>
</view>
<view class='address' bindtap='address'>
<!-- <view class='address' bindtap='address'>
<text>住址</text>
<view class='names' wx:if="{{address}}">{{address}}</view>
<view class='names' wx:if="{{!address}}">请选择地址</view>
</view>
</view> -->
<view class='ques' wx:if="{{question&&question.length>0}}">
<text class='questionTitle'>调查问卷</text>
<view class='answer' wx:for="{{question}}" wx:key="index">


Loading…
Cancel
Save