fix 选择用户地址
This commit is contained in:
parent
28c4297e80
commit
acbfb9d567
@ -48,11 +48,10 @@ App({
|
|||||||
this.getLoginInfo(loginInfo => {
|
this.getLoginInfo(loginInfo => {
|
||||||
if (loginInfo.is_login) {
|
if (loginInfo.is_login) {
|
||||||
this.findNearbyUserAddr(userAddress => {
|
this.findNearbyUserAddr(userAddress => {
|
||||||
if (userAddress) {
|
if (!userAddress) {
|
||||||
address = userAddress
|
return
|
||||||
}
|
}
|
||||||
address = that.setCurrentAddress(address)
|
that.setCurrentAddress(userAddress)
|
||||||
cb(address)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
"pages/index/index",
|
"pages/index/index",
|
||||||
|
"pages/order/quasi",
|
||||||
"pages/shop/show",
|
"pages/shop/show",
|
||||||
"pages/order/list",
|
"pages/order/list",
|
||||||
"pages/order/show",
|
"pages/order/show",
|
||||||
"pages/order/quasi",
|
|
||||||
"pages/order/content",
|
"pages/order/content",
|
||||||
"pages/mine/coupon",
|
"pages/mine/coupon",
|
||||||
"pages/mine/mine",
|
"pages/mine/mine",
|
||||||
|
@ -5,6 +5,7 @@ import {
|
|||||||
} from '../../utils/apis'
|
} from '../../utils/apis'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
alert,
|
||||||
requestPayment, getCurrentPage
|
requestPayment, getCurrentPage
|
||||||
} from '../../utils/util'
|
} from '../../utils/util'
|
||||||
Page({
|
Page({
|
||||||
@ -13,7 +14,7 @@ Page({
|
|||||||
},
|
},
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
// 页面初始化 options为页面跳转所带来的参数
|
// 页面初始化 options为页面跳转所带来的参数
|
||||||
this.id = options.id || '2843'
|
this.id = options.id || '2853'
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
onReady: function () {
|
onReady: function () {
|
||||||
@ -124,10 +125,13 @@ Page({
|
|||||||
onAddOrder(e) {
|
onAddOrder(e) {
|
||||||
var that = this
|
var that = this
|
||||||
var {id} = this
|
var {id} = this
|
||||||
var {loading, content} = this.data
|
var {loading, content, info} = this.data
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!info.receiver_addr_id) {
|
||||||
|
return alert('请选择用户地址')
|
||||||
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
loading: true
|
loading: true
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user