From f971eb5a7fd0f715bfaea85918a2df1ffa0b833f Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Mon, 29 Sep 2025 13:44:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 256 +-- config/appConfig.js | 2 +- http/yskApi/http.js | 2 +- pages/login/index.vue | 724 +++--- pagesCreateOrder/index/index.vue | 3676 +++++++++++++++--------------- vite.config.js | 18 +- vue.config.js | 2 +- 7 files changed, 2321 insertions(+), 2359 deletions(-) diff --git a/App.vue b/App.vue index df35230..759f62d 100644 --- a/App.vue +++ b/App.vue @@ -25,135 +25,135 @@ App.vue本身不是页面,这里不能编写视图元素,也就是没有 { - //请求后台接口 解析数据 对比版本 - console.log("widgetInfo==",widgetInfo) - getFindBySource({source:'点餐宝'}).then(res => { - if (res.url && widgetInfo.version < res.version) { - let downloadLink = res.url; - console.log(downloadLink) - let ready = false; - // 校验是否强制升级 - if (res.isUp == 1) { - uni.showModal({ - showCancel: false, - title: '发现新版本', - confirmText: '立即更新', - content: res.message, - success: res => { - if (res.confirm) { - uni.showLoading({title:'下载中...'}); - if (uni.getSystemInfoSync().platform == - 'android') { - uni.hideLoading() - uni.downloadFile({ - url: downloadLink, - success: downloadResult => { - uni.hideLoading() - if (downloadResult.statusCode === 200) { - plus.io.resolveLocalFileSystemURL(downloadResult.tempFilePath, entry => { - entry.getParent(_oldFile=>{ - entry.moveTo(_oldFile,'.apk',newFilePath=>{ - console.log('newFilePath',newFilePath.fullPath) - plus.runtime - .install(newFilePath.fullPath, { force: false }, - d => { - console - .log( - 'install success...' - ); - plus.runtime - .restart(); - }, - e => { - console.log(e) - console - .error( - 'install fail...' - ); - } - ); - }) - }) - }) - } - } - }); - } - if (uni.getSystemInfoSync().platform == - 'ios') { - plus.runtime.openURL(downloadLink, function( - res) {}); - } - } else if (res.cancel) { - console.log('取消'); - } - } - }); - } else { - uni.showModal({ - title: '发现新版本', - confirmText: '立即更新', - cancelText: '下次更新', - content: res.message, - success: res => { - if (res.confirm) { - uni.showLoading({title:'下载中...'}); - if (uni.getSystemInfoSync().platform == - 'android') { - uni.downloadFile({ - url: downloadLink, - success: downloadResult => { - if (downloadResult - .statusCode === - 200) { - plus.io.resolveLocalFileSystemURL(downloadResult.tempFilePath, entry => { - entry.getParent(_oldFile=>{ - entry.moveTo(_oldFile,'.apk',newFilePath=>{ - console.log('newFilePath',newFilePath.fullPath) - plus.runtime - .install(newFilePath.fullPath, { force: false }, - d => { - console - .log( - 'install success...' - ); - plus.runtime - .restart(); - }, - e => { - console.log(e) - console - .error( - 'install fail...' - ); - } - ); - }) - }) - }) + // plus.runtime.getProperty(plus.runtime.appid, widgetInfo => { + // //请求后台接口 解析数据 对比版本 + // console.log("widgetInfo==",widgetInfo) + // getFindBySource({source:'点餐宝'}).then(res => { + // if (res.url && widgetInfo.version < res.version) { + // let downloadLink = res.url; + // console.log(downloadLink) + // let ready = false; + // // 校验是否强制升级 + // if (res.isUp == 1) { + // uni.showModal({ + // showCancel: false, + // title: '发现新版本', + // confirmText: '立即更新', + // content: res.message, + // success: res => { + // if (res.confirm) { + // uni.showLoading({title:'下载中...'}); + // if (uni.getSystemInfoSync().platform == + // 'android') { + // uni.hideLoading() + // uni.downloadFile({ + // url: downloadLink, + // success: downloadResult => { + // uni.hideLoading() + // if (downloadResult.statusCode === 200) { + // plus.io.resolveLocalFileSystemURL(downloadResult.tempFilePath, entry => { + // entry.getParent(_oldFile=>{ + // entry.moveTo(_oldFile,'.apk',newFilePath=>{ + // console.log('newFilePath',newFilePath.fullPath) + // plus.runtime + // .install(newFilePath.fullPath, { force: false }, + // d => { + // console + // .log( + // 'install success...' + // ); + // plus.runtime + // .restart(); + // }, + // e => { + // console.log(e) + // console + // .error( + // 'install fail...' + // ); + // } + // ); + // }) + // }) + // }) + // } + // } + // }); + // } + // if (uni.getSystemInfoSync().platform == + // 'ios') { + // plus.runtime.openURL(downloadLink, function( + // res) {}); + // } + // } else if (res.cancel) { + // console.log('取消'); + // } + // } + // }); + // } else { + // uni.showModal({ + // title: '发现新版本', + // confirmText: '立即更新', + // cancelText: '下次更新', + // content: res.message, + // success: res => { + // if (res.confirm) { + // uni.showLoading({title:'下载中...'}); + // if (uni.getSystemInfoSync().platform == + // 'android') { + // uni.downloadFile({ + // url: downloadLink, + // success: downloadResult => { + // if (downloadResult + // .statusCode === + // 200) { + // plus.io.resolveLocalFileSystemURL(downloadResult.tempFilePath, entry => { + // entry.getParent(_oldFile=>{ + // entry.moveTo(_oldFile,'.apk',newFilePath=>{ + // console.log('newFilePath',newFilePath.fullPath) + // plus.runtime + // .install(newFilePath.fullPath, { force: false }, + // d => { + // console + // .log( + // 'install success...' + // ); + // plus.runtime + // .restart(); + // }, + // e => { + // console.log(e) + // console + // .error( + // 'install fail...' + // ); + // } + // ); + // }) + // }) + // }) - } - } - }); - } - if (uni.getSystemInfoSync().platform == - 'ios') { - plus.runtime.openURL(downloadLink, function( - res) {}); - } - } else if (res.cancel) { - uni.hideLoading() - console.log('取消'); - } - } - }); - } - } - }).catch((res)=>{ - console.log(res) - }) - }); + // } + // } + // }); + // } + // if (uni.getSystemInfoSync().platform == + // 'ios') { + // plus.runtime.openURL(downloadLink, function( + // res) {}); + // } + // } else if (res.cancel) { + // uni.hideLoading() + // console.log('取消'); + // } + // } + // }); + // } + // } + // }).catch((res)=>{ + // console.log(res) + // }) + // }); // #endif diff --git a/config/appConfig.js b/config/appConfig.js index 9796013..4092cb2 100644 --- a/config/appConfig.js +++ b/config/appConfig.js @@ -8,7 +8,7 @@ const appConfig = { // 环境变量相关 env: {}, - wss: "ws://192.168.1.42:2348", // + wss: "ws://192.168.1.42:2348", // ws://192.168.1.42:2348 // wss: "wss://sockets.sxczgkj.com/wss", // // 环境变量常量 ENV_ENUM: { diff --git a/http/yskApi/http.js b/http/yskApi/http.js index ec107cb..de200e4 100644 --- a/http/yskApi/http.js +++ b/http/yskApi/http.js @@ -30,7 +30,7 @@ import { // let baseUrl = 'https://cashier.sxczgkj.com' // 本地测 -let baseUrl = "http://192.168.1.31" +let baseUrl = "http://192.168.1.42" // #ifdef H5 baseUrl = '/ysk' // #endif diff --git a/pages/login/index.vue b/pages/login/index.vue index df44fb9..7ac0e0c 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -1,25 +1,19 @@