From bb12efb2781f643034aa232b05e7736e7607074f Mon Sep 17 00:00:00 2001 From: TianYu <332368756@qq.com> Date: Tue, 23 May 2023 09:47:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/src/settings.js | 10 + .../src/views/system/tenant/index.vue | 4 +- yudao-ui-app/components/countDown/index.vue | 74 +- yudao-ui-app/components/numberScroll.vue | 160 ++++ .../components/paymentMember/index.vue | 47 +- yudao-ui-app/config/app.js | 10 +- yudao-ui-app/pages.json | 6 + yudao-ui-app/pages/goods_cashier/index.vue | 752 ++++++++++++++++++ yudao-ui-app/pages/users/login/index.vue | 6 +- yudao-ui-app/pages/users/register/index.vue | 2 +- .../pages/users/retrievePassword/index.vue | 2 +- .../pages/users/user_spread_code/index.vue | 5 +- 12 files changed, 988 insertions(+), 90 deletions(-) create mode 100644 yudao-ui-app/components/numberScroll.vue create mode 100644 yudao-ui-app/pages/goods_cashier/index.vue diff --git a/yudao-ui-admin/src/settings.js b/yudao-ui-admin/src/settings.js index 045f5eb3f..c3be16571 100644 --- a/yudao-ui-admin/src/settings.js +++ b/yudao-ui-admin/src/settings.js @@ -1,5 +1,15 @@ module.exports = { + /** + * 推广链接域名 + */ + spreadDomain: 'http://h5.cyywl.top', + + /** + * 推广码生成访问H5链接地址 + */ + spreadLink: '/pages/member_application/index', + /** * 侧边栏主题 深色主题theme-dark,浅色主题theme-light */ diff --git a/yudao-ui-admin/src/views/system/tenant/index.vue b/yudao-ui-admin/src/views/system/tenant/index.vue index 9acf6e86e..d026fa14b 100755 --- a/yudao-ui-admin/src/views/system/tenant/index.vue +++ b/yudao-ui-admin/src/views/system/tenant/index.vue @@ -204,6 +204,7 @@ import { getTenantPage, exportTenantExcel } from '@/api/system/tenant'; +import config from '@/settings' import QRCode from 'qrcode' import {CommonStatusEnum} from '@/utils/constants' import {getTenantPackageList} from '@/api/system/tenantPackage'; @@ -345,8 +346,7 @@ export default { this.resetForm('form'); }, handleQRCode(row) { - const baseUrl = 'http://yuxy.perrymake.com' - const url =`${baseUrl}/pages/member_application/index?redirectUrl=${baseUrl}&tenantId=${row.id}` + const url =`${config.spreadDomain}${config.spreadLink}?redirectUrl=${config.spreadDomain}&tenantId=${row.id}` QRCode.toCanvas(document.getElementById(`id-${row.id}`), url, { scale: 2 }, function (error) { diff --git a/yudao-ui-app/components/countDown/index.vue b/yudao-ui-app/components/countDown/index.vue index 291c6e6e5..b0e6e12c2 100644 --- a/yudao-ui-app/components/countDown/index.vue +++ b/yudao-ui-app/components/countDown/index.vue @@ -1,14 +1,14 @@ @@ -49,13 +49,13 @@ type: Boolean, default: true }, - isCol: { - type: Boolean, - default: false + bgColor:{ + type: String, + default: "" }, - bgColor: { - type: Object, - default: null + colors:{ + type: String, + default: "" } }, data: function() { @@ -116,47 +116,13 @@ }; - diff --git a/yudao-ui-app/components/numberScroll.vue b/yudao-ui-app/components/numberScroll.vue new file mode 100644 index 000000000..2ace75d54 --- /dev/null +++ b/yudao-ui-app/components/numberScroll.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/yudao-ui-app/components/paymentMember/index.vue b/yudao-ui-app/components/paymentMember/index.vue index f44fa2875..fe28f204d 100644 --- a/yudao-ui-app/components/paymentMember/index.vue +++ b/yudao-ui-app/components/paymentMember/index.vue @@ -22,7 +22,8 @@ - + + @@ -65,35 +66,35 @@ data() { return { alipayShow: false, - alipayForm:`链接已复制,请到外部浏览器完成支付` + alipayForm: `链接已复制,请到外部浏览器完成支付` }; }, computed: mapGetters(['systemPlatform', 'openId']), methods: { - handleConfirm(){ + handleConfirm() { this.alipayShow = false window.location.reload() }, // 复制操作 - _copy(context) { - // 创建输入框元素 - let oInput = document.createElement('input'); - // 将想要复制的值 - oInput.value = context; - // 页面底部追加输入框 - document.body.appendChild(oInput); - // 选中输入框 - oInput.select(); - // 执行浏览器复制命令 - document.execCommand('Copy'); - // 弹出复制成功信息 - this.$util.Tips({ - title: '复制链接成功' - }) - this.alipayShow = true - // 复制后移除输入框 - oInput.remove(); - }, + _copy(context) { + // 创建输入框元素 + let oInput = document.createElement('input'); + // 将想要复制的值 + oInput.value = context; + // 页面底部追加输入框 + document.body.appendChild(oInput); + // 选中输入框 + oInput.select(); + // 执行浏览器复制命令 + document.execCommand('Copy'); + // 弹出复制成功信息 + this.$util.Tips({ + title: '复制链接成功' + }) + this.alipayShow = true + // 复制后移除输入框 + oInput.remove(); + }, close: function() { this.$emit('onChangeFun', { action: 'payClose' @@ -139,7 +140,7 @@ title: '支付中', mask: true }); - if(paytype === 'WXPAY' && !that.openId) { + if (paytype === 'WXPAY' && !that.openId) { return that.$util.Tips({ title: '请在微信客户端进行支付操作' }); diff --git a/yudao-ui-app/config/app.js b/yudao-ui-app/config/app.js index d42b88408..4c65e8dab 100644 --- a/yudao-ui-app/config/app.js +++ b/yudao-ui-app/config/app.js @@ -1,12 +1,12 @@ -let domain = 'http://yuxy.perrymake.com' +let domain = 'http://api.cyywl.top' module.exports = { // 请求域名 格式: https://您的域名 // #ifdef MP HTTP_REQUEST_URL: domain, // #endif - HTTP_ADMIN_URL:'http://yuxy.perrymake.com', //PC后台的API请求地址,上传图片用 + HTTP_ADMIN_URL:'http://api.cyywl.top', //PC后台的API请求地址,上传图片用 // #ifdef H5 //H5接口是浏览器地址 // HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host, @@ -25,5 +25,9 @@ module.exports = { // 缓存时间 0 永久 EXPIRE:0, //分页最多显示条数 - LIMIT: 10 + LIMIT: 10, + // 推广链接域名 + SPREAD_DOMAIN: 'http://h5.cyywl.top', + // 推广码生成访问H5链接地址 + SPREAD_LINK: '/pages/member_application/index', }; diff --git a/yudao-ui-app/pages.json b/yudao-ui-app/pages.json index 73cc78bfb..f85e987c1 100644 --- a/yudao-ui-app/pages.json +++ b/yudao-ui-app/pages.json @@ -46,6 +46,12 @@ "navigationBarTitleText": "购物车" } }, + { + "path": "pages/goods_cashier/index", + "style": { + "navigationBarTitleText": "收银台" + } + }, { "path": "pages/user/index", "style": { diff --git a/yudao-ui-app/pages/goods_cashier/index.vue b/yudao-ui-app/pages/goods_cashier/index.vue new file mode 100644 index 000000000..cc6cc9ab1 --- /dev/null +++ b/yudao-ui-app/pages/goods_cashier/index.vue @@ -0,0 +1,752 @@ + + + + + diff --git a/yudao-ui-app/pages/users/login/index.vue b/yudao-ui-app/pages/users/login/index.vue index 36d01c63b..90f8adb92 100644 --- a/yudao-ui-app/pages/users/login/index.vue +++ b/yudao-ui-app/pages/users/login/index.vue @@ -379,7 +379,7 @@ background-size:100% 672rpx; .logo-wrap { - margin: 285rpx 0 85rpx 0; + margin: 185rpx 0 85rpx 0; display:flex; align-items:center; img{ @@ -478,7 +478,7 @@ justify-content: center; width: 100%; height: 87rpx; - margin-top: 237rpx; + margin-top: 137rpx; color: #FFFFFF; font-size: 32rpx; background: linear-gradient(0deg, #E63163 0%, #FF819F 100%); @@ -486,7 +486,7 @@ } .tips { - margin: 125rpx 20rpx 0 20rpx; + margin: 60rpx 20rpx 0 20rpx; font-size: 24rpx; color: #000; display: flex; diff --git a/yudao-ui-app/pages/users/register/index.vue b/yudao-ui-app/pages/users/register/index.vue index 30b4ba1ce..675d9e2d9 100644 --- a/yudao-ui-app/pages/users/register/index.vue +++ b/yudao-ui-app/pages/users/register/index.vue @@ -206,7 +206,7 @@ background-size:100% 672rpx; .logo-wrap { - margin: 285rpx 0 85rpx 0; + margin: 185rpx 0 85rpx 0; display:flex; align-items:center; img{ diff --git a/yudao-ui-app/pages/users/retrievePassword/index.vue b/yudao-ui-app/pages/users/retrievePassword/index.vue index 06812bd90..7b9fa568d 100644 --- a/yudao-ui-app/pages/users/retrievePassword/index.vue +++ b/yudao-ui-app/pages/users/retrievePassword/index.vue @@ -154,7 +154,7 @@ background-size: 100% 672rpx; .logo-wrap { - margin: 285rpx 0 85rpx 0; + margin: 185rpx 0 85rpx 0; display:flex; align-items:center; img{ diff --git a/yudao-ui-app/pages/users/user_spread_code/index.vue b/yudao-ui-app/pages/users/user_spread_code/index.vue index 81605e4f1..50064ea71 100644 --- a/yudao-ui-app/pages/users/user_spread_code/index.vue +++ b/yudao-ui-app/pages/users/user_spread_code/index.vue @@ -58,6 +58,7 @@ import { imageBase64 } from "@/api/public"; + import appConfig from '@/config/app.js' export default { components: { // #ifdef MP @@ -203,9 +204,7 @@ let that = this; let href = ''; // href = window.location.href.split('/pages')[0]; - console.log('uid', that.uid) - const baseUrl = 'http://yuxy.perrymake.com'; - const url =`${baseUrl}/pages/member_application/index?redirectUrl=${baseUrl}&tenantId=${that.tenantId}&spreadId=${that.uid}` + const url =`${appConfig.SPREAD_DOMAIN}${appConfig.SPREAD_LINK}?redirectUrl=${appConfig.SPREAD_DOMAIN}&tenantId=${that.tenantId}&spreadId=${that.uid}` console.log('url', url) uQRCode.make({ canvasId: 'qrcode',