tanxue 3 dagar sedan
förälder
incheckning
881071059c

+ 36 - 0
api/haibao.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+export function getHaibaoOpsZhiye(data = {}) {
+  return request({
+    url: '/app/haibao/ops/zhiye',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getHaibaoList(data = {}) {
+  return request({
+    url: '/app/haibao/list',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}
+
+export function getHaibaoInfo(data = {}) {
+  return request({
+    url: '/app/haibao/info',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
+}

+ 61 - 0
pages/admin/haibao/haibaoInfo.vue

@@ -0,0 +1,61 @@
+<template>
+    <view class="phone-haibao-info-page">
+        <view class="phone-navBar-box">
+            <view @click="goUpPage" class="nav-bar-icon"></view>
+            <text class="nav-bar-title">职业海报</text>
+            <view class="text-btn">分享</view>
+        </view>
+        <view class="haibao-info-body-box">
+			<view v-if="data.img" class="img-box">
+				<img :src="data.img" class="haibao-image" />
+				<view class="info-text-box">
+					<view class="haibao-info-text"><icon class="jz-icon"></icon>{{data.jzName}}</view>
+					<view class="haibao-info-text"><icon class="tel-icon"></icon>{{data.realName}}({{data.tel}})</view>
+				</view>
+				
+			</view>
+            <view v-else class="loading-text">加载中...</view>
+        </view>
+    </view>
+</template>
+
+<script setup>
+import { reactive } from "vue"
+import { onLoad } from "@dcloudio/uni-app";
+import * as httpApi from '@/api/haibao.js'	
+
+const data = reactive({
+    img: '',
+    id: '',
+    menuId: '',
+	jzName: '',
+	realName: '',
+	tel: '',
+})
+
+function goUpPage() {
+    uni.redirectTo({
+        url: `/pages/admin/haibao/index?menuId=${data.menuId}`
+    })
+}
+
+function getHaibaoOpsZhiyeData(id) {
+    httpApi.getHaibaoInfo({ id }).then(res => {
+        data.img = res.data.image;
+		data.jzName = res.data.jzName;
+		data.realName = res.data.realName;
+		data.tel = res.data.tel;
+    }).catch(err => {
+        console.error('加载海报失败:', err)
+        uni.showToast({ title: '加载失败', icon: 'none' })
+    })
+}
+
+onLoad((options) => {
+    data.id = options.cardId || ''
+    data.menuId = options.menuId || ''
+    if (data.id) {
+        getHaibaoOpsZhiyeData(data.id) 
+    }
+})
+</script>

+ 45 - 0
pages/admin/webview/index.vue

@@ -0,0 +1,45 @@
+<!-- pages/admin/webview/index.vue -->
+<template>
+  <view class="webview-container">
+    <!-- #ifndef H5 -->
+    <web-view :src="url" @load="onLoad" @message="onMessage"></web-view>
+    <!-- #endif -->
+
+    <!-- #ifdef H5 -->
+    <iframe :src="url" style="width:100%;height:100vh;border:none;"></iframe>
+    <!-- #endif -->
+  </view>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { onLoad as onPageLoad } from '@dcloudio/uni-app';
+
+const url = ref('');
+
+onPageLoad((options) => {
+  if (options.url) {
+    url.value = decodeURIComponent(options.url);
+  }
+});
+
+const onLoad = (e) => {
+  console.log('webview loaded', e);
+};
+
+const onMessage = (e) => {
+  console.log('message from webview', e.detail.data);
+};
+function goUpPage() {
+		uni.redirectTo({
+			url: `/pages/admin/ShouYe/shouye`
+		})
+	}
+</script>
+
+<style>
+.webview-container {
+  width: 100%;
+  height: 100vh;
+}
+</style>

+ 1 - 0
static/images/common/haibao-jz-icon.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1768273274794" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5257" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100"><path d="M831.999792 588.800109a193.279952 193.279952 0 0 1-156.159961-76.799981 211.711947 211.711947 0 0 1-327.679918 0 193.023952 193.023952 0 0 1-155.903961 76.799981A189.439953 189.439953 0 0 1 0 402.432155a31.231992 31.231992 0 0 1 5.119999-16.895995L195.327951 15.616252A32.511992 32.511992 0 0 1 223.231944 0.000256h577.535856a32.511992 32.511992 0 0 1 27.903993 15.615996l190.975952 371.199907a30.207992 30.207992 0 0 1 4.351999 18.431996A189.695953 189.695953 0 0 1 831.999792 588.800109z m-155.135961-180.991955a32.255992 32.255992 0 0 1 30.975992 24.063994 127.999968 127.999968 0 0 0 251.391937-22.271994L782.335804 62.46424H241.66394L64.511984 409.600154a126.463968 126.463968 0 0 0 127.999968 115.711971 126.463968 126.463968 0 0 0 123.903969-94.463977 31.999992 31.999992 0 0 1 30.975992-24.063994 32.511992 32.511992 0 0 1 31.231992 23.551994A134.143966 134.143966 0 0 0 511.999872 526.336124a134.911966 134.911966 0 0 0 133.631967-94.975976 31.999992 31.999992 0 0 1 31.231992-23.551994z m217.343945 584.191854V680.192086a31.999992 31.999992 0 0 0-63.999984 0V960.000016H193.791952V680.192086a31.999992 31.999992 0 0 0-63.999984 0v311.807922A31.999992 31.999992 0 0 0 161.79196 1024h700.415824a31.999992 31.999992 0 0 0 31.999992-31.999992z" p-id="5258" fill="#000000"></path></svg>

+ 1 - 0
static/images/common/haibao-yh-icon.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1768273983850" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="43856" data-spm-anchor-id="a313x.search_index.0.i4.3ddb3a81Xg38G3" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100"><path d="M98.46 417.5a19.7 19.7 0 0 1-19.69-19.69V178.75a100.09 100.09 0 0 1 100-100h219.04a19.69 19.69 0 0 1 0 39.38H178.75a60.68 60.68 0 0 0-60.6 60.6v219.08a19.69 19.69 0 0 1-19.69 19.69zM397.81 945.23H178.75a100.09 100.09 0 0 1-100-100V626.19a19.69 19.69 0 0 1 39.38 0v219.06a60.68 60.68 0 0 0 60.6 60.6h219.08a19.69 19.69 0 0 1 0 39.38zM925.54 387.2a19.69 19.69 0 0 1-19.69-19.69V178.75a60.68 60.68 0 0 0-60.6-60.6H629.59a19.69 19.69 0 1 1 0-39.38h215.66a100.09 100.09 0 0 1 100 100v188.74a19.7 19.7 0 0 1-19.71 19.69zM845.25 945.23H626.19a19.69 19.69 0 0 1 0-39.38h219.06a60.68 60.68 0 0 0 60.6-60.6V626.19a19.69 19.69 0 0 1 39.38 0v219.06a100.09 100.09 0 0 1-99.98 99.98zM512 551.38c-97.73 0-177.23-79.5-177.23-177.23S414.27 196.92 512 196.92s177.23 79.51 177.23 177.23S609.73 551.38 512 551.38z m0-315.07c-76 0-137.85 61.84-137.85 137.84S436 512 512 512s137.85-61.84 137.85-137.85S588 236.31 512 236.31z" p-id="43857" fill="#000000"></path><path d="M787.69 827.08a19.7 19.7 0 0 1-19.69-19.7 256 256 0 0 0-512 0 19.69 19.69 0 1 1-39.38 0 295.38 295.38 0 0 1 590.76 0 19.69 19.69 0 0 1-19.69 19.7z" p-id="43858" fill="#000000"></path></svg>