运检食堂接入
This commit is contained in:
parent
fe6d78a0da
commit
1d13f956b1
|
|
@ -3,15 +3,15 @@ module.exports = {
|
||||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||||
// baseUrl: 'http://192.168.0.39:21995',
|
// baseUrl: 'http://192.168.0.39:21995',
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
baseUrl: '/canteen/dev-api',
|
// baseUrl: '/canteen/dev-api',
|
||||||
// baseUrl: '/dev-api',
|
// baseUrl: '/dev-api',
|
||||||
// baseUrl: 'http://10.138.55.104:58080',//测试
|
// 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.0.176:58080',//测试
|
||||||
// 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.78:58080',//盛旭
|
// baseUrl: 'http://192.168.2.74:28080',//盛旭
|
||||||
// baseUrl: 'http://192.168.1.102:58080',//测试
|
// baseUrl: 'http://192.168.1.102:58080',//测试
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,13 @@
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/yjCanteen",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/mine/me/healthInformation",
|
"path": "pages/mine/me/healthInformation",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
||||||
|
|
@ -15,14 +15,14 @@
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="dashesData.quantity>0"
|
v-if="dashesData.quantity>0"
|
||||||
name="../../static/images/delete.png"
|
name="../../static/images/delete.png"
|
||||||
size="16"
|
size="20"
|
||||||
@click="handleFoodNum(1, dashesData)"
|
@click="handleFoodNum(1, dashesData)"
|
||||||
/>
|
/>
|
||||||
<span style="margin: 0 10px;font-size: 28rpx;">{{ dashesData.quantity || 0 }}</span>
|
<span style="margin: 0 10px;font-size: 28rpx;">{{ dashesData.quantity || 0 }}</span>
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="dashesData.quantity < dashesData.restrictNum"
|
v-if="dashesData.quantity < dashesData.restrictNum"
|
||||||
name="../../static/images/add.png"
|
name="../../static/images/add.png"
|
||||||
size="16"
|
size="20"
|
||||||
@click="handleFoodNum(2, dashesData)"
|
@click="handleFoodNum(2, dashesData)"
|
||||||
/>
|
/>
|
||||||
<u-icon v-if="dashesData.quantity == dashesData.restrictNum" name="../../static/images/no-add.png" size="16" />
|
<u-icon v-if="dashesData.quantity == dashesData.restrictNum" name="../../static/images/no-add.png" size="16" />
|
||||||
|
|
@ -199,7 +199,7 @@
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="food.quantity > 0"
|
v-if="food.quantity > 0"
|
||||||
name="../../static/images/del.png"
|
name="../../static/images/del.png"
|
||||||
size="16"
|
size="20"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<span class="cont-num">{{ food.quantity || 0 }}</span>
|
<span class="cont-num">{{ food.quantity || 0 }}</span>
|
||||||
|
|
@ -207,7 +207,7 @@
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="food.quantity<food.restrictNum"
|
v-if="food.quantity<food.restrictNum"
|
||||||
name="../../static/images/add2.png"
|
name="../../static/images/add2.png"
|
||||||
size="18"
|
size="20"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -793,7 +793,7 @@ page {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 63px;
|
width: 63px;
|
||||||
height: 20px;
|
height: 24px;
|
||||||
border-radius: 13px 13px 13px 13px;
|
border-radius: 13px 13px 13px 13px;
|
||||||
border: 1px solid rgba(15, 39, 75, 0.2);
|
border: 1px solid rgba(15, 39, 75, 0.2);
|
||||||
.cont-num {
|
.cont-num {
|
||||||
|
|
|
||||||
|
|
@ -58,14 +58,14 @@
|
||||||
<view class="right-cont" v-if="item.surplusNum!=0">
|
<view class="right-cont" v-if="item.surplusNum!=0">
|
||||||
<u-icon v-if="item.quantity > 0"
|
<u-icon v-if="item.quantity > 0"
|
||||||
name="../../static/images/delete.png"
|
name="../../static/images/delete.png"
|
||||||
size="16"
|
size="18"
|
||||||
@click="handleFoodNum(1, item)"
|
@click="handleFoodNum(1, item)"
|
||||||
/>
|
/>
|
||||||
<span style="margin: 0 10px;font-size: 28rpx;">{{ item.quantity || 0 }}</span>
|
<span style="margin: 0 10px;font-size: 28rpx;">{{ item.quantity || 0 }}</span>
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="item.quantity < item.restrictNum"
|
v-if="item.quantity < item.restrictNum"
|
||||||
name="../../static/images/add.png"
|
name="../../static/images/add.png"
|
||||||
size="16"
|
size="18"
|
||||||
@click="handleFoodNum(2, item)"
|
@click="handleFoodNum(2, item)"
|
||||||
/>
|
/>
|
||||||
<u-icon v-if="item.quantity == item.restrictNum" name="../../static/images/no-add.png" size="16" />
|
<u-icon v-if="item.quantity == item.restrictNum" name="../../static/images/no-add.png" size="16" />
|
||||||
|
|
@ -147,7 +147,7 @@
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="food.quantity > 0"
|
v-if="food.quantity > 0"
|
||||||
name="../../static/images/del.png"
|
name="../../static/images/del.png"
|
||||||
size="16"
|
size="20"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<span class="cont-num">{{ food.quantity || 0 }}</span>
|
<span class="cont-num">{{ food.quantity || 0 }}</span>
|
||||||
|
|
@ -155,7 +155,7 @@
|
||||||
<u-icon
|
<u-icon
|
||||||
v-if="food.quantity<food.restrictNum"
|
v-if="food.quantity<food.restrictNum"
|
||||||
name="../../static/images/add2.png"
|
name="../../static/images/add2.png"
|
||||||
size="18"
|
size="20"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -275,6 +275,7 @@ export default {
|
||||||
let param = {
|
let param = {
|
||||||
"recipeId":this.recipeId,
|
"recipeId":this.recipeId,
|
||||||
"applyDate":this.newDate2
|
"applyDate":this.newDate2
|
||||||
|
// "applyDate":'2025-02-11'
|
||||||
}
|
}
|
||||||
const res = await getAdvanceDetailListAPI(param)
|
const res = await getAdvanceDetailListAPI(param)
|
||||||
console.log(res, '预订餐菜谱')
|
console.log(res, '预订餐菜谱')
|
||||||
|
|
@ -362,7 +363,8 @@ export default {
|
||||||
} else if (type === 2) {
|
} else if (type === 2) {
|
||||||
return '午餐'
|
return '午餐'
|
||||||
} else if (type === 3) {
|
} else if (type === 3) {
|
||||||
return '下午茶'
|
return '外卖'
|
||||||
|
// return '下午茶'
|
||||||
} else if (type === 4) {
|
} else if (type === 4) {
|
||||||
return '晚餐'
|
return '晚餐'
|
||||||
}else if (type === 5) {
|
}else if (type === 5) {
|
||||||
|
|
@ -851,7 +853,7 @@ page {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 63px;
|
width: 63px;
|
||||||
height: 20px;
|
height: 24px;
|
||||||
border-radius: 13px 13px 13px 13px;
|
border-radius: 13px 13px 13px 13px;
|
||||||
border: 1px solid rgba(15, 39, 75, 0.2);
|
border: 1px solid rgba(15, 39, 75, 0.2);
|
||||||
.cont-num {
|
.cont-num {
|
||||||
|
|
|
||||||
|
|
@ -150,9 +150,11 @@ export default {
|
||||||
resetForgetPwdApi(param).then(res => {
|
resetForgetPwdApi(param).then(res => {
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
uni.$u.toast('密码重置成功!')
|
uni.$u.toast('密码重置成功!')
|
||||||
|
setTimeout(()=>{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/login'
|
url: '/pages/login'
|
||||||
})
|
})
|
||||||
|
},500)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,14 @@
|
||||||
<view class="box-subtitle">智能、预定、鲜活</view>
|
<view class="box-subtitle">智能、预定、鲜活</view>
|
||||||
</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>
|
</view>
|
||||||
|
|
||||||
|
|
@ -181,7 +189,8 @@ export default {
|
||||||
walletBal: 0 ,// 钱包余额
|
walletBal: 0 ,// 钱包余额
|
||||||
messageNumber:0,//未读通知数量
|
messageNumber:0,//未读通知数量
|
||||||
showNotice:false,
|
showNotice:false,
|
||||||
noticeData:{}
|
noticeData:{},
|
||||||
|
userInfo:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -220,6 +229,7 @@ export default {
|
||||||
getUserInfo(){
|
getUserInfo(){
|
||||||
getInfoNewAPI({'custId':uni.getStorageSync('custId'),"sourceType":7}).then(result => {
|
getInfoNewAPI({'custId':uni.getStorageSync('custId'),"sourceType":7}).then(result => {
|
||||||
console.log(result)
|
console.log(result)
|
||||||
|
this.userInfo = result.data
|
||||||
uni.setStorageSync('openId', result.data.openid,{expires:90})
|
uni.setStorageSync('openId', result.data.openid,{expires:90})
|
||||||
uni.setStorageSync('placeId', result.data.placeId,{expires:90})
|
uni.setStorageSync('placeId', result.data.placeId,{expires:90})
|
||||||
})
|
})
|
||||||
|
|
@ -246,6 +256,13 @@ export default {
|
||||||
url: '/pages/code/index'
|
url: '/pages/code/index'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
goToYj() {
|
||||||
|
// 跳转到运检食堂
|
||||||
|
uni.navigateTo({ url: '/pages/yjCanteen' });
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: '/pages/code/index'
|
||||||
|
// })
|
||||||
|
},
|
||||||
handleSwiperChange(e) {
|
handleSwiperChange(e) {
|
||||||
this.current = e.current // 更新当前活动的指示点索引
|
this.current = e.current // 更新当前活动的指示点索引
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getInfoNewAPI } from '@/api/login'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -49,9 +49,13 @@ export default {
|
||||||
name: '志愿者服务',
|
name: '志愿者服务',
|
||||||
icon: require('../static/images/system/server.png')
|
icon: require('../static/images/system/server.png')
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
userInfo:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getUserInfo()
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: res => {
|
success: res => {
|
||||||
|
|
@ -60,13 +64,22 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//获取用户信息
|
||||||
|
getUserInfo(){
|
||||||
|
getInfoNewAPI({'custId':uni.getStorageSync('custId'),"sourceType":7}).then(result => {
|
||||||
|
this.userInfo = result.data
|
||||||
|
console.log(this.userInfo)
|
||||||
|
})
|
||||||
|
},
|
||||||
handleItem(index) {
|
handleItem(index) {
|
||||||
console.log(index)
|
console.log(index)
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
|
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' })
|
this.$router.push({ path: '/pages/index' })
|
||||||
// uni.switchTab({
|
}
|
||||||
// url: `/pages/index`
|
|
||||||
// })
|
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
this.$router.push({ path: '/pages/post/index' })
|
this.$router.push({ path: '/pages/post/index' })
|
||||||
} else if (index === 2) {
|
} else if (index === 2) {
|
||||||
|
|
@ -76,7 +89,12 @@ export default {
|
||||||
jumpPage(index) {
|
jumpPage(index) {
|
||||||
console.log(index)
|
console.log(index)
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
|
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' })
|
this.$router.push({ path: '/pages/index' })
|
||||||
|
}
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
this.$router.push({ path: '/pages/post/index' })
|
this.$router.push({ path: '/pages/post/index' })
|
||||||
} else if (index === 2) {
|
} else if (index === 2) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<view class="appraise">
|
<view class="appraise">
|
||||||
<view>您对本单满意吗?</view>
|
<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>
|
||||||
<!-- <view class="refund-btn" @click="refundOrder" v-if="detailData.payState==4&&detailData.orderState==4">
|
<!-- <view class="refund-btn" @click="refundOrder" v-if="detailData.payState==4&&detailData.orderState==4">
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
<view class="img-list m-8" v-for="(item, index) in detailData.orderDetailList" :key="index">
|
<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: 100%;display: flex;justify-content: space-between;">
|
||||||
<view style="width: 24%;">
|
<view style="width: 24%;">
|
||||||
<u-image :src="item.goodsDishesImgUrl" width="80px" height="80px" />
|
<u-image :src="item.goodsDishesImgUrl" width="100%" height="80px" />
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 74%;display: flex;flex-direction: column;justify-content: space-between;padding: 10rpx;font-size: 24rpx;">
|
<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;">
|
<view style="display: flex;justify-content: space-between;">
|
||||||
|
|
@ -214,7 +214,6 @@ export default {
|
||||||
this.orderId = options.orderId;
|
this.orderId = options.orderId;
|
||||||
this.getPayTypeList()
|
this.getPayTypeList()
|
||||||
// this.getSourceTypeList()
|
// this.getSourceTypeList()
|
||||||
|
|
||||||
this.getOrderDetail()
|
this.getOrderDetail()
|
||||||
this.generate('1223321312')
|
this.generate('1223321312')
|
||||||
},
|
},
|
||||||
|
|
@ -281,7 +280,8 @@ export default {
|
||||||
const res = await getOrderInfoAPI(param)
|
const res = await getOrderInfoAPI(param)
|
||||||
console.log('?? ~ getList ~ res:', res)
|
console.log('?? ~ getList ~ res:', res)
|
||||||
this.detailData = res.data;
|
this.detailData = res.data;
|
||||||
this.generate(res.data.macOrderId)
|
let str = `xnzn{"s":1,"y":2,"p":"${res.data.orderId}","t":${new Date().getTime()}}`
|
||||||
|
this.generate(str)
|
||||||
this.payTypeList.forEach((item=>{
|
this.payTypeList.forEach((item=>{
|
||||||
if(item.key==this.detailData.payType){
|
if(item.key==this.detailData.payType){
|
||||||
this.detailData.payTypeStr = item.value
|
this.detailData.payTypeStr = item.value
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
Loading…
Reference in New Issue