fix 选择用户地址
This commit is contained in:
parent
28c4297e80
commit
acbfb9d567
@ -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)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user