Просмотр исходного кода

fix:微信二维码-积分兑换

jiayubo 15 часов назад
Родитель
Сommit
ddaa8d34e3

+ 4 - 2
api/login.js

@@ -1,12 +1,14 @@
 import request from '@/utils/request'
 
 // 登录方法
-export function login(username, password, code, uuid) {
+export function login(username, password, code, uuid, referrerType, referrerId) {
 	const data = {
 		username,
 		password,
 		code,
-		uuid
+		uuid,
+		referrerType,
+		referrerId
 	}
 	return request({
 		url: '/login',

+ 17 - 13
api/qrcode.js

@@ -1,20 +1,24 @@
 import request from '@/utils/request'
 
 // 获取不限制的小程序码
-export function getUnlimitedQRCode(data) {
+export function getUnlimitedQRCode(params) {
   return request({
-    url: '/wx/qrcode/unlimited',
-    method: 'post',
-    data: {
-      scene: data.scene, // 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符
-      page: data.page, // 默认是主页,页面 page,例如 pages/index/index
-      check_path: data.check_path || true, // 默认是true,检查page 是否存在
-      env_version: data.env_version || 'release', // 要打开的小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop"
-      width: data.width || 430, // 二维码的宽度,单位 px,最小 280px,最大 1280px
-      auto_color: data.auto_color || false, // 自动配置线条颜色
-      line_color: data.line_color || { r: 0, g: 0, b: 0 }, // 使用 rgb 设置颜色
-      is_hyaline: data.is_hyaline || false // 是否需要透明底色
+    url: '/core/InviteUser/getInviteQrCode',
+    method: 'get',
+    params: {
+      // scene: data.scene, // 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符
+      // page: data.page, // 默认是主页,页面 page,例如 pages/index/index
+      // check_path: data.check_path || true, // 默认是true,检查page 是否存在
+      // env_version: data.env_version || 'release', // 要打开的小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop"
+      // width: data.width || 430, // 二维码的宽度,单位 px,最小 280px,最大 1280px
+      // auto_color: data.auto_color || false, // 自动配置线条颜色
+      // line_color: data.line_color || { r: 0, g: 0, b: 0 }, // 使用 rgb 设置颜色
+      // is_hyaline: data.is_hyaline || false, // 是否需要透明底色
+      referrerType: 1,
+      referrerId: 130,
+      page: 'pages/index/index',
+      scene: '1234567890',
     },
-    responseType: 'arraybuffer' // 设置响应类型为arraybuffer,因为返回的是图片二进制内容
+    // responseType: 'arraybuffer', // 设置响应类型为arraybuffer,因为返回的是图片二进制内容
   })
 } 

+ 18 - 0
api/userPoints.js

@@ -0,0 +1,18 @@
+import request from '../utils/request'
+
+// 获取积分列表
+export function getUserPointInfoData(params) {
+  return request({
+    url: '/getUserPointInfo',
+    method: 'get',
+    params: params,
+  })
+}
+// 查询用户积分变更
+export function coreUserPointChangeData(params) {
+  return request({
+    url: '/core/UserPointChange/list',
+    method: 'get',
+    params: params,
+  })
+}

+ 1 - 1
components/Client/new_file.vue

@@ -3,7 +3,7 @@
 		<template>
 			<view class="Wrapper-grid">
 				<view class="serve-title client-title" v-if="userType == 2">注册专区</view>
-				<up-grid :border="false" col="4">
+				<up-grid :border="false" col="3">
 					<up-grid-item v-for="(item, index) in serveiceList" :key="index" @click="handleGridClick(item)">
 						<view class="grid-box">
 							<view class="grid-icon">

+ 31 - 23
components/QRCode/index.vue

@@ -1,7 +1,12 @@
 <template>
   <view class="qrcode-container">
     <view class="qrcode-box" v-if="qrCodeUrl">
-      <image :src="qrCodeUrl" mode="aspectFit" class="qrcode-image" @longpress="handleLongPress"></image>
+      <image
+        :src="qrCodeUrl"
+        mode="aspectFit"
+        class="qrcode-image"
+        @longpress="handleLongPress"
+      ></image>
       <text class="qrcode-tip">长按保存二维码</text>
     </view>
     <view class="qrcode-loading" v-else>
@@ -18,28 +23,28 @@ import { arrayBufferToBase64, saveQRCodeToLocal } from '@/utils/qrcode'
 const props = defineProps({
   scene: {
     type: String,
-    required: true
+    required: true,
   },
   page: {
     type: String,
-    default: 'pages/index/index'
+    default: 'pages/index/index',
   },
   width: {
     type: Number,
-    default: 430
+    default: 430,
   },
   autoColor: {
     type: Boolean,
-    default: false
+    default: false,
   },
   lineColor: {
     type: Object,
-    default: () => ({ r: 0, g: 0, b: 0 })
+    default: () => ({ r: 0, g: 0, b: 0 }),
   },
   isHyaline: {
     type: Boolean,
-    default: false
-  }
+    default: false,
+  },
 })
 
 const qrCodeUrl = ref('')
@@ -47,21 +52,24 @@ const qrCodeUrl = ref('')
 const generateQRCode = async () => {
   try {
     const response = await getUnlimitedQRCode({
-      scene: props.scene,
-      page: props.page,
-      width: props.width,
-      auto_color: props.autoColor,
-      line_color: props.lineColor,
-      is_hyaline: props.isHyaline
+      // scene: props.scene,
+      // page: props.page,
+      // width: props.width,
+      // auto_color: props.autoColor,
+      // line_color: props.lineColor,
+      // is_hyaline: props.isHyaline
+      referrerType: 1,
+      referrerId: 130,
+      page: 'pages/index/index',
     })
-    
-    // 将ArrayBuffer转换为Base64图片
-    qrCodeUrl.value = arrayBufferToBase64(response)
+
+    // 拼接Base64图片前缀
+    qrCodeUrl.value = 'data:image/jpeg;base64,' + response.data
   } catch (error) {
     console.error('生成二维码失败:', error)
     uni.showToast({
       title: '生成二维码失败',
-      icon: 'error'
+      icon: 'error',
     })
   }
 }
@@ -86,26 +94,26 @@ onMounted(() => {
   align-items: center;
   justify-content: center;
   padding: 20rpx;
-  
+
   .qrcode-box {
     display: flex;
     flex-direction: column;
     align-items: center;
-    
+
     .qrcode-image {
       width: 400rpx;
       height: 400rpx;
     }
-    
+
     .qrcode-tip {
       margin-top: 20rpx;
       font-size: 24rpx;
       color: #999;
     }
   }
-  
+
   .qrcode-loading {
     padding: 40rpx;
   }
 }
-</style> 
+</style>

+ 30 - 28
config.js

@@ -1,33 +1,35 @@
 // 应用全局配置
 const config = {
-	// baseUrl: 'https://vue.ruoyi.vip/prod-api',
-	//cloud后台网关地址
-	baseUrl: 'http://192.168.100.139:9527',//嵘哥
-	// baseUrl: 'http://192.168.100.101:9527',//龙哥
-	// baseUrl: 'https://zybooks.tech/prod-api',
-	mapKey:'KFEBZ-P2GKZ-A5PX4-7Q6Y7-KXOBF-XCB4C',
-	appName: '金邻助家',
-	// 应用信息
-	appInfo: {
-		// 应用名称
-		name: "ruoyi-app-vue3",
-		// 应用版本
-		version: "1.1.0",
-		// 应用logo
-		logo: "/static/logo.png",
-		// 官方网站
-		site_url: "http://ruoyi.vip",
-		// 政策协议
-		agreements: [{
-				title: "隐私政策",
-				url: "https://ruoyi.vip/protocol.html"
-			},
-			{
-				title: "用户服务协议",
-				url: "https://ruoyi.vip/protocol.html"
-			}
-		]
-	}
+  // baseUrl: 'https://vue.ruoyi.vip/prod-api',
+  //cloud后台网关地址
+  // baseUrl: 'http://192.168.100.139:9527', //嵘哥
+  // baseUrl: 'http://192.168.100.101:9527',//龙哥
+  baseUrl: 'http://192.168.100.122:9527',//东哥
+  // baseUrl: 'https://zybooks.tech/prod-api',
+  mapKey: 'KFEBZ-P2GKZ-A5PX4-7Q6Y7-KXOBF-XCB4C',
+  appName: '金邻助家',
+  // 应用信息
+  appInfo: {
+    // 应用名称
+    name: 'ruoyi-app-vue3',
+    // 应用版本
+    version: '1.1.0',
+    // 应用logo
+    logo: '/static/logo.png',
+    // 官方网站
+    site_url: 'http://ruoyi.vip',
+    // 政策协议
+    agreements: [
+      {
+        title: '隐私政策',
+        url: 'https://ruoyi.vip/protocol.html',
+      },
+      {
+        title: '用户服务协议',
+        url: 'https://ruoyi.vip/protocol.html',
+      },
+    ],
+  },
 }
 
 export default config

+ 8 - 2
pages.json

@@ -14,7 +14,7 @@
 		{
 			"path": "pages/index",
 			"style": {
-				"navigationBarTitleText": "金邻助家",
+				// "navigationBarTitleText": "金邻助家",
 				"navigationStyle": "custom"
 			}
 		},
@@ -244,7 +244,13 @@
 					"style": {
 						"navigationBarTitleText": "个人信息"
 					}
-				}
+				},
+        {
+          "path": "pages/integral/index",
+          "style": {
+            "navigationBarTitleText": "查看积分"
+          }
+        }
 			]
 		},
 		{

+ 81 - 82
pages/index.vue

@@ -2,14 +2,11 @@
   <view class="main-content">
     <view class="home-banner" :style="`height: ${globalData.navBarHeight}px `">
       <view class="home-banner-left" @click="cityClick">
-        <up-icon name="map" color="#fff" size="25"></up-icon>
+        <up-icon name="map" color="#000" size="25"></up-icon>
         <text class="address-text">{{ data.address.name }}</text>
       </view>
-      <view class="home-banner-cente">金邻助家</view>
-      <view class="home-banner-rigth">
-        <!-- <up-icon name="bell" :size="25" color="rgba(46, 46, 46, 1)"></up-icon> -->
-      </view>
     </view>
+
     <view class="home-box" :style="`margin-top: ${globalData.navBarHeight}px `">
       <view class="home-main">
         <view class="custom-swiper" v-if="list3.length > 0">
@@ -18,33 +15,27 @@
             indicator
             indicatorMode="line"
             circular
+            :height="'554rpx'"
           ></up-swiper>
         </view>
       </view>
+      <up-loadmore
+        style="margin-top: 40rpx"
+        :status="loadmoreInfo.status"
+        :loadmoreText="loadmoreInfo.loadingText"
+        :loadingText="loadmoreInfo.loadmoreText"
+        :nomoreText="loadmoreInfo.nomoreText"
+        @loadmore="handleLoadmore"
+        v-if="userType == 1"
+      />
+    </view>
 
-      <view class="home-grid">
+    <view class="Wrapper">
+       <view class="home-g-bgc">
         <Client />
       </view>
 
-      <view class="home-grid hot-box" v-if="userType === 1">
-        <view
-          v-for="(item, index) in hotList"
-          :key="index + 'hot'"
-          class="hot-item"
-        >
-          <img :src="item" alt="" style="width: 100%; height: 160rpx" />
-        </view>
-       
-      </view>
-       <view>
-          <up-notice-bar :text="text1"></up-notice-bar>
-        </view>
-
-      <view class="home-g-bgc">
         <view class="home-grid2">
-          <view class="serve-title hot-box-title" v-if="userType === 1"
-            >超值专区</view
-          >
           <view class="hot-swiper" v-if="ValueZone.length > 0">
             <up-swiper
               :list="ValueZone"
@@ -54,7 +45,7 @@
             ></up-swiper>
           </view>
         </view>
-
+        
         <view class="home-ranking home-grid2">
           <ServIces
             :leftList="leftList"
@@ -63,19 +54,8 @@
           ></ServIces>
           <RankingList v-if="userType === 2" />
         </view>
-      </view>
 
-      <up-loadmore
-        style="margin-top: 40rpx"
-        :status="loadmoreInfo.status"
-        :loadmoreText="loadmoreInfo.loadingText"
-        :loadingText="loadmoreInfo.loadmoreText"
-        :nomoreText="loadmoreInfo.nomoreText"
-        @loadmore="handleLoadmore"
-        v-if="userType == 1"
-      />
     </view>
-
     <custom-tab-bar page="home" />
   </view>
 </template>
@@ -97,8 +77,8 @@ import { getToken } from '@/utils/auth'
 
 const rightList = ref([])
 const leftList = ref([])
-const list3 = ref([''])  // Initialize with at least one empty item
-const ValueZone = ref([''])  // Initialize with at least one empty item
+const list3 = ref(['']) // Initialize with at least one empty item
+const ValueZone = ref(['']) // Initialize with at least one empty item
 const hotList = ref([])
 const userType = uni.getStorageSync('userType') //读取本地存储
 const text1 = ref(
@@ -133,8 +113,11 @@ const pages = ref({
 
 const cityClick = async () => {
   const { latitude, longitude } = data.address
-  const address = await chooseLocationInit({ latitude, longitude },addresstree.value)
-	console.log("TCL: cityClick -> address", address)
+  const address = await chooseLocationInit(
+    { latitude, longitude },
+    addresstree.value
+  )
+  console.log('TCL: cityClick -> address', address)
   data.address = { ...data.address, ...address }
   settingAddress()
   console.log('address', address)
@@ -241,7 +224,7 @@ const settingAddress = async () => {
   try {
     console.log('data', data)
 
-    const { address } = data;
+    const { address } = data
     const { cityCode, latitude, longitude } = address
     const parmas = {
       provinceName: cityCode.data[0], // 省
@@ -281,31 +264,27 @@ onShow(() => {
   })
 })
 
-const addresstree = ref([]);
+const addresstree = ref([])
 
 onMounted(async () => {
-
-
- 
-
-  const token  = getToken();
-  if(token){
+  const token = getToken()
+  if (token) {
     const res_dara = await regionAddresstree()
-    addresstree.value = res_dara.data;
+    addresstree.value = res_dara.data
     locateTheCurrentAddress(res_dara.data)
-    .then((res) => {
-      console.log('locateTheCurrentAddress', res)
-      data.address = res
-      settingAddress()
-    })
-    .catch((error) => {
-      console.log('获取地址失败!', error)
-      getList()
-    })
-  }else{
-      //设置默认角色
-  uni.setStorageSync('userType', 1);
-  getList();
+      .then((res) => {
+        console.log('locateTheCurrentAddress', res)
+        data.address = res
+        settingAddress()
+      })
+      .catch((error) => {
+        console.log('获取地址失败!', error)
+        getList()
+      })
+  } else {
+    //设置默认角色
+    uni.setStorageSync('userType', 1)
+    getList()
   }
 })
 
@@ -313,8 +292,7 @@ onUnload(() => {})
 </script>
 
 <style scoped lang="scss">
-.main-content {
-  background: rgba(255, 255, 255, 1);
+
 
   .home-banner {
     display: flex;
@@ -322,12 +300,12 @@ onUnload(() => {})
     justify-content: space-between;
     // background: rgba(255, 255, 255, 1);
     // background-color: #ED806A;
-    background-color: rgba(221, 60, 62, 1);
-    box-shadow: 0rpx 0rpx 0rpx rgba(0, 0, 0, 0), 0rpx 0rpx 0rpx rgba(0, 0, 0, 0),
-      0rpx 2.08rpx 4.17rpx rgba(0, 0, 0, 0.05);
+    // background-color: rgba(221, 60, 62, 1);
+    // box-shadow: 0rpx 0rpx 0rpx rgba(0, 0, 0, 0), 0rpx 0rpx 0rpx rgba(0, 0, 0, 0),
+    //   0rpx 2.08rpx 4.17rpx rgba(0, 0, 0, 0.05);
     padding: 20rpx 16rpx;
     color: #fff;
-    position: fixed;
+    // position: fixed;
     top: 0px;
     left: 0px;
     right: 0;
@@ -343,25 +321,29 @@ onUnload(() => {})
     display: flex;
     align-items: center;
     width: 30%;
+    z-index: 110;
   }
 
-  .home-banner-center {
-    flex: 1;
-    font-size: 38rpx;
-  }
-
-  .home-banner-rigth {
-    width: 30%;
-  }
+  .Wrapper{
+    background: rgba(255, 255, 255, 1);
+      // background: red;
+    // position: absolute;
+    // top: 309px;
+    // left: 0;
+    // right: 0;
+    // bottom: 0;
+    border-radius: 20rpx 20rpx 0rpx 0rpx;
+    z-index: 130;
+}
 
   .home-main {
     padding: 12px 16px 0;
+    z-index: 99;
   }
 
   .home-ranking {
     padding: 24rpx 16px;
   }
-}
 
 .hot-box-title {
   padding: 0 32rpx;
@@ -383,18 +365,34 @@ onUnload(() => {})
   }
 }
 
-.home-grid2 {
-  margin-bottom: 32rpx;
-  background: #fff;
-  padding: 12px 0;
-  border-radius: 8px;
+.home-grid{
+  margin-top: 220rpx;
 }
 
+// .home-grid2 {
+//   margin-bottom: 32rpx;
+//   background: #fff;
+//   padding: 12px 0;
+//   border-radius: 8px;
+// }
+
 .home-g-bgc {
   background: #f7f7f7;
   padding: 24rpx;
 }
 
+.custom-swiper {
+  width: 750rpx;
+  height: 554rpx;
+  // position: fixed;
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  right: 0;
+  z-index: 99;
+  // background: red; // 移除测试色
+}
+
 .address-text {
   white-space: nowrap;
   /* 禁止换行 */
@@ -402,5 +400,6 @@ onUnload(() => {})
   /* 隐藏溢出内容 */
   text-overflow: ellipsis;
   /* 超出部分显示省略号 */
+  color: #000;
 }
 </style>

+ 10 - 0
pages/login.vue

@@ -68,6 +68,8 @@ const loginForm = reactive({
   password: '',
   code: '',
   uuid: '',
+  referrerType: 1,
+  referrerId: 130,
 })
 
 const checkboxValue = ref(false)
@@ -155,7 +157,15 @@ const handleLogin = async () => {
           title: '系统暂未开放',
         })
       }
+      // 保持原有的 referrerType 和 referrerId
+      const currentReferrerType = loginForm.referrerType
+      const currentReferrerId = loginForm.referrerId
+      
       loginForm.code = res.code
+      // 确保 referrerType 和 referrerId 不被覆盖
+      loginForm.referrerType = currentReferrerType
+      loginForm.referrerId = currentReferrerId
+      
       // 获取用户信息
       uni.getUserInfo({
         success: (res) => {

Разница между файлами не показана из-за своего большого размера
+ 648 - 591
pages/mine.vue


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

@@ -149,10 +149,12 @@
               ></uniDatetimePickerMy>
             </view>
             <view>
+
+              <!-- :businessDuration="listData.businessDuration" -->
               <its-calendar
                 v-if="show"
                 ref="itsCalendarRef"
-                :businessDuration="listData.businessDuration"
+                :businessDuration="businessDurationComputed"
                 :minQuantity="singleQuantity"
                 :timeArr="doorToDoorTimeArr"
                 :timeHostArr="timeHostArr"
@@ -406,6 +408,22 @@ const radiolist2 = reactive([
   },
 ])
 
+const businessDurationComputed = computed(() => {
+  // listData.value.businessDuration
+
+  let result = 0
+  if (listData.value.businessDuration < 30) {
+    result = 30
+  } else { 
+    const num = Math.floor(listData.value.businessDuration / 30)
+
+     result = (num + 1) * 30
+  }
+  console.log(result, '>>>>>>>result')
+  
+  return result
+})
+
 // 设置第一个弹框的样式
 const popupStyle = {
   height: '80vh', // 设置为视窗高度的80%
@@ -430,6 +448,14 @@ function close() {
 
 // 第一个弹框逻辑
 const handleBuy = () => {
+  console.log(selectedTimes.value, '>>>>>>selectedTimes.value')
+  if (selectedTimes.value.length === 0) {
+    uni.showToast({
+      title: '请选择服务时间',
+      icon: 'none',
+    })
+    return
+  }
   show.value = false // 关闭第一个弹框
   showSecond.value = true // 打开第二个弹框
 }
@@ -522,13 +548,15 @@ onLoad(async (options) => {
 
 // 添加步进器值变化处理函数
 const valChange = (obj) => {
-  const durationMs = listData.value.businessDuration * obj.value * 60
+  // const durationMs = listData.value.businessDuration * obj.value * 60
+  const durationMs = businessDurationComputed.value * obj.value * 60
 
   const a = itsCalendarRef.value.upItem
   const b = itsCalendarRef.value.timeHostArr
   const c = itsCalendarRef.value.day_index
 
-  const seconds = listData.value.businessDuration * obj.value * 60
+  // const seconds = listData.value.businessDuration * obj.value * 60
+  const seconds = businessDurationComputed.value * obj.value * 60
   const endTimestamp = a.timeStamp + durationMs
 
   // 根据当前时间分割出后续应选数据数组
@@ -780,7 +808,7 @@ const proceedToPayment = async () => {
                 })
               } else {
                 uni.showToast({
-                  title: '支付失败',
+                  title:error.response?.data?.msg,
                   icon: 'error',
                   duration: 1500,
                   mask: true,
@@ -818,7 +846,7 @@ const proceedToPayment = async () => {
   } catch (error) {
     console.error('支付失败:', error)
     uni.showToast({
-      title: error.response?.data?.msg || '支付失败',
+      title: error.response?.data?.msg,
       icon: 'error',
       duration: 1500,
       mask: true,

+ 176 - 0
pages_mine/pages/integral/index.vue

@@ -0,0 +1,176 @@
+<template>
+  <view class="integral-container">
+    <!-- 积分总览 -->
+    <view class="integral-header">
+      <view class="integral-header-row">
+        <view class="integral-header-item">
+          <view class="integral-header-label">总积分</view>
+          <view class="integral-header-value">{{ List.totalPoint }}</view>
+        </view>
+        <view class="integral-header-item">
+          <view class="integral-header-label">可兑换积分</view>
+          <view class="integral-header-value">{{ List.availablePoint }}</view>
+        </view>
+      </view>
+      <view class="integral-rate-row">
+        <view class="integral-rate">1积分=1人民币</view>
+        <view class="integral-desc">收益说明</view>
+      </view>
+    </view>
+
+    <!-- 积分明细 -->
+    <view class="integral-detail-section">
+      <view class="integral-detail-title">积分明细</view>
+      <view class="integral-detail-list">
+        <view class="integral-detail-item">
+          <view class="integral-detail-type">用户推广积分</view>
+          <view class="integral-detail-date">2025-08-12 12:00:00</view>
+          <view class="integral-detail-value add">+1积分</view>
+        </view>
+        <!-- 可循环渲染多条明细 -->
+      </view>
+    </view>
+
+    <!-- 固定底部提示 -->
+    <view class="integral-tip-footer">提示:用户推广积分需要用户所推广人员进行消费过后积分才可以使用</view>
+  </view>
+</template>
+
+<script setup>
+import { onMounted ,ref} from 'vue'
+import { getUserPointInfoData ,coreUserPointChangeData} from '@/api/userPoints'
+
+const List = ref({})//可用积分
+const Data = ref({})//积分明细
+// 可用积分
+const getData = async () => {
+  const params = {
+    totalPoint: 0,//总积分
+    availablePoint:0,//可兑换积分
+  }
+  const res = await getUserPointInfoData(params)
+  List.value = res.data
+  console.log(res)
+}
+
+// 积分明细
+const getList = async () => {
+  // const params = {
+  //   totalPoint: 0,//总积分
+  //   availablePoint:0,//可兑换积分
+  // }
+  const res = await coreUserPointChangeData()
+  // Data.value = res.data
+  console.log(res)
+}
+
+onMounted(() => {
+  getData()
+  getList()
+})
+</script>
+<style lang="scss" scoped>
+.integral-container {
+  padding: 32rpx 24rpx 120rpx 24rpx;
+  background: #fff;
+  min-height: 100vh;
+  padding-bottom: 120rpx;
+}
+.integral-header {
+  background: #f8f8f8;
+  border-radius: 20rpx;
+  padding: 32rpx 24rpx 24rpx 24rpx;
+  margin-bottom: 32rpx;
+}
+.integral-header-row {
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 16rpx;
+}
+.integral-header-item {
+  flex: 1;
+  text-align: center;
+}
+.integral-header-label {
+  color: #888;
+  font-size: 28rpx;
+  margin-bottom: 8rpx;
+}
+.integral-header-value {
+  color: #333;
+  font-size: 40rpx;
+  font-weight: bold;
+}
+.integral-rate-row {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+.integral-rate {
+  color: #888;
+  font-size: 24rpx;
+}
+.integral-desc {
+  color: #1a73e8;
+  font-size: 24rpx;
+}
+.integral-detail-section {
+  margin-bottom: 32rpx;
+}
+.integral-detail-title {
+  font-size: 32rpx;
+  font-weight: bold;
+  margin-bottom: 16rpx;
+}
+.integral-detail-list {
+  background: #f8f8f8;
+  border-radius: 16rpx;
+  padding: 16rpx;
+}
+.integral-detail-item {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 16rpx 0;
+  border-bottom: 1rpx solid #eee;
+  font-size: 28rpx;
+}
+.integral-detail-item:last-child {
+  border-bottom: none;
+}
+.integral-detail-type {
+  color: #333;
+  flex: 2;
+}
+.integral-detail-date {
+  color: #aaa;
+  flex: 3;
+  font-size: 24rpx;
+  text-align: center;
+}
+.integral-detail-value {
+  flex: 1;
+  text-align: right;
+  font-weight: bold;
+}
+.integral-detail-value.add {
+  color: #1a73e8;
+}
+.integral-detail-value.minus {
+  color: #e81a1a;
+}
+.integral-tip-footer {
+  position: fixed;
+  left: 0;
+  bottom: 30rpx;
+  width: 100vw;
+  background: #fffbe8;
+  color: #b8860b;
+  font-size: 24rpx;
+  text-align: center;
+  padding: 24rpx 0 32rpx 0;
+  box-shadow: 0 -4rpx 24rpx rgba(0,0,0,0.04);
+  z-index: 99;
+}
+</style>
+

BIN
static/img/Location.png


BIN
static/img/admin.png


BIN
static/img/dd.png


BIN
static/img/go-right.png


BIN
static/img/harvest (1).png


BIN
static/img/logo.png


BIN
static/img/success.png


BIN
static/img/swipr1.png


BIN
static/img/upload.png


BIN
static/img/user.png


BIN
static/img/专家服务.png


BIN
static/img/临时助手.png


BIN
static/img/分类or广场or其他.png


BIN
static/img/孩子陪护.png


BIN
static/img/家庭保洁.png


BIN
static/img/家电维护.png


BIN
static/img/报事报修@6x.png


BIN
static/img/新增.png


BIN
static/img/构建.png


BIN
static/img/编组.png


BIN
static/img/老人生活.png


+ 3 - 1
store/modules/user.ts

@@ -67,8 +67,10 @@ const user: Module<UserState, UserState> = {
       const password = userInfo.password
       const code = userInfo.code
       const uuid = userInfo.uuid
+      const referrerType = userInfo.referrerType
+      const referrerId = userInfo.referrerId
       return new Promise((resolve, reject) => {
-        login(username, password, code, uuid).then((res: any) => {
+        login(username, password, code, uuid, referrerType, referrerId).then((res: any) => {
           setToken(res.token)
           commit('SET_TOKEN', res.token)
           resolve(res)

+ 2 - 1
types/store.ts

@@ -1,4 +1,3 @@
-
 export interface UserState {
     token: string,
     name: string,
@@ -15,6 +14,8 @@ export interface UserForm {
     password: string
     code: string
     uuid: string
+    referrerType: number
+    referrerId: number
 }
 
 

+ 1 - 1
utils/request.ts

@@ -71,7 +71,7 @@ const request = <T>(config:RequestConfig):Promise<ResponseData<T>> => {
       resolve(data)
     })
       .catch(error => {
-        let { message } = error
+        let message = error?.message || '未知错误'
         uni.hideLoading()
         if (message === 'Network Error') {
           message = '后端接口连接异常'