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 { 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(() => {});

View File

@@ -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/',
@@ -25,8 +25,8 @@ export function returnBaseUrl(param) {
env, env,
apiType apiType
} = param } = param
if(!env){ if (!env) {
env=ENV env = ENV
} }
console.log('env', env); console.log('env', env);
console.log('apiType', apiType); console.log('apiType', apiType);
@@ -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
View File

@@ -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 }

View File

@@ -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}
] ]

View File

@@ -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);
} }
}); });

View File

@@ -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)