浏览代码

日历页面

Karsa 3 年之前
父节点
当前提交
2ec76eae7a

+ 3 - 1
.env.development

@@ -5,4 +5,6 @@ VITE_APP_CYGX_BASEAPIURL="http://8.136.199.33:8500/api"
 
 VITE_APP_HZYB_BASEAPIURL="http://8.136.199.33:8612"
 
-VITE_APP_HZSL_BASEAPIURL="http://8.136.199.33:8608/api"
+VITE_APP_HZSL_BASEAPIURL="http://8.136.199.33:8608/api"
+
+VITE_APP_SSBG_BASEAPIURL="http://8.136.199.33:8607/h5adminapi"

+ 3 - 1
.env.product

@@ -5,4 +5,6 @@ VITE_APP_CYGX_BASEAPIURL="https://cygx.hzinsights.com/api"
 
 VITE_APP_HZYB_BASEAPIURL="https://yanbao.hzinsights.com"
 
-VITE_APP_HZSL_BASEAPIURL="https://openapi.hzinsights.com/api"
+VITE_APP_HZSL_BASEAPIURL="https://openapi.hzinsights.com/api"
+
+VITE_APP_SSBG_BASEAPIURL="http://8.136.199.33:8607"

+ 3 - 1
.env.test

@@ -5,4 +5,6 @@ VITE_APP_CYGX_BASEAPIURL="http://8.136.199.33:8500/api"
 
 VITE_APP_HZYB_BASEAPIURL="http://8.136.199.33:8612"
 
-VITE_APP_HZSL_BASEAPIURL="http://8.136.199.33:8608/api"
+VITE_APP_HZSL_BASEAPIURL="http://8.136.199.33:8608/api"
+
+VITE_APP_SSBG_BASEAPIURL="http://8.136.199.33:8607/h5adminapi"

+ 1 - 0
index.html

@@ -10,5 +10,6 @@
   <body>
     <div id="app"></div>
     <script type="module" src="/src/main.js"></script>
+    <script type="text/javascript" src="https://gitee.com/dcloud/uni-app/raw/master/dist/uni.webview.1.5.2.js"></script>
   </body>
 </html>

+ 11 - 0
src/api/ssbg/api.js

@@ -0,0 +1,11 @@
+import {get,post} from './http';
+
+
+/**
+ * 研究员列表
+ * @param {*} params 
+ * @returns 
+ */
+export const researcherList = params=>{
+	return get('/roadshow/researcher/list',params)
+}

+ 79 - 0
src/api/ssbg/http.js

@@ -0,0 +1,79 @@
+"use strict";
+import axios from "axios";
+import { Toast } from "vant";
+
+// Full config:  https://github.com/axios/axios#request-config
+// axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
+// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
+// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
+
+// 请求数
+let LOADINGCOUNT = 0;
+let LOADING;
+let config = {
+  baseURL: import.meta.env.VITE_APP_SSBG_BASEAPIURL,
+  timeout: 60 * 1000, // Timeout
+  // withCredentials: true, // Check cross-site Access-Control
+};
+
+const _axios = axios.create(config);
+
+_axios.interceptors.request.use(
+  function (config) {
+    // Do something before request is sent
+    // 设置loading
+    if (LOADINGCOUNT === 0) {
+      LOADING = Toast.loading({
+        message: "loading...",
+        duration: 0,
+        forbidClick: true,
+      });
+    }
+    LOADINGCOUNT++;
+    config.headers.Authorization = localStorage.getItem('ssbg-token') || '';
+    
+    return config;
+  },
+  function (error) {
+    // Do something with request error
+    return Promise.reject(error);
+  }
+);
+
+// Add a response interceptor
+_axios.interceptors.response.use(
+  function (response) {
+    // Do something with response data
+
+    //关闭loading
+    LOADINGCOUNT--;
+    if (LOADINGCOUNT === 0) {
+      LOADING.clear();
+    }
+    
+    return response.data;
+  },
+  function (error) {
+    LOADING.clear();
+    // Do something with response error
+    return Promise.reject(error);
+  }
+);
+
+/**
+ * 导出get请求方法
+ * @url 请求地址
+ * @params get请求参数
+ */
+export const get = (url, params) => {
+  return _axios.get(url, { params });
+};
+
+/**
+ * 导出post请求方法
+ * @url 请求地址
+ * @params post请求参数
+ */
+export const post = (url, params) => {
+  return _axios.post(url, params);
+};

+ 25 - 12
src/views/ssbg/components/calendar.vue

