Compare commits
5 Commits
2fac00ceeb
...
test
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c08b3b878 | |||
| b8e8815cca | |||
| 2c5b47ad8b | |||
| f265c47617 | |||
| d40ded92b0 |
@@ -1,29 +1,108 @@
|
||||
//当前环境 test,prod
|
||||
export const ENV = 'prod'
|
||||
export const ENV_BASE_URL = {
|
||||
java: {
|
||||
prod: 'https://cashier.sxczgkj.com/',
|
||||
test: 'http://192.168.1.42/',
|
||||
h5ProdProxy: '/prodJavaApi/',
|
||||
h5TestProxy: '/testJavaApi/',
|
||||
},
|
||||
php: {
|
||||
prod: 'https://cashier.sxczgkj.com/',
|
||||
test: 'http://192.168.1.42:8787/',
|
||||
h5ProdProxy: '/prodPhpApi/api/',
|
||||
h5TestProxy: '/testPhpApi/api/',
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} env 环境,测试或者正式
|
||||
* @param {String} apiType 语言,java或者php
|
||||
*/
|
||||
export function returnBaseUrl(param) {
|
||||
let {
|
||||
env,
|
||||
apiType
|
||||
} = param
|
||||
if(!env){
|
||||
env=ENV
|
||||
}
|
||||
console.log('env', env);
|
||||
console.log('apiType', apiType);
|
||||
if (env === 'prod') {
|
||||
//正式环境
|
||||
// #ifdef H5
|
||||
if (apiType === 'php') {
|
||||
return ENV_BASE_URL.php.h5ProdProxy
|
||||
}
|
||||
if (apiType === 'java') {
|
||||
return ENV_BASE_URL.java.h5ProdProxy
|
||||
}
|
||||
// #endif
|
||||
|
||||
if (apiType === 'php') {
|
||||
return ENV_BASE_URL.php.prod
|
||||
}
|
||||
if (apiType === 'java') {
|
||||
return ENV_BASE_URL.java.prod
|
||||
}
|
||||
|
||||
} else {
|
||||
//测试环境
|
||||
// #ifdef H5
|
||||
if (apiType === 'php') {
|
||||
return ENV_BASE_URL.php.h5TestProxy
|
||||
}
|
||||
if (apiType === 'java') {
|
||||
return ENV_BASE_URL.java.h5TestProxy
|
||||
}
|
||||
// #endif
|
||||
|
||||
if (apiType === 'php') {
|
||||
return ENV_BASE_URL.php.test
|
||||
}
|
||||
if (apiType === 'java') {
|
||||
return ENV_BASE_URL.java.test
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
const appConfig = {
|
||||
|
||||
|
||||
// 项目名称
|
||||
appName: '银收客',
|
||||
|
||||
|
||||
// token取值key
|
||||
tokenKey: 'iToken',
|
||||
// tokenKey: 'satoken',
|
||||
|
||||
|
||||
// 环境变量相关
|
||||
env: {},
|
||||
|
||||
|
||||
// wss: "wss://sockets.sxczgkj.com/wss", //测试环境
|
||||
wss: "wss://czgeatws.sxczgkj.com/wss", //正式环境
|
||||
// 环境变量常量
|
||||
ENV_ENUM: {
|
||||
DEVELOPMENT: 'development', // 本地调试地址
|
||||
DEVELOPMENT: 'development', // 本地调试地址
|
||||
TEST: 'test', // 测试地址
|
||||
DEMO: 'demo', // 演示环境
|
||||
PRODUCTION: 'production' // 生产环境
|
||||
PRODUCTION: 'production' // 生产环境
|
||||
},
|
||||
|
||||
|
||||
returnBaseUrl: returnBaseUrl,
|
||||
storeEnvEnumKey: 'currentEnvEnum', // 本地存储的envkey的值
|
||||
|
||||
encryptKey: '1234567890123456' // http数据加解密的key
|
||||
|
||||
|
||||
encryptKey: '1234567890123456', // http数据加解密的key
|
||||
baseUrl: "",
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default appConfig;
|
||||
17
http/http.js
17
http/http.js
@@ -16,22 +16,9 @@ import go from "@/commons/utils/go.js";
|
||||
import { reject } from "lodash";
|
||||
// 设置node环境
|
||||
// envConfig.changeEnv(storageManage.env('production')) //正式
|
||||
envConfig.changeEnv(storageManage.env("development")); //测试
|
||||
|
||||
// 测试服
|
||||
// #ifdef H5
|
||||
let baseUrl = "/javaapi/";
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
// let baseUrl = 'https://tapi.cashier.sxczgkj.cn/'
|
||||
//预发布
|
||||
// let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
|
||||
|
||||
//正式
|
||||
// let baseUrl = 'https://cashier.sxczgkj.com/'
|
||||
let baseUrl = appConfig.env.JEEPAY_BASE_URL;
|
||||
// #endif
|
||||
// envConfig.changeEnv(storageManage.env("development")); //测试
|
||||
|
||||
let baseUrl = appConfig.returnBaseUrl({apiType:'java'});
|
||||
const loadingShowTime = 200;
|
||||
|
||||
function getHeader() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// const baseURL : string = 'https://newblockwlx.sxczgkj.cn/index.php/api/'
|
||||
let baseURL: string = "http://192.168.1.42:8787/api/";
|
||||
// #ifdef H5
|
||||
baseURL = "/phpapi/api/";
|
||||
baseURL = "/prodPhpApi/api/";
|
||||
// #endif
|
||||
|
||||
import go from "@/commons/utils/go.js";
|
||||
|
||||
@@ -14,23 +14,7 @@ import storageManage from '@/commons/utils/storageManage.js'
|
||||
import infoBox from "@/commons/utils/infoBox.js"
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { reject } from 'lodash';
|
||||
// 设置node环境
|
||||
// envConfig.changeEnv(storageManage.env('production'))
|
||||
|
||||
// 测试服
|
||||
// #ifdef H5
|
||||
let baseUrl = '/api/'
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
// let baseUrl = 'https://tapi.cashier.sxczgkj.cn/'
|
||||
//预发布
|
||||
// let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
|
||||
|
||||
//正式
|
||||
// let baseUrl = 'https://cashier.sxczgkj.com/'
|
||||
let baseUrl = appConfig.env.JEEPAY_BASE_URL
|
||||
// #endif
|
||||
|
||||
let baseUrl = appConfig.returnBaseUrl({apiType:'php'});
|
||||
const loadingShowTime = 200
|
||||
|
||||
function getHeader(){
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
<view class="u-flex-1 u-p-l-30 u-text-left">
|
||||
<view class="u-flex">
|
||||
<view class="u-line-1 u-font-36 font-bold" style="width: 80%;">{{shopInfo.shopName}}</view>
|
||||
<view class="u-font-28 color-fff change-shop u-flex u-row-center" @click="changeShop">
|
||||
<!-- <view class="u-font-28 color-fff change-shop u-flex u-row-center" @click="changeShop">
|
||||
<image src="/static/change.png" class="u-m-t-2" style="width: 20rpx;height: 20rpx;"
|
||||
mode=""></image>
|
||||
<text class="u-m-l-6">切换店铺</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="u-m-t-16">
|
||||
<view style="color: rgba(255,255,255,0.83);" v-if="shopStaff">
|
||||
|
||||
@@ -239,6 +239,7 @@
|
||||
discount_sale_amount: form.price, //数量
|
||||
pack_number: 0, //数量
|
||||
is_gift: 0,
|
||||
remark:form.note,
|
||||
is_temporary: 1, //是否是临时菜
|
||||
}
|
||||
websocketUtil.send(JSON.stringify(params))
|
||||
@@ -247,6 +248,7 @@
|
||||
name: form.name,
|
||||
lowPrice: form.price,
|
||||
number: form.num,
|
||||
remark:form.note,
|
||||
is_temporary: 1, //是否是临时菜
|
||||
})
|
||||
clearInterval(timer)
|
||||
|
||||
@@ -436,6 +436,7 @@
|
||||
websocketUtil.offMessage();
|
||||
websocketUtil.onMessage(async (res) => {
|
||||
let msg = JSON.parse(res);
|
||||
console.log('收到消息',msg)
|
||||
let cartItem;
|
||||
let cartArr = [];
|
||||
// console.log("onMessage===",msg)
|
||||
@@ -1349,13 +1350,13 @@
|
||||
if (fileRes) {
|
||||
uni.setStorageSync('stickData',{
|
||||
table:data.table,
|
||||
orderInfo:data.orderInfo
|
||||
orderInfo:data.orderInfo,
|
||||
limitTimeDiscount:data.limitTimeDiscount
|
||||
})
|
||||
go.to("PAGES_CREATE_ORDER_STICK", {
|
||||
tableCode: data.table.tableCode,
|
||||
number:fileRes,
|
||||
isCreateOrderToDetail:isCreateOrderToDetail.value,
|
||||
limitTimeDiscount:data.limitTimeDiscount
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
<view class="default-box-padding bg-fff border-r-12 u-m-t-24">
|
||||
<view class="u-flex u-row-between">
|
||||
<view>订单状态</view>
|
||||
<view>{{$dict.getDiceName(data.status,'orderStatus')}}</view>
|
||||
<view>{{ $dict.getDiceName(data.status, 'orderStatus') }}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>订单类型</view>
|
||||
<view>{{$dict.getDiceName(data.dineMode,'dineMode')}}</view>
|
||||
<view>{{ $dict.getDiceName(data.dineMode, 'dineMode') }}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>桌位号</view>
|
||||
<view>{{table.name||data.tableName}}</view>
|
||||
<view>{{ table.name || data.tableName }}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24" v-if="seatFee.number">
|
||||
<view>就餐人数</view>
|
||||
<view>{{seatFee.number||''}}</view>
|
||||
<view>{{ seatFee.number || '' }}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>支付方式</view>
|
||||
<view>{{$dict.getDiceName(data.payType,'payType')||''}}</view>
|
||||
<view>{{ $dict.getDiceName(data.payType, 'payType') || '' }}</view>
|
||||
</view>
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>下单时间</view>
|
||||
@@ -27,9 +27,9 @@
|
||||
<view class="u-flex u-row-between u-m-t-24">
|
||||
<view>订单编号</view>
|
||||
<view class="u-flex">
|
||||
<view>{{data.orderNo}}</view>
|
||||
<view>{{ data.orderNo }}</view>
|
||||
<view v-if="data.orderNo" class="u-m-l-6">
|
||||
<up-copy :content="data.orderNo" >
|
||||
<up-copy :content="data.orderNo">
|
||||
<up-icon name="/static/copy.svg" :size="16"></up-icon>
|
||||
</up-copy>
|
||||
</view>
|
||||
@@ -37,34 +37,44 @@
|
||||
</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;">
|
||||
{{data.remark}}
|
||||
<view class="u-p-l-32" style="max-width: 522rpx; word-wrap: break-word">
|
||||
{{ data.remark }}
|
||||
</view>
|
||||
</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">
|
||||
<template v-if="JSON.parse(data.printStatus).length > 0">
|
||||
打印失败({{
|
||||
JSON.parse(data.printStatus)
|
||||
.map((item) => item.name)
|
||||
.join('、')
|
||||
}})
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
table: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
seatFee: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
totalNumber: 0
|
||||
}
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
table: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
seatFee: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
totalNumber: 0;
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -7,17 +7,25 @@ export default defineConfig({
|
||||
],
|
||||
server: {
|
||||
proxy: {
|
||||
'/javaapi': {
|
||||
// target: 'https://cashier.sxczgkj.com', // 目标服务器地址
|
||||
'/prodJavaApi': {
|
||||
target: 'https://cashier.sxczgkj.com', // 目标服务器地址
|
||||
changeOrigin: true, // 是否更改请求源
|
||||
rewrite: path => path.replace(/^\/prodJavaApi/, '')
|
||||
},
|
||||
'/testJavaApi': {
|
||||
target: 'http://192.168.1.42/', // 目标服务器地址
|
||||
changeOrigin: true, // 是否更改请求源
|
||||
rewrite: path => path.replace(/^\/javaapi/, '')
|
||||
rewrite: path => path.replace(/^\/testJavaApi/, '')
|
||||
},
|
||||
'/phpapi': {
|
||||
// target: 'https://cashier.sxczgkj.com', // 目标服务器地址
|
||||
'/prodPhpApi': {
|
||||
target: 'https://cashier.sxczgkj.com', // 目标服务器地址
|
||||
changeOrigin: true, // 是否更改请求源
|
||||
rewrite: path => path.replace(/^\/prodPhpApi/, '')
|
||||
},
|
||||
'/testPhpApi': {
|
||||
target: 'http://192.168.1.42:8787/', // 目标服务器地址
|
||||
changeOrigin: true, // 是否更改请求源
|
||||
rewrite: path => path.replace(/^\/phpapi/, '')
|
||||
rewrite: path => path.replace(/^\/testPhpApi/, '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user