商户号区分测试和生产环境
This commit is contained in:
parent
de644ad138
commit
6affbac192
3
.env
3
.env
|
@ -1,4 +1,3 @@
|
||||||
# 邮储奶茶活动
|
# 邮储奶茶活动
|
||||||
VITE_YCNC_APPID = '2vikrqptiia9pe9bf5ztrd'
|
VITE_YCNC_APPID = '2vikrqptiia9pe9bf5ztrd'
|
||||||
VITE_YCNC_SECRET = '6fpfwdkgcggyk0yf2yb6bt'
|
VITE_YCNC_SECRET = '6fpfwdkgcggyk0yf2yb6bt'
|
||||||
VITE_TEST_TOKEN = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0Tm8iOiIzOTY3ODA2ODcwMjIyIiwiZXhwIjoxNzE5NTQxNzA5LCJpZCI6IjIifQ.cDjKKYYTYOPPYUh8XidADpxr8xZ_WXbZ9b1pZt1Kzm4'
|
|
|
@ -1,6 +1,3 @@
|
||||||
#请求url前缀
|
|
||||||
# 中信建投
|
|
||||||
# VITE_BASE_URL = 'http://zxjt.test.86698.cn'
|
|
||||||
# 兴业优酷
|
# 兴业优酷
|
||||||
# VITE_BASE_URL = 'http://192.168.110.50:8083'
|
# VITE_BASE_URL = 'http://192.168.110.50:8083'
|
||||||
# 邮储奶茶活动
|
# 邮储奶茶活动
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
#请求url前缀
|
|
||||||
# 中信建投
|
|
||||||
# VITE_BASE_URL = 'https://zxjt.86698.cn'
|
|
||||||
# 兴业优酷
|
# 兴业优酷
|
||||||
# VITE_BASE_URL = 'http://192.168.110.50:8083'
|
# VITE_BASE_URL = 'http://192.168.110.50:8083'
|
||||||
|
|
||||||
|
|
||||||
# 邮储奶茶活动(测试环境)
|
# 邮储奶茶活动(测试环境)
|
||||||
VITE_BASE_URL = 'http://milk.api.test.86698.cn'
|
# VITE_BASE_URL = 'http://milk.api.test.86698.cn'
|
||||||
|
# VITE_MERCH_CODE = '100610100019029'
|
||||||
# 邮储奶茶活动(正式环境)
|
# 邮储奶茶活动(正式环境)
|
||||||
# VITE_BASE_URL = 'https://milk.api.cdlsxd.cn'
|
VITE_BASE_URL = 'https://milk.api.cdlsxd.cn'
|
||||||
|
VITE_MERCH_CODE = '100510102210712'
|
81
index.html
81
index.html
|
@ -15,55 +15,56 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"><!--app-html--></div>
|
<div id="app"><!--app-html--></div>
|
||||||
|
<!-- 邮储奶茶项目客户端sdk插件 -->
|
||||||
<script src="/static/ycnc/YT_Client_api.js"></script>
|
<script src="/static/ycnc/YT_Client_api.js"></script>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// document.addEventListener('touchmove', function(e) {
|
document.addEventListener('touchmove', function(e) {
|
||||||
// e.preventDefault();
|
e.preventDefault();
|
||||||
// }, {passive: false})
|
}, {passive: false})
|
||||||
</script>
|
</script>
|
||||||
<script src="https://fastly.jsdelivr.net/npm/eruda"></script>
|
<!-- <script src="https://fastly.jsdelivr.net/npm/eruda"></script>
|
||||||
<script>
|
<script>
|
||||||
eruda.init()
|
eruda.init()
|
||||||
</script>
|
</script> -->
|
||||||
<script>
|
<script>
|
||||||
// var clickCount = 0
|
var clickCount = 0
|
||||||
// var timer = null
|
var timer = null
|
||||||
// var isShow = false
|
var isShow = false
|
||||||
// function insertScript() {
|
function insertScript() {
|
||||||
// isShow = true
|
isShow = true
|
||||||
// // 创建一个新的script元素
|
// 创建一个新的script元素
|
||||||
// var src = 'https://fastly.jsdelivr.net/npm/eruda'
|
var src = 'https://fastly.jsdelivr.net/npm/eruda'
|
||||||
// var script = document.createElement('script')
|
var script = document.createElement('script')
|
||||||
// script.type = 'text/javascript'
|
script.type = 'text/javascript'
|
||||||
// script.src = src
|
script.src = src
|
||||||
// // 插入到head中
|
// 插入到head中
|
||||||
// document.head.appendChild(script)
|
document.head.appendChild(script)
|
||||||
// script.onload = function () {
|
script.onload = function () {
|
||||||
// eruda.init()
|
eruda.init()
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// document.addEventListener('click', function () {
|
document.addEventListener('click', function () {
|
||||||
// if (isShow) return false
|
if (isShow) return false
|
||||||
// if (clickCount < 6) {
|
if (clickCount < 6) {
|
||||||
// clickCount++
|
clickCount++
|
||||||
// console.log(`Clicked ${clickCount} times`)
|
console.log(`Clicked ${clickCount} times`)
|
||||||
|
|
||||||
// // 如果是第一次点击,则开始计时
|
// 如果是第一次点击,则开始计时
|
||||||
// if (clickCount === 1) {
|
if (clickCount === 1) {
|
||||||
// timer = setTimeout(() => {
|
timer = setTimeout(() => {
|
||||||
// clickCount = 0 // 重置点击计数
|
clickCount = 0 // 重置点击计数
|
||||||
// }, 2000)
|
}, 2000)
|
||||||
// }
|
}
|
||||||
|
|
||||||
// // 如果点击次数达到6次,则清除计时器并重置状态
|
// 如果点击次数达到6次,则清除计时器并重置状态
|
||||||
// if (clickCount >= 6) {
|
if (clickCount >= 6) {
|
||||||
// clearTimeout(timer)
|
clearTimeout(timer)
|
||||||
// insertScript()
|
insertScript()
|
||||||
// clickCount = 0 // 重置点击计数
|
clickCount = 0 // 重置点击计数
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,16 +1,9 @@
|
||||||
// import MX from '../../static/ycnc/bg-mxbc.png'
|
|
||||||
// import BW from '../../static/ycnc/bg-bwcj.png'
|
|
||||||
// import NX from '../../static/ycnc/bg-nxdc.png'
|
|
||||||
// import CoCo from '../../static/ycnc/bg-coco.png'
|
|
||||||
// import CBD from '../../static/ycnc/bg-cbd.png'
|
|
||||||
// import CYYS from '../../static/ycnc/bg-cyys.png'
|
|
||||||
|
|
||||||
import MX from '/static/ycnc/bg-mxbc.png'
|
import MX from '/static/ycnc/bg-mxbc.png'
|
||||||
import BW from '/static/ycnc/bg-bwcj.png'
|
import BW from '/static/ycnc/bg-bwcj.png'
|
||||||
import NX from '/static/ycnc/bg-nxdc.png'
|
import NX from '/static/ycnc/bg-nxdc.png'
|
||||||
import CoCo from '/static/ycnc/bg-coco.png'
|
import CoCo from '/static/ycnc/bg-coco.png'
|
||||||
import CBD from '/static/ycnc/bg-cbd.png'
|
import CBD from '/static/ycnc/bg-cbd.png'
|
||||||
import CYYS from '/static/ycnc/bg-cyys.png'
|
// import CYYS from '/static/ycnc/bg-cyys.png'
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
"MX":{
|
"MX":{
|
||||||
|
@ -38,11 +31,11 @@ const config = {
|
||||||
src:CBD,
|
src:CBD,
|
||||||
height:584,
|
height:584,
|
||||||
},
|
},
|
||||||
"CYYS":{
|
// "CYYS":{
|
||||||
name:'茶颜悦色',
|
// name:'茶颜悦色',
|
||||||
src:CYYS,
|
// src:CYYS,
|
||||||
height:974,
|
// height:974,
|
||||||
},
|
// },
|
||||||
}
|
}
|
||||||
|
|
||||||
export const stateConfig = {
|
export const stateConfig = {
|
||||||
|
|
|
@ -20,7 +20,7 @@ export default function usePay(){
|
||||||
BackLink:encodeURIComponent(`${window.location.origin}/#/pages/ycnc/orderDetail?order_no=${order_no}`),
|
BackLink:encodeURIComponent(`${window.location.origin}/#/pages/ycnc/orderDetail?order_no=${order_no}`),
|
||||||
psbcmcc:'LSXD',
|
psbcmcc:'LSXD',
|
||||||
TxnDt:dayjs(Date.now()).format('YYYY-MM-DD'),
|
TxnDt:dayjs(Date.now()).format('YYYY-MM-DD'),
|
||||||
MercCode:'100610100019029'
|
MercCode:import.meta.env.VITE_MERCH_CODE
|
||||||
}
|
}
|
||||||
const params = {
|
const params = {
|
||||||
Plain:handleParams(Plain),
|
Plain:handleParams(Plain),
|
||||||
|
|
|
@ -70,8 +70,6 @@
|
||||||
|
|
||||||
onMounted(async ()=>{
|
onMounted(async ()=>{
|
||||||
queryProducts();
|
queryProducts();
|
||||||
// let testToken = import.meta.env.VITE_TEST_TOKEN
|
|
||||||
// window.localStorage.setItem('token',testToken)
|
|
||||||
const token = window.localStorage.getItem('token') || '';
|
const token = window.localStorage.getItem('token') || '';
|
||||||
if(!token){
|
if(!token){
|
||||||
console.log('进入登录过程');
|
console.log('进入登录过程');
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 35 KiB |
|
@ -3,7 +3,7 @@ export const getQueryString = (name) => {
|
||||||
let urlStr = window.location.href.split('?')[1]
|
let urlStr = window.location.href.split('?')[1]
|
||||||
const urlSearchParams = new URLSearchParams(urlStr)
|
const urlSearchParams = new URLSearchParams(urlStr)
|
||||||
const result = Object.fromEntries(urlSearchParams.entries())
|
const result = Object.fromEntries(urlSearchParams.entries())
|
||||||
return result[name]
|
return name ? result[name] : result
|
||||||
}
|
}
|
||||||
|
|
||||||
//是否iOS设备
|
//是否iOS设备
|
||||||
|
|
Loading…
Reference in New Issue