Compare commits
5 Commits
410b0501af
...
test
| Author | SHA1 | Date | |
|---|---|---|---|
| 23ccde5250 | |||
| 24d7345056 | |||
| 38e26fed3e | |||
| f3bd7637b5 | |||
| 85354f6296 |
1
App.vue
1
App.vue
@@ -9,6 +9,7 @@ import appConfig from '@/config/appConfig.js';
|
|||||||
import { provide, onMounted } from 'vue';
|
import { provide, onMounted } from 'vue';
|
||||||
import WebsocketUtil from '@/commons/utils/websocket.js';
|
import WebsocketUtil from '@/commons/utils/websocket.js';
|
||||||
|
|
||||||
|
console.log('appConfig.wss',appConfig.wss);
|
||||||
const websocketUtil = new WebsocketUtil(appConfig.wss, 5000); // 创建 WebSocket 工具类实例
|
const websocketUtil = new WebsocketUtil(appConfig.wss, 5000); // 创建 WebSocket 工具类实例
|
||||||
provide('websocketUtil', websocketUtil); // 提供给所有子组件
|
provide('websocketUtil', websocketUtil); // 提供给所有子组件
|
||||||
onMounted(() => {});
|
onMounted(() => {});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//当前环境 test,prod
|
//当前环境 test,prod
|
||||||
export const ENV = 'prod'
|
export const ENV = 'test'
|
||||||
export const ENV_BASE_URL = {
|
export const ENV_BASE_URL = {
|
||||||
java: {
|
java: {
|
||||||
prod: 'https://cashier.sxczgkj.com/',
|
prod: 'https://cashier.sxczgkj.com/',
|
||||||
@@ -70,6 +70,23 @@ export function returnBaseUrl(param) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function returnWss(env) {
|
||||||
|
// #ifdef H5
|
||||||
|
if (env === 'test') {
|
||||||
|
return 'http://192.168.1.42:2348'
|
||||||
|
} else {
|
||||||
|
return 'https://czgeatws.sxczgkj.com/wss'
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
|
if (env === 'test') {
|
||||||
|
return 'ws://192.168.1.42:2348'
|
||||||
|
} else {
|
||||||
|
return 'wss://czgeatws.sxczgkj.com/wss'
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const appConfig = {
|
const appConfig = {
|
||||||
@@ -85,7 +102,7 @@ const appConfig = {
|
|||||||
env: {},
|
env: {},
|
||||||
|
|
||||||
// wss: "wss://sockets.sxczgkj.com/wss", //测试环境
|
// wss: "wss://sockets.sxczgkj.com/wss", //测试环境
|
||||||
wss: "wss://czgeatws.sxczgkj.com/wss", //正式环境
|
wss: returnWss(ENV), //正式环境
|
||||||
// 环境变量常量
|
// 环境变量常量
|
||||||
ENV_ENUM: {
|
ENV_ENUM: {
|
||||||
DEVELOPMENT: 'development', // 本地调试地址
|
DEVELOPMENT: 'development', // 本地调试地址
|
||||||
|
|||||||
2
env/config.js
vendored
2
env/config.js
vendored
@@ -30,7 +30,7 @@ const processEnv = process.env.NODE_ENV
|
|||||||
// 改变env环境
|
// 改变env环境
|
||||||
function changeEnv(envMode){
|
function changeEnv(envMode){
|
||||||
appConfig.env = allEnvMap[envMode || processEnv]
|
appConfig.env = allEnvMap[envMode || processEnv]
|
||||||
appConfig.wss = allEnvMap[envMode || processEnv].JEEPAY_BASE_URL_WSS
|
// appConfig.wss = allEnvMap[envMode || processEnv].JEEPAY_BASE_URL_WSS
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { changeEnv: changeEnv }
|
export default { changeEnv: changeEnv }
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
placeholder-class="color-999 u-font-28"
|
placeholder-class="color-999 u-font-28"
|
||||||
type="digit"
|
type="digit"
|
||||||
@input="checkNumberCommission($event,index)"
|
@input="checkNumberCommission($event,index)"
|
||||||
v-model="item.levelOneCommission"
|
v-model="item.commission"
|
||||||
/>
|
/>
|
||||||
<view class="unit">%</view>
|
<view class="unit">%</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -144,7 +144,7 @@ function toggle(index) {
|
|||||||
const allCommission=()=>{
|
const allCommission=()=>{
|
||||||
let sum=0
|
let sum=0
|
||||||
for(let item of form.levelConfigList){
|
for(let item of form.levelConfigList){
|
||||||
sum+=parseFloat(item.levelOneCommission)
|
sum+=parseFloat(item.commission)
|
||||||
}
|
}
|
||||||
return sum
|
return sum
|
||||||
}
|
}
|
||||||
@@ -162,7 +162,7 @@ function checkNumberCommission(e,index){
|
|||||||
icon:'none'
|
icon:'none'
|
||||||
})
|
})
|
||||||
timer= setTimeout(()=>{
|
timer= setTimeout(()=>{
|
||||||
form.levelConfigList[index].levelOneCommission=''
|
form.levelConfigList[index].commission=''
|
||||||
},30)
|
},30)
|
||||||
|
|
||||||
return false
|
return false
|
||||||
@@ -172,7 +172,7 @@ function checkNumberCommission(e,index){
|
|||||||
const arr=value.split('.')
|
const arr=value.split('.')
|
||||||
if(arr[1].length>2){
|
if(arr[1].length>2){
|
||||||
timer= setTimeout(()=>{
|
timer= setTimeout(()=>{
|
||||||
form.levelConfigList[index].levelOneCommission=arr[0]+'.'+arr[1].substring(0,2)
|
form.levelConfigList[index].commission=arr[0]+'.'+arr[1].substring(0,2)
|
||||||
},30)
|
},30)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -200,7 +200,7 @@ function remove(index){
|
|||||||
function addLevelConfig(){
|
function addLevelConfig(){
|
||||||
form.levelConfigList.push({
|
form.levelConfigList.push({
|
||||||
name:'',
|
name:'',
|
||||||
levelOneCommission:'',
|
commission:'',
|
||||||
inviteCount:'',
|
inviteCount:'',
|
||||||
costAmount:''
|
costAmount:''
|
||||||
})
|
})
|
||||||
@@ -217,7 +217,7 @@ function addLevelConfig(){
|
|||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if(!item.levelOneCommission){
|
if(!item.commission){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'请输入分成比例',
|
title:'请输入分成比例',
|
||||||
icon:'none'
|
icon:'none'
|
||||||
@@ -279,7 +279,7 @@ onLoad(()=>{
|
|||||||
const levelConfigList=[...distributionStore.config.levelConfigList||[]]
|
const levelConfigList=[...distributionStore.config.levelConfigList||[]]
|
||||||
form.levelConfigList=levelConfigList.length?levelConfigList:[
|
form.levelConfigList=levelConfigList.length?levelConfigList:[
|
||||||
{ name:'',
|
{ name:'',
|
||||||
levelOneCommission:'',
|
commission:'',
|
||||||
inviteCount:0,
|
inviteCount:0,
|
||||||
costAmount:0}
|
costAmount:0}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -274,6 +274,7 @@ onLoad((opt) => {
|
|||||||
);
|
);
|
||||||
optiopns.index = index;
|
optiopns.index = index;
|
||||||
const item = superVipStore.vipLevelList.find((item) => item.id == opt.id);
|
const item = superVipStore.vipLevelList.find((item) => item.id == opt.id);
|
||||||
|
item.cycleRewardCouponList=item.cycleRewardCouponList||[]
|
||||||
Object.assign(form, item);
|
Object.assign(form, item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between u-m-t-24 u-col-top">
|
<view class="u-flex u-row-between u-m-t-24 u-col-top">
|
||||||
<view class="no-wrap">打印状态</view>
|
<view class="no-wrap">打印状态</view>
|
||||||
<view class="u-p-l-32" style="max-width: 522rpx; word-wrap: break-word; color: red">
|
<view class="u-p-l-32" style="max-width: 522rpx; word-wrap: break-word; color: red" v-if="data.printStatus">
|
||||||
<template v-if="JSON.parse(data.printStatus).length > 0">
|
<template v-if="JSON.parse(data.printStatus).length > 0">
|
||||||
打印失败({{
|
打印失败({{
|
||||||
JSON.parse(data.printStatus)
|
JSON.parse(data.printStatus)
|
||||||
|
|||||||
Reference in New Issue
Block a user