5 Commits

Author SHA1 Message Date
gyq
23ccde5250 Merge branch 'test' of https://newgitea.sxczgkj.cn/czg_team/cashier_app into test 2026-01-26 15:29:23 +08:00
gyq
24d7345056 优化分销字段设置 2026-01-26 15:29:20 +08:00
38e26fed3e 修复socket环境问题 2026-01-26 15:09:41 +08:00
f3bd7637b5 会员等级编辑修复 2026-01-19 10:15:25 +08:00
85354f6296 部分问题修复 2026-01-17 17:22:59 +08:00
6 changed files with 32 additions and 13 deletions

View File

@@ -9,6 +9,7 @@ import appConfig from '@/config/appConfig.js';
import { provide, onMounted } from 'vue';
import WebsocketUtil from '@/commons/utils/websocket.js';
console.log('appConfig.wss',appConfig.wss);
const websocketUtil = new WebsocketUtil(appConfig.wss, 5000); // 创建 WebSocket 工具类实例
provide('websocketUtil', websocketUtil); // 提供给所有子组件
onMounted(() => {});

View File

@@ -1,5 +1,5 @@
//当前环境 test,prod
export const ENV = 'prod'
export const ENV = 'test'
export const ENV_BASE_URL = {
java: {
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 = {
@@ -85,7 +102,7 @@ const appConfig = {
env: {},
// wss: "wss://sockets.sxczgkj.com/wss", //测试环境
wss: "wss://czgeatws.sxczgkj.com/wss", //正式环境
wss: returnWss(ENV), //正式环境
// 环境变量常量
ENV_ENUM: {
DEVELOPMENT: 'development', // 本地调试地址

2
env/config.js vendored
View File

@@ -30,7 +30,7 @@ const processEnv = process.env.NODE_ENV
// 改变env环境
function changeEnv(envMode){
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 }

View File

@@ -45,7 +45,7 @@
placeholder-class="color-999 u-font-28"
type="digit"
@input="checkNumberCommission($event,index)"
v-model="item.levelOneCommission"
v-model="item.commission"
/>
<view class="unit">%</view>
</view>
@@ -144,7 +144,7 @@ function toggle(index) {
const allCommission=()=>{
let sum=0
for(let item of form.levelConfigList){
sum+=parseFloat(item.levelOneCommission)
sum+=parseFloat(item.commission)
}
return sum
}
@@ -162,7 +162,7 @@ function checkNumberCommission(e,index){
icon:'none'
})
timer= setTimeout(()=>{
form.levelConfigList[index].levelOneCommission=''
form.levelConfigList[index].commission=''
},30)
return false
@@ -172,7 +172,7 @@ function checkNumberCommission(e,index){
const arr=value.split('.')
if(arr[1].length>2){
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)
}
}
@@ -200,7 +200,7 @@ function remove(index){
function addLevelConfig(){
form.levelConfigList.push({
name:'',
levelOneCommission:'',
commission:'',
inviteCount:'',
costAmount:''
})
@@ -217,7 +217,7 @@ function addLevelConfig(){
})
return false
}
if(!item.levelOneCommission){
if(!item.commission){
uni.showToast({
title:'请输入分成比例',
icon:'none'
@@ -279,7 +279,7 @@ onLoad(()=>{
const levelConfigList=[...distributionStore.config.levelConfigList||[]]
form.levelConfigList=levelConfigList.length?levelConfigList:[
{ name:'',
levelOneCommission:'',
commission:'',
inviteCount:0,
costAmount:0}
]

View File

@@ -274,6 +274,7 @@ onLoad((opt) => {
);
optiopns.index = index;
const item = superVipStore.vipLevelList.find((item) => item.id == opt.id);
item.cycleRewardCouponList=item.cycleRewardCouponList||[]
Object.assign(form, item);
}
});

View File

@@ -43,7 +43,7 @@
</view>
<view class="u-flex u-row-between u-m-t-24 u-col-top">
<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">
打印失败{{
JSON.parse(data.printStatus)