Compare commits

...

2 Commits

Author SHA1 Message Date
ihzero 2040f7c833 打包 2023-11-12 18:38:39 +08:00
ihzero 42b93add91 隐藏标题 2023-11-12 18:37:19 +08:00
65 changed files with 186 additions and 126 deletions

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title></title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="/static/index.97465e7b.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.959091ef.js"></script><script src="/static/js/index.4e3d1ead.js"></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="/static/index.97465e7b.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.959091ef.js"></script><script src="/static/js/index.c1a89ce6.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,11 @@
<script>
import store from './store/index.js'
import jwt from '@/api/jwt.js'
import globalMixin from './globalMixin'
export default {
mixins: [globalMixin],
onLaunch: function (e) {
console.log('App Launch')
const { token } = e.query
if (token) {
jwt.setAccessToken(token)
}
if (!store.state.user_access_token) {
//
uni.redirectTo({
@ -33,6 +31,7 @@ export default {
<style lang="scss">
@import 'uview-ui/index.scss';
/*每个页面公共css */
body,
uni-page-body {
background-color: #f8f8f8;

View File

@ -1,12 +1,14 @@
<template>
<u-navbar
:title="title"
:title="show ? title : ''"
:background="background"
:custom-back="goback"
:title-color="titleColor"
:isBack="show"
:back-icon-color="titleColor"
>
<template #right>
<template #right
>
<slot name="right"></slot>
</template>
</u-navbar>
@ -15,6 +17,10 @@
import { navigateBack } from '@/com/utils.js'
export default {
props: {
show: {
type: Boolean,
default: true,
},
title: {
type: String,
default: '',

14
src/globalMixin.js 100644
View File

@ -0,0 +1,14 @@
import store from './store/index.js'
export default {
onLaunch(e) {
const { appbar, token } = e.query
if (token) {
jwt.setAccessToken(token)
}
if (appbar == 'hidden') {
store.commit('showAppbar', false)
} else {
store.commit('showAppbar', true)
}
}
}

View File

@ -3,6 +3,10 @@ import App from './App'
import PortalVue from 'portal-vue'
import './uni.promisify.adaptor'
import uView from "uview-ui";
import mixin from './mixin'
Vue.mixin(mixin)
Vue.use(uView);
Vue.use(PortalVue)
import {http,getFullUrl} from '@/api/index.js'

33
src/mixin.js 100644
View File

@ -0,0 +1,33 @@
import { mapGetters } from 'vuex'
export default {
data() {
return {
h5NavHeightP: 44,
// showAppbar:true
}
},
computed: {
...mapGetters(['showAppbar'])
},
onLoad({ appbar }) {
if (appbar == 'hidden') {
this.h5NavHeightP = 0
// this.showAppbar = false
this.hideNavBar()
}
},
methods: {
hideNavBar() {
/*#ifdef H5*/
this.$nextTick(() => {
let head = document.getElementsByTagName('uni-page-head')
if (head[0]) {
head[0].remove()
}
// console.log(head);
})
/*#endif*/
}
}
}

View File

@ -1,6 +1,6 @@
<template>
<view>
<Appbar title="基地数据">
<Appbar :show="showAppbar" title="基地数据">
<template #right>
<view
v-auth="['endpoint.agricultural_basic.create']"

View File

@ -14,7 +14,7 @@
</view>
</view>
<view class="w-full h-20rpx"></view>
<u-sticky>
<u-sticky :h5NavHeight="h5NavHeightP">
<view class="bg-white">
<view class="flex items-center p-20rpx">
<u-input

View File

@ -1,6 +1,6 @@
<template>
<view>
<Appbar title="基地农作物">
<Appbar :show="showAppbar" title="基地农作物">
<template #right>
<view v-auth="['endpoint.crops.create']" class="text-white mr-20px" @click="handleCreate"></view>
</template>

View File

@ -1,6 +1,6 @@
<template>
<view>
<Appbar title="城镇农作物">
<Appbar :show="showAppbar" title="城镇农作物">
<template #right>
<view
v-auth="['endpoint.town_crops.create']"

View File

@ -1,6 +1,6 @@
<template>
<view class="bg-page">
<u-navbar title="设备管理" :background="background" :custom-back="goback"
<u-navbar :isBack="showAppbar" :title="showAppbar?'设备管理':''" :background="background" :custom-back="goback"
:title-color="titleColor" :back-icon-color="titleColor">
<view class="nav_slot_right_box" slot="right">
<view v-auth="['endpoint.device.create']" class="custom_btn add_btn" @click="addBtn()"></view>

View File

@ -1,7 +1,7 @@
<template>
<view class="bg-page">
<u-navbar
title="稻虾流向"
<u-navbar :isBack="showAppbar"
:title="showAppbar?'稻虾流向':''"
:background="background"
:custom-back="goback"
:title-color="titleColor"

View File

@ -1,6 +1,6 @@
<template>
<view class="bg-page">
<u-navbar title="稻虾产业" :background="background" :custom-back="goback"
<u-navbar :isBack="showAppbar" :title="showAppbar?'稻虾产业':''" :background="background" :custom-back="goback"
:title-color="titleColor" :back-icon-color="titleColor">
<view class="nav_slot_right_box" slot="right">
<view v-auth="['endpoint.rice_shrimp_industries.create']" class="custom_btn add_btn" @click="addBtn()"></view>

View File

@ -1,6 +1,6 @@
<template>
<view class="bg-page">
<u-navbar title="大宗物资" :background="background" :custom-back="goback"
<u-navbar :isBack="showAppbar" :title="showAppbar?'大宗物资':''" :background="background" :custom-back="goback"
:title-color="titleColor" :back-icon-color="titleColor">
<view class="nav_slot_right_box" slot="right">
<view v-auth="['endpoint.materiels.create']" class="custom_btn add_btn" @click="addBtn()"></view>

View File

@ -1,7 +1,8 @@
<template>
<view class="bg-page">
<u-navbar
title="稻虾价格"
<u-navbar :isBack="showAppbar"
:title="showAppbar?'稻虾价格':''"
:background="background"
:custom-back="goback"
:title-color="titleColor"

View File

@ -1,7 +1,7 @@
<template>
<view class="bg-page">
<u-navbar
title="稻虾每周价格"
<u-navbar :isBack="showAppbar"
:title="showAppbar?'稻虾每周价格':''"
:background="background"
:custom-back="goback"
:title-color="titleColor"

View File

@ -1,6 +1,6 @@
<template>
<view>
<u-sticky>
<u-sticky :h5NavHeight="h5NavHeightP">
<view class="bg-white">
<SearchForm
:schemas="searchFormSchema"

View File

@ -205,7 +205,6 @@ export default {
},
linknavFn(item) {
console.log(item)
uni.navigateTo({
url: `${item.url}`,
})

View File

@ -1,6 +1,6 @@
<template>
<view>
<u-sticky>
<u-sticky :h5NavHeight="h5NavHeightP">
<view class="bg-white">
<SearchForm
:schemas="searchFormSchema"

View File

@ -1,6 +1,6 @@
<template>
<view>
<u-sticky>
<u-sticky :h5NavHeight="h5NavHeightP">
<view class="bg-white">
<SearchForm
:schemas="searchFormSchema"

View File

@ -1,6 +1,6 @@
<template>
<view>
<u-sticky>
<u-sticky :h5NavHeight="h5NavHeightP">
<view class="px-26rpx">
<u-subsection
:list="list"

View File

@ -1,6 +1,6 @@
<template>
<view class="bg-page">
<u-navbar title="预警列表" :background="background" :custom-back="goback"
<u-navbar v-if="showAppbar" title="预警列表" :background="background" :custom-back="goback"
:title-color="titleColor" :back-icon-color="titleColor">
</u-navbar>
<view class="secreen-section" style="background-color: #fff;">

View File

@ -1,6 +1,6 @@
<template>
<view class="role-page bg-page">
<u-sticky>
<u-sticky :h5NavHeight="h5NavHeightP">
<view class="top-title-box">
<view class="title">账号列表</view>
<view class="handle-option">

View File

@ -1,6 +1,6 @@
<template>
<view class="bg-page">
<u-navbar title="友情链接" :background="background" :custom-back="goback"
<u-navbar :isBack="showAppbar" :title="showAppbar?'友情链接':''" :background="background" :custom-back="goback"
:title-color="titleColor" :back-icon-color="titleColor">
<view class="nav_slot_right_box" slot="right">
<view v-auth="['endpoint.friend_links.edit']" class="custom_btn add_btn" @click="addBtn()"></view>

View File

@ -1,6 +1,6 @@
<template>
<view class="role-page bg-page">
<u-sticky>
<u-sticky :h5NavHeight="h5NavHeightP">
<view class="top-title-box">
<view class="title">角色列表</view>
<view class="handle-option">

View File

@ -1,6 +1,6 @@
<template>
<view>
<Appbar title="基地产量">
<Appbar :show="showAppbar" title="基地产量">
<template #right>
<view v-auth="['endpoint.crops_output.create']" class="text-white mr-20px" @click="handleCreate"></view>
</template>

View File

@ -1,6 +1,6 @@
<template>
<view>
<Appbar title="城镇产量">
<Appbar :show="showAppbar" title="城镇产量">
<template #right>
<view v-auth="['endpoint.town_crops_output.create']" class="text-white mr-20px" @click="handleCreate"></view>
</template>

View File

@ -10,5 +10,8 @@ const mutations = {
[types.USERKEY](state, userkey) {
state.user_key = userkey
},
showAppbar: (state, e) => {
state.showAppbar = e
}
};
export default mutations;

View File

@ -2,6 +2,7 @@ const state = {
userInfo: {},
user_access_token: '',
user_key:'',
showAppbar:true
};
export default state;