商户号区分测试和生产环境
This commit is contained in:
parent
de644ad138
commit
6affbac192
1
.env
1
.env
|
@ -1,4 +1,3 @@
|
|||
# 邮储奶茶活动
|
||||
VITE_YCNC_APPID = '2vikrqptiia9pe9bf5ztrd'
|
||||
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'
|
||||
# 邮储奶茶活动
|
||||
|
|
|
@ -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://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>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<!-- 邮储奶茶项目客户端sdk插件 -->
|
||||
<script src="/static/ycnc/YT_Client_api.js"></script>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
<script>
|
||||
// document.addEventListener('touchmove', function(e) {
|
||||
// e.preventDefault();
|
||||
// }, {passive: false})
|
||||
document.addEventListener('touchmove', function(e) {
|
||||
e.preventDefault();
|
||||
}, {passive: false})
|
||||
</script>
|
||||
<script src="https://fastly.jsdelivr.net/npm/eruda"></script>
|
||||
<!-- <script src="https://fastly.jsdelivr.net/npm/eruda"></script>
|
||||
<script>
|
||||
eruda.init()
|
||||
</script>
|
||||
</script> -->
|
||||
<script>
|
||||
// var clickCount = 0
|
||||
// var timer = null
|
||||
// var isShow = false
|
||||
// function insertScript() {
|
||||
// isShow = true
|
||||
// // 创建一个新的script元素
|
||||
// var src = 'https://fastly.jsdelivr.net/npm/eruda'
|
||||
// var script = document.createElement('script')
|
||||
// script.type = 'text/javascript'
|
||||
// script.src = src
|
||||
// // 插入到head中
|
||||
// document.head.appendChild(script)
|
||||
// script.onload = function () {
|
||||
// eruda.init()
|
||||
// }
|
||||
// }
|
||||
// document.addEventListener('click', function () {
|
||||
// if (isShow) return false
|
||||
// if (clickCount < 6) {
|
||||
// clickCount++
|
||||
// console.log(`Clicked ${clickCount} times`)
|
||||
var clickCount = 0
|
||||
var timer = null
|
||||
var isShow = false
|
||||
function insertScript() {
|
||||
isShow = true
|
||||
// 创建一个新的script元素
|
||||
var src = 'https://fastly.jsdelivr.net/npm/eruda'
|
||||
var script = document.createElement('script')
|
||||
script.type = 'text/javascript'
|
||||
script.src = src
|
||||
// 插入到head中
|
||||
document.head.appendChild(script)
|
||||
script.onload = function () {
|
||||
eruda.init()
|
||||
}
|
||||
}
|
||||
document.addEventListener('click', function () {
|
||||
if (isShow) return false
|
||||
if (clickCount < 6) {
|
||||
clickCount++
|
||||
console.log(`Clicked ${clickCount} times`)
|
||||
|
||||
// // 如果是第一次点击,则开始计时
|
||||
// if (clickCount === 1) {
|
||||
// timer = setTimeout(() => {
|
||||
// clickCount = 0 // 重置点击计数
|
||||
// }, 2000)
|
||||
// }
|
||||
// 如果是第一次点击,则开始计时
|
||||
if (clickCount === 1) {
|
||||
timer = setTimeout(() => {
|
||||
clickCount = 0 // 重置点击计数
|
||||
}, 2000)
|
||||
}
|
||||
|
||||
// // 如果点击次数达到6次,则清除计时器并重置状态
|
||||
// if (clickCount >= 6) {
|
||||
// clearTimeout(timer)
|
||||
// insertScript()
|
||||
// clickCount = 0 // 重置点击计数
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// 如果点击次数达到6次,则清除计时器并重置状态
|
||||
if (clickCount >= 6) {
|
||||
clearTimeout(timer)
|
||||
insertScript()
|
||||
clickCount = 0 // 重置点击计数
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</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 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 CYYS from '/static/ycnc/bg-cyys.png'
|
||||
|
||||
const config = {
|
||||
"MX":{
|
||||
|
@ -38,11 +31,11 @@ const config = {
|
|||
src:CBD,
|
||||
height:584,
|
||||
},
|
||||
"CYYS":{
|
||||
name:'茶颜悦色',
|
||||
src:CYYS,
|
||||
height:974,
|
||||
},
|
||||
// "CYYS":{
|
||||
// name:'茶颜悦色',
|
||||
// src:CYYS,
|
||||
// height:974,
|
||||
// },
|
||||
}
|
||||
|
||||
export const stateConfig = {
|
||||
|
|
|
@ -20,7 +20,7 @@ export default function usePay(){
|
|||
BackLink:encodeURIComponent(`${window.location.origin}/#/pages/ycnc/orderDetail?order_no=${order_no}`),
|
||||
psbcmcc:'LSXD',
|
||||
TxnDt:dayjs(Date.now()).format('YYYY-MM-DD'),
|
||||
MercCode:'100610100019029'
|
||||
MercCode:import.meta.env.VITE_MERCH_CODE
|
||||
}
|
||||
const params = {
|
||||
Plain:handleParams(Plain),
|
||||
|
|
|
@ -70,8 +70,6 @@
|
|||
|
||||
onMounted(async ()=>{
|
||||
queryProducts();
|
||||
// let testToken = import.meta.env.VITE_TEST_TOKEN
|
||||
// window.localStorage.setItem('token',testToken)
|
||||
const token = window.localStorage.getItem('token') || '';
|
||||
if(!token){
|
||||
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]
|
||||
const urlSearchParams = new URLSearchParams(urlStr)
|
||||
const result = Object.fromEntries(urlSearchParams.entries())
|
||||
return result[name]
|
||||
return name ? result[name] : result
|
||||
}
|
||||
|
||||
//是否iOS设备
|
||||
|
|
Loading…
Reference in New Issue