瀏覽代碼

用户下单时间选择器修改

jiayubo 3 月之前
父節點
當前提交
ec644db247
共有 4 個文件被更改,包括 35 次插入7 次删除
  1. 9 0
      api/volunteerDetailsApi/details.js
  2. 2 2
      config.js
  3. 19 3
      pages/index.vue
  4. 5 2
      pages_home/pages/Volunteerside/goodsDetails.vue

+ 9 - 0
api/volunteerDetailsApi/details.js

@@ -138,3 +138,12 @@ export function volunteerVolunteerPicture(params) {
   })
 }
 
+// 滚动文字
+export function systemConfig(params) {
+  return request({
+    url: '/system/config/getHomeRollText',
+    method: 'get',
+    params: params,
+  })
+}
+

+ 2 - 2
config.js

@@ -2,9 +2,9 @@
 const config = {
   // baseUrl: 'https://vue.ruoyi.vip/prod-api',
   //cloud后台网关地址
-  baseUrl: 'http://192.168.100.139:9527', //嵘哥
+  // baseUrl: 'http://192.168.100.139:9527', //嵘哥
   // baseUrl: 'http://192.168.100.128:9527',//龙哥
-  // baseUrl: 'http://192.168.100.122:9527',
+  baseUrl: 'http://192.168.100.122:9527',
   // baseUrl: 'https://goldshulin.com/prod-api',
   mapKey: 'KFEBZ-P2GKZ-A5PX4-7Q6Y7-KXOBF-XCB4C',
   appName: '金邻助家',

+ 19 - 3
pages/index.vue

@@ -23,10 +23,15 @@
         <view v-if="ValueZone.length > 0">
           <up-swiper :list="ValueZone" :indicator="false" indicatorMode="line" circular></up-swiper>
         </view>
+        <view>
+          <up-notice-bar :text="text1" class="notice-bar"></up-notice-bar>
+        </view>
+
       </view>
 
 
 
+
       <view class="home-ranking" :class="{ 'no-margin': userType === 2 }">
         <ServIces :leftList="leftList" :rightList="rightList" :ValueZoneSwiper="ValueZoneSwiper" v-if="userType == 1">
         </ServIces>
@@ -51,7 +56,7 @@ import { onLoad, onShow, onReachBottom, onUnload, onPageScroll } from '@dcloudio
 import RankingList from '@/pages/common/rankingList/index.vue'
 import ServIces from '@/components/Services/services.vue'
 import { Client } from '@/components/Client/new_file.vue'
-import { volunteerinfolist } from '@/api/volunteerDetailsApi/details.js'
+import { volunteerinfolist, systemConfig } from '@/api/volunteerDetailsApi/details.js'
 import { slideshow, settingHomeAddress } from '@/api/home.js'
 import { useDict } from '@/utils/dict.js'
 import { chooseLocationInit, locateTheCurrentAddress } from '@/utils/adress'
@@ -66,6 +71,8 @@ const ValueZone = ref(['']) // Initialize with at least one empty item
 const hotList = ref([])
 const ValueZoneSwiper = ref([''])
 const userType = uni.getStorageSync('userType'); //读取本地存储
+const text1 = ref('');
+
 
 const globalData = ref({
   statusBarHeight: 47,
@@ -126,6 +133,12 @@ async function handleLoadmore(e) {
   }
 }
 
+// 加载滚动文字
+const getNotice = async () => {
+  const res = await systemConfig()
+  text1.value = res.data
+}
+
 const getList = async () => {
   try {
     loadmoreInfo.value.status = 'loading'
@@ -263,7 +276,7 @@ onPageScroll(e => {
 })
 
 onMounted(async () => {
-
+  getNotice()
   const token = getToken();
   // console.log("TCL: token", token || 'null')
   if (token) {
@@ -352,11 +365,14 @@ onUnload(() => { })
   height: 180rpx;
   border-radius: 16rpx;
   background: linear-gradient(180deg, #FEF9ED 0%, #FFF9F3 100%);
+  .notice-bar{
+    margin-top: 10rpx;
+  }
 }
 
 // 瀑布流
 .home-ranking {
-  margin-top: 93rpx;
+  margin-top: 160rpx;
   margin-left: 11rpx;
   margin-right: 17rpx;
   margin-bottom: 120rpx;

+ 5 - 2
pages_home/pages/Volunteerside/goodsDetails.vue

@@ -413,12 +413,15 @@ const businessDurationComputed = computed(() => {
   // listData.value.businessDuration
 
   let result = 0
-  if (listData.value.businessDuration < 30) {
+  if (listData.value.businessDuration <= 30) {
     result = 30
   } else { 
     const num = Math.floor(listData.value.businessDuration / 30)
 
-     result = (num + 1) * 30
+    //  result = (num + 1) * 30
+    const n = listData.value.businessDuration % 30
+
+    result = (n ? (num + 1) : num) * 30
   }
   console.log(result, '>>>>>>>result')