From d6eae39b0f08a32566a4070fea6b17b8b2d4996a Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Fri, 4 Mar 2022 15:53:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?-=20=E5=A2=9E=E5=8A=A0=20AgreementDialog=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6,=20'@/components/AgreementDialog'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 33 ++++++- antpay_frontend_web_run.sh | 4 +- package-lock.json | 12 +++ package.json | 1 + src/api/alipay.js | 6 +- src/components/AgreementDialog.vue | 144 +++++++++++++++++++++++++++++ src/main.js | 13 ++- 7 files changed, 202 insertions(+), 11 deletions(-) create mode 100644 src/components/AgreementDialog.vue diff --git a/README.md b/README.md index a058952..6cac505 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # alipay-scan-code-front-end ## 项目说明 @@ -23,12 +23,28 @@ npm run dev npm run build ``` +### 项目本地调试 + +``` +运行成功后 本地调试首次进入会进入到 http://localhost:8080/#/404 404页面 +因为当前url还没有参数, 此时需要手动在url后面添加需要的参数, +例子: http://localhost:8080/#/index?goodsNo=889&userId=1 +其中 goodsNo是商品的no, userId是用户的id, 这两个参数后面接口都会用到 +以上在线上环境不需要配置,因为二维码会自动把这两个参数添加上去 +``` + ### 项目代码编写规范(暂时想到这些,后面根据项目情况补充说明) - css类名: 小写驼峰 中间用 - 隔开 - js函数方法: 开头小写后面开头大写驼峰 - .vue 文件命名: 统一大写驼峰 - 常量命名: 全部大写 以_拼接, 具体例子见: /src/config/models下的文件 + +### 项目分支管理 +- master: 不可在此分支做任何修改, 只能合并develop分支, git merge --no-ff develop ; 且部署上线时对应production环境,不可混肴 +- develop: 平时开发使用此分支, 需另开分支并说明是做什么的, 比如fix bug, git checkout -b fix-xxxx, 开发完成自测无问题后合并到develop分支, +- test: 如不必要不在此分支做任何修改, 合并develpo分支, git merge --no-ff develop ; 部署上线时对应test环境,不可混肴 + ### git 提交规范 - feature 新增一个功能 - bugfix 修复一个 @@ -44,12 +60,13 @@ npm run build 。 ### 版本控制以及版本迭代说明 + ### v1.0.0 `2022.02.23` build - 初版发布 - 完成 项目搭建 -- 完成 项目迁移 从documentFrontEndWeb 到 AlipayFrontendWeb +- 完成 项目迁移 从documentFrontEndWeb 到 AntpayFrontEnd - 增加 docker部署脚本 - 增加 环境设置脚本 - 增加 nginx.conf文件 @@ -61,4 +78,12 @@ fix feature - 增加 非支付宝浏览环境下扫码切换支付宝弹窗提示 - 增加 android和ios设备支付宝下载链接 -- 增加 android设备复制粘贴下载链接功能 \ No newline at end of file +- 增加 android设备复制粘贴下载链接功能 + + +### v1.0.2 +`2022.03.04` +feature +- 增加 春雨个性化定制 '@/views/chunyu/AliPayForm' +- 增加 Checkbox 组件, '@/components/checkbox' +- 增加 AgreementDialog 组件, '@/components/AgreementDialog' \ No newline at end of file diff --git a/antpay_frontend_web_run.sh b/antpay_frontend_web_run.sh index cb60b1f..6ff264e 100644 --- a/antpay_frontend_web_run.sh +++ b/antpay_frontend_web_run.sh @@ -2,9 +2,9 @@ ### # @Date: 2021-11-15 09:37:49 # @LastEditors: JinxChen - # @LastEditTime: 2022-02-25 11:36:46 + # @LastEditTime: 2022-03-04 10:47:47 # @FilePath: \AntpayFrontEnd\antpay_frontend_web_run.sh - # @description: docker部署脚本 + # @description: docker部署脚本, 根据项目具体情况来 修改 docker run -p 8804:80 ### environment=$1 version=$2 diff --git a/package-lock.json b/package-lock.json index e7acc8a..50a360b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,8 +5,10 @@ "requires": true, "packages": { "": { + "name": "alipay-scan-code-front-end", "version": "0.1.0", "dependencies": { + "@vant/area-data": "^1.2.2", "axios": "^0.26.0", "core-js": "^3.6.5", "nprogress": "^0.2.0", @@ -2492,6 +2494,11 @@ "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", "dev": true }, + "node_modules/@vant/area-data": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.2.2.tgz", + "integrity": "sha512-efv7Yl/OTHjyy0irhJJPtgZb5mJZmroEtVOa8vkGRNTLY93+NgEcVuIBaC35hYCMsTrPHDQRvQGnI9Hyhtto0Q==" + }, "node_modules/@vant/icons": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.7.3.tgz", @@ -21439,6 +21446,11 @@ "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", "dev": true }, + "@vant/area-data": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.2.2.tgz", + "integrity": "sha512-efv7Yl/OTHjyy0irhJJPtgZb5mJZmroEtVOa8vkGRNTLY93+NgEcVuIBaC35hYCMsTrPHDQRvQGnI9Hyhtto0Q==" + }, "@vant/icons": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.7.3.tgz", diff --git a/package.json b/package.json index 9600648..d5ffd6e 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "test:unit": "vue-cli-service test:unit" }, "dependencies": { + "@vant/area-data": "^1.2.2", "axios": "^0.26.0", "core-js": "^3.6.5", "nprogress": "^0.2.0", diff --git a/src/api/alipay.js b/src/api/alipay.js index d6a7ee4..0450017 100644 --- a/src/api/alipay.js +++ b/src/api/alipay.js @@ -1,9 +1,9 @@ /* * @Date: 2022-02-14 15:18:50 * @LastEditors: JinxChen - * @LastEditTime: 2022-02-14 15:21:05 - * @FilePath: \alipay-scan-code-front-end\src\api\goods.js - * @description: + * @LastEditTime: 2022-03-04 10:50:22 + * @FilePath: \AntpayFrontEnd\src\api\alipay.js + * @description: axios封装 */ import request from '../http/request'; diff --git a/src/components/AgreementDialog.vue b/src/components/AgreementDialog.vue new file mode 100644 index 0000000..a675c58 --- /dev/null +++ b/src/components/AgreementDialog.vue @@ -0,0 +1,144 @@ + + + + + + diff --git a/src/main.js b/src/main.js index b7c720c..2f14456 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,7 @@ /* * @Date: 2022-01-19 10:08:26 * @LastEditors: JinxChen - * @LastEditTime: 2022-02-25 17:51:58 + * @LastEditTime: 2022-03-04 15:00:32 * @FilePath: \AntpayFrontEnd\src\main.js * @description: */ @@ -34,7 +34,11 @@ import { Notify, Loading, Toast, -} from 'vant'; + Popup, + Area, + Cascader, + Picker, +} from 'vant'; //按需加载vant组件 Vue .use(Button) @@ -59,9 +63,14 @@ Vue .use(Notify) .use(Loading) .use(Toast) + .use(Area) + .use(Popup) + .use(Picker) + .use(Cascader) .use(Tabs); Vue.config.productionTip = false; +Vue.prototype.$bus = new Vue(); new Vue({ router, store, From b116b9d3b3194d7d2c8234d04a65adb437530c66 Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Fri, 4 Mar 2022 15:53:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?-=20=E5=A2=9E=E5=8A=A0=20Checkbox=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6,=20'@/components/checkbox'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Checkbox.vue | 76 +++++++++++++++++++++++++++++++++++++ src/utils/bus.js | 10 +++++ 2 files changed, 86 insertions(+) create mode 100644 src/components/Checkbox.vue create mode 100644 src/utils/bus.js diff --git a/src/components/Checkbox.vue b/src/components/Checkbox.vue new file mode 100644 index 0000000..e887ae0 --- /dev/null +++ b/src/components/Checkbox.vue @@ -0,0 +1,76 @@ + + + + + + \ No newline at end of file diff --git a/src/utils/bus.js b/src/utils/bus.js new file mode 100644 index 0000000..fbd053e --- /dev/null +++ b/src/utils/bus.js @@ -0,0 +1,10 @@ +/* + * @Date: 2022-02-28 15:30:40 + * @LastEditors: JinxChen + * @LastEditTime: 2022-02-28 15:30:43 + * @FilePath: \AntpayFrontEnd\src\utils\bus.js + * @description: + */ +import Vue from 'vue'; +const bus = new Vue(); +export default bus; \ No newline at end of file From f8b5e74366c0e9d0adb4be102052110c5f457e12 Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Fri, 4 Mar 2022 15:54:18 +0800 Subject: [PATCH 3/3] =?UTF-8?q?-=20=E5=A2=9E=E5=8A=A0=20=E6=98=A5=E9=9B=A8?= =?UTF-8?q?=E4=B8=AA=E6=80=A7=E5=8C=96=E5=AE=9A=E5=88=B6=20'@/views/chunyu?= =?UTF-8?q?/AliPayForm'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/customize.js | 13 + src/config/models.js | 4 +- src/router/index.js | 6 +- src/views/AliPayForm.vue | 228 ++++++++------- src/views/AliPayIndex.vue | 86 +++--- src/views/AliPayRedirect.vue | 8 +- src/views/AliPayResult.vue | 8 +- src/views/ComponentsTest.vue | 46 +++ src/views/chunyu/AliPayForm.vue | 501 ++++++++++++++++++++++++++++++++ 9 files changed, 751 insertions(+), 149 deletions(-) create mode 100644 src/config/customize.js create mode 100644 src/views/ComponentsTest.vue create mode 100644 src/views/chunyu/AliPayForm.vue diff --git a/src/config/customize.js b/src/config/customize.js new file mode 100644 index 0000000..9c6f92f --- /dev/null +++ b/src/config/customize.js @@ -0,0 +1,13 @@ +/* + * @Date: 2022-02-26 15:09:25 + * @LastEditors: JinxChen + * @LastEditTime: 2022-03-04 10:58:12 + * @FilePath: \AntpayFrontEnd\src\config\customize.js + * @description: 个性化定制, 根据不同的商家定制个性化的界面 + * 注意: 后期可以根据接口来实现 + */ +import store from '../store/index'; + +export const CUSTOMIZE_SERVICE = { + isChunyu:() => store.getters.goodsNo === 889, +}; \ No newline at end of file diff --git a/src/config/models.js b/src/config/models.js index cad0eb8..742a8b0 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: 2022-02-25 17:57:21 + * @LastEditTime: 2022-03-04 11:38:20 * @FilePath: \AntpayFrontEnd\src\config\models.js * @description: */ -export const VERSION_MODEL = '1.0.1'; +export const VERSION_MODEL = '1.0.2'; //版本号 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 53398ca..22d2b63 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,7 +1,7 @@ /* * @Date: 2022-01-19 10:08:26 * @LastEditors: JinxChen - * @LastEditTime: 2022-02-25 15:26:05 + * @LastEditTime: 2022-02-28 09:47:42 * @FilePath: \AntpayFrontEnd\src\router\index.js * @description: */ @@ -19,6 +19,10 @@ const routes = [ { path: '/redirect', name: 'redirect', component: resolve => require(['@/views/AliPayRedirect'], resolve) }, { path: '/result', name: 'result', component: resolve => require(['@/views/AliPayResult'], resolve) }, { path: '/404', name: 'page-not-found', component: resolve => require(['@/views/page-not-found/index'], resolve) }, + // 春雨 + { path: '/chunyuForm', name: 'chunyuForm', component: resolve => require(['@/views/chunyu/AliPayForm'], resolve) }, + // 组件测试页面 + { path: '/compTest', name: 'compTest', component: resolve => require(['@/views/ComponentsTest'], resolve) }, ]; diff --git a/src/views/AliPayForm.vue b/src/views/AliPayForm.vue index 4321484..47e9be0 100644 --- a/src/views/AliPayForm.vue +++ b/src/views/AliPayForm.vue @@ -1,22 +1,30 @@ diff --git a/src/views/AliPayIndex.vue b/src/views/AliPayIndex.vue index 66577dc..a365721 100644 --- a/src/views/AliPayIndex.vue +++ b/src/views/AliPayIndex.vue @@ -1,7 +1,7 @@ @@ -13,8 +13,8 @@
-

