合并所有代码
This commit is contained in:
parent
d483ab2f88
commit
69cbf6ab71
47
api/main.js
47
api/main.js
|
|
@ -1,47 +0,0 @@
|
|||
// src/composables/useWeChatAuth.js
|
||||
import { ref } from 'vue';
|
||||
import request from '@/request/index.js';
|
||||
|
||||
//解决跨域
|
||||
export function proxy(res){
|
||||
return request({
|
||||
url: `/api/proxy/get?apiUrl=${res.apiUrl}¶ms=${res.other}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export const jsonp = function (url, data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// 1.初始化url
|
||||
let dataString = url.indexOf('?') === -1 ? '?' : '&'
|
||||
let callbackName = `jsonpCB_${Date.now()}`;
|
||||
url += `${dataString}`
|
||||
if (data) {
|
||||
|
||||
// 2.有请求参数,依次添加到url
|
||||
for (let k in data) {
|
||||
url += `&${k}=${data[k]}`
|
||||
}
|
||||
}
|
||||
|
||||
let scriptNode = document.createElement('script');
|
||||
scriptNode.src = url;
|
||||
|
||||
// 3. callback
|
||||
window[callbackName] = (result) => {
|
||||
result ? resolve(result) : reject('没有返回数据');
|
||||
delete window[callbackName];
|
||||
document.body.removeChild(scriptNode);
|
||||
}
|
||||
|
||||
// 4. 异常情况
|
||||
scriptNode.addEventListener('error', () => {
|
||||
reject('接口返回数据失败');
|
||||
delete window[callbackName];
|
||||
document.body.removeChild(scriptNode);
|
||||
}, false)
|
||||
|
||||
// 5. 开始请求
|
||||
document.body.appendChild(scriptNode)
|
||||
})
|
||||
}
|
||||
|
|
@ -21,7 +21,6 @@
|
|||
const height = ref(600);
|
||||
// 裁剪完成的回调
|
||||
const handleCrop = (e) => {
|
||||
// console.log("剪切完了")
|
||||
uni.setStorageSync(`imgkey${type.value}`, e.tempFilePath);
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,121 +0,0 @@
|
|||
<template>
|
||||
<view>
|
||||
<image :src="isError ? defaultImage : links[currentIndex]" :style="{ width: width, height: height }"
|
||||
:mode="objectFit" @error="isError = true" @load="isError = false" />
|
||||
<button v-if="showButton" @click="$emit('update:playing', !playing)">
|
||||
{{ playing ? '停止播放' : '开始播放' }}
|
||||
</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
watch,
|
||||
onUnmounted
|
||||
} from 'vue'
|
||||
|
||||
// 定义组件的 props
|
||||
const props = defineProps({
|
||||
links: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '65rpx'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '65rpx'
|
||||
},
|
||||
objectFit: {
|
||||
type: String,
|
||||
default: 'aspectFill'
|
||||
},
|
||||
defaultImage: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
interval: {
|
||||
type: Number,
|
||||
default: 80
|
||||
},
|
||||
playing: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showButton: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
loop: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
// 定义组件发出的事件
|
||||
const emit = defineEmits(['update:playing'])
|
||||
|
||||
// 组件内部状态
|
||||
const currentIndex = ref(0) // 当前播放的图片索引
|
||||
const isPlaying = ref(false) // 是否正在播放
|
||||
const isError = ref(false) // 当前图片是否加载失败
|
||||
let timer = null // 定时器
|
||||
|
||||
// 开始播放
|
||||
const startPlay = () => {
|
||||
if (isPlaying.value) return
|
||||
isPlaying.value = true
|
||||
timer = setInterval(() => {
|
||||
if (props.loop) {
|
||||
// 循环播放:使用模运算循环索引
|
||||
currentIndex.value = (currentIndex.value + 1) % props.links.length
|
||||
isError.value = false
|
||||
} else {
|
||||
// 非循环播放:到末尾时停止
|
||||
if (currentIndex.value < props.links.length - 1) {
|
||||
currentIndex.value++
|
||||
isError.value = false
|
||||
} else {
|
||||
stopPlay()
|
||||
}
|
||||
}
|
||||
}, props.interval)
|
||||
}
|
||||
|
||||
// 停止播放
|
||||
const stopPlay = () => {
|
||||
isPlaying.value = false
|
||||
clearInterval(timer)
|
||||
}
|
||||
|
||||
// 监听 playing 属性变化
|
||||
watch(() => props.playing, (val) => {
|
||||
currentIndex.value = 0
|
||||
if (val) {
|
||||
startPlay()
|
||||
} else {
|
||||
stopPlay()
|
||||
setTimeout(() => currentIndex.value = 0, 50)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
// 监听 links 数组变化
|
||||
watch(() => props.links, () => {
|
||||
currentIndex.value = 0
|
||||
isError.value = false
|
||||
if (isPlaying.value) {
|
||||
stopPlay()
|
||||
}
|
||||
}, {
|
||||
deep: true
|
||||
})
|
||||
|
||||
// 组件销毁时清理定时器
|
||||
onUnmounted(() => {
|
||||
stopPlay()
|
||||
})
|
||||
</script>
|
||||
|
|
@ -5,10 +5,6 @@
|
|||
<view class="neuro-mask" @click="handleClose"></view>
|
||||
<!-- 拟态框,阻止冒泡点击 -->
|
||||
<view class="neuro-box" @click.stop>
|
||||
<!-- <view class="tittle-bgc">
|
||||
|
||||
</view> -->
|
||||
<!-- <view class="text">提示</view> -->
|
||||
<view class="button-father">
|
||||
<view class="button-white" @click="handleClose">取消</view>
|
||||
<view class="button" @click="go">确定</view>
|
||||
|
|
@ -40,11 +36,7 @@
|
|||
}
|
||||
const go = () => {
|
||||
if(props.cont=='是否退出登录?'){
|
||||
// uni.clearStorage()
|
||||
wx.exitMiniProgram()
|
||||
// uni.reLaunch({
|
||||
// url:'/pages/login/index'
|
||||
// })
|
||||
}else{
|
||||
emit('go');
|
||||
}
|
||||
|
|
@ -96,25 +88,6 @@
|
|||
padding: 0 10%;
|
||||
}
|
||||
|
||||
.tittle-bgc {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
background-image: url('https://www.focusnu.com/media/directive/index/modelbgc.png');
|
||||
background-size: 100% auto;
|
||||
background-position: top center;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
.text {
|
||||
color: #47526F;
|
||||
font-size: 40rpx;
|
||||
margin: 40rpx 0 0 50rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
width: 47%;
|
||||
background: linear-gradient(to bottom, #e7f4ff, #c5e5ff);
|
||||
|
|
@ -134,8 +107,6 @@
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
// color: #fff;
|
||||
// color: rgb(242,242,242);
|
||||
font-size: 25rpx;
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,9 @@
|
|||
<view class="botton-view">
|
||||
<view v-for="(item,index) in itemArray" :key="index" class="array-father">
|
||||
<view :class="itemTarget===index ? `bottom-button-target` : `bottom-button`" @click="jumpto(index)">
|
||||
<!-- <donghua :width="`60rpx`" :height="`60rpx`" :links="donghuaArray[index]" :playing="playing==index"
|
||||
:interval="50" /> -->
|
||||
<image v-if="index==0" :src="playing==0?'/static/donghua/home/home19.png':'/static/donghua/home/home0.png'" mode="aspectFill" style="width: 60rpx;height: 60rpx;"></image>
|
||||
<image v-if="index==1" :src="playing==1?'/static/donghua/new/new18.png':'/static/donghua/new/new0.png'" mode="aspectFill" style="width: 60rpx;height: 60rpx;"></image>
|
||||
<image v-if="index==2" :src="playing==2?'/static/donghua/my/my14.png':'/static/donghua/my/my0.png'" mode="aspectFill" style="width: 60rpx;height: 60rpx;"></image>
|
||||
|
||||
<view class="bottom-text">
|
||||
{{item}}
|
||||
</view>
|
||||
|
|
@ -37,28 +34,6 @@
|
|||
const playing = ref(-1);
|
||||
const photoplay = ref(false);
|
||||
const itemArray = ["NU", "动态", "我的"];
|
||||
const donghuaArray = [genPaths(
|
||||
'/static/donghua/home',
|
||||
'home',
|
||||
19, // 张数
|
||||
'png',
|
||||
0, // 起始索引
|
||||
false // 不补零
|
||||
),genPaths(
|
||||
'/static/donghua/new',
|
||||
'new',
|
||||
18, // 张数
|
||||
'png',
|
||||
0, // 起始索引
|
||||
false // 不补零
|
||||
),genPaths(
|
||||
'/static/donghua/my',
|
||||
'my',
|
||||
14, // 张数
|
||||
'png',
|
||||
0, // 起始索引
|
||||
false // 不补零
|
||||
)]
|
||||
|
||||
onMounted(() => {
|
||||
photoplay.value = true;
|
||||
|
|
@ -82,7 +57,6 @@
|
|||
});
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -3,8 +3,6 @@
|
|||
<view class="botton-view">
|
||||
<view v-for="(item,index) in itemArray" :key="index" class="array-father">
|
||||
<view :class="itemTarget===index ? `bottom-button-target` : `bottom-button`" @click="jumpto(index)">
|
||||
<!-- <donghua :width="`60rpx`" :height="`60rpx`" :links="donghuaArray[index]" :playing="playing==index"
|
||||
:interval="50" /> -->
|
||||
<image v-if="index==0" :src="playing==0?'/static/donghua/home/home19.png':'/static/donghua/home/home0.png'" mode="aspectFill" style="width: 60rpx;height: 60rpx;"></image>
|
||||
<image v-if="index==1" :src="playing==1?'/static/donghua/new/new18.png':'/static/donghua/new/new0.png'" mode="aspectFill" style="width: 60rpx;height: 60rpx;"></image>
|
||||
<image v-if="index==2" :src="playing==2?'/static/donghua/my/my14.png':'/static/donghua/my/my0.png'" mode="aspectFill" style="width: 60rpx;height: 60rpx;"></image>
|
||||
|
|
@ -37,28 +35,6 @@
|
|||
const playing = ref(-1);
|
||||
const photoplay = ref(false);
|
||||
const itemArray = ["NU", "动态", "我的"];
|
||||
const donghuaArray = [genPaths(
|
||||
'/static/donghua/home',
|
||||
'home',
|
||||
19, // 张数
|
||||
'png',
|
||||
0, // 起始索引
|
||||
false // 不补零
|
||||
), genPaths(
|
||||
'/static/donghua/new',
|
||||
'new',
|
||||
18, // 张数
|
||||
'png',
|
||||
0, // 起始索引
|
||||
false // 不补零
|
||||
), genPaths(
|
||||
'/static/donghua/my',
|
||||
'my',
|
||||
14, // 张数
|
||||
'png',
|
||||
0, // 起始索引
|
||||
false // 不补零
|
||||
)]
|
||||
|
||||
onMounted(() => {
|
||||
photoplay.value = true;
|
||||
2
main.js
2
main.js
|
|
@ -17,12 +17,10 @@ app.$mount()
|
|||
import {
|
||||
createSSRApp
|
||||
} from 'vue'
|
||||
import donghua from '@/compontent/public/donghua.vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
// 使用 uView UI
|
||||
app.use(uView)
|
||||
app.component('donghua', donghua)
|
||||
return {
|
||||
app
|
||||
}
|
||||
|
|
|
|||
32
pages.json
32
pages.json
|
|
@ -77,63 +77,63 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"path": "pages/mechanismindex/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/mine",
|
||||
"path": "pages/mechanismindex/mine",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yuangongindex/searchjigou",
|
||||
"path": "pages/staffindex/searchjigou",
|
||||
"style": {
|
||||
"navigationBarTitleText": "查找"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yuangongindex/workjoin",
|
||||
"path": "pages/staffindex/workjoin",
|
||||
"style": {
|
||||
"navigationBarTitleText": "入驻审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yuangongindex/message",
|
||||
"path": "pages/staffindex/message",
|
||||
"style": {
|
||||
"navigationBarTitleText": "消息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yuangongindex/companyyaoqing",
|
||||
"path": "pages/staffindex/companyyaoqing",
|
||||
"style": {
|
||||
"navigationBarTitleText": "公司邀请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yuangongindex/simpleyaoqing",
|
||||
"path": "pages/staffindex/simpleyaoqing",
|
||||
"style": {
|
||||
"navigationBarTitleText": "公司邀请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yuangongindex/company",
|
||||
"path": "pages/staffindex/company",
|
||||
"style": {
|
||||
"navigationBarTitleText": "公司详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yuangongindex/index",
|
||||
"path": "pages/staffindex/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/yuangongindex/mine",
|
||||
"path": "pages/staffindex/mine",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的"
|
||||
}
|
||||
|
|
@ -390,7 +390,7 @@
|
|||
|
||||
},
|
||||
{
|
||||
"path" : "pages/yuangongindex/purchaseorder",
|
||||
"path" : "pages/staffindex/purchaseorder",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
|
|
@ -398,7 +398,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/yuangongindex/purchaseorderdetail",
|
||||
"path" : "pages/staffindex/purchaseorderdetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
|
|
@ -406,7 +406,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/yuangongindex/detIlspro",
|
||||
"path" : "pages/staffindex/detIlspro",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
|
|
@ -448,21 +448,21 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/yuangongindex/commission",
|
||||
"path" : "pages/staffindex/commission",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/yuangongindex/daypay",
|
||||
"path" : "pages/staffindex/daypay",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/yuangongindex/region",
|
||||
"path" : "pages/staffindex/region",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
// src/composables/useWeChatAuth.js
|
||||
import { ref } from 'vue';
|
||||
import request from '@/request/index.js';
|
||||
|
||||
|
|
@ -25,9 +24,6 @@ export function queryOrgInfoById(id){
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export function queryOrgHis(id){
|
||||
return request({
|
||||
url: `/api/orgApplyInfo/queryOrgHis?openId=${id}&optType=rz,bg`,
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@
|
|||
|
||||
// import tu from 'https://www.focusnu.com/media/directive/index/tu.png'
|
||||
import request from '@/request/index.js' // 您封装的 uni.request
|
||||
import downMenu from '@/compontent/public/downmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/mechanismdownmenu.vue'
|
||||
import model from "@/compontent/public/model.vue"
|
||||
|
||||
const tu = 'https://www.focusnu.com/media/directive/index/tu.png'
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
onUnmounted
|
||||
} from 'vue';
|
||||
import exit from "@/compontent/public/exit.vue"
|
||||
import downMenu from '@/compontent/public/downmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/mechanismdownmenu.vue'
|
||||
|
||||
const phone = ref("")
|
||||
const openid = ref("")
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref, onMounted, onUnmounted } from 'vue';
|
||||
import exit from "@/compontent/public/exit.vue"
|
||||
import downMenu from '@/compontent/public/oldmandownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/oldmandownmenu.vue'
|
||||
import {
|
||||
getMessageList
|
||||
} from '@/pages/addstaff/api/addjigou.js'
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@
|
|||
// getOrgNuId
|
||||
// } from './api.js'
|
||||
import request from '@/request/index.js'
|
||||
import downMenu from '@/compontent/public/oldmandownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/oldmandownmenu.vue'
|
||||
import model from "@/compontent/public/model.vue"
|
||||
|
||||
const show = ref(false);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
onUnmounted
|
||||
} from 'vue';
|
||||
import exit from "@/compontent/public/exit.vue"
|
||||
import downMenu from '@/compontent/public/oldmandownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/oldmandownmenu.vue'
|
||||
import {
|
||||
getMessageList
|
||||
} from '@/pages/addstaff/api/addjigou.js'
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref, onMounted, onUnmounted } from 'vue';
|
||||
import exit from "@/compontent/public/exit.vue"
|
||||
import downMenu from '@/compontent/public/oldmandownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/oldmandownmenu.vue'
|
||||
import {
|
||||
getMessageList
|
||||
} from '@/pages/addstaff/api/addjigou.js'
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref, onMounted, onUnmounted } from 'vue';
|
||||
import exit from "@/compontent/public/exit.vue"
|
||||
import downMenu from '@/compontent/public/oldmandownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/oldmandownmenu.vue'
|
||||
import {
|
||||
getMessageList
|
||||
} from '@/pages/addstaff/api/addjigou.js'
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref, onMounted, onUnmounted } from 'vue';
|
||||
import exit from "@/compontent/public/exit.vue"
|
||||
import downMenu from '@/compontent/public/oldmandownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/oldmandownmenu.vue'
|
||||
import {
|
||||
getMessageList
|
||||
} from '@/pages/addstaff/api/addjigou.js'
|
||||
|
|
@ -275,7 +275,7 @@
|
|||
Apply
|
||||
} from './api.js'
|
||||
import request from '@/request/index.js'
|
||||
import downMenu from '@/compontent/public/yuangongdownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/staffdownmenu.vue'
|
||||
import model from "@/compontent/public/model.vue"
|
||||
import exit from "@/compontent/public/exit.vue"
|
||||
const show = ref(false);
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
onUnmounted
|
||||
} from 'vue';
|
||||
import exit from "@/compontent/public/exit.vue"
|
||||
import downMenu from '@/compontent/public/yuangongdownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/staffdownmenu.vue'
|
||||
import {
|
||||
getMessageList
|
||||
} from '@/pages/addstaff/api/addjigou.js'
|
||||
|
|
@ -255,7 +255,7 @@
|
|||
getShowInfoByOpenId
|
||||
} from './api.js'
|
||||
import request from '@/request/index.js'
|
||||
import downMenu from '@/compontent/public/gongyingshnagdownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/supplierdownmenu.vue'
|
||||
import model from "@/compontent/public/model.vue"
|
||||
|
||||
const show = ref(false);
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@
|
|||
getSupInfoByOpenId
|
||||
} from './api.js'
|
||||
import request from '@/request/index.js'
|
||||
import downMenu from '@/compontent/public/gongyingshnagdownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/supplierdownmenu.vue'
|
||||
import model from "@/compontent/public/model.vue"
|
||||
|
||||
const show = ref(false);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
onUnmounted
|
||||
} from 'vue';
|
||||
import exit from "@/compontent/public/exit.vue"
|
||||
import downMenu from '@/compontent/public/gongyingshnagdownmenu.vue'
|
||||
import downMenu from '@/compontent/public/menus/supplierdownmenu.vue'
|
||||
import {
|
||||
getMessageList
|
||||
} from '@/pages/addstaff/api/addjigou.js'
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
ref,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
defineExpose
|
||||
// defineExpose
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
|
|
|
|||
Loading…
Reference in New Issue