Merge remote-tracking branch 'remotes/origin/master'
This commit is contained in:
commit
d5ff310858
2
env/.env.development
vendored
2
env/.env.development
vendored
@ -7,7 +7,7 @@ VITE_SHOW_SOURCEMAP = true
|
||||
# 是否启用读取配置文件 min
|
||||
#VITE_WEBAPP = 'D://opt//AppUpdateTest'
|
||||
VITE_WEBAPP = ''
|
||||
VITE_SERVER_BASEURL = 'http://10.75.15.246:8080/jeecg-boot'
|
||||
VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot'
|
||||
#websocket连接url-测试用
|
||||
VITE_WEBSOCKET_URL = 'ws://10.75.15.246:8899/mqttprod/ws/simple'
|
||||
#VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
|
||||
|
4
env/.env.production
vendored
4
env/.env.production
vendored
@ -8,9 +8,5 @@ VITE_SHOW_SOURCEMAP = false
|
||||
#VITE_WEBAPP = 'D://opt//AppUpdateTest'
|
||||
VITE_WEBAPP = ''
|
||||
VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot'
|
||||
|
||||
|
||||
|
||||
|
||||
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/wwapi'
|
||||
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/yjapi'
|
||||
|
@ -76,6 +76,8 @@ export default defineManifestConfig({
|
||||
'<uses-feature android:name="android.hardware.camera"/>',
|
||||
'<uses-permission android:name="android.permission.WRITE_SETTINGS"/>',
|
||||
],
|
||||
// app外连接访问 by 闵
|
||||
schemes : "szcxapp"
|
||||
},
|
||||
/* ios打包配置 */
|
||||
ios: {},
|
||||
|
19
src/App.vue
19
src/App.vue
@ -7,18 +7,35 @@
|
||||
import { getLocation, useUpdateApp } from '@/utils';
|
||||
export default {
|
||||
onLaunch: function (options) {
|
||||
console.log(options)
|
||||
// 检查更新
|
||||
useUpdateApp().checkAppUpdate()
|
||||
// 定位
|
||||
getLocation()
|
||||
// 处理外部唤醒逻辑 min
|
||||
if (options.path && options.query) {
|
||||
const path = options.path; // 获取路径,如 "pages/home/index"
|
||||
const query = options.query; // 获取参数,如 {id: 123}
|
||||
uni.navigateTo({
|
||||
url: `/${path}?${Object.keys(query).map(k => `${k}=${query[k]}`).join('&')}`
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow: function (options) {
|
||||
|
||||
var args= plus.runtime.arguments;
|
||||
if(args){
|
||||
// 处理args参数,如直达到某新页面等
|
||||
}
|
||||
console.log(args)
|
||||
|
||||
//改造了一下,加了白名单验证
|
||||
//为了实现实流检定的证书验证页面
|
||||
//jiang 20250605
|
||||
// 定义白名单页面
|
||||
const publicPages = [
|
||||
'/pages/sljd/index'
|
||||
'/pages/sljd/index',
|
||||
'/pages/linktoapp/index'
|
||||
]
|
||||
|
||||
// 检查当前页面是否在白名单中
|
||||
|
10
src/api/officialReceptions/index.ts
Normal file
10
src/api/officialReceptions/index.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { http } from '@/utils/http';
|
||||
|
||||
/*通过id查询公文数据*/
|
||||
export function queryById(id : string) {
|
||||
return http({
|
||||
url: '/CxcGwjdSpd/cxcGwjdSpd/queryByIdBpm',
|
||||
method: 'GET',
|
||||
data: { id }
|
||||
})
|
||||
}
|
10
src/api/plan/index.ts
Normal file
10
src/api/plan/index.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { http } from '@/utils/http';
|
||||
|
||||
/*通过id查询公文数据*/
|
||||
export function queryByIdBpm(id : string) {
|
||||
return http({
|
||||
url: '/cxcjhcwjswxjh/cxcJhcwJswxjh/queryByIdBpm',
|
||||
method: 'GET',
|
||||
data: { id }
|
||||
})
|
||||
}
|
@ -2,10 +2,10 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-if="ifH5">
|
||||
<SinopecEsignPageH5 :valiData="props.valiData" :procInsId="props.procInsId" :path="props.path" ref="signH5" :fileName="props.fileName" @stampSuccess="getStampSuccess"></SinopecEsignPageH5>
|
||||
<SinopecEsignPageH5 :taskDefKey="props.taskDefKey" :valiData="props.valiData" :procInsId="props.procInsId" :path="props.path" ref="signH5" :fileName="props.fileName" @stampSuccess="getStampSuccess"></SinopecEsignPageH5>
|
||||
</view>
|
||||
<view v-else>
|
||||
<SinopecEsignPageAPP :valiData="props.valiData" :procInsId="props.procInsId" :path="props.path" ref="signAPP" :fileName="props.fileName" @stampSuccess="getStampSuccess"></SinopecEsignPageAPP>
|
||||
<SinopecEsignPageAPP :taskDefKey="props.taskDefKey" :valiData="props.valiData" :procInsId="props.procInsId" :path="props.path" ref="signAPP" :fileName="props.fileName" @stampSuccess="getStampSuccess"></SinopecEsignPageAPP>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -40,6 +40,10 @@
|
||||
path: {//签章验证
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
taskDefKey: { //流程节点
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -45,6 +45,10 @@ export default {
|
||||
path: {//签章验证
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
taskDefKey: { //流程节点
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
emits: ['message'],
|
||||
@ -107,10 +111,14 @@ export default {
|
||||
} else {
|
||||
return flag = false;
|
||||
}
|
||||
} else if (props.path == 'modules/gwjdspd/modules/CxcGwjdSpdFromByProcess') { //判断公务接待模块
|
||||
} else if (props.path == 'officialReceptions/index') { //判断公务接待模块
|
||||
//2024.5.16张祥瑞
|
||||
//如果签章路径是非常规盖章则走这里,验证机制为跳过签章个数验证,只要没签章则不能提交流程
|
||||
// let flag = false;
|
||||
if(props.taskDefKey=='task1715564108096'){ //如果是综合办审核,不需要该区
|
||||
return flag = true; //只要执行了签章成功操作就返回成功,否则加载个数验证
|
||||
}
|
||||
|
||||
if (sign.value) {
|
||||
return flag = true; //只要执行了签章成功操作就返回成功,否则加载个数验证
|
||||
} else {
|
||||
|
@ -60,6 +60,10 @@
|
||||
path: {//签章验证
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
taskDefKey: { //流程节点
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
})
|
||||
|
||||
@ -90,7 +94,7 @@
|
||||
|
||||
const signValidator = async () => { //签章验证 by 闵
|
||||
|
||||
console.log(props.valiData)
|
||||
console.log(props.path)
|
||||
errorMsg.value = '';
|
||||
let flag = false;
|
||||
if (props.path == 'unconventional/stamp') { //非常规验证
|
||||
@ -126,10 +130,15 @@
|
||||
} else {
|
||||
return flag = false;
|
||||
}
|
||||
} else if (props.path == 'modules/gwjdspd/modules/CxcGwjdSpdFromByProcess') { //判断公务接待模块
|
||||
} else if (props.path == 'officialReceptions/index') { //判断公务接待模块
|
||||
//2024.5.16张祥瑞
|
||||
//如果签章路径是非常规盖章则走这里,验证机制为跳过签章个数验证,只要没签章则不能提交流程
|
||||
// let flag = false;
|
||||
console.log(2222)
|
||||
if(props.taskDefKey=='task1715564108096'){ //如果是综合办审核,不需要该区
|
||||
return flag = true; //只要执行了签章成功操作就返回成功,否则加载个数验证
|
||||
}
|
||||
|
||||
if (sign.value) {
|
||||
return flag = true; //只要执行了签章成功操作就返回成功,否则加载个数验证
|
||||
} else {
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view>
|
||||
<wd-upload :accept="accept" multiple :file-list="fileList" :action="action" @change="handleChange" :disabled="disabled" @fail="fail"
|
||||
<wd-upload :accept="accept" multiple :before-preview="beforeChoose" :file-list="fileList" :action="action" @change="handleChange" :disabled="disabled" @fail="fail"
|
||||
:before-remove="beforeRemove" :multiple="multiple">
|
||||
<template #preview-cover="{ file,index }">
|
||||
<!-- 小程序拿不到文件 -->
|
||||
<view class="preview-cover text-ellipsis" style="color: #0081ff;" @click="onLinePreview(file.name)">
|
||||
<view class="preview-cover text-ellipsis" style="color: #0081ff;" @click="onLinePreview(file)">
|
||||
{{ file?.name||`文件${index+1}` }}
|
||||
</view>
|
||||
</template>
|
||||
@ -82,6 +82,10 @@
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
const beforeChoose = (val) =>{
|
||||
onLinePreview(val.file);
|
||||
return false;
|
||||
}
|
||||
|
||||
const handleChange = (val) => { //文件发生变化
|
||||
let pathArr = [];
|
||||
@ -143,9 +147,8 @@
|
||||
}
|
||||
|
||||
const onLinePreview = (val) => { //在线预览
|
||||
console.log(val)
|
||||
let prex = props.path ? props.path : 'APP文件'
|
||||
let usePath = prex + '/' + val
|
||||
// let prex = props.path ? props.path : 'APP文件'
|
||||
let usePath = JSON.parse( val.response).message
|
||||
uni.navigateTo({
|
||||
url: `/pages/onlinePreview/detail?data=${usePath}`
|
||||
});
|
||||
|
@ -44,7 +44,8 @@
|
||||
"abiFilters": [
|
||||
"armeabi-v7a",
|
||||
"arm64-v8a"
|
||||
]
|
||||
],
|
||||
"schemes": "szcxapp"
|
||||
},
|
||||
"ios": {},
|
||||
"sdkConfigs": {
|
||||
|
109
src/pages-bpm/officialReceptions/index.vue
Normal file
109
src/pages-bpm/officialReceptions/index.vue
Normal file
@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<view>
|
||||
<wd-collapse v-model="value">
|
||||
<wd-collapse-item title="表单数据" name="item1">
|
||||
<wd-cell title="接待类别" :value="info.jdlb" />
|
||||
<wd-cell title="详细类别" :value="info.jdlb2" />
|
||||
<wd-cell title="申请时间" :value="info.sqrq" />
|
||||
<wd-cell title="申请单位" :value="info.sqdw" />
|
||||
<wd-cell title="申请盖章领导" :value="info.gzbmld" />
|
||||
<wd-cell title="申请盖章厂领导" :value="info.gzcld" />
|
||||
<wd-cell title="活动日期" :value="info.hdrq" />
|
||||
<wd-cell title="来宾单位" :value="info.lbdw" />
|
||||
<wd-cell title="活动内容" :value="info.hdnr" />
|
||||
<wd-cell title="经办人" :value="info.jbr" />
|
||||
<wd-cell title="接待类别" :value="info.jdxm" />
|
||||
<wd-cell v-if="info.jdxm=='工作餐(午餐)'&&info.jdlb2=='业务招待(外部市场)'" title="午餐地点" :value="info.wcddforwbxm" />
|
||||
<wd-cell v-if="info.jdxm=='工作餐(午餐)'&&info.jdlb2!='业务招待(外部市场)'" title="午餐地点" :value="info.gzcjszwdidian" />
|
||||
<wd-cell v-if="info.jdxm=='工作餐(晚餐)'" title="晚餐开始时间" :value="info.nightstarttime" />
|
||||
<wd-cell v-if="info.jdxm=='工作餐(晚餐)'&&info.jdlb2=='业务招待(外部市场)'" title="晚餐地点" :value="info.ninghtddforwbxm" />
|
||||
<wd-cell v-if="info.jdxm=='工作餐(晚餐)'&&info.jdlb2!='业务招待(外部市场)'" title="晚餐地点" :value="info.gzcjswsdidian" />
|
||||
<wd-cell v-if="info.jdxm=='自助餐'" title="自助餐人数" :value="info.zzcrs" />
|
||||
<wd-cell v-if="info.jdxm=='自助餐'" title="自助餐次数" :value="info.zzccs" />
|
||||
<wd-cell title="来宾人数" :value="info.lbrs" />
|
||||
<wd-cell title="陪餐人数" :value="info.pcrs" />
|
||||
<wd-cell title="申请金额(元)" :value="info.sqje" />
|
||||
<wd-cell title="备注" :value="info.bz" />
|
||||
</wd-collapse-item>
|
||||
<wd-collapse-item custom-body-style="padding:0;" title="审批附件" name="item2">
|
||||
<SinopecEsignPage ref="sign" :procInsId="props.formData.procInsId" :path="props.formData.path" :taskDefKey="props.formData.taskDefKey" :fileName="info.jdsqwj" @stampSuccess="getStampSuccess" ></SinopecEsignPage>
|
||||
</wd-collapse-item>
|
||||
</wd-collapse>
|
||||
<wd-toast></wd-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
queryById
|
||||
} from '@/api/officialReceptions'
|
||||
import {
|
||||
processHistoryList
|
||||
} from '@/api/bpm/sign'
|
||||
import {
|
||||
imgUrl
|
||||
} from '@/utils/index'
|
||||
import SinopecEsignPage from '@/components/Esign/SinopecEsignPage.vue'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { useToast, useMessage, useNotify, dayjs } from 'wot-design-uni'
|
||||
const userStore = useUserStore()
|
||||
const toast = useToast()
|
||||
const emit = defineEmits(['getStampSuc'])
|
||||
|
||||
const sign = ref(null);
|
||||
const value = ref([]);
|
||||
const info = ref({});
|
||||
const valiData = ref({});
|
||||
const ifEsign = ref(true);
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
fileName: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
})
|
||||
|
||||
const queryData = ()=>{
|
||||
console.log(props.formData)
|
||||
queryById(props.formData.dataId).then(res=>{
|
||||
if (res.success) {
|
||||
console.log(res)
|
||||
info.value = res.result.records[0]
|
||||
if(info.value.jdsqwj){
|
||||
info.value.jdsqwj = info.value.jdsqwj.replace("PdfFiles/PdfFile/",'')
|
||||
}
|
||||
}else{
|
||||
toast.error(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
//获取印章成功事件,并将信号传给确认提交按钮。
|
||||
const getStampSuccess=(val)=> {
|
||||
emit('getStampSuc', val)
|
||||
}
|
||||
|
||||
const signValidator = (procInsId,path)=>{
|
||||
//这里进行电子签章验证
|
||||
return sign.value.signValidator();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
queryData();
|
||||
})
|
||||
|
||||
|
||||
defineExpose({ //暴露方法
|
||||
signValidator,
|
||||
ifEsign
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
|
||||
</style>
|
65
src/pages-bpm/planReview/index.vue
Normal file
65
src/pages-bpm/planReview/index.vue
Normal file
@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<view>
|
||||
<wd-cell-group>
|
||||
<wd-cell title="建议计划类别" :value="info.jyjhlx_dictText" />
|
||||
<wd-cell title="项目名称" :value="info.xmmc" />
|
||||
<wd-cell title="年度批次" :value="info.nd+'+0'+info.pc" />
|
||||
<wd-cell title="计划开工(执行)时间" :value="info.jhkgsj" />
|
||||
<wd-cell title="完工时间" :value="info.wgsj" />
|
||||
<wd-cell title="结算时间" :value="info.jssj" />
|
||||
<wd-cell title="使用单位(部门)" :value="info.sydw_dictText" />
|
||||
<wd-cell title="实施原因" :value="info.ssyy" />
|
||||
<wd-cell title="主要工作内容及工程量" :value="info.nrgzl" />
|
||||
<wd-cell title="费用明细构成" :value="info.mxgc" />
|
||||
<wd-cell title="项目负责人" :value="info.xmfzr_dictText" />
|
||||
<wd-cell title="主管部门" :value="info.zgbm_dictText" />
|
||||
<wd-cell title="切块费用名称" :value="info.qkfymc" />
|
||||
<wd-cell title="计划金额(万元)" :value="info.jhje" />
|
||||
<wd-cell title="剩余预算(万元)" :value="info.remainder" />
|
||||
<wd-cell title="承揽单位类别" :value="info.cldwlb_dictText" />
|
||||
<wd-cell title="自营组织方式" :value="info.zyzzfs" />
|
||||
<wd-cell title="自营意向单位" :value="info.zyysdw" />
|
||||
<wd-cell title="项目经办人" :value="info.contactPerson_dictText" />
|
||||
<wd-cell title="备注" :value="info.bz" />
|
||||
<wd-cell title="上传请示文件" v-if="info.jyjhlx!='4'">
|
||||
<Mupload v-model="info.qsbz" disabled></Mupload>
|
||||
</wd-cell>
|
||||
</wd-cell-group>
|
||||
<wd-toast></wd-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
queryByIdBpm
|
||||
} from '@/api/plan'
|
||||
import { useToast, useMessage, useNotify, dayjs } from 'wot-design-uni'
|
||||
import Mupload from '@/components/Mupload/Mupload.vue'
|
||||
|
||||
const toast = useToast()
|
||||
const info = ref({})
|
||||
const image = ref([])
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// 申请信息
|
||||
const queryByIdMount = () => {
|
||||
queryByIdBpm(props.formData.dataId).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res)
|
||||
info.value = res.result.records[0]
|
||||
}else{
|
||||
toast.error(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
queryByIdMount()
|
||||
})
|
||||
</script>
|
@ -184,7 +184,6 @@
|
||||
})
|
||||
.then(() => {
|
||||
loading.value = true
|
||||
console.log('*---',submitData)
|
||||
addApi(submitData).then(res => {
|
||||
if (res.success) {
|
||||
startMutilProcess(res.message)
|
||||
@ -229,10 +228,8 @@
|
||||
/*获取请假类型*/
|
||||
const getTypeList = () => {
|
||||
getCategoryItemsApi('1838487445813645313').then((res) => {
|
||||
console.log("res-------",res.result)
|
||||
if (res.success) {
|
||||
data.value = res.result
|
||||
console.log("res-------",data.value)
|
||||
typeData.value = [data.value.map(item => {
|
||||
return {
|
||||
value: item.name,
|
||||
@ -338,13 +335,10 @@
|
||||
roleId: '1554379432313397250',
|
||||
orgCode: code
|
||||
}).then(res => {
|
||||
if (res.result.length == 0) {
|
||||
toast.warning('请切换工作单位!')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 2000)
|
||||
} else {
|
||||
if (res.result.length > 0) {
|
||||
model.hr = res.result[0].username
|
||||
}
|
||||
if (!code) {
|
||||
hrData.value = res.result.map(item => {
|
||||
return {
|
||||
label: item.realname,
|
||||
|
@ -85,6 +85,15 @@
|
||||
"navigationBarTitleText": "主页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/linktoapp/index",
|
||||
"type": "page",
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "跳转到APP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/message/message",
|
||||
"type": "page",
|
||||
@ -592,6 +601,14 @@
|
||||
"path": "OfficeEquipmentMaintenanceApplication/index",
|
||||
"type": "page"
|
||||
},
|
||||
{
|
||||
"path": "officialReceptions/index",
|
||||
"type": "page"
|
||||
},
|
||||
{
|
||||
"path": "planReview/index",
|
||||
"type": "page"
|
||||
},
|
||||
{
|
||||
"path": "SuperiorSystem/index",
|
||||
"type": "page"
|
||||
|
209
src/pages/linktoapp/index.vue
Normal file
209
src/pages/linktoapp/index.vue
Normal file
@ -0,0 +1,209 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '跳转到APP',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 顶部占位 -->
|
||||
<view class="placeholder"></view>
|
||||
|
||||
<!-- 主要内容 -->
|
||||
<view class="content">
|
||||
<view class="logo-area">
|
||||
<uni-title :title="'数智产销APP'" type="h1" color="white" />
|
||||
</view>
|
||||
|
||||
<view class="action-area">
|
||||
<!-- 主跳转按钮 -->
|
||||
<button class="action-btn" @click="handleJump">立即打开APP</button>
|
||||
<uni-section title="自定义颜色" type="line" padding>
|
||||
<uni-link href="szcxapp://pages/login/login" text="立即打开APP" color="#007BFF"></uni-link>
|
||||
</uni-section>
|
||||
<!-- 备用方案 -->
|
||||
<view class="tips" v-if="showTips">
|
||||
<text>跳转失败?请尝试:</text>
|
||||
<button class="secondary-btn" @click="openInBrowser">在浏览器中打开</button>
|
||||
<button class="secondary-btn" @click="copyDownloadLink">复制下载链接</button>
|
||||
<button class="secondary-btn" @click="tryIntent">高级跳转方式</button>
|
||||
</view>
|
||||
|
||||
<!-- 特殊浏览器指引 -->
|
||||
<view class="guide" v-if="showGuide">
|
||||
<text>操作指引:</text>
|
||||
<text>1. 点击右上角 ⋮ 或 ••• 按钮</text>
|
||||
<text>2. 选择"在浏览器中打开"</text>
|
||||
<text>3. 在浏览器中点击"打开APP"按钮</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 隐藏的iframe用于Intent跳转 -->
|
||||
<iframe id="intentIframe" style="display:none;"></iframe>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
const showTips = ref(false)
|
||||
const showGuide = ref(false)
|
||||
|
||||
// 尝试直接Scheme跳转
|
||||
const trySchemeJump = () => {
|
||||
window.location.href = 'szcxapp://pages/login/login'
|
||||
|
||||
setTimeout(() => {
|
||||
if (!document.hidden) {
|
||||
showTips.value = true
|
||||
detectSpecialBrowser()
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
|
||||
// Android Intent方式跳转
|
||||
const tryIntentJump = () => {
|
||||
const iframe = document.getElementById('intentIframe')
|
||||
iframe.src = `intent://open#Intent;scheme=szcxapp;package=${getAppPackageName()};end`
|
||||
|
||||
// setTimeout(() => {
|
||||
// if (!document.hidden) {
|
||||
// openInBrowser()
|
||||
// }
|
||||
// }, 1000)
|
||||
}
|
||||
|
||||
// 获取应用包名(根据实际情况修改)
|
||||
const getAppPackageName = () => {
|
||||
return 'uni.UNI1B02D50' // 替换为你的实际包名
|
||||
}
|
||||
|
||||
// 处理跳转按钮点击
|
||||
const handleJump = () => {
|
||||
trySchemeJump()
|
||||
}
|
||||
|
||||
// 高级跳转方式
|
||||
const tryIntent = () => {
|
||||
tryIntentJump()
|
||||
}
|
||||
|
||||
// 在系统浏览器中打开
|
||||
const openInBrowser = () => {
|
||||
window.open('https://36.112.48.190//jeecg-boot/sys/common/static//D://opt//AppUpdate//apk//数智产销.apk')
|
||||
}
|
||||
|
||||
// 复制下载链接
|
||||
const copyDownloadLink = () => {
|
||||
uni.setClipboardData({
|
||||
data: 'https://36.112.48.190//jeecg-boot/sys/common/static//D://opt//AppUpdate//apk//数智产销.apk',
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '链接已复制',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 检测是否在特殊浏览器中
|
||||
const detectSpecialBrowser = () => {
|
||||
const ua = navigator.userAgent.toLowerCase()
|
||||
if (ua.indexOf('micromessenger') > -1 ||
|
||||
ua.indexOf('weibo') > -1 ||
|
||||
ua.indexOf('qq') > -1 ||
|
||||
ua.indexOf('your-app-internal-browser') > -1) {
|
||||
showGuide.value = true
|
||||
}
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
// 页面加载时自动尝试跳转
|
||||
trySchemeJump()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
background-color: #0a2463;
|
||||
background-image:
|
||||
linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
|
||||
linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
|
||||
background-size: 20rpx 20rpx;
|
||||
background-position: 0 0, 10rpx 10rpx;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
height: var(--status-bar-height);
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.logo-area {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
|
||||
.action-area {
|
||||
margin-bottom: 80rpx;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
background-color: #007aff;
|
||||
color: white;
|
||||
border-radius: 50rpx;
|
||||
padding: 20rpx 40rpx;
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.secondary-btn {
|
||||
background-color: transparent;
|
||||
color: #007aff;
|
||||
border: 1rpx solid #007aff;
|
||||
border-radius: 50rpx;
|
||||
padding: 15rpx 30rpx;
|
||||
font-size: 28rpx;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.tips {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
color: #ffffff;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.guide {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #ffffff;
|
||||
margin-top: 40rpx;
|
||||
padding: 20rpx;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.guide text {
|
||||
margin-bottom: 10rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
3
src/types/uni-pages.d.ts
vendored
3
src/types/uni-pages.d.ts
vendored
@ -8,6 +8,7 @@ interface NavigateToOptions {
|
||||
"/pages/annotation/annotationDetail" |
|
||||
"/pages/annotation/annotationList" |
|
||||
"/pages/index/index" |
|
||||
"/pages/linktoapp/index" |
|
||||
"/pages/message/message" |
|
||||
"/pages/more/more" |
|
||||
"/pages/onlinePreview/detail" |
|
||||
@ -71,6 +72,8 @@ interface NavigateToOptions {
|
||||
"/pages-bpm/lawsAndRegulations/index" |
|
||||
"/pages-bpm/leaveApplication/index" |
|
||||
"/pages-bpm/OfficeEquipmentMaintenanceApplication/index" |
|
||||
"/pages-bpm/officialReceptions/index" |
|
||||
"/pages-bpm/planReview/index" |
|
||||
"/pages-bpm/SuperiorSystem/index" |
|
||||
"/pages-bpm/unconventional/index" |
|
||||
"/pages-bpm/unconventional/stamp" |
|
||||
|
17
src/uni_modules/uni-link/changelog.md
Normal file
17
src/uni_modules/uni-link/changelog.md
Normal file
@ -0,0 +1,17 @@
|
||||
## 1.0.0(2021-11-19)
|
||||
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
|
||||
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-link](https://uniapp.dcloud.io/component/uniui/uni-link)
|
||||
## 1.1.7(2021-11-08)
|
||||
## 0.0.7(2021-09-03)
|
||||
- 修复 在 nvue 下不显示的 bug
|
||||
## 0.0.6(2021-07-30)
|
||||
- 新增 支持自定义插槽
|
||||
## 0.0.5(2021-06-21)
|
||||
- 新增 download 属性,H5平台下载文件名
|
||||
## 0.0.4(2021-05-12)
|
||||
- 新增 组件示例地址
|
||||
## 0.0.3(2021-03-09)
|
||||
- 新增 href 属性支持 tel:|mailto:
|
||||
|
||||
## 0.0.2(2021-02-05)
|
||||
- 调整为uni_modules目录规范
|
128
src/uni_modules/uni-link/components/uni-link/uni-link.vue
Normal file
128
src/uni_modules/uni-link/components/uni-link/uni-link.vue
Normal file
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<a v-if="isShowA" class="uni-link" :href="href"
|
||||
:class="{'uni-link--withline':showUnderLine===true||showUnderLine==='true'}"
|
||||
:style="{color,fontSize:fontSize+'px'}" :download="download">
|
||||
<slot>{{text}}</slot>
|
||||
</a>
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<text v-else class="uni-link" :class="{'uni-link--withline':showUnderLine===true||showUnderLine==='true'}"
|
||||
:style="{color,fontSize:fontSize+'px'}" @click="openURL">
|
||||
<slot>{{text}}</slot>
|
||||
</text>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<text v-else class="uni-link" :class="{'uni-link--withline':showUnderLine===true||showUnderLine==='true'}"
|
||||
:style="{color,fontSize:fontSize+'px'}" @click="openURL">
|
||||
{{text}}
|
||||
</text>
|
||||
<!-- #endif -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* Link 外部网页超链接组件
|
||||
* @description uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打开新网页
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=1182
|
||||
* @property {String} href 点击后打开的外部网页url
|
||||
* @property {String} text 显示的文字
|
||||
* @property {String} downlaod H5平台下载文件名
|
||||
* @property {Boolean} showUnderLine 是否显示下划线
|
||||
* @property {String} copyTips 在小程序端复制链接时显示的提示语
|
||||
* @property {String} color 链接文字颜色
|
||||
* @property {String} fontSize 链接文字大小
|
||||
* @example * <uni-link href="https://ext.dcloud.net.cn" text="https://ext.dcloud.net.cn"></uni-link>
|
||||
*/
|
||||
export default {
|
||||
name: 'uniLink',
|
||||
props: {
|
||||
href: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
text: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
download: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
showUnderLine: {
|
||||
type: [Boolean, String],
|
||||
default: true
|
||||
},
|
||||
copyTips: {
|
||||
type: String,
|
||||
default: '已自动复制网址,请在手机浏览器里粘贴该网址'
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '#999999'
|
||||
},
|
||||
fontSize: {
|
||||
type: [Number, String],
|
||||
default: 14
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isShowA() {
|
||||
// #ifdef H5
|
||||
this._isH5 = true;
|
||||
// #endif
|
||||
if ((this.isMail() || this.isTel()) && this._isH5 === true) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this._isH5 = null;
|
||||
},
|
||||
methods: {
|
||||
isMail() {
|
||||
return this.href.startsWith('mailto:');
|
||||
},
|
||||
isTel() {
|
||||
return this.href.startsWith('tel:');
|
||||
},
|
||||
openURL() {
|
||||
// #ifdef APP-PLUS
|
||||
if (this.isTel()) {
|
||||
this.makePhoneCall(this.href.replace('tel:', ''));
|
||||
} else {
|
||||
plus.runtime.openURL(this.href);
|
||||
}
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
window.open(this.href)
|
||||
// #endif
|
||||
// #ifdef MP
|
||||
uni.setClipboardData({
|
||||
data: this.href
|
||||
});
|
||||
uni.showModal({
|
||||
content: this.copyTips,
|
||||
showCancel: false
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
makePhoneCall(phoneNumber) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* #ifndef APP-NVUE */
|
||||
.uni-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
.uni-link--withline {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
87
src/uni_modules/uni-link/package.json
Normal file
87
src/uni_modules/uni-link/package.json
Normal file
@ -0,0 +1,87 @@
|
||||
{
|
||||
"id": "uni-link",
|
||||
"displayName": "uni-link 超链接",
|
||||
"version": "1.0.0",
|
||||
"description": "uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打",
|
||||
"keywords": [
|
||||
"uni-ui",
|
||||
"uniui",
|
||||
"link",
|
||||
"超链接",
|
||||
""
|
||||
],
|
||||
"repository": "https://github.com/dcloudio/uni-ui",
|
||||
"engines": {
|
||||
"HBuilderX": ""
|
||||
},
|
||||
"directories": {
|
||||
"example": "../../temps/example_temps"
|
||||
},
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
],
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": ["uni-scss"],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y"
|
||||
},
|
||||
"client": {
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "y"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "y",
|
||||
"微信浏览器(Android)": "y",
|
||||
"QQ浏览器(Android)": "y"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "y",
|
||||
"Edge": "y",
|
||||
"Firefox": "y",
|
||||
"Safari": "y"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "y",
|
||||
"阿里": "y",
|
||||
"百度": "y",
|
||||
"字节跳动": "y",
|
||||
"QQ": "y"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "y",
|
||||
"联盟": "y"
|
||||
},
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
src/uni_modules/uni-link/readme.md
Normal file
11
src/uni_modules/uni-link/readme.md
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
## Link 链接
|
||||
> **组件名:uni-link**
|
||||
> 代码块: `uLink`
|
||||
|
||||
|
||||
uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打开新网页。
|
||||
|
||||
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-link)
|
||||
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
Loading…
Reference in New Issue
Block a user