月套餐费: ¥{{ (goodsData.price/goodsData.goodCount).toFixed(2) }} x {{goodsData.goodCount}}期 = ¥{{goodsData.price}}

-

可切换支付方式:

+

月套餐费: ¥{{ (goodsData.price/goodsData.count).toFixed(2) }} x {{goodsData.count}}期 = ¥{{goodsData.price}}

+

{{switchPayType}}:

@@ -59,21 +59,21 @@

我要开通花呗

-

{{agreement.agreementTitle}}

+

{{agreement.title}}

一.开通需知及承诺

1.感谢用户使用支付宝花呗分期功能。

-

2.用户自愿开通4G电子学生证资费套餐服务({{goodsData.goodCount}}期)每月自动通过支付宝花呗分期支付资费(话费+流量)套餐费{{(goodsData.price/goodsData.goodCount).toFixed(2)}}元/月。

+

2.用户自愿开通4G电子学生证资费套餐服务({{goodsData.count}}期)每月自动通过支付宝花呗分期支付资费(话费+流量)套餐费{{(goodsData.price/goodsData.count).toFixed(2)}}元/月。

3.用户需连续使用该资费套餐24期,可据此领取4G电子学生证1台、电话卡1张。

-

4.{{goodsData.goodDescription}}

+

4.{{goodsData.description}}

5.协议期内,电子学生证非人为损坏或进水按“三包”政策进行免费维修或更换。如丢失或人为损坏,按优惠价重新购买。

6.北京随手精灵科技有限公司接受电子学生证运营销售商委托采用支付宝花呗分期付代收业务货款。

二.用户承诺
@@ -92,11 +92,11 @@