shish 3 лет назад
Родитель
Сommit
897845829e
2 измененных файлов с 36 добавлено и 2 удалено
  1. 32 2
      ghsApp/src/admin/home/workbench.vue
  2. 4 0
      ghsApp/src/api/item/index.js

+ 32 - 2
ghsApp/src/admin/home/workbench.vue

@@ -30,6 +30,7 @@
 		<div class="user-wrap">
 			<div class="user-top">
 				<div class="app-size-28">今日概况</div>
+				<text v-if="!$util.isEmpty(errorPirceList)" @click="showErrorPriceFn" style="float:right;color:yellow;font-weight:bold;">价格异常,点击查看</text>
 			</div>
 			<div class="income-amount" @click="pageTo({url:'/admin/stat/kdIncome'})">
 				<div>收入</div>
@@ -142,7 +143,20 @@
 	</view>
   </block>
 
-	
+	<uni-popup ref="errorPriceRef" background-color="#fff" type="center" :animation="false">
+		<view style="padding-top:20upx;font-size:30upx;padding-bottom:20upx;">
+			<view v-for="(errItem, errIndex) in errorPirceList" :key="errIndex">
+				<text v-if="errItem.name">{{errItem.name}}</text>
+				<text v-if="errItem.a" style="margin-left:18upx;">A级:¥{{errItem.a?parseFloat(errItem.a):0}}</text>
+				<text v-if="errItem.b" style="margin-left:18upx;">B级:¥{{errItem.b?parseFloat(errItem.b):0}}</text>
+				<text v-if="errItem.c" style="margin-left:18upx;">C级:¥{{errItem.c?parseFloat(errItem.c):0}}</text>
+			</view>
+			<view style="text-align:center;margin-top:20upx;">
+				<button @click="closeErrorPriceFn" class="admin-button-com middle blue">知道了</button>
+			</view>
+		</view>
+	</uni-popup>
+
 </view>
 </template>
 
@@ -156,6 +170,7 @@ import { allProduct } from '@/api/product'
 import { getStat,getStrokeCount } from '@/api/console'
 import autoUpdateMixins from "@/mixins/autoUpdate";
 import { getWeixinId } from "@/api/invite/index";
+import { getErrorPrice } from "@/api/item"
 export default {
 	name: "admin-workbench",
 	components: { },
@@ -195,7 +210,8 @@ export default {
 			countStat:{systemIncome:0,systemCount:0,debtCount:0,debtIncome:0,kfWxCount:0,kfWxIncome:0},
 			overview:[],
 			//登录状态 0未登录 1登录
-			loginStyle :0
+			loginStyle :0,
+			errorPirceList:[]
 		};
 	},
 	onShareAppMessage(res) {
@@ -233,6 +249,12 @@ export default {
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
+		closeErrorPriceFn(){
+			this.$refs.errorPriceRef.close()
+		},
+		showErrorPriceFn(){
+			this.$refs.errorPriceRef.open('top')
+		},
 		buyItem() {
 			let that = this
 			// #ifdef MP-WEIXIN
@@ -325,6 +347,14 @@ export default {
 				this.getappIdList = res.data
 			})
 
+			//是否有C级价格比B级和A级贵的情况
+			getErrorPrice().then(res=>{
+				let that = this
+				if(res.code == 1){
+					that.errorPirceList = res.data.list
+				}
+			})
+
 		},
 		setIndex(){
 			// #ifdef MP-WEIXIN

+ 4 - 0
ghsApp/src/api/item/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const getErrorPrice = data => {
+	return https.get('/item/get-error-price', data)
+}
+
 export const getColorList = data => {
 	return https.get('/item/color-list', data)
 }