diff --git a/api/coupon/coupon.js b/api/coupon/coupon.js index f52adae..16fc030 100644 --- a/api/coupon/coupon.js +++ b/api/coupon/coupon.js @@ -52,4 +52,71 @@ export function listCouponPropertyUserDetail(_that,_data){ } }) }); +} + +export function getIntegralSetting(_that,_data){ + return new Promise(function(reslove,reject){ + _that.context.get({ + url: url.listIntegralSetting, + data:_data, + success: function(res) { + if(res.data.code != 0){ + reject(res.data.msg); + return ; + } + reslove(res.data); + }, + fail: function(e) { + reject(e); + } + }) + }); +} + +export function useIntegral(_that,_data){ + return new Promise(function(reslove,reject){ + // debugger + _that.context.post({ + url: url.useIntegral, + data:_data, + success: function(res) { + if (res.data.code == 0){ + reslove(res); + }else { + // debugger + wx.showToast({ + title: "核销状态:" + res.data.msg, + icon: 'none', + duration: 3000 + }) + } + }, + fail: function(e) { + wx.showToast({ + title: "服务器异常了", + icon: 'none', + duration: 3000 + }) + } + }) + }); +} + +export function getIntegralUserDetail(_that,_data){ + return new Promise(function(reslove,reject){ + _that.context.get({ + url: url.listIntegralUserDetail, + data:_data, + success: function(res) { + if(res.data.code != 0){ + reject(res.data.msg); + return ; + } + reslove(res.data); + }, + fail: function(e) { + reject(e); + } + }) + }); } \ No newline at end of file diff --git a/api/owner/owner.js b/api/owner/owner.js new file mode 100644 index 0000000..21d2934 --- /dev/null +++ b/api/owner/owner.js @@ -0,0 +1,45 @@ +import url from '../../constant/url.js'; +export function queryOwners(_that,_data){ + return new Promise(function(reslove,reject){ + _that.context.get({ + url: url.queryOwners, + data:_data, + success: function(res) { + reslove(res.data); + }, + fail: function(e) { + wx.showToast({ + title: "服务器异常了", + icon: 'none', + duration: 2000 + }) + } + }) + }); +} +export function queryOwnerAccount(_that,_data){ + return new Promise(function(reslove,reject){ + _that.context.get({ + url: url.queryOwnerAccount, + data:_data, + success: function(res) { + if(res.data.code == 0){ + reslove(res.data); + }else{ + wx.showToast({ + title: "服务器异常了", + icon: 'none', + duration: 2000 + }) + } + }, + fail: function(e) { + wx.showToast({ + title: "服务器异常了", + icon: 'none', + duration: 2000 + }) + } + }) + }); +} diff --git a/components/coupon/use-integral-log.vue b/components/coupon/use-integral-log.vue new file mode 100644 index 0000000..b4218df --- /dev/null +++ b/components/coupon/use-integral-log.vue @@ -0,0 +1,72 @@ + + + + + \ No newline at end of file diff --git a/components/coupon/use-integral.vue b/components/coupon/use-integral.vue new file mode 100644 index 0000000..04f61de --- /dev/null +++ b/components/coupon/use-integral.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/constant/url.js b/constant/url.js index cac9390..1f38dd6 100644 --- a/constant/url.js +++ b/constant/url.js @@ -179,7 +179,16 @@ export default { saveCommunitySpaceConfirmOrder: baseUrl + "app/communitySpace.saveCommunitySpaceConfirmOrder", queryReportStaffInspection: baseUrl+"app/inspection.queryReportStaffInspection", listCouponPropertyUserDetail: baseUrl+"app/couponProperty.listCouponPropertyUserDetail", - writeOffCouponPropertyUser: baseUrl+"app/couponProperty.writeOffCouponPropertyUser" + writeOffCouponPropertyUser: baseUrl+"app/couponProperty.writeOffCouponPropertyUser", + listIntegralSetting: baseUrl+"app/integral.listIntegralSetting", + queryOwners: baseUrl+"app/owner.queryOwners", + queryOwnerAccount: baseUrl+"app/account/queryOwnerAccount", + useIntegral: baseUrl+"app/integral.useIntegral", + listIntegralUserDetail: baseUrl+"app/integral.listIntegralUserDetail", + + + + diff --git a/pages.json b/pages.json index ed3a7ce..7dd1112 100644 --- a/pages.json +++ b/pages.json @@ -569,6 +569,15 @@ } } + ,{ + "path" : "pages/coupon/writeOffIntegral", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + + } ], "globalStyle": { "navigationBarTextStyle": "white", diff --git a/pages/coupon/writeOffIntegral.vue b/pages/coupon/writeOffIntegral.vue new file mode 100644 index 0000000..627dba6 --- /dev/null +++ b/pages/coupon/writeOffIntegral.vue @@ -0,0 +1,58 @@ + + +