提交 d216bb8d 编写于 作者: D devil_gong

1.6

上级 0bd89b4b
...@@ -61,6 +61,7 @@ App({ ...@@ -61,6 +61,7 @@ App({
// 请求地址 // 请求地址
request_url: "{{request_url}}", request_url: "{{request_url}}",
request_url: 'http://tp5-dev.com/', request_url: 'http://tp5-dev.com/',
request_url: 'http://test.shopxo.net/',
// 基础信息 // 基础信息
application_title: "{{application_title}}", application_title: "{{application_title}}",
...@@ -224,6 +225,7 @@ App({ ...@@ -224,6 +225,7 @@ App({
// 邀请人参数 // 邀请人参数
var params = my.getStorageSync({key: this.data.cache_launch_info_key}); var params = my.getStorageSync({key: this.data.cache_launch_info_key});
var referrer = (params.data == null) ? 0 : (params.data.referrer || 0); var referrer = (params.data == null) ? 0 : (params.data.referrer || 0);
var $this = this;
// 加载loding // 加载loding
my.showLoading({ content: "授权中..." }); my.showLoading({ content: "授权中..." });
...@@ -233,19 +235,20 @@ App({ ...@@ -233,19 +235,20 @@ App({
scopes: "auth_user", scopes: "auth_user",
success: res => { success: res => {
if (res.authCode) { if (res.authCode) {
my.httpRequest({ my.request({
url: this.get_request_url("alipayuserauth", "user"), url: $this.get_request_url("alipayuserauth", "user"),
method: "POST", method: "POST",
data: { data: {
authcode: res.authCode, authcode: res.authCode,
referrer: referrer referrer: referrer
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
my.setStorage({ my.setStorage({
key: this.data.cache_user_login_key, key: $this.data.cache_user_login_key,
data: res.data.data data: res.data.data
}); });
...@@ -262,7 +265,6 @@ App({ ...@@ -262,7 +265,6 @@ App({
}, },
fail: () => { fail: () => {
my.hideLoading(); my.hideLoading();
my.showToast({ my.showToast({
type: "fail", type: "fail",
content: "服务器请求出错", content: "服务器请求出错",
...@@ -274,7 +276,6 @@ App({ ...@@ -274,7 +276,6 @@ App({
}, },
fail: e => { fail: e => {
my.hideLoading(); my.hideLoading();
my.showToast({ my.showToast({
type: "fail", type: "fail",
content: "授权失败", content: "授权失败",
...@@ -291,7 +292,6 @@ App({ ...@@ -291,7 +292,6 @@ App({
* auth_data 授权数据 * auth_data 授权数据
*/ */
user_auth_login(object, method, auth_data) { user_auth_login(object, method, auth_data) {
my.showLoading({ content: "授权中..." });
var openid = my.getStorageSync({key: this.data.cache_user_login_key}); var openid = my.getStorageSync({key: this.data.cache_user_login_key});
if ((openid || null) == null) if ((openid || null) == null)
{ {
...@@ -309,14 +309,14 @@ App({ ...@@ -309,14 +309,14 @@ App({
* auth_data 授权数据 * auth_data 授权数据
*/ */
get_user_login_info(object, method, openid, userinfo) { get_user_login_info(object, method, openid, userinfo) {
// 远程解密数据 my.showLoading({ content: "授权中..." });
var $this = this; var $this = this;
my.request({ my.request({
url: $this.get_request_url('alipayuserinfo', 'user'), url: $this.get_request_url('alipayuserinfo', 'user'),
method: 'POST', method: 'POST',
data: { userinfo: userinfo, openid: openid }, data: { userinfo: userinfo, openid: openid },
dataType: 'json', dataType: 'json',
header: { 'content-type': 'application/x-www-form-urlencoded' }, headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => { success: (res) => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
...@@ -345,7 +345,7 @@ App({ ...@@ -345,7 +345,7 @@ App({
} }
}, },
fail: () => { fail: () => {
wx.hideLoading(); my.hideLoading();
my.showToast({ my.showToast({
type: "fail", type: "fail",
content: "服务器请求出错", content: "服务器请求出错",
......
...@@ -60,11 +60,12 @@ Page({ ...@@ -60,11 +60,12 @@ Page({
this.setData({form_submit_loading: true}); this.setData({form_submit_loading: true});
// 网络请求 // 网络请求
my.httpRequest({ my.request({
url: app.get_request_url('add', 'answer'), url: app.get_request_url('add', 'answer'),
method: 'POST', method: 'POST',
data: e.detail.value, data: e.detail.value,
dataType: 'json', dataType: 'json',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => { success: (res) => {
my.hideLoading(); my.hideLoading();
......
...@@ -30,13 +30,14 @@ Page({ ...@@ -30,13 +30,14 @@ Page({
}); });
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("common", "answer"), url: app.get_request_url("common", "answer"),
method: "POST", method: "POST",
data: { data: {
page: this.data.data_page page: this.data.data_page
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.stopPullDownRefresh(); my.stopPullDownRefresh();
......
...@@ -72,11 +72,12 @@ Page({ ...@@ -72,11 +72,12 @@ Page({
var data = this.data.params; var data = this.data.params;
data['address_id'] = this.data.address_id; data['address_id'] = this.data.address_id;
data['payment_id'] = this.data.payment_id; data['payment_id'] = this.data.payment_id;
my.httpRequest({ my.request({
url: app.get_request_url("index", "buy"), url: app.get_request_url("index", "buy"),
method: "POST", method: "POST",
data: data, data: data,
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
...@@ -161,11 +162,12 @@ Page({ ...@@ -161,11 +162,12 @@ Page({
my.showLoading({content: '提交中...'}); my.showLoading({content: '提交中...'});
this.setData({ buy_submit_disabled_status: true }); this.setData({ buy_submit_disabled_status: true });
my.httpRequest({ my.request({
url: app.get_request_url("add", "buy"), url: app.get_request_url("add", "buy"),
method: "POST", method: "POST",
data: data, data: data,
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
......
...@@ -64,11 +64,12 @@ Page({ ...@@ -64,11 +64,12 @@ Page({
buy_submit_disabled_status: true, buy_submit_disabled_status: true,
}); });
my.httpRequest({ my.request({
url: app.get_request_url("index", "cart"), url: app.get_request_url("index", "cart"),
method: "POST", method: "POST",
data: {}, data: {},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.stopPullDownRefresh(); my.stopPullDownRefresh();
if (res.data.code == 0) { if (res.data.code == 0) {
...@@ -168,11 +169,12 @@ Page({ ...@@ -168,11 +169,12 @@ Page({
} }
// 更新数据库 // 更新数据库
my.httpRequest({ my.request({
url: app.get_request_url("stock", "cart"), url: app.get_request_url("stock", "cart"),
method: "POST", method: "POST",
data: { "id": temp_data_list[index]['id'], "goods_id": temp_data_list[index]['goods_id'], "stock": buy_number}, data: { "id": temp_data_list[index]['id'], "goods_id": temp_data_list[index]['goods_id'], "stock": buy_number},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.stopPullDownRefresh(); my.stopPullDownRefresh();
if (res.data.code == 0) { if (res.data.code == 0) {
...@@ -231,11 +233,12 @@ Page({ ...@@ -231,11 +233,12 @@ Page({
// 收藏事件 // 收藏事件
goods_favor_event(id, goods_id, type) { goods_favor_event(id, goods_id, type) {
my.httpRequest({ my.request({
url: app.get_request_url('favor', 'goods'), url: app.get_request_url('favor', 'goods'),
method: 'POST', method: 'POST',
data: { "id": goods_id, "is_mandatory_favor": 1 }, data: { "id": goods_id, "is_mandatory_favor": 1 },
dataType: 'json', dataType: 'json',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => { success: (res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
this.cart_delete(id, type); this.cart_delete(id, type);
...@@ -257,11 +260,12 @@ Page({ ...@@ -257,11 +260,12 @@ Page({
// 购物车删除 // 购物车删除
cart_delete(id, type) { cart_delete(id, type) {
my.httpRequest({ my.request({
url: app.get_request_url('delete', 'cart'), url: app.get_request_url('delete', 'cart'),
method: 'POST', method: 'POST',
data: { "id": id }, data: { "id": id },
dataType: 'json', dataType: 'json',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => { success: (res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
var temp_data_list = this.data.data_list; var temp_data_list = this.data.data_list;
......
...@@ -22,11 +22,12 @@ Page({ ...@@ -22,11 +22,12 @@ Page({
}); });
// 加载loding // 加载loding
my.httpRequest({ my.request({
url: app.get_request_url("category", "goods"), url: app.get_request_url("category", "goods"),
method: "POST", method: "POST",
data: {}, data: {},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.stopPullDownRefresh(); my.stopPullDownRefresh();
if (res.data.code == 0) { if (res.data.code == 0) {
......
...@@ -69,11 +69,12 @@ Page({ ...@@ -69,11 +69,12 @@ Page({
data_list_loding_status: 1 data_list_loding_status: 1
}); });
my.httpRequest({ my.request({
url: app.get_request_url("detail", "goods"), url: app.get_request_url("detail", "goods"),
method: "POST", method: "POST",
data: {goods_id: this.data.params.goods_id}, data: {goods_id: this.data.params.goods_id},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.stopPullDownRefresh(); my.stopPullDownRefresh();
my.hideLoading(); my.hideLoading();
...@@ -237,11 +238,12 @@ Page({ ...@@ -237,11 +238,12 @@ Page({
} else { } else {
my.showLoading({content: '处理中...'}); my.showLoading({content: '处理中...'});
my.httpRequest({ my.request({
url: app.get_request_url('favor', 'goods'), url: app.get_request_url('favor', 'goods'),
method: 'POST', method: 'POST',
data: {"id": this.data.goods.id}, data: {"id": this.data.goods.id},
dataType: 'json', dataType: 'json',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => { success: (res) => {
my.hideLoading(); my.hideLoading();
if(res.data.code == 0) if(res.data.code == 0)
...@@ -288,11 +290,12 @@ Page({ ...@@ -288,11 +290,12 @@ Page({
return false; return false;
} else { } else {
my.showLoading({ content: '处理中...' }); my.showLoading({ content: '处理中...' });
my.httpRequest({ my.request({
url: app.get_request_url('save', 'cart'), url: app.get_request_url('save', 'cart'),
method: 'POST', method: 'POST',
data: { "goods_id": this.data.goods.id, "stock": this.data.temp_buy_number, "spec": JSON.stringify(spec) }, data: { "goods_id": this.data.goods.id, "stock": this.data.temp_buy_number, "spec": JSON.stringify(spec) },
dataType: 'json', dataType: 'json',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => { success: (res) => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
...@@ -397,11 +400,12 @@ Page({ ...@@ -397,11 +400,12 @@ Page({
} }
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url('spectype', 'goods'), url: app.get_request_url('spectype', 'goods'),
method: 'POST', method: 'POST',
data: { "id": this.data.goods.id, "spec": JSON.stringify(spec) }, data: { "id": this.data.goods.id, "spec": JSON.stringify(spec) },
dataType: 'json', dataType: 'json',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => { success: (res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
var spec_count = spec.length; var spec_count = spec.length;
...@@ -484,11 +488,12 @@ Page({ ...@@ -484,11 +488,12 @@ Page({
} }
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url('specdetail', 'goods'), url: app.get_request_url('specdetail', 'goods'),
method: 'POST', method: 'POST',
data: { "id": this.data.goods.id, "spec": JSON.stringify(spec) }, data: { "id": this.data.goods.id, "spec": JSON.stringify(spec) },
dataType: 'json', dataType: 'json',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => { success: (res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
this.setData({ this.setData({
......
...@@ -63,11 +63,12 @@ Page({ ...@@ -63,11 +63,12 @@ Page({
post_data['category_id'] = params['category_id'] || 0; post_data['category_id'] = params['category_id'] || 0;
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("index", "search"), url: app.get_request_url("index", "search"),
method: "POST", method: "POST",
data: post_data, data: post_data,
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
my.stopPullDownRefresh(); my.stopPullDownRefresh();
......
...@@ -26,11 +26,12 @@ Page({ ...@@ -26,11 +26,12 @@ Page({
}); });
// 加载loding // 加载loding
my.httpRequest({ my.request({
url: app.get_request_url("index", "index"), url: app.get_request_url("index", "index"),
method: "POST", method: "POST",
data: {}, data: {},
dataType: "json", dataType: "json",
header: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.stopPullDownRefresh(); my.stopPullDownRefresh();
self.setData({load_status: 1}); self.setData({load_status: 1});
......
...@@ -39,8 +39,13 @@ Page({ ...@@ -39,8 +39,13 @@ Page({
user_auth_code(object, method, auth_data) { user_auth_code(object, method, auth_data) {
my.getOpenUserInfo({ my.getOpenUserInfo({
success: (userinfo) => { success: (userinfo) => {
// my.alert({
// title: '亲',
// content: userinfo,
// buttonText: '我知道了',
// });
console.log(userinfo) console.log(userinfo)
app.user_auth_login($this, 'user_auth_back_event', userinfo); app.user_auth_login($this, 'user_auth_back_event', null);
} }
}); });
}, },
...@@ -80,11 +85,12 @@ Page({ ...@@ -80,11 +85,12 @@ Page({
my.showLoading({content: '发送中...'}); my.showLoading({content: '发送中...'});
this.setData({verify_submit_text: '发送中', verify_loading: true, verify_disabled: true}); this.setData({verify_submit_text: '发送中', verify_loading: true, verify_disabled: true});
my.httpRequest({ my.request({
url: app.get_request_url('regverifysend', 'user'), url: app.get_request_url('regverifysend', 'user'),
method: 'POST', method: 'POST',
data: {mobile: this.data.mobile}, data: {mobile: this.data.mobile},
dataType: 'json', dataType: 'json',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => { success: (res) => {
my.hideLoading(); my.hideLoading();
if(res.data.code == 0) if(res.data.code == 0)
...@@ -149,11 +155,12 @@ Page({ ...@@ -149,11 +155,12 @@ Page({
this.setData({form_submit_loading: true}); this.setData({form_submit_loading: true});
// 网络请求 // 网络请求
my.httpRequest({ my.request({
url: app.get_request_url('reg', 'user'), url: app.get_request_url('reg', 'user'),
method: 'POST', method: 'POST',
data: e.detail.value, data: e.detail.value,
dataType: 'json', dataType: 'json',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: (res) => { success: (res) => {
my.hideLoading(); my.hideLoading();
......
...@@ -51,13 +51,14 @@ Page({ ...@@ -51,13 +51,14 @@ Page({
}); });
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("index", "message"), url: app.get_request_url("index", "message"),
method: "POST", method: "POST",
data: { data: {
page: this.data.data_page page: this.data.data_page
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
my.stopPullDownRefresh(); my.stopPullDownRefresh();
......
...@@ -77,11 +77,12 @@ Page({ ...@@ -77,11 +77,12 @@ Page({
// 加载loding // 加载loding
my.showLoading({ content: "加载中..." }); my.showLoading({ content: "加载中..." });
my.httpRequest({ my.request({
url: app.get_request_url("detail", "useraddress"), url: app.get_request_url("detail", "useraddress"),
method: "POST", method: "POST",
data: self.data.params, data: self.data.params,
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
...@@ -122,11 +123,12 @@ Page({ ...@@ -122,11 +123,12 @@ Page({
// 获取选择的省市区 // 获取选择的省市区
get_province_list() { get_province_list() {
var self = this; var self = this;
my.httpRequest({ my.request({
url: app.get_request_url("index", "region"), url: app.get_request_url("index", "region"),
method: "POST", method: "POST",
data: {}, data: {},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
if (res.data.code == 0) { if (res.data.code == 0) {
var data = res.data.data; var data = res.data.data;
...@@ -152,13 +154,14 @@ Page({ ...@@ -152,13 +154,14 @@ Page({
get_city_list() { get_city_list() {
var self = this; var self = this;
if (self.data.province_id) { if (self.data.province_id) {
my.httpRequest({ my.request({
url: app.get_request_url("index", "region"), url: app.get_request_url("index", "region"),
method: "POST", method: "POST",
data: { data: {
pid: self.data.province_id pid: self.data.province_id
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
if (res.data.code == 0) { if (res.data.code == 0) {
var data = res.data.data; var data = res.data.data;
...@@ -186,13 +189,14 @@ Page({ ...@@ -186,13 +189,14 @@ Page({
var self = this; var self = this;
if (self.data.city_id) { if (self.data.city_id) {
// 加载loding // 加载loding
my.httpRequest({ my.request({
url: app.get_request_url("index", "region"), url: app.get_request_url("index", "region"),
method: "POST", method: "POST",
data: { data: {
pid: self.data.city_id pid: self.data.city_id
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
if (res.data.code == 0) { if (res.data.code == 0) {
var data = res.data.data; var data = res.data.data;
...@@ -301,11 +305,12 @@ Page({ ...@@ -301,11 +305,12 @@ Page({
// 加载loding // 加载loding
my.showLoading({ content: "处理中..." }); my.showLoading({ content: "处理中..." });
my.httpRequest({ my.request({
url: app.get_request_url("save", "useraddress"), url: app.get_request_url("save", "useraddress"),
method: "POST", method: "POST",
data: form_data, data: form_data,
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
......
...@@ -48,11 +48,12 @@ Page({ ...@@ -48,11 +48,12 @@ Page({
}); });
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("index", "useraddress"), url: app.get_request_url("index", "useraddress"),
method: "POST", method: "POST",
data: {}, data: {},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
my.stopPullDownRefresh(); my.stopPullDownRefresh();
...@@ -136,11 +137,12 @@ Page({ ...@@ -136,11 +137,12 @@ Page({
my.showLoading({ content: "处理中..." }); my.showLoading({ content: "处理中..." });
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("delete", "useraddress"), url: app.get_request_url("delete", "useraddress"),
method: "POST", method: "POST",
data: {id: value}, data: {id: value},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) if (res.data.code == 0)
...@@ -216,11 +218,12 @@ Page({ ...@@ -216,11 +218,12 @@ Page({
my.showLoading({ content: "处理中..." }); my.showLoading({ content: "处理中..." });
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("setdefault", "useraddress"), url: app.get_request_url("setdefault", "useraddress"),
method: "POST", method: "POST",
data: {id: value}, data: {id: value},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) if (res.data.code == 0)
......
...@@ -51,13 +51,14 @@ Page({ ...@@ -51,13 +51,14 @@ Page({
}); });
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("index", "answer"), url: app.get_request_url("index", "answer"),
method: "POST", method: "POST",
data: { data: {
page: this.data.data_page page: this.data.data_page
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
my.stopPullDownRefresh(); my.stopPullDownRefresh();
......
...@@ -50,13 +50,14 @@ Page({ ...@@ -50,13 +50,14 @@ Page({
}); });
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("index", "usergoodsfavor"), url: app.get_request_url("index", "usergoodsfavor"),
method: "POST", method: "POST",
data: { data: {
page: this.data.data_page page: this.data.data_page
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
my.stopPullDownRefresh(); my.stopPullDownRefresh();
...@@ -146,11 +147,12 @@ Page({ ...@@ -146,11 +147,12 @@ Page({
// 加载loding // 加载loding
my.showLoading({ content: "处理中..." }); my.showLoading({ content: "处理中..." });
my.httpRequest({ my.request({
url: app.get_request_url("cancel", "usergoodsfavor"), url: app.get_request_url("cancel", "usergoodsfavor"),
method: "POST", method: "POST",
data: {id: id}, data: {id: id},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
......
...@@ -50,13 +50,14 @@ Page({ ...@@ -50,13 +50,14 @@ Page({
}); });
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("index", "usergoodsbrowse"), url: app.get_request_url("index", "usergoodsbrowse"),
method: "POST", method: "POST",
data: { data: {
page: this.data.data_page page: this.data.data_page
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
my.stopPullDownRefresh(); my.stopPullDownRefresh();
...@@ -145,11 +146,12 @@ Page({ ...@@ -145,11 +146,12 @@ Page({
// 加载loding // 加载loding
my.showLoading({ content: "处理中..." }); my.showLoading({ content: "处理中..." });
my.httpRequest({ my.request({
url: app.get_request_url("delete", "usergoodsbrowse"), url: app.get_request_url("delete", "usergoodsbrowse"),
method: "POST", method: "POST",
data: { id: id }, data: { id: id },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
......
...@@ -51,13 +51,14 @@ Page({ ...@@ -51,13 +51,14 @@ Page({
}); });
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("index", "userintegral"), url: app.get_request_url("index", "userintegral"),
method: "POST", method: "POST",
data: { data: {
page: this.data.data_page page: this.data.data_page
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
my.stopPullDownRefresh(); my.stopPullDownRefresh();
......
...@@ -25,13 +25,14 @@ Page({ ...@@ -25,13 +25,14 @@ Page({
data_list_loding_status: 1 data_list_loding_status: 1
}); });
my.httpRequest({ my.request({
url: app.get_request_url("detail", "order"), url: app.get_request_url("detail", "order"),
method: "POST", method: "POST",
data: { data: {
id: this.data.params.id id: this.data.params.id
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
my.stopPullDownRefresh(); my.stopPullDownRefresh();
......
...@@ -93,7 +93,7 @@ Page({ ...@@ -93,7 +93,7 @@ Page({
var order_status = ((this.data.nav_status_list[this.data.nav_status_index] || null) == null) ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value']; var order_status = ((this.data.nav_status_list[this.data.nav_status_index] || null) == null) ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value'];
// 获取数据 // 获取数据
my.httpRequest({ my.request({
url: app.get_request_url("index", "order"), url: app.get_request_url("index", "order"),
method: "POST", method: "POST",
data: { data: {
...@@ -103,6 +103,7 @@ Page({ ...@@ -103,6 +103,7 @@ Page({
is_more: 1, is_more: 1,
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
my.stopPullDownRefresh(); my.stopPullDownRefresh();
...@@ -226,7 +227,7 @@ Page({ ...@@ -226,7 +227,7 @@ Page({
// 加载loding // 加载loding
my.showLoading({ content: "请求中..." }); my.showLoading({ content: "请求中..." });
my.httpRequest({ my.request({
url: app.get_request_url("pay", "order"), url: app.get_request_url("pay", "order"),
method: "POST", method: "POST",
data: { data: {
...@@ -234,6 +235,7 @@ Page({ ...@@ -234,6 +235,7 @@ Page({
payment_id: this.data.payment_id, payment_id: this.data.payment_id,
}, },
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
...@@ -310,11 +312,12 @@ Page({ ...@@ -310,11 +312,12 @@ Page({
// 加载loding // 加载loding
my.showLoading({ content: "处理中..." }); my.showLoading({ content: "处理中..." });
my.httpRequest({ my.request({
url: app.get_request_url("cancel", "order"), url: app.get_request_url("cancel", "order"),
method: "POST", method: "POST",
data: {id: id}, data: {id: id},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
...@@ -363,11 +366,12 @@ Page({ ...@@ -363,11 +366,12 @@ Page({
// 加载loding // 加载loding
my.showLoading({ content: "处理中..." }); my.showLoading({ content: "处理中..." });
my.httpRequest({ my.request({
url: app.get_request_url("collect", "order"), url: app.get_request_url("collect", "order"),
method: "POST", method: "POST",
data: {id: id}, data: {id: id},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.hideLoading(); my.hideLoading();
if (res.data.code == 0) { if (res.data.code == 0) {
......
...@@ -84,11 +84,12 @@ Page({ ...@@ -84,11 +84,12 @@ Page({
// 获取数据 // 获取数据
get_data() { get_data() {
my.httpRequest({ my.request({
url: app.get_request_url("center", "user"), url: app.get_request_url("center", "user"),
method: "POST", method: "POST",
data: {}, data: {},
dataType: "json", dataType: "json",
headers: { 'content-type': 'application/x-www-form-urlencoded' },
success: res => { success: res => {
my.stopPullDownRefresh(); my.stopPullDownRefresh();
if (res.data.code == 0) { if (res.data.code == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册