py 2 лет назад
Родитель
Сommit
561cb6f195

+ 3 - 1
api/common.js

@@ -24,4 +24,6 @@ export const setCooperation = (data) => request('/api/system/' + 'cooperation',
 export const setRiderApply = (data) => request('/api/system/' + 'riderApply', 'post', { ...data })
 
 // 文字说明
-export const getCommonText = (data) => request(commonUrl + 'text', 'post', { ...data })
+export const getCommonText = (data) => request(commonUrl + 'text', 'post', { ...data })
+// 获取实习岗位二维码
+export const commonPracticeCode = (data) => request(commonUrl + 'practice_code', 'post', { ...data })

+ 2 - 2
components/en-utils/en-nav/en-nav.vue

@@ -12,7 +12,7 @@
 		  <uni-icons type="left" :color="leftColor" size="18"  ></uni-icons>
         </view>
 
-        <view v-if="!customNav" class="title-text">{{title}}</view>
+        <view v-if="!customNav" :style="[{'color': titleColor}]" class="title-text">{{title}}</view>
 		<view v-else class="">
 			<slot name="custom"></slot>
 		</view>
@@ -76,7 +76,7 @@
 
       titleColor: {
         type: String,
-        default: '#fff'
+        default: '#333'
       },
       bgColor: {
         type: String,

+ 64 - 0
pages-position/Internship-position.vue

@@ -0,0 +1,64 @@
+<template>
+	<view class="flex-common-css iPhone-bottom">
+		<Nav title="实习岗位" leftColor="#fff" bgckgroundBox='transparent' titleColor="#fff"></Nav>
+		<image class="bg" src="@/static/img/index/sxgw.png" mode=""></image>
+		<image class="code-img" :src="codeImg" mode="aspectFit"></image>
+		<image class="but-img" src="@/static/img/index/bcdxc.png" mode=""></image>
+	</view>
+</template>
+
+<script>
+	import {
+		commonPracticeCode
+	} from "@/api/common.js"
+	export default {
+		components: {},
+		data() {
+			return {
+				codeImg: ''
+			};
+		},
+		onLoad(data) {},
+		mounted() {
+			this.commonPracticeCode()
+		},
+		methods: {
+			commonPracticeCode() {
+				commonPracticeCode().then((res) => {
+					if(res.code == 1) {
+						this.codeImg = res.data.url
+					}
+				})
+			},
+			scrolltolower() {
+				console.log('触底');
+			},
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.bg {
+		width: 100%;
+		height: 100vh;
+		position: fixed;
+		left: 0;
+		top: 0;
+	}
+
+	.but-img {
+		width: 670rpx;
+		height: 88rpx;
+		position: absolute;
+		bottom: 36rpx;
+		left: 40rpx;
+	}
+	.code-img{
+		width: 340rpx;
+		height: 340rpx;
+		position: absolute;
+		top: 488rpx;
+		left: 204rpx;
+		border-radius: 20rpx;
+	}
+</style>

+ 53 - 17
pages-takeout/shop.vue

@@ -31,13 +31,15 @@
 				<view class="fs-24 fw-400 fc-9 mb-20 text-overflow-ellipsis-one">
 					公告:{{shopsInfo.notice}}
 				</view>
-				<view class="flex-wrap-wrap">
+				<view class="flex-wrap-wrap" v-if="couponData.length>0">
 					<view class="info-box-quan-list" v-for="(item,i) in couponData" :key="i" @click="openCoupon">
-						<image src="@/static/img/takeout/quan-bg.png" mode=""></image>
-						<view class="quan-list-1 fw-b fs-32 fc-f">
-							<span class="fw-b fs-20 fc-f">¥</span>{{item.money}}
+						<view class="" v-if="i<=2">
+							<image src="@/static/img/takeout/quan-bg.png" mode=""></image>
+							<view class="quan-list-1 fw-b fs-32 fc-f">
+								<span class="fw-b fs-20 fc-f">¥</span>{{item.money}}
+							</view>
+							<view class="quan-list-2 fw-400 fs-24 fc-f">领</view>
 						</view>
-						<view class="quan-list-2 fw-400 fs-24 fc-f">领</view>
 					</view>
 				</view>
 			</view>
@@ -57,7 +59,8 @@
 
 		<view class="common-view-css bgc-f" style="overflow: hidden;">
 			<Menu style="height: 100%;" v-if="shopType === 1"></Menu>
-			<Evaluate style="height: 100%;" :shopId='shop_id' :shopScore='shopsInfo.shop_score' v-else-if="shopType === 2"></Evaluate>
+			<Evaluate style="height: 100%;" :shopId='shop_id' :shopScore='shopsInfo.shop_score'
+				v-else-if="shopType === 2"></Evaluate>
 			<ShopInfo style="height: 100%;" :shopId='shop_id' v-else-if="shopType === 3"></ShopInfo>
 		</view>
 
@@ -142,25 +145,33 @@
 					<uni-icons @click="closeCoupon" class="box-close" type="closeempty" size="20"></uni-icons>
 				</view>
 				<view class="scroll-view-css">
-					<view class="item-box display-flex mb-20" v-for="(item,index) in 10" :key="index">
+					<view v-if="couponData<= 0" class="blank-text fs-32 fc-6 text-align-center">
+						暂无优惠券
+					</view>
+<!-- 					<EnBlank :customSrc='true' v-if="couponData<= 0">
+						<template v-slot:blankImg>
+							<image class="black-img" src="@/static/img/common/no-order.png" mode=""></image>
+						</template>
+					</EnBlank> -->
+					<view class="item-box display-flex mb-20" v-for="(item,index) in couponData" :key="index">
 						<view class="item-right flex-direction flex-justify-center flex-1 bgc-f">
 							<view class="fs-28 mb-12 ticket-name text-overflow-ellipsis fc-3 fw-600">
-								优惠券名称优惠券名称优惠券名称优惠券名称优
+								{{item.name}}
 							</view>
 							<view class="fs-24 fc-6">
-								有效时间:2024.05.08-2024.05.24
+								有效时间:{{item.time_type_str}}
 							</view>
 						</view>
 						<view class="item-hr"></view>
 						<view class="item-left flex-direction align-items-center flex-justify-center bgc-FCE7E2">
 							<view class="align-items-center">
 								<view class="fs-30 fw-600 fc-FB3D03">¥</view>
-								<view class="fs-48 fw-600 fc-FB3D03">10</view>
+								<view class="fs-48 fw-600 fc-FB3D03">{{item.money}}</view>
 							</view>
 							<view class="fs-24 mb-18 fc-6">
-								满90元可用
+								满{{item.full_money}}可用
 							</view>
-							<view class="but-box fs-28 fc-f">
+							<view class="but-box fs-28 fc-f" @click="receiveCode(item)">
 								立即领取
 							</view>
 							<view class="ball"></view>
@@ -178,6 +189,10 @@
 	import Evaluate from './shop-mod/evaluate.vue';
 	import ShopInfo from './shop-mod/info.vue';
 	import tools from "@/service/tools";
+	import EnBlank from "@/components/en-utils/en-blank/en-blank";
+	import {
+		receiveCoupon
+	} from "@/api/coupon.js"
 	import {
 		shopInfo,
 		shopCoupon
@@ -186,7 +201,8 @@
 		components: {
 			Menu,
 			Evaluate,
-			ShopInfo
+			ShopInfo,
+			EnBlank
 		},
 		data() {
 			return {
@@ -215,10 +231,21 @@
 			}
 		},
 		mounted() {
-			this.getDomH();
+			// this.getDomH();
 			this.shopCoupon()
 		},
 		methods: {
+			receiveCode(item) {
+				receiveCoupon({grant_id: item.grant_id,coupon_id: item.coupon_id}).then((res) => {
+					if(res.code == 1) {
+						tools.success(res.msg)
+						this.couponData = []
+						this.shopCoupon()
+					}else {
+						tools.error(res.msg)
+					}
+				})
+			},
 			toBack() {
 				tools.leftClick()
 			},
@@ -280,7 +307,13 @@
 					shop_id: this.shop_id
 				}).then((res) => {
 					if (res.code == 1) {
-						this.couponData = res.data
+						if(res.data.length>0) {
+							this.domHeigjt = 224
+							this.couponData = res.data
+						}else {
+							this.domHeigjt = 156
+							console.log(this.domHeigjt, '1111111111111111111');
+						}
 					}
 				})
 			}
@@ -289,6 +322,9 @@
 </script>
 
 <style scoped lang="scss">
+	.blank-text{
+		line-height: 32vh;
+	}
 	.pop-coupon {
 		width: 100%;
 		height: 42vh;
@@ -327,7 +363,7 @@
 		}
 
 		.item-left {
-			width: 200rpx;
+			width: 220rpx;
 			height: auto;
 			padding: 20rpx 24rpx;
 			box-sizing: border-box;
@@ -469,7 +505,7 @@
 				top: -50rpx;
 				left: 24rpx;
 				width: 702rpx;
-				min-height: 258rpx;
+				// min-height: 156rpx;
 				border-radius: 20rpx;
 				box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
 

+ 23 - 22
pages.json

@@ -27,8 +27,7 @@
 			}
 		]
 	},
-	"pages": [
-		{
+	"pages": [{
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "首页",
@@ -66,11 +65,9 @@
 			}
 		}
 	],
-	"subPackages": [
-		{
+	"subPackages": [{
 			"root": "pages-address",
-			"pages": [
-				{
+			"pages": [{
 					"path": "select-school",
 					"style": {
 						"navigationBarTitleText": "选择学校"
@@ -92,8 +89,7 @@
 		},
 		{
 			"root": "pages-buy",
-			"pages": [
-				{
+			"pages": [{
 					"path": "ticket",
 					"style": {
 						"navigationBarTitleText": "票务"
@@ -151,8 +147,7 @@
 		},
 		{
 			"root": "pages-school",
-			"pages": [
-				{
+			"pages": [{
 					"path": "school-circle",
 					"style": {
 						"navigationBarTitleText": "校友圈"
@@ -174,8 +169,7 @@
 		},
 		{
 			"root": "pages-takeout",
-			"pages": [
-				{
+			"pages": [{
 					"path": "takeout",
 					"style": {
 						"navigationBarTitleText": "外卖"
@@ -200,14 +194,14 @@
 					}
 				},
 				{
-				
+
 					"path": "aptitude",
 					"style": {
 						"navigationBarTitleText": "资质"
 					}
 				},
 				{
-				
+
 					"path": "confirm-order",
 					"style": {
 						"navigationBarTitleText": "提交订单"
@@ -215,10 +209,18 @@
 				}
 			]
 		},
+		{
+			"root": "pages-position",
+			"pages": [{
+				"path": "Internship-position",
+				"style": {
+					"navigationBarTitleText": "实习岗位"
+				}
+			}]
+		},
 		{
 			"root": "pages-order",
-			"pages": [
-				{
+			"pages": [{
 					"path": "takeout-info",
 					"style": {
 						"navigationBarTitleText": "外卖详情"
@@ -252,8 +254,7 @@
 		},
 		{
 			"root": "pages-my",
-			"pages": [
-				{
+			"pages": [{
 					"path": "user-info",
 					"style": {
 						"navigationBarTitleText": "个人信息"
@@ -388,12 +389,12 @@
 			]
 		}
 	],
-	"preloadRule":{
-		"pages/index/index":{
+	"preloadRule": {
+		"pages/index/index": {
 			"network": "all",
 			"packages": ["pages-address"]
 		},
-		"pages/login/index":{
+		"pages/login/index": {
 			"network": "all",
 			"packages": ["pages-address"]
 		}
@@ -409,7 +410,7 @@
 		"current": 0,
 		"list": [{
 			"name": "列表调试",
-			"path": "pages-my/my-ticket",
+			"path": "pages-position/Internship-position",
 			"query": ""
 		}]
 	}

+ 26 - 9
pages/index/index.vue

@@ -106,7 +106,7 @@
 							</view>
 							<image class="right-box-title-img" src="@/static/img/toRight.png" mode=""></image>
 						</view>
-						<view class="align-items-center mb-8">
+						<view class="align-items-center mb-12">
 							<image class="img-x mr-12" src="@/static/img/my/wdpj.png" mode=""></image>
 							<view class="fs-26 fw-600 fc-FF7F00 mr-12">{{item.shop_score}}分</view>
 							<view class="fc-6 fs-24 mr-12">| 预计{{item.delivery_time}}分钟 |</view>
@@ -135,7 +135,10 @@
 		</view>
 		<uni-popup ref="popup" type="center" border-radius="10px 10px 10px 10px" :is-mask-click="false">
 			<view class="roll-pop">
-				<image class="lq-bg" src="@/static/img/index/lq-bg.png" mode=""></image>
+				<!-- <image class="lq-bg" src="@/static/img/index/lq-bg.png" mode=""></image> -->
+				<image class="tc-top" src="@/static/img/index/tc-top.png" mode=""></image>
+				<image class="tc-content" src="@/static/img/index/tc-content.png" mode=""></image>
+				<image class="tc-bot" src="@/static/img/index/tc-bot.png" mode=""></image>
 				<view class="coupon-box">
 					<view class="item-box display-flex mb-20" v-for="(item,index) in couponData" :key="index">
 						<view class="item-right flex-direction flex-justify-center flex-1 bgc-FCE7E2">
@@ -237,6 +240,7 @@
 					{
 						name: "实习岗位",
 						img: require('@/static/img/index/index-sxgw.png'),
+						type: 8
 					},
 				],
 
@@ -443,6 +447,11 @@
 					uni.navigateTo({
 						url: '/pages-school/school-circle'
 					})
+				} else if (type === 8) {
+					// 去实习岗位
+					uni.navigateTo({
+						url: '/pages-position/Internship-position'
+					})
 				} else {
 					tools.error('暂未开放')
 				}
@@ -471,12 +480,19 @@
 		width: 100vw;
 		height: 1000rpx;
 
-		.lq-bg {
-			width: 100vw;
-			height: 1000rpx;
-			position: absolute;
-			top: 0;
-			left: 0;
+		.tc-top {
+			width: 100%;
+			height: 202rpx;
+		}
+
+		.tc-content {
+			width: 100%;
+			max-height: 590rpx;
+		}
+
+		.tc-bot {
+			width: 100%;
+			height: 178rpx;
 		}
 
 		.pop-gb {
@@ -825,12 +841,13 @@
 		border-radius: 20rpx 0 0 20rpx;
 		position: relative;
 	}
+
 	.but-box {
 		width: 152rpx;
 		height: 52rpx;
 		line-height: 52rpx;
 		text-align: center;
-		background: linear-gradient( 225deg, #FB3D03 0%, #FF6901 100%);
+		background: linear-gradient(225deg, #FB3D03 0%, #FF6901 100%);
 		border-radius: 200rpx;
 	}
 </style>

BIN
static/img/index/bcdxc.png


BIN
static/img/index/sxgw.png


BIN
static/img/index/tc-bot.png


BIN
static/img/index/tc-content.png


BIN
static/img/index/tc-top.png