fix 选择用户地址

This commit is contained in:
Kiyan 2017-05-31 14:36:05 +08:00
parent 28c4297e80
commit acbfb9d567
3 changed files with 10 additions and 7 deletions

View File

@ -48,11 +48,10 @@ App({
this.getLoginInfo(loginInfo => {
if (loginInfo.is_login) {
this.findNearbyUserAddr(userAddress => {
if (userAddress) {
address = userAddress
if (!userAddress) {
return
}
address = that.setCurrentAddress(address)
cb(address)
that.setCurrentAddress(userAddress)
})
}
})

View File

@ -1,10 +1,10 @@
{
"pages": [
"pages/index/index",
"pages/order/quasi",
"pages/shop/show",
"pages/order/list",
"pages/order/show",
"pages/order/quasi",
"pages/order/content",
"pages/mine/coupon",
"pages/mine/mine",

View File

@ -5,6 +5,7 @@ import {
} from '../../utils/apis'
import {
alert,
requestPayment, getCurrentPage
} from '../../utils/util'
Page({
@ -13,7 +14,7 @@ Page({
},
onLoad: function (options) {
// 页面初始化 options为页面跳转所带来的参数
this.id = options.id || '2843'
this.id = options.id || '2853'
this.loadData()
},
onReady: function () {
@ -124,10 +125,13 @@ Page({
onAddOrder(e) {
var that = this
var {id} = this
var {loading, content} = this.data
var {loading, content, info} = this.data
if (loading) {
return
}
if (!info.receiver_addr_id) {
return alert('请选择用户地址')
}
this.setData({
loading: true
})