@@ -5,16 +5,22 @@ import FullCalendar from '@fullcalendar/vue3';
 import timeGridPlugin from '@fullcalendar/timegrid';
 import interactionPlugin from '@fullcalendar/interaction';
 
+import moment from 'moment';
+
 import swiperCalendar from './swiperCalendar.vue';
 // import swiperCalendar from './swiper.vue';
 
-const emit = defineEmits(['dateChange'])
+const emits = defineEmits(['dateChange','cellClick'])
+
+const swiperCalendarRef = ref(null);
 
-const handleDateClick = () => {
+/* 点击表格日期 */
+const handleDateClick = ({date}) => {
+  emits('cellClick',date)
 };
+
+/* 点击日程 */
 const handleEventClick = () => {};
-const handleEvents = () => {};
-const handleDateSelect = () => {};
 
 
 let calendarOptions = ref({
@@ -35,8 +41,8 @@ let calendarOptions = ref({
   weekends: true,
   dateClick: handleDateClick,
   eventClick: handleEventClick,
-  eventsSet: handleEvents,
-  select: handleDateSelect,
+  // eventsSet: handleEvents,
+  // select: handleDateSelect,
   events: [
     {
       start: '2022-03-07T09:30:00',
@@ -81,20 +87,27 @@ let FullCalendarRef = ref(null); //ref
 const datechangeHandle = (date) => {
 
   calendarApi.value.gotoDate(date)
-  emit('dateChange',date)
+  emits('dateChange',date)
+  // document.title = date.substr(0,7);
 }
 
+/* 切换日历和周为本日 */
+const toogeCurrentWeek = () => {
+  swiperCalendarRef.value.getRecentWeek(moment().format('YYYY-MM-DD'))
+  swiperCalendarRef.value.selectDateHandle(moment().format('YYYY-MM-DD'),1)
+}
 
 onMounted(() => {
   calendarApi.value = FullCalendarRef.value.getApi();
 
-  // calendarApi.value.prev()
 });
+
+defineExpose({ toogeCurrentWeek });
 </script>
 
 <template>
   <div class="header">
-    <swiperCalendar @dateChange="datechangeHandle"/>
+    <swiperCalendar @dateChange="datechangeHandle" ref="swiperCalendarRef"/>
 
   </div>
   <FullCalendar :options="calendarOptions" ref="FullCalendarRef">
@@ -110,18 +123,18 @@ onMounted(() => {
 <style lang="scss" scoped>
 
 .header {
-  position: fixed;
+  position: sticky;
   top: 0;
   left: 0;
   right: 0;
   z-index: 99;
   background: #fff;
   padding-top: 20px;
-  padding: 20px 0;
+  padding: 10px 0 20px;
   box-shadow: 0px 3px 6px rgba(172, 172, 172, 0.16);
 }
 .fc {
-  margin: 160px 0;
+  margin: 0 0 160px;
   ::v-deep(.fc-timegrid-slot) {
     height: 80px;
   }

+ 51 - 33
src/views/ssbg/components/swiperCalendar.vue

@@ -79,8 +79,8 @@ const getRecentWeek = (day) => {
 getRecentWeek(current.value.currentDate);
 
 /* 设置周日历选中的位置 */
-const setWeekIndex = (selectDate, list) => {
-  const currentWeekDateList = list[1];
+const setWeekIndex = (selectDate) => {
+  const currentWeekDateList = state.weekDateList[1];
   let weekIndex = 0;
   currentWeekDateList.forEach((item, index) => {
     if (item === selectDate) weekIndex = index;
@@ -89,11 +89,10 @@ const setWeekIndex = (selectDate, list) => {
   state.weekIndex = weekIndex;
 };
 
-setWeekIndex(current.value.currentDate,state.weekDateList);
+setWeekIndex(current.value.currentDate);
 
 /* 选择天 */
-const selectDateHandle = (date,index) => {
-
+const selectDateHandle = (date, index) => {
   state.weekIndex = index;
   state.selectDate = date;
   state.touch = { x: 0 };
@@ -106,7 +105,7 @@ const touchStartHandle = (e) => {
   const { clientX } = e.touches[0];
   current.value.touchStartX = clientX;
   current.value.isTouch = true;
-}
+};
 
 /* 滑动中 */
 const touchMoveHandle = _.throttle((e) => {
@@ -117,16 +116,17 @@ const touchMoveHandle = _.throttle((e) => {
   // console.log(current.value.touchStartX,clientX)
 
   state.touch = { x: moveX / calendarWidth };
-},50)
+}, 50);
 
 //滑动结束
 const touchEndHandle = (e) => {
+  const touchX = state.touch.x;
+  const newTranslateIndex =
+    touchX > 0 ? state.moveIndex + 1 : state.moveIndex - 1;
 
-    const touchX = state.touch.x;
-    const newTranslateIndex = touchX > 0 ? state.moveIndex + 1 : state.moveIndex - 1;
-
-    if( Math.abs(touchX) > 0 ) {
-      const nextWeekFirstDay = touchX > 0
+  if (Math.abs(touchX) > 0) {
+    const nextWeekFirstDay =
+      touchX > 0
         ? moment(state.selectDate)
             .subtract(1, 'week')
             .startOf('isoWeek')
@@ -135,22 +135,19 @@ const touchEndHandle = (e) => {
             .add(1, 'week')
             .startOf('isoWeek')
             .format('YYYY-MM-DD');
-      getRecentWeek(nextWeekFirstDay);
-      
-      state.moveIndex = newTranslateIndex;
-  
-      //默认选中
-      const currentWeekDays = state.weekDateList[1];
-      const selectWeekDay = currentWeekDays[state.weekIndex]
-      state.selectDate = selectWeekDay;
-      state.touch = { x: 0 }
-      
-      current.value.isTouch = false;
+    getRecentWeek(nextWeekFirstDay);
 
-    }
+    state.moveIndex = newTranslateIndex;
 
-};
+    //默认选中
+    const currentWeekDays = state.weekDateList[1];
+    const selectWeekDay = currentWeekDays[state.weekIndex];
+    state.selectDate = selectWeekDay;
+    state.touch = { x: 0 };
 
+    current.value.isTouch = false;
+  }
+};
 
 /* 选中日期 更新日历 */
 watch(
@@ -163,11 +160,16 @@ watch(
   }
 );
 
-const {  weekDateList, selectDate, moveIndex, touch } =
-  toRefs(state);
+defineExpose({
+  getRecentWeek,
+  selectDateHandle
+})
+
+const { weekDateList, selectDate, moveIndex, touch } = toRefs(state);
 </script>
 
 <template>
+  <h3 class="current-date">{{ moment(selectDate).format('YYYY年MM月') }}</h3>
   <ul class="weekend-ul">
     <li v-for="item in weekDays">
       <span>{{ item.label }}</span>
@@ -196,10 +198,17 @@ const {  weekDateList, selectDate, moveIndex, touch } =
         <li
           v-for="(day, day_index) in week"
           :key="`${(index, day_index)}`"
-          :class="{ act: selectDate === day }"
-          @touchstart.stop="selectDateHandle(day,day_index)"
+          :class="{
+            act: selectDate === day,
+            today: moment().format('YYYY-MM-DD') === day,
+          }"
+          @touchstart.stop="selectDateHandle(day, day_index)"
         >
-          {{ moment().format('YYYY-MM-DD') === day ? '今' :  moment(day).format('DD') }}
+          {{
+            moment().format('YYYY-MM-DD') === day
+              ? '今'
+              : moment(day).format('DD')
+          }}
         </li>
       </ul>
     </div>
@@ -207,6 +216,10 @@ const {  weekDateList, selectDate, moveIndex, touch } =
 </template>
 
 <style scoped lang="scss">
+.current-date {
+  text-align: center;
+  margin-bottom: 10px;
+}
 .weekend-ul {
   display: flex;
   li {
@@ -241,11 +254,16 @@ const {  weekDateList, selectDate, moveIndex, touch } =
         width: calc(100% / 7);
         text-align: center;
         padding: 10px 0;
-        margin: 0 28px;
+        margin: 0 24px;
+        &.today {
+          background: #b4cef5;
+          border-radius: 50%;
+          color: #fff;
+        }
         &.act {
           background: #39a9ed;
-          border-radius: 4px;
-          /* border-radius: 50%; */
+          /* border-radius: 4px; */
+          border-radius: 50%;
           color: #fff;
         }
       }

+ 57 - 0
src/views/ssbg/roadshow/common-calendar.js

@@ -0,0 +1,57 @@
+
+
+/* 根绝研究员id找类index */
+export const findParentByid = (id,arr) => {
+	let obj = arr.find(item => item.ResearcherList.some( _ => _.AdminId === id));
+	// console.log(obj)
+	return arr.findIndex(_ => _.GroupName === obj.GroupName);
+}
+
+//  研究员
+export const RESEARCHLIST = ['ficc_researcher', 'researcher', 'rai_researcher','ficc_admin', 'rai_admin',];
+
+// 销售/组长
+const SELLERLIST = ['ficc_seller', 'rai_seller', 'ficc_group', 'rai_group'];
+
+// admin
+const ADMINLIST = ['admin'];
+
+
+/* 获取我的日历顶部tab */
+export const getTabsByRole = (role) => {
+	return RESEARCHLIST.includes(role) 
+		? [
+			{
+				label: '活动审批',
+				key:1
+			},
+			{
+				label: '内部会议',
+				key:3
+			},
+			{
+				label: '事项',
+				key:5
+			},
+		] : SELLERLIST.includes(role)
+		? [
+			{
+				label: '活动申请',
+				key:2
+			},
+			{
+				label: '内部会议',
+				key:3
+			},
+		] : ADMINLIST.includes(role)
+		? [
+			{
+				label: '内部会议',
+				key:3
+			},
+			{
+				label: '报告电话会',
+				key:4
+			},
+		] : [];
+}

+ 148 - 4
src/views/ssbg/roadshow/myCalendar.vue

@@ -1,9 +1,153 @@
+
+<script setup>
+import { ref } from 'vue';
+import { Icon } from 'vant';
+import { useRoute } from 'vue-router';
+import { isWxprogram } from '../utils';
+import { getTabsByRole } from './common-calendar';
+import Calendar from '../components/calendar.vue';
+
+const route = useRoute();
+localStorage.setItem('ssbg-token',route.query.token ||  '5e532bc5fa7281aebaa6d89960b54c4ab22f1ab18e969258c634a7940fdb0922');
+localStorage.setItem('ssbg-role',route.query.role ||  'researcher');
+
+const calendarRef = ref(null);//日历ref
+const actionsList = ref([
+  {
+    label: '本周',
+    key: 'weeknow',
+  },
+  {
+    label: '添加事项',
+    key: 'add_matter',
+		icon: 'add-o'
+  },
+]);//底部固定数据
+
+const Tabs = ref(getTabsByRole(localStorage.getItem('ssbg-role')));//顶部tab
+
+/* 获取日历日程列表 */
+const getEventList = (date) => {
+  console.log(date, '日程');
+};
+
+/* 底部操作 */
+const dealActionHandler = (type) => {
+  const deal_methods_handles = {
+    weeknow: toogeCurrentWeek,
+    add_matter: () => {
+			uni.navigateTo({
+				url: '/pages-roadshow/addActivity/addMatter',
+			});
+		},
+  };
+  deal_methods_handles[type]();
+}
+
+/* 切换为本周 */
+const toogeCurrentWeek = () => {
+  calendarRef.value.toogeCurrentWeek();
+};
+
+</script>
 <!--  -->
 <template>
-	<div>4848484</div>
+	<div class="mycalendar-container">
+
+		<div class="tab-cont">
+			<ul class="tab-ul">
+				<li v-for="tab in Tabs" :key="tab.key" @click="switchTabHandle(tab.key)">
+					<!-- <img class="item-img" src="@/assets/ssbg/calendar_ico.png"/>
+					<img class="item-img" src="@/assets/ssbg/calendar_ico.png"/>
+					<img class="item-img" src="@/assets/ssbg/calendar_ico.png"/>
+					<img class="item-img" src="@/assets/ssbg/calendar_ico.png"/>
+					<img class="item-img" src="@/assets/ssbg/calendar_ico.png"/> -->
+					{{ tab.label }}
+				</li>
+			</ul>
+		</div>
+
+		<Calendar @dateChange="getEventList" ref="calendarRef"/>
+<!-- v-if="isWxprogram()" -->
+    <div class="fix-action">
+      <ul class="action-ul">
+        <li
+          v-for="item in actionsList"
+          key="item.key"
+          @click="dealActionHandler(item.key)"
+        >
+          <Icon :name="item.icon" class="item-icon" v-if="item.icon" />
+          <img
+            class="item-img"
+            src="@/assets/ssbg/calendar_ico.png"
+            alt=""
+            v-else-if="item.key === 'weeknow'"
+          />
+          {{ item.label }}
+        </li>
+      </ul>
+    </div>
+	</div>
 </template>
+<style scoped lang="scss">
+.mycalendar-container {
 
-<script lang='ts'>
-</script>
-<style scoped>
+	.tab-cont {
+		padding: 30px;
+		background: #fff;
+		box-shadow: 0px 3px 12px rgba(175, 175, 175, 0.16);
+		border-bottom: 6px solid #f6f6f6;
+		.tab-ul {
+			display: flex;
+			align-items: center;
+			li {
+				margin-right: 50px;
+				font-size: 32px;
+				color: #666;
+				text-align: center;
+				.item-img {
+					width: 80px;
+					height: 80px;
+					display:block;
+					margin: 0 auto 10px;
+				}
+			}
+		}
+	}
+	.fix-action {
+    height: 160px;
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    z-index: 99;
+    background-color: #fff;
+    box-shadow: 0px -3px 6px rgba(172, 172, 172, 0.16);
+    padding-top: 20px;
+    padding-bottom: constant(safe-area-inset-bottom);
+    padding-bottom: env(safe-area-inset-bottom);
+    .action-ul {
+      height: 100%;
+      display: flex;
+      align-items: center;
+      justify-content: space-around;
+      color: #3385ff;
+      li:hover {
+        opacity: 0.8;
+      }
+      .item-icon {
+        font-size: 52px;
+        display: block;
+        text-align: center;
+        margin: 0 auto 10px;
+      }
+      .item-img {
+        display: block;
+        width: 46px;
+        height: 46px;
+        margin: 0 auto 10px;
+      }
+    }
+  }
+}
 </style>

+ 182 - 13
src/views/ssbg/roadshow/rsCalendar.vue

@@ -1,8 +1,16 @@
 <script setup>
-import { ref } from 'vue';
-import { Icon } from 'vant';
+import { ref, reactive } from 'vue';
+import { useRoute } from 'vue-router';
+import { researcherList } from '@/api/ssbg/api';
+import { Icon, Toast,TreeSelect,Popup } from 'vant';
+import { isWxprogram } from '../utils';
+import { findParentByid } from './common-calendar';
 import Calendar from '../components/calendar.vue';
 
+
+const route = useRoute();
+localStorage.setItem('ssbg-token',route.query.token ||  '5e532bc5fa7281aebaa6d89960b54c4ab22f1ab18e969258c634a7940fdb0922');
+
 const actionsList = ref([
   { label: '添加活动', key: 'add', icon: 'add-o' },
   {
@@ -17,32 +25,144 @@ const actionsList = ref([
   },
 ]);
 
+const calendarRef = ref(null);
+
+const state = reactive({
+  selectResearcher: '', // 选中的研究员
+});
+
 /* 获取日历日程列表 */
 const getEventList = (date) => {
   console.log(date, '日程');
 };
 
+/* 点击日历表格添加活动 */
+const cellClickHandle = (date) => {
+  console.log(date);
+  console.log(state.selectResearcher)
+
+  if (!state.selectResearcher) return Toast.fail('请先选择研究员');
+
+  const endDate = new Date(date.getTime() + 1000 * 60 * 60);
+  const selectResearchers = [
+    {
+      researcherId: this.selectResearcher.ResearcherId,
+      startDate: startDate,
+      startTime: startDate,
+      endDate: endDate,
+      endTime: endDate,
+    }
+  ] 
+
+  uni.navigateTo({
+    url: `/pages-roadshow/addActivity/cellAdd?defaultOpt=${JSON.stringify(selectResearchers)}`,
+  });
+};
+
+/* 底部操作 */
+const dealActionHandler = (type) => {
+  const deal_methods_handles = {
+    add: addActivityHandleByBtn,
+    weeknow: toogeCurrentWeek,
+    choose: slectResearcherHandle,
+  };
+  deal_methods_handles[type]();
+};
+
+/* 点击按钮添加活动 */
+const addActivityHandleByBtn = () => {
+  uni.navigateTo({
+    url: '/pages-roadshow/addActivity/index',
+  });
+};
+
+/* 切换为本周 */
+const toogeCurrentWeek = () => {
+  calendarRef.value.toogeCurrentWeek();
+};
+
+/* ==========选择研究员picker============ */
+const researcherArr = ref([]);
+const isResearcherPicker = ref(false);
+
+const rs_picker = ref({
+  firstindex: 0,
+  id: ''
+})
+
+/* 获取研究员列表 */
+const getResearcherList = async() => {
+  const { code,data } = await researcherList();
+  if(code !== 200) return;
+  researcherArr.value = data.map(group => ({
+    ...group,
+    text: group.GroupName,
+    children: group.ResearcherList ? group.ResearcherList.map(child => ({
+      ...child,
+      text: child.RealName,
+      id: child.AdminId
+    })) : []
+  }));
+}
+getResearcherList();
+
+/* 选择研究员 */
+const slectResearcherHandle = () => {
+  // console.log('slect');
+  if(state.selectResearcher) {
+    rs_picker.value = {
+      firstindex: findParentByid(state.selectResearcher,researcherArr.value),
+      id: state.selectResearcher
+    }
+  }
+  isResearcherPicker.value = true;
+};
+
+/* 点击第一项索引 */
+const clickFirstHandle = (index) => {
+  rs_picker.value.firstindex = index;
+}
+/* 点击选择研究员 */
+const clickItemHandle = ({AdminId}) => {
+  rs_picker.value.id  = AdminId;
+}
+/* 取消 */
+const cancelResearcher = () => {
 
+  isResearcherPicker.value = false;
+}
+/* 确认 */
+const confirmResearcher = () => {
+  state.selectResearcher = rs_picker.value.id;
+			
+	isResearcherPicker.value = false;
+}
 
+
+document.title = '研究员日历';
 </script>
 
 <!--  -->
 <template>
   <div class="rs-container">
-    <Calendar @dateChange="getEventList" />
-
+    <Calendar @dateChange="getEventList" @cellClick="cellClickHandle" ref="calendarRef"/>
+<!-- v-if="isWxprogram()" -->
     <div class="fix-action">
       <ul class="action-ul">
-        <li v-for="item in actionsList" key="item.key">
+        <li
+          v-for="item in actionsList"
+          key="item.key"
+          @click="dealActionHandler(item.key)"
+        >
           <Icon :name="item.icon" class="item-icon" v-if="item.icon" />
           <img
-						class="item-img"
+            class="item-img"
             src="@/assets/ssbg/calendar_ico.png"
             alt=""
             v-else-if="item.key === 'weeknow'"
           />
           <img
-						class="item-img"
+            class="item-img"
             src="@/assets/ssbg/choose_ico.png"
             alt=""
             v-else-if="item.key === 'choose'"
@@ -51,6 +171,23 @@ const getEventList = (date) => {
         </li>
       </ul>
     </div>
+    
+    
+
+    <!-- 选择研究员picker -->
+    <Popup v-model:show="isResearcherPicker" position="bottom">
+			<view class="select-rs-header">
+				<text class="cancel" @click="cancelResearcher">取消</text>
+				<text class="ensure" @click="confirmResearcher">确认</text>
+			</view>
+			<TreeSelect 
+				:items="researcherArr" 
+				:main-active-index="rs_picker.firstindex" 
+				:active-id="rs_picker.id"
+				@click-nav="clickFirstHandle" 
+				@click-item="clickItemHandle" 
+			/>
+		</Popup>
   </div>
 </template>
 
@@ -65,25 +202,57 @@ const getEventList = (date) => {
     z-index: 99;
     background-color: #fff;
     box-shadow: 0px -3px 6px rgba(172, 172, 172, 0.16);
+    padding-top: 20px;
+    padding-bottom: constant(safe-area-inset-bottom);
+    padding-bottom: env(safe-area-inset-bottom);
     .action-ul {
       height: 100%;
       display: flex;
       align-items: center;
       justify-content: space-around;
       color: #3385ff;
+      li:hover {
+        opacity: 0.8;
+      }
       .item-icon {
         font-size: 52px;
         display: block;
         text-align: center;
         margin: 0 auto 10px;
       }
-			.item-img {
-				display: block;
-				width: 46px;
-				height: 46px;
-				margin: 0 auto 10px;
-			}
+      .item-img {
+        display: block;
+        width: 46px;
+        height: 46px;
+        margin: 0 auto 10px;
+      }
     }
   }
+
+  .select-rs-header {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 30px 20px;
+
+    .cancel {
+      color: #969799;
+    }
+
+    .ensure {
+      color: #576b95;
+    }
+  }
+
+  .van-tree-select {
+		::v-deep(.van-sidebar-item--select:before) {
+			background-color: #1989fa;
+		}
+
+		::v-deep(.van-tree-select__item--active) {
+			color: #1989fa;
+		}
+
+	}
 }
 </style>

+ 7 - 0
src/views/ssbg/utils/index.js

@@ -3,4 +3,11 @@ import moment from "moment";
 //格式化日期函数
 export const formtDate = (date, v) => {
   return moment(date).format(v)
+}
+
+/* 是否在小程序内 */
+export const isWxprogram = () => {
+  const userAgent = navigator.userAgent;
+
+  return /miniProgram/i.test(userAgent) && /micromessenger/i.test(userAgent);
 }