Преглед на файлове

fix

- 修改 获取openId方式
feat
JinxChen преди 1 година
родител
ревизия
3e3cd009d6
променени са 3 файла, в които са добавени 31 реда и са изтрити 14 реда
  1. +3
    -2
      README.md
  2. +11
    -2
      src/api/core.js
  3. +17
    -10
      src/views/package-list/index.vue

+ 3
- 2
README.md Целия файл

@@ -1,7 +1,7 @@
<!--
* @Date: 2022-08-17 16:19:13
* @LastEditors: JinxChen
* @LastEditTime: 2023-02-25 16:43:43
* @LastEditTime: 2023-02-25 17:24:17
* @FilePath: \TelpoH5FrontendWeb\README.md
* @description: 项目说明
-->
@@ -193,4 +193,5 @@ fix
`2023.2.25`
fix
- 修复 调起微信支付异常的问题
- 修复 获取imei异常的问题
- 修复 获取imei异常的问题
- 修改 获取openId方式

+ 11
- 2
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;

function cardPackageList(data) {
return service({
url: `${baseUrl}/core/api/v1/open/card/QueryIotCardPackage`,
method: 'post',
data,
});
}
export default APICore;

+ 17
- 10
src/views/package-list/index.vue Целия файл

@@ -1,7 +1,7 @@
<!--
* @Date: 2022-03-29 16:57:58
* @LastEditors: JinxChen
* @LastEditTime: 2023-02-25 16:54:07
* @LastEditTime: 2023-02-25 17:17:01
* @FilePath: \TelpoH5FrontendWeb\src\views\package-list\index.vue
* @description: TODO 小台风充值h5
-->
@@ -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
}
});
})


Loading…
Отказ
Запис