From b59670f0a9e22153b074e91e9cf7a441b6d9387b Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Sun, 5 Mar 2023 12:01:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=A5=97=E9=A4=90?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/package-list/index.vue | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/views/package-list/index.vue b/src/views/package-list/index.vue index 397b3b5..f320dfa 100644 --- a/src/views/package-list/index.vue +++ b/src/views/package-list/index.vue @@ -1,7 +1,7 @@ @@ -52,11 +52,11 @@ 合计{{item.packagePrice}}元

-
+

支付方式:

@@ -88,6 +88,11 @@
+
+
+

第一步:充值话费

+
+
@@ -522,7 +527,7 @@ export default { .package-order-container { position: relative; margin: 10px 0; - padding: 0 20px; + /* padding: 0 20px; */ z-index: 999; box-shadow: rgba(14, 30, 37, 0.12) 0 3px 5px 0, rgba(14, 30, 37, 0.32) 0 2px 16px 0; @@ -560,7 +565,7 @@ export default { } } .order-content { - padding: 15px 0; + padding: 15px 10px; .title { display: flex; justify-content: flex-start; @@ -618,10 +623,11 @@ export default { } } .package-buy { + @include center(); padding: 5px 8px; .buy-btn { height: 40px; - width: 150px; + width: 200px; padding: 0 5px; display: flex; justify-content: center; From 44130adb8cf340ea677dc3d9c68a30c97a2ab3d5 Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Mon, 13 Mar 2023 16:41:49 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat=20-=20=E5=A2=9E=E5=8A=A0=20=E5=A5=97?= =?UTF-8?q?=E9=A4=90=E5=88=97=E8=A1=A8=E4=BB=8E=E6=8E=A5=E5=8F=A3=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++- src/api/core.js | 8 +++ src/config/models.js | 4 +- src/http/webapi.js | 4 +- src/views/package-list/index.vue | 91 ++++++++++++++++++-------------- 5 files changed, 69 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index bae3cf4..c095e87 100644 --- a/README.md +++ b/README.md @@ -249,4 +249,10 @@ feature ## v1.0.28 `2023.3.2` update -- 修改 最后一步按钮文案 \ No newline at end of file +- 修改 最后一步按钮文案 + + +## v1.0.29 +`2023.3.13` +feat +- 增加 套餐列表从接口获取 \ No newline at end of file diff --git a/src/api/core.js b/src/api/core.js index bdaa645..47ca481 100644 --- a/src/api/core.js +++ b/src/api/core.js @@ -28,6 +28,7 @@ export const APICore = { payLiveBaseDevice, //微信统一下单 GpsDeviceFence, //围栏 redis cardPackageList, //零川基础套餐列表 + devicePayPackage, } /* const headerAuth = this.$store.getters.gatewayToken; */ // 获取告警详情 @@ -85,4 +86,11 @@ function cardPackageList(data) { data, }); } +function devicePayPackage(imei) { + return service({ + url: `${baseUrl}/core/api/v1/open/card/GetDevicePayPackage`, + method: 'get', + params: {imei}, + }) +} export default APICore; diff --git a/src/config/models.js b/src/config/models.js index 7f11c07..0b3bf58 100644 --- a/src/config/models.js +++ b/src/config/models.js @@ -1,11 +1,11 @@ /* * @Date: 2021-11-20 10:26:39 * @LastEditors: JinxChen - * @LastEditTime: 2023-02-27 09:59:02 + * @LastEditTime: 2023-03-13 09:35:07 * @FilePath: \TelpoH5FrontendWeb\src\config\models.js * @description: */ -export const VERSION_MODEL = '1.0.28F'; //版本号 +export const VERSION_MODEL = '1.0.29F'; //版本号 export const IMAGE_URL = { production: 'http://zfb.ssjlai.com/web/', test: 'http://zfb.ssjlai.com/web/', diff --git a/src/http/webapi.js b/src/http/webapi.js index 7427682..b5f1927 100644 --- a/src/http/webapi.js +++ b/src/http/webapi.js @@ -1,7 +1,7 @@ /* * @Author: linwl * @Date: 2020-04-13 14:47:59 - * @LastEditTime: 2023-02-24 10:47:44 + * @LastEditTime: 2023-03-13 16:35:17 * @LastEditors: JinxChen * @Description: axios请求配置 * @FilePath: \TelpoH5FrontendWeb\src\http\webapi.js @@ -41,7 +41,7 @@ service.interceptors.request.use( /* if (localStorage.getItem('webapiToken')) { } */ - request.headers.AuthToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJVc2VySW5mbyI6eyJVc2VySWQiOiJjZTQzOWU1Yy03NWVjLTRhMTEtYWJmMC02YTdhM2IzY2UwMGQiLCJMb2dpbk5hbWUiOiIxODI3NzQyNjcxMiIsIkxvZ2luVHlwZSI6MX0sIkV4cCI6MTY4NDg5NTk5ODg4NS4wfQ.VK_fNU0QrCJwsc_Dxa_lPP1dvnxo73TfKzV_bJquqxU'; + request.headers.AuthToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJVc2VySW5mbyI6eyJVc2VySWQiOiJjZTQzOWU1Yy03NWVjLTRhMTEtYWJmMC02YTdhM2IzY2UwMGQiLCJMb2dpbk5hbWUiOiIxODI3NzQyNjcxMiIsIkxvZ2luVHlwZSI6MX0sIkV4cCI6MTY4NjY0NTI1MTQ4NC4wfQ.cm3AblDTivfbuJ-OgDAglWVsJFWiJZyrpt_BmNq499g'; return request; }, errorHandler diff --git a/src/views/package-list/index.vue b/src/views/package-list/index.vue index f320dfa..ff3b268 100644 --- a/src/views/package-list/index.vue +++ b/src/views/package-list/index.vue @@ -1,7 +1,7 @@ @@ -18,7 +18,7 @@
-
+

暂无相关套餐数据,请您联系管理员~

@@ -38,7 +38,7 @@
-

{{item.packageName}}

+

{{item.packageName}}

每月200分钟通话时长,1G流量

@@ -46,10 +46,10 @@

- ¥{{(item.packagePrice/(item.packageIssue === 0 ? 1: item.packageIssue)).toFixed(0)}}元/月, + ¥{{(item.packagesPrice/(item.packageIssue === 0 ? 1: item.packageIssue)).toFixed(0)}}元/月,

- 合计{{item.packagePrice}}元 + 合计{{item.packagesPrice}}元

@@ -279,30 +279,33 @@ export default { this.price = data.packagesPrice; // 遍历数据找到属于三种支付方式对应的套餐id, 1 微信 2 支付宝全额 3 支付宝分期 let payTypeToPackAgeId = data.payTypeList; - console.log("购买的套餐数据data", data); + console.log("购买的套餐数据data", payTypeToPackAgeId); // 需要区分是要用微信支付还是支付宝花呗支付 if (this.payType === '2') { // 全额 this.payProductId = payTypeToPackAgeId.filter(item => { - return item.payType === '2'; + return item.payType === '2' })[0].productId; this.packageIssue = 0; + console.log("this.payProductId", this.payProductId); this.aliPay(data); } else if (this.payType === '3') { // 分期 this.payProductId = payTypeToPackAgeId.filter(item => { - return item.payType === '3'; + return item.payType === '3' })[0].productId; this.packageIssue = 12; - this.payType = '2' + this.payType = '2'; + console.log("this.payProductId2", this.payProductId); this.aliPay(data); } else { // 微信 let openId = this.$store.getters.openId; this.payProductId = payTypeToPackAgeId.filter(item => { - return item.payType === '1'; + return item.payType === '1' })[0].productId; this.packageIssue = 0; + console.log("this.payProductId3", this.payProductId); if(openId === null || openId === 'null') { this.$dialog.confirm({ message: '获取OpenId失败,请您重新进入', @@ -324,7 +327,7 @@ export default { openId: this.$store.getters.openId, //openId imei: this.params.imei, //imei productId: this.payProductId, //套餐id - packageName: /* data.productModel */ data.packageName, //套餐名字 + packageName: /* data.productModel */ data.packagesName, //套餐名字 packagePayType: Number(this.payType), //支付类型 packageIssue: 0, //分期 packagePrice: process.env.NODE_ENV === "production" ? data.packagesPrice * 100 : 1 //总金额单位为分,测试环境写死 @@ -419,7 +422,7 @@ export default { openId: this.$store.getters.openId, //openId imei: this.params.imei, //imei productId: this.payProductId, //套餐id - packageName: /* data.productModel + ',' + */data.packageName, //套餐名字 + packageName: /* data.productModel + ',' + */data.packagesName, //套餐名字 packagePayType: Number(this.payType), //支付类型 packageIssue: this.packageIssue, //分期 packagePrice: process.env.NODE_ENV === "production" ? data.packagesPrice * 100 : 1 //总金额单位为分,测试环境写死 From 5d4081971632c169bf9dd7597627f221be1732ed Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Tue, 14 Mar 2023 15:35:46 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat=20-=20cardInfo=20=20=20=20=20-=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E7=89=A9=E8=81=94=E7=BD=91=E5=8D=A1?= =?UTF-8?q?=E5=A5=97=E9=A4=90=E4=BF=A1=E6=81=AF=E6=9F=A5=E8=AF=A2=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20=20=20=20=20-=20=E5=A2=9E=E5=8A=A0=20=E5=8A=A0?= =?UTF-8?q?=E6=B2=B9=E5=8C=85=E5=90=88=E5=9F=BA=E7=A1=80=E5=A5=97=E9=A4=90?= =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 +- src/config/models.js | 2 +- src/router/index.js | 3 +- src/views/buy-record/index.vue | 8 +- src/views/card-info/index.vue | 54 ++- src/views/package-buy/index.vue | 670 ++++++++++++++++++++++++++++++++ 6 files changed, 734 insertions(+), 12 deletions(-) create mode 100644 src/views/package-buy/index.vue diff --git a/README.md b/README.md index c095e87..c915387 100644 --- a/README.md +++ b/README.md @@ -255,4 +255,11 @@ update ## v1.0.29 `2023.3.13` feat -- 增加 套餐列表从接口获取 \ No newline at end of file +- 增加 套餐列表从接口获取 + +## v1.0.30 +`2023.3.14` +feat +- cardInfo + - 增加 物联网卡套餐信息查询页面 + - 增加 加油包合基础套餐购买页面 diff --git a/src/config/models.js b/src/config/models.js index 0b3bf58..524e9bb 100644 --- a/src/config/models.js +++ b/src/config/models.js @@ -5,7 +5,7 @@ * @FilePath: \TelpoH5FrontendWeb\src\config\models.js * @description: */ -export const VERSION_MODEL = '1.0.29F'; //版本号 +export const VERSION_MODEL = '1.0.30F'; //版本号 export const IMAGE_URL = { production: 'http://zfb.ssjlai.com/web/', test: 'http://zfb.ssjlai.com/web/', diff --git a/src/router/index.js b/src/router/index.js index b1cde61..66c6911 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,7 +1,7 @@ /* * @Date: 2023-02-25 16:34:35 * @LastEditors: JinxChen - * @LastEditTime: 2023-02-26 15:30:31 + * @LastEditTime: 2023-03-14 09:33:17 * @FilePath: \TelpoH5FrontendWeb\src\router\index.js * @description: */ @@ -25,6 +25,7 @@ const routes = [ { path: '/packageList', name: 'packageList', component: resolve => require(['@/views/package-list'], resolve) }, { path: '/payResult', name: 'payResult', component: resolve => require(['@/views/pay-result'], resolve) }, { path: '/cardInfo', name: 'cardInfo', component: resolve => require(['@/views/card-info'], resolve) }, + { path: '/packageBuy', name: 'packageBuy', component: resolve => require(['@/views/package-buy'], resolve) }, { path: '/buyRecord', name: 'buyRecord', component: resolve => require(['@/views/buy-record'], resolve) }, { path: '/activeStatus', name: 'activeStatus', component: resolve => require(['@/views/active-status'], resolve) }, { path: '/cardActive', name: 'cardActive', component: resolve => require(['@/views/card-active'], resolve) }, diff --git a/src/views/buy-record/index.vue b/src/views/buy-record/index.vue index d69706d..63fc945 100644 --- a/src/views/buy-record/index.vue +++ b/src/views/buy-record/index.vue @@ -93,10 +93,10 @@ export default { }) }, onNavBack() { - /* this.$router.push({ - name: "check", - query: { serialNo: this.$route.query.serialNo, iccid: this.$route.query.iccid, isShowMenu: true} - }); */ + this.$router.replace({ + name: "cardInfo", + query: { imei: this.$route.query.imei, iccid: this.$route.query.iccid, isShowMenu: true} + }); }, // 复制订单号 onCopy(type) { diff --git a/src/views/card-info/index.vue b/src/views/card-info/index.vue index 45e309d..e49a8ba 100644 --- a/src/views/card-info/index.vue +++ b/src/views/card-info/index.vue @@ -1,7 +1,7 @@ @@ -71,6 +71,9 @@ + +