ios问题修改

This commit is contained in:
zzyuan 2025-07-11 14:41:52 +08:00
parent c517c7fee4
commit 09fe1d45fe
89 changed files with 283 additions and 34 deletions

View File

@ -12,7 +12,7 @@ module.exports = {
// baseUrl: 'http://192.168.2.82:58080',//张天强 // baseUrl: 'http://192.168.2.82:58080',//张天强
// baseUrl: 'http://192.168.2.69:58080',//董高文 // baseUrl: 'http://192.168.2.69:58080',//董高文
// baseUrl: 'http://192.168.0.44:58080',//董高文 // baseUrl: 'http://192.168.0.44:58080',//董高文
// baseUrl: 'http://192.168.2.74:28080',//盛旭 // baseUrl: 'http://192.168.2.72:58080',//盛旭
// baseUrl: 'http://192.168.1.102:58080',//测试 // baseUrl: 'http://192.168.1.102:58080',//测试
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS

View File

@ -76,12 +76,11 @@
</view> </view>
<view v-if="typeList.length == 0&&!showLoading" class="flex align-center" style="height: 50vh;margin-left:12%;"> <view v-if="typeList.length == 0&&!showLoading" class="flex align-center" style="height: 50vh;margin-left:12%;">
<u-empty icon="../../static/images/not_order.png" text="暂无数据" textColor="#000" /> <u-empty icon="../../static/images/not_order.png" text="暂无数据" textColor="#000" />
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<!-- 购物车 --> <!-- 购物车 -->
<view style="height: 60px"></view>
<view class="shop-car"> <view class="shop-car">
<view class="car-cont"> <view class="car-cont">
<view class="flex align-center" @click="openCar"> <view class="flex align-center" @click="openCar">
@ -689,12 +688,12 @@ page {
.menuContent{ .menuContent{
width: 100%; width: 100%;
display: flex; display: flex;
height: 74vh; height: 71vh;
// background-color: #DD7D3C; // background-color: #DD7D3C;
} }
.content-left{ .content-left{
width: 23%; width: 23%;
height: 74vh; height: 71vh;
} }
.active2 { .active2 {
color: #DD7D3C; color: #DD7D3C;
@ -704,7 +703,7 @@ page {
.content-right{ .content-right{
width: 77%; width: 77%;
height: 74vh; height: 71vh;
// height: auto !important; // height: auto !important;
} }
.scroll-right-item{ .scroll-right-item{
@ -732,7 +731,7 @@ page {
// z-index: 999; // z-index: 999;
} }
.top-cont { .top-cont {
height: 55px; height: 42px;
padding: 0 16px; padding: 0 16px;
background: #fff; background: #fff;
.top-right-cont { .top-right-cont {

View File

@ -252,6 +252,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.u-action-sheet__item-wrap {
overflow: auto;
max-height: 50vh;
}
.feedback-page { .feedback-page {
height:96vh; height:96vh;
overflow-y: auto; overflow-y: auto;

View File

@ -93,7 +93,7 @@
<view class="box-title">客流统计</view> <view class="box-title">客流统计</view>
</view> </view>
<view class="handle-box-item2" @click="goToYj" style="background: #F4FFFF;" v-if="userInfo.orgId=='456365640698040320'||userInfo.custNum.indexOf('@yjst')>-1"> <view class="handle-box-item2" @click="goToYj" style="background: #F4FFFF;" v-if="userInfo.orgId=='456365640698040320'||userInfo.custNum.indexOf('!yjst')>-1">
<view class="image-box"> <view class="image-box">
<image src="/static/images/index/yjCanteen.png" style="width: 40px;height: 40px;" mode="aspectFit"></image> <image src="/static/images/index/yjCanteen.png" style="width: 40px;height: 40px;" mode="aspectFit"></image>
</view> </view>
@ -268,7 +268,7 @@ export default {
//sm4 //sm4
// let jsonStr = decryptWithSM4(result.data.data) // let jsonStr = decryptWithSM4(result.data.data)
// this.userInfo = JSON.parse(jsonStr) // this.userInfo = JSON.parse(jsonStr)
console.log(this.userInfo) // console.log(this.userInfo)
uni.setStorageSync('openId', this.userInfo.openid,{expires:90}) uni.setStorageSync('openId', this.userInfo.openid,{expires:90})
uni.setStorageSync('placeId', this.userInfo.placeId,{expires:90}) uni.setStorageSync('placeId', this.userInfo.placeId,{expires:90})
}) })

View File

@ -158,9 +158,9 @@
getUserInfo() { getUserInfo() {
getInfoNewAPI({'custId':uni.getStorageSync('custId'),"sourceType":7}).then(res => { getInfoNewAPI({'custId':uni.getStorageSync('custId'),"sourceType":7}).then(res => {
this.userInfo = res.data; this.userInfo = res.data;
this.$set(this.userInfo,'mobile',decryptWithSM4(this.userInfo.mobile)) this.$set(this.userInfo,'mobile',decryptWithSM4(res.data.mobile))
this.$set(this.userInfo,'idCard',decryptWithSM4(this.userInfo.idCard)) this.$set(this.userInfo,'idCard',decryptWithSM4(res.data.idCard))
this.$set(this.userInfo,'email',decryptWithSM4(this.userInfo.email)) this.$set(this.userInfo,'email',decryptWithSM4(res.data.email))
//sm4 //sm4
// let jsonStr = decryptWithSM4(res.data.data) // let jsonStr = decryptWithSM4(res.data.data)
// this.userInfo = JSON.parse(jsonStr) // this.userInfo = JSON.parse(jsonStr)

View File

@ -207,6 +207,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.u-action-sheet__item-wrap {
overflow: auto;
max-height: 50vh;
}
.rating-page { .rating-page {
height: 94vh; height: 94vh;
// background-color: #ffffff; // background-color: #ffffff;

View File

@ -81,8 +81,8 @@ export default {
handleItem(index) { handleItem(index) {
console.log(index) console.log(index)
if (index === 0) { if (index === 0) {
console.log(this.userInfo.custNum.indexOf("@yjst_sbd")) console.log(this.userInfo.custNum.indexOf("!yjst_sbd"))
if(this.userInfo.custNum.indexOf("@yjst_yj")>-1||(this.userInfo.orgId=='456365640698040320'&&this.userInfo.custNum.indexOf("@yjst_sbd")==-1)){ if(this.userInfo.custNum.indexOf("!yjst_yj")>-1||(this.userInfo.orgId=='456365640698040320'&&this.userInfo.custNum.indexOf("!yjst_sbd")==-1)){
uni.navigateTo({ url: '/pages/yjCanteen' }); uni.navigateTo({ url: '/pages/yjCanteen' });
}else{ }else{
this.$router.push({ path: '/pages/index' }) this.$router.push({ path: '/pages/index' })
@ -97,7 +97,7 @@ export default {
console.log(index) console.log(index)
if (index === 0) { if (index === 0) {
console.log(this.userInfo.custNum.indexOf("yjst_sbd")) console.log(this.userInfo.custNum.indexOf("yjst_sbd"))
if(this.userInfo.custNum.indexOf("@yjst_yj")>-1||(this.userInfo.orgId=='456365640698040320'&&this.userInfo.custNum.indexOf("@yjst_sbd")==-1)){ if(this.userInfo.custNum.indexOf("!yjst_yj")>-1||(this.userInfo.orgId=='456365640698040320'&&this.userInfo.custNum.indexOf("!yjst_sbd")==-1)){
uni.navigateTo({ url: '/pages/yjCanteen' }); uni.navigateTo({ url: '/pages/yjCanteen' });
}else{ }else{
this.$router.push({ path: '/pages/index' }) this.$router.push({ path: '/pages/index' })

View File

@ -262,12 +262,12 @@ page {
.menuContent{ .menuContent{
width: 100%; width: 100%;
display: flex; display: flex;
height: 80vh; height: 77vh;
// background-color: #ff6816; // background-color: #ff6816;
} }
.content-left{ .content-left{
width: 20%; width: 20%;
height: 80vh; height: 77vh;
} }
.active2 { .active2 {
color: #DD7D3C; color: #DD7D3C;
@ -277,7 +277,7 @@ page {
.content-right{ .content-right{
width: 80%; width: 80%;
height: 80vh; height: 77vh;
} }
.scroll-right-item{ .scroll-right-item{
width: 100%; width: 100%;

View File

@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<web-view id="webviewId" :update-title="false" :webview-styles="webviewStyles" @message="getMessage" :src="webViewSrc" <web-view id="webviewId" :update-title="false" :webview-styles="webviewStyles" @message="getMessage"
style="height: 100%;" ref="webView"></web-view> :src="webViewSrc" style="height: 100%;" ref="webView"></web-view>
</view> </view>
</template> </template>
@ -9,7 +9,7 @@
import { import {
getToken getToken
} from '@/utils/auth'; } from '@/utils/auth';
import Cookies from "js-cookie"; import Cookies from "js-cookie";
// import '@/utils/webview.js' // import '@/utils/webview.js'
let wv // webview let wv // webview
export default { export default {
@ -29,17 +29,17 @@
// return `/SDT_ZHST_APP?token=${this.token}`;// // return `/SDT_ZHST_APP?token=${this.token}`;//
//return `../../static/yjCanteen/SDT_ZHST_APP?token=${uni.getStorageSync('token')}`;// //return `../../static/yjCanteen/SDT_ZHST_APP?token=${uni.getStorageSync('token')}`;//
// return `/canteen/SDT_ZHST_APP?token=${uni.getStorageSync('token')}`;// // return `/canteen/SDT_ZHST_APP?token=${uni.getStorageSync('token')}`;//
const token = uni.getStorageSync('token'); const token = uni.getStorageSync('token');
const mobile = uni.getStorageSync('mobile'); const mobile = uni.getStorageSync('mobile');
const origin = location.origin; const origin = location.origin;
console.log(origin) console.log(origin)
return `${origin}/SDT_ZHST_APP/index.html?token=${token}&mobile=${mobile}`; return `${origin}/SDT_ZHST_APP/index.html?token=${token}&mobile=${mobile}`;
} }
}, },
onReady() { onReady() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
const currentWebview = this.$scope.$getAppWebview() // webview const currentWebview = this.$scope.$getAppWebview() // webview
setTimeout(()=>{ setTimeout(() => {
this.webView = currentWebview.children()[0] this.webView = currentWebview.children()[0]
this.webView.setStyle({ this.webView.setStyle({
scalable: true scalable: true
@ -47,6 +47,16 @@
}, 1000); // }, 1000); //
// #endif // #endif
window.addEventListener("message", this.getMessage); window.addEventListener("message", this.getMessage);
// iOS
//window.addEventListener('focusout', () => {
// if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
// //
// window.scrollTo(0, 0);
// uni.$u.toast('userAgent')
// }
//});
}, },
methods: { methods: {
getMessage(event) { //H5使App getMessage(event) { //H5使App
@ -55,20 +65,44 @@
uni.reLaunch({ uni.reLaunch({
url: '/pages/system' url: '/pages/system'
}); });
}else if (event.data.data.arg.action == 'logOut') { } else if (event.data.data.arg.action == 'logOut') {
// uni.reLaunch({ // uni.reLaunch({
// url: '/pages/login' // url: '/pages/login'
// }); // });
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
uni.removeStorageSync('token') uni.removeStorageSync('token')
Cookies.remove('token') Cookies.remove('token')
uni.reLaunch({ url: '/pages/login' }) uni.reLaunch({
url: '/pages/login'
})
}) })
}else if (event.data.data.arg.action == 'sbdCanteen') {// sbd } else if (event.data.data.arg.action == 'sbdCanteen') { // sbds
// uni.reLaunch({ // uni.reLaunch({
// url: '/pages/index' // // url: '/pages/index' //
// }); // });
this.$router.push({ path: '/pages/index' }) this.$router.push({
path: '/pages/index'
})
} else if (event.data.data.arg.action == 'keyboard-blur') { // sbd
console.log('触发一次滚动,让页面回弹')
//
setTimeout(() => {
if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
//
// window.scrollTo(0, 0);
console.log('触发一次滚动让页面回弹2')
uni.pageScrollTo({
scrollTop: 0,
duration: 100
});
// DOM
//document.body.style.display = 'none';
//setTimeout(() => {
// console.log(' DOM')
// document.body.style.display = '';
//}, 50);
}
}, 100);
} }
} }
}, },
@ -76,11 +110,11 @@
window.onQrScanSuccess = (result) => { window.onQrScanSuccess = (result) => {
return onQrScanSuccess(result); return onQrScanSuccess(result);
} }
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page { page {
background: #fff; background: #fff;
} }
</style> </style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long