diff --git a/README.md b/README.md index 173d5bb..b0c05bb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -193,4 +193,5 @@ fix `2023.2.25` fix - 修复 调起微信支付异常的问题 -- 修复 获取imei异常的问题 \ No newline at end of file +- 修复 获取imei异常的问题 +- 修改 获取openId方式 \ No newline at end of file diff --git a/src/api/core.js b/src/api/core.js index 7a9ea24..bdaa645 100644 --- a/src/api/core.js +++ b/src/api/core.js @@ -1,7 +1,7 @@ /* * @Date: 2021-12-18 15:49:01 * @LastEditors: JinxChen - * @LastEditTime: 2023-02-24 10:03:15 + * @LastEditTime: 2023-02-25 17:04:23 * @FilePath: \TelpoH5FrontendWeb\src\api\core.js * @description: * b端的接口, 每次调用前先获取token @@ -27,6 +27,7 @@ export const APICore = { QueryLiveBasePackage, //获取基本套餐 payLiveBaseDevice, //微信统一下单 GpsDeviceFence, //围栏 redis + cardPackageList, //零川基础套餐列表 } /* const headerAuth = this.$store.getters.gatewayToken; */ // 获取告警详情 @@ -76,4 +77,12 @@ function payLiveBaseDevice(params) { data: params }); } -export default APICore; \ No newline at end of file + +function cardPackageList(data) { + return service({ + url: `${baseUrl}/core/api/v1/open/card/QueryIotCardPackage`, + method: 'post', + data, + }); +} +export default APICore; diff --git a/src/views/package-list/index.vue b/src/views/package-list/index.vue index 43cea5b..a391992 100644 --- a/src/views/package-list/index.vue +++ b/src/views/package-list/index.vue @@ -1,7 +1,7 @@ @@ -161,10 +161,15 @@ export default { duration: 1500 }); let reqBody = { - imei: this.params.imei + manufactorId:"", + productModelId:0, + iccid:"", + pageNumber:1, + begNumber:20 } - APICore.QueryLiveBasePackage(reqBody) + APICore.cardPackageList(reqBody) .then(res => { + console.log("data", res.data); if (res.data.code === 106 || res.data.code === 104) { // token过期 this.getAuth(); @@ -174,11 +179,13 @@ export default { } else if (res.data.code === 0 && res.data.data === null) { this.isShowNoData = true; }else { - let data = res.data.data.packageList; + let data = res.data.data.list; if(data === null) { this.isShowNoData = true; } else { - this.packageOrderList = data.reverse(); + this.packageOrderList = data.filter(item => { + return item.pechargeUrl === '1629405716684029952' || item.pechargeUrl === '1629405558344859648'; + }); console.log("套餐数据::", data); } } @@ -254,9 +261,9 @@ export default { let reqBody = { openId: this.$store.getters.openId, //openId imei: this.params.imei, //imei - productId: data.productId, //套餐id + productId: data.pechargeUrl, //套餐id packageName: data.productModel + ',' + data.packageName, //套餐名字 - packagePayType: this.shiftType(data.packagePayType), //支付类型 + packagePayType: data.packagePayType, //支付类型 packageIssue: data.packageIssue, //分期 packagePrice: process.env.NODE_ENV === "production" ? data.packagePrice * 100 : 1 //总金额单位为分,测试环境写死 }; @@ -342,9 +349,9 @@ export default { let reqBody = { openId: this.$store.getters.openId, //openId imei: this.serialNo, //imei - productId: data.productId, //套餐id + productId: data.pechargeUrl, //套餐id packageName: data.productModel + ',' + data.packageName, //套餐名字 - packagePayType: this.shiftType(data.packagePayType), //支付类型 + packagePayType: data.packagePayType, //支付类型 packageIssue: data.packageIssue, //分期 packagePrice: process.env.NODE_ENV === "production" ? data.packagePrice * 100 : 1 //总金额单位为分,测试环境写死 }; @@ -376,7 +383,7 @@ export default { isAdmin: that.$route.query.isAdmin || false, serialNo: that.params.imei, alipayUserId: alipayUserId, - productId: data.productId + productId: data.pechargeUrl } }); })