mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-03 20:39:59 +08:00
小程序优化
This commit is contained in:
parent
0c41f6bdfd
commit
95005fb023
@ -145,7 +145,7 @@ class BuyService
|
||||
{
|
||||
if(!is_array($params['spec']))
|
||||
{
|
||||
$spec = json_decode($params['spec'], true);
|
||||
$spec = json_decode(htmlspecialchars_decode($params['spec']), true);
|
||||
} else {
|
||||
$spec = $params['spec'];
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ App({
|
||||
// 请求地址
|
||||
request_url: "{{request_url}}",
|
||||
//request_url: "https://test.shopxo.net/",
|
||||
//request_url: 'http://tp5-dev.com/',
|
||||
request_url: 'http://tp5-dev.com/',
|
||||
|
||||
// 基础信息
|
||||
application_title: "{{application_title}}",
|
||||
|
@ -71,6 +71,7 @@ Page({
|
||||
|
||||
var data = this.data.params;
|
||||
data['address_id'] = this.data.address_id;
|
||||
data['payment_id'] = this.data.payment_id;
|
||||
my.httpRequest({
|
||||
url: app.get_request_url("index", "buy"),
|
||||
method: "POST",
|
||||
@ -99,6 +100,10 @@ Page({
|
||||
address: data.base.address,
|
||||
address_id: data.base.address.id,
|
||||
});
|
||||
my.setStorage({
|
||||
key: app.data.cache_buy_user_address_select_key,
|
||||
data: data.base.address,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,6 +201,7 @@ Page({
|
||||
payment_event(e) {
|
||||
this.setData({ payment_id: e.target.dataset.value});
|
||||
this.payment_list_data(this.data.payment_list);
|
||||
this.init();
|
||||
},
|
||||
|
||||
// 支付方式数据处理
|
||||
|
@ -69,6 +69,7 @@ Page({
|
||||
|
||||
var data = this.data.params;
|
||||
data['address_id'] = this.data.address_id;
|
||||
data['payment_id'] = this.data.payment_id;
|
||||
wx.request({
|
||||
url: app.get_request_url("index", "buy"),
|
||||
method: "POST",
|
||||
@ -97,6 +98,11 @@ Page({
|
||||
address: data.base.address,
|
||||
address_id: data.base.address.id,
|
||||
});
|
||||
|
||||
my.setStorage({
|
||||
key: app.data.cache_buy_user_address_select_key,
|
||||
data: data.base.address,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,6 +188,7 @@ Page({
|
||||
payment_event(e) {
|
||||
this.setData({ payment_id: e.currentTarget.dataset.value});
|
||||
this.payment_list_data(this.data.payment_list);
|
||||
this.init();
|
||||
},
|
||||
|
||||
// 支付方式数据处理
|
||||
|
Loading…
Reference in New Issue
Block a user