运检食堂接入

This commit is contained in:
zzyuan 2025-06-10 10:54:00 +08:00
parent fe6d78a0da
commit 1d13f956b1
9 changed files with 153 additions and 35 deletions

View File

@ -3,15 +3,15 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://192.168.0.39:21995',
// #ifdef H5
baseUrl: '/canteen/dev-api',
// baseUrl: '/canteen/dev-api',
// baseUrl: '/dev-api',
// baseUrl: 'http://10.138.55.104:58080',//测试
// baseUrl: 'http://192.168.0.244:38380',//测试
baseUrl: 'http://192.168.0.244:38380',//测试
// baseUrl: 'http://192.168.0.176:58080',//测试
// baseUrl: 'http://192.168.2.82:58080',//张天强
// baseUrl: 'http://192.168.2.69:58080',//董高文
// baseUrl: 'http://192.168.0.44:58080',//董高文
// baseUrl: 'http://192.168.2.78:58080',//盛旭
// baseUrl: 'http://192.168.2.74:28080',//盛旭
// baseUrl: 'http://192.168.1.102:58080',//测试
// #endif
// #ifdef APP-PLUS

View File

@ -244,6 +244,13 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/yjCanteen",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/mine/me/healthInformation",
"style": {

View File

@ -15,14 +15,14 @@
<u-icon
v-if="dashesData.quantity>0"
name="../../static/images/delete.png"
size="16"
size="20"
@click="handleFoodNum(1, dashesData)"
/>
<span style="margin: 0 10px;font-size: 28rpx;">{{ dashesData.quantity || 0 }}</span>
<u-icon
v-if="dashesData.quantity < dashesData.restrictNum"
name="../../static/images/add.png"
size="16"
size="20"
@click="handleFoodNum(2, dashesData)"
/>
<u-icon v-if="dashesData.quantity == dashesData.restrictNum" name="../../static/images/no-add.png" size="16" />
@ -199,7 +199,7 @@
<u-icon
v-if="food.quantity > 0"
name="../../static/images/del.png"
size="16"
size="20"
/>
</view>
<span class="cont-num">{{ food.quantity || 0 }}</span>
@ -207,7 +207,7 @@
<u-icon
v-if="food.quantity<food.restrictNum"
name="../../static/images/add2.png"
size="18"
size="20"
/>
</view>
</view>
@ -793,7 +793,7 @@ page {
justify-content: space-between;
align-items: center;
width: 63px;
height: 20px;
height: 24px;
border-radius: 13px 13px 13px 13px;
border: 1px solid rgba(15, 39, 75, 0.2);
.cont-num {

View File

@ -58,14 +58,14 @@
<view class="right-cont" v-if="item.surplusNum!=0">
<u-icon v-if="item.quantity > 0"
name="../../static/images/delete.png"
size="16"
size="18"
@click="handleFoodNum(1, item)"
/>
<span style="margin: 0 10px;font-size: 28rpx;">{{ item.quantity || 0 }}</span>
<u-icon
v-if="item.quantity < item.restrictNum"
name="../../static/images/add.png"
size="16"
size="18"
@click="handleFoodNum(2, item)"
/>
<u-icon v-if="item.quantity == item.restrictNum" name="../../static/images/no-add.png" size="16" />
@ -147,7 +147,7 @@
<u-icon
v-if="food.quantity > 0"
name="../../static/images/del.png"
size="16"
size="20"
/>
</view>
<span class="cont-num">{{ food.quantity || 0 }}</span>
@ -155,7 +155,7 @@
<u-icon
v-if="food.quantity<food.restrictNum"
name="../../static/images/add2.png"
size="18"
size="20"
/>
</view>
</view>
@ -275,6 +275,7 @@ export default {
let param = {
"recipeId":this.recipeId,
"applyDate":this.newDate2
// "applyDate":'2025-02-11'
}
const res = await getAdvanceDetailListAPI(param)
console.log(res, '预订餐菜谱')
@ -362,7 +363,8 @@ export default {
} else if (type === 2) {
return '午餐'
} else if (type === 3) {
return '下午茶'
return '外卖'
// return ''
} else if (type === 4) {
return '晚餐'
}else if (type === 5) {
@ -851,7 +853,7 @@ page {
justify-content: space-between;
align-items: center;
width: 63px;
height: 20px;
height: 24px;
border-radius: 13px 13px 13px 13px;
border: 1px solid rgba(15, 39, 75, 0.2);
.cont-num {

View File

@ -150,9 +150,11 @@ export default {
resetForgetPwdApi(param).then(res => {
if(res.code==200){
uni.$u.toast('密码重置成功!')
uni.navigateTo({
url: '/pages/login'
})
setTimeout(()=>{
uni.navigateTo({
url: '/pages/login'
})
},500)
}
})
}

View File

@ -85,6 +85,14 @@
<view class="box-subtitle">智能预定鲜活</view>
</view>
<view class="handle-box-item" @click="goToYj" style="background: #FFF6F4;" v-if="userInfo.orgId=='378921748080365568'||userInfo.custNum.indexOf('@yjst')>-1">
<view class="image-box">
<image src="/static/images/index/food.png" style="width: 100%;height: 100%;" mode="aspectFit"></image>
</view>
<view class="box-title">运检食堂</view>
<view class="box-subtitle">运检食堂</view>
</view>
</view>
@ -181,7 +189,8 @@ export default {
walletBal: 0 ,//
messageNumber:0,//
showNotice:false,
noticeData:{}
noticeData:{},
userInfo:{}
}
},
onLoad() {
@ -220,6 +229,7 @@ export default {
getUserInfo(){
getInfoNewAPI({'custId':uni.getStorageSync('custId'),"sourceType":7}).then(result => {
console.log(result)
this.userInfo = result.data
uni.setStorageSync('openId', result.data.openid,{expires:90})
uni.setStorageSync('placeId', result.data.placeId,{expires:90})
})
@ -246,6 +256,13 @@ export default {
url: '/pages/code/index'
})
},
goToYj() {
//
uni.navigateTo({ url: '/pages/yjCanteen' });
// uni.navigateTo({
// url: '/pages/code/index'
// })
},
handleSwiperChange(e) {
this.current = e.current //
},

View File

@ -29,11 +29,11 @@
</template>
<script>
import { getInfoNewAPI } from '@/api/login'
export default {
data() {
return {
fontValue:uni.getStorageSync('fontSize') || 8,
fontValue:uni.getStorageSync('fontSize') || 8,
screenH: '',
swiperImg: [require('../static/images/system/top.png'),require('../static/images/system/top1.png'),require('../static/images/system/top2.png')],
firstMenus: [
@ -49,9 +49,13 @@ export default {
name: '志愿者服务',
icon: require('../static/images/system/server.png')
}
]
],
userInfo:{}
}
},
onShow() {
this.getUserInfo()
},
mounted() {
uni.getSystemInfo({
success: res => {
@ -60,13 +64,22 @@ export default {
})
},
methods: {
//
getUserInfo(){
getInfoNewAPI({'custId':uni.getStorageSync('custId'),"sourceType":7}).then(result => {
this.userInfo = result.data
console.log(this.userInfo)
})
},
handleItem(index) {
console.log(index)
if (index === 0) {
this.$router.push({ path: '/pages/index' })
// uni.switchTab({
// url: `/pages/index`
// })
console.log(this.userInfo.custNum.indexOf("@yjst_sbd"))
if(this.userInfo.custNum.indexOf("@yjst_yj")>-1||(this.userInfo.orgId=='378921748080365568'&&this.userInfo.custNum.indexOf("@yjst_sbd")==-1)){
uni.navigateTo({ url: '/pages/yjCanteen' });
}else{
this.$router.push({ path: '/pages/index' })
}
} else if (index === 1) {
this.$router.push({ path: '/pages/post/index' })
} else if (index === 2) {
@ -76,7 +89,12 @@ export default {
jumpPage(index) {
console.log(index)
if (index === 0) {
this.$router.push({ path: '/pages/index' })
console.log(this.userInfo.custNum.indexOf("yjst_sbd"))
if(this.userInfo.custNum.indexOf("@yjst_yj")>-1||(this.userInfo.orgId=='378921748080365568'&&this.userInfo.custNum.indexOf("@yjst_sbd")==-1)){
uni.navigateTo({ url: '/pages/yjCanteen' });
}else{
this.$router.push({ path: '/pages/index' })
}
} else if (index === 1) {
this.$router.push({ path: '/pages/post/index' })
} else if (index === 2) {

View File

@ -11,7 +11,7 @@
<view class="appraise">
<view>您对本单满意吗?</view>
<view class="refund-btn" @click="refundOrder" v-if="detailData.orderState==1&&detailData.canteenId=='378928463446282240'">
<view class="refund-btn" @click="refundOrder" v-if="detailData.orderState==1&&(detailData.canteenId=='378928463446282240'||detailData.canteenId=='378928314946949120')">
退单
</view>
<!-- <view class="refund-btn" @click="refundOrder" v-if="detailData.payState==4&&detailData.orderState==4">
@ -30,16 +30,16 @@
<view style="color: rgba(15, 39, 75, 0.8);font-weight: 400;font-size: 26rpx;">就餐日期: {{ detailData.orderDate }}</view>
</view>
<view class="flex m-8">
<view class="flex align-center justify-between" style="width: 100%;font-weight: 600;">
<view class="flex align-center justify-between" style="width: 100%;font-weight: 600;">
<view style="color: #0f274b;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;max-width: 80%;">{{ detailData.canteenName }}/{{detailData.stallName}}</view>
<view class="tag">{{ detailData.mealtimeName }}</view>
</view>
</view>
</view>
<view class="img-cont m-8">
<view class="img-list m-8" v-for="(item, index) in detailData.orderDetailList" :key="index">
<view style="width: 100%;display: flex;justify-content: space-between;">
<view style="width: 24%;">
<u-image :src="item.goodsDishesImgUrl" width="80px" height="80px" />
<u-image :src="item.goodsDishesImgUrl" width="100%" height="80px" />
</view>
<view style="width: 74%;display: flex;flex-direction: column;justify-content: space-between;padding: 10rpx;font-size: 24rpx;">
<view style="display: flex;justify-content: space-between;">
@ -63,7 +63,7 @@
配送费
<view style="font-weight: 600;">{{ detailData.deliveryAmount>0? "¥"+(detailData.deliveryAmount/100).toFixed(2):"免配送费" }}</view>
</view>
<view class="flex justify-between m-8 bt fs26">
<view class="flex justify-between m-8 bt fs26">
包装费
<view style="font-weight: 600;">{{ detailData.packingAmount>0? "¥"+(detailData.packingAmount/100).toFixed(2):"免包装费" }}</view>
</view>
@ -213,8 +213,7 @@ export default {
console.log(options)
this.orderId = options.orderId;
this.getPayTypeList()
// this.getSourceTypeList()
// this.getSourceTypeList()
this.getOrderDetail()
this.generate('1223321312')
},
@ -280,8 +279,9 @@ export default {
}
const res = await getOrderInfoAPI(param)
console.log('?? ~ getList ~ res:', res)
this.detailData = res.data;
this.generate(res.data.macOrderId)
this.detailData = res.data;
let str = `xnzn{"s":1,"y":2,"p":"${res.data.orderId}","t":${new Date().getTime()}}`
this.generate(str)
this.payTypeList.forEach((item=>{
if(item.key==this.detailData.payType){
this.detailData.payTypeStr = item.value

72
pages/yjCanteen.vue Normal file
View File

@ -0,0 +1,72 @@
<template>
<view>
<web-view id="webviewId" :update-title="false" :webview-styles="webviewStyles" @message="getMessage" :src="webViewSrc"
style="height: 100%;" ref="webView"></web-view>
</view>
</template>
<script>
import {
getToken
} from '@/utils/auth';
// import '@/utils/webview.js'
let wv // webview
export default {
data() {
return {
webViewHeight: 0,
webviewStyles: {
top: "30px",
},
phoneNumber: uni.getStorageSync('mobile'),
token: getToken(),
webView: null
};
},
computed: {
webViewSrc() {
// return `/SDT_ZHST_APP?token=${this.token}`;//
return `/SDT_ZHST_APP/?token=${uni.getStorageSync('token')}`;//
}
},
onReady() {
console.log("yjCanteen")
// #ifdef APP-PLUS
const currentWebview = this.$scope.$getAppWebview() // webview
setTimeout(()=>{
this.webView = currentWebview.children()[0]
this.webView.setStyle({
scalable: true
})
}, 1000); //
// #endif
window.addEventListener("message", this.getMessage);
},
methods: {
getMessage(event) { //H5使App
console.log(event, '0000000000000000000000000')
if (event.data.data.arg.action == 'stage_navigateBack') {
uni.reLaunch({
url: '/pages/system'
});
}else if (event.data.data.arg.action == 'logOut') {
uni.reLaunch({
url: '/pages/login'
});
}else if (event.data.data.arg.action == 'sbdCanteen') {// sbd
this.$router.push({ path: '/pages/index' })
}
}
},
mounted() {
window.onQrScanSuccess = (result) => {
return onQrScanSuccess(result);
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #fff;
}
</style>