小程序优化

This commit is contained in:
gongfuxiang 2019-03-28 00:40:42 +08:00
parent 0c41f6bdfd
commit 95005fb023
4 changed files with 15 additions and 2 deletions

View File

@ -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'];
}

View File

@ -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}}",

View File

@ -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();
},
// 支付方式数据处理

View File

@ -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();
},
// 支付方式数据处理