调试接口

This commit is contained in:
wangxiaowei
2025-12-25 00:05:32 +08:00
parent b71687e898
commit 434fc0f041
13 changed files with 89 additions and 24 deletions

12
env/.env vendored
View File

@ -2,7 +2,7 @@ VITE_APP_TITLE = '茶址'
VITE_APP_PORT = 9000
VITE_UNI_APPID = '__UNI__D1E5001'
VITE_WX_APPID = 'wx63e106209b842919'
VITE_WX_APPID = 'wx5b2c2c1cfc757c47'
# h5部署网站的base配置到 manifest.config.ts 里的 h5.router.base
VITE_APP_PUBLIC_BASE=/
@ -10,17 +10,21 @@ VITE_APP_PUBLIC_BASE=/
# 登录页面
VITE_LOGIN_URL = '/pages/login/login'
# 第一个请求地址
VITE_SERVER_BASEURL = 'https://cz.stnav.com'
VITE_SERVER_BASEURL = 'https://76458.com'
VITE_UPLOAD_BASEURL = 'https://cz.stnav.com/upload'
VITE_UPLOAD_BASEURL = 'https://76458.com/upload'
# h5是否需要配置代理
VITE_APP_PROXY=false
VITE_APP_PROXY_PREFIX = '/api'
# 第二个请求地址 (目前alova中可以使用)
VITE_SERVER_BASEURL = 'https://cz.stnav.com'
VITE_SERVER_BASEURL = 'https://76458.com'
# 默认上海经纬度
VITE_DEFAULT_LONGITUDE = 121.4737
VITE_DEFAULT_LATITUDE = 31.2304
# 上传图片请求地址
VITE_UPLOAD_BASEURL = 'https://76458.com/storeapi/upload/image'
VITE_UPLOAD_IMAGE_URL = 'https://76458.com/'

View File

@ -135,7 +135,7 @@
// 上传文件
const fileList = ref<any[]>([])
const action = 'https://cz.stnav.com/api/upload/image' // 仅做测试使用,实际请换成真实上传接口
const action = 'https://76458.com/api/upload/image' // 仅做测试使用,实际请换成真实上传接口
// 修改昵称
const showEditNicknamePopup = ref<boolean>(false) // 是否显示退款详情弹出框
@ -192,7 +192,8 @@
const response = JSON.parse(e.file.response)
if (response.code) {
const avatarUrl = response.data.url
await updateUserInfo({ field: 'avatar', value: avatarUrl })
const url = avatarUrl.replace(import.meta.env.VITE_UPLOAD_IMAGE_URL, '')
await updateUserInfo({ field: 'avatar', value: url })
user.value.avatar = avatarUrl
toast.info('头像上传成功')
} else {

View File

@ -90,10 +90,10 @@
<view class="text-[#303133] text-26rpx leading-48rpx font-500" v-if="isGroupBuying">{{ teaRoomPackage.introduce }}</view>
<view class="text-[#6A6363] flex-1 text-22rpx leading-32rpx text-right">已售
<template v-if="isGroupBuying">
{{ teaRoomPackage.sold > 10 ? teaRoomPackage.sold + '+' : teaRoomPackage.sold }}
{{ teaRoomPackage.sold > 10 ? '10+' : teaRoomPackage.sold }}
</template>
<template v-else>
{{ teaRoom.room?.sold > 10 ? teaRoom.room?.sold + '+' : teaRoom.room?.sold }}
{{ teaRoom.room?.sold > 10 ? '10+' : teaRoom.room?.sold }}
</template>
</view>
</view>

View File

@ -89,7 +89,7 @@
</wd-tabs>
<view class="mx-30rpx mt-34rpx">
<view class="text-24rpx flex items-center justify-end" v-if="storeType != 2">
<view class="text-24rpx flex items-center justify-end mb-20rpx" v-if="storeType != 2">
<view class="flex items-center mr-12rpx">
<view class="bg-[#C9C9C9] w-20rpx h-20rpx rounded-10rpx mr-10rpx"></view>
<view>过期</view>

View File

@ -28,7 +28,7 @@
<wd-radio checked-color="#4C9F44" size='large' shape="dot" :value="index"></wd-radio>
</view>
<view v-if="!isUseCoupon">
<view class="text-[#6A6363] text-22rpx leading-30rpx">已售 {{ item.sold > 10 ? item.sold + '+' : item.sold }}</view>
<view class="text-[#6A6363] text-22rpx leading-30rpx">已售 {{ item.sold > 10 ? '10+' : item.sold }}</view>
<view
class="w-104rpx h-52rpx mt-16rpx text-26rpx font-400 text-[#4C9F44] leading-52rpx text-center border-[2rpx] border-[#4C9F44] rounded-10rpx"
@click="RoomList.handleToPage(ReserveServiceCategory.ReserveRoom, item.store_id, item.id, item.price)">
@ -60,7 +60,7 @@
</view>
</view>
<view class="absolute bottom-0 right-0">
<view class="text-[#6A6363] text-22rpx leading-30rpx">已售 {{ item.sold > 10 ? item.sold + '+' : item.sold }}</view>
<view class="text-[#6A6363] text-22rpx leading-30rpx">已售 {{ item.sold > 10 ? '10+' : item.sold }}</view>
<view
class="w-104rpx h-52rpx mt-16rpx text-26rpx font-400 text-[#4C9F44] leading-52rpx text-center border-[2rpx] border-[#4C9F44] rounded-10rpx"
@click="RoomList.handleToPage(ReserveServiceCategory.GroupBuying, item.store_id, item.id, item.price)">

View File

@ -83,7 +83,7 @@
},
"quickapp": {},
"mp-weixin": {
"appid": "wx63e106209b842919",
"appid": "wx5b2c2c1cfc757c47",
"setting": {
"urlCheck": false,
"es6": true,

View File

@ -172,7 +172,6 @@
{
"path": "pages/webview/webview",
"type": "page",
"needLogin": true,
"layout": "tabbar",
"style": {
"navigationStyle": "custom"

View File

@ -20,7 +20,7 @@
<view class="mt-52rpx mx-30rpx">
<view class="text-[#333] leading-42rpx text-30rpx font-bold">当前定位</view>
<view class="mt-40rpx">
<view class="bg-[#F8F9FA] rounded-28rpx w-162rpx h-56rpx text-[#606266] flex items-center justify-center">
<view class="bg-[#F8F9FA] rounded-28rpx w-162rpx h-56rpx text-[#606266] flex items-center justify-center" @click="City.handleSetCurretCity">
<wd-img width="28rpx" height="28rpx" :src="`${OSS}icon/icon_location2.png`"></wd-img>
<view class="text-26rpx text-[#606266] leading-36rpx">{{ city || LOCATION_DEFAULT_CITY }}</view>
</view>
@ -35,7 +35,7 @@
@click="City.handleChooseCity(item)"
>
<wd-img width="28rpx" height="28rpx" :src="`${OSS}icon/icon_location2.png`"></wd-img>
<view class="text-26rpx text-[#606266] leading-36rpx">{{ item.name }}</view>
<view class="text-26rpx text-[#606266] leading-36rpx line-1">{{ item.name }}</view>
</view>
</view>
</view>
@ -45,7 +45,7 @@
<script lang="ts" setup>
import { router } from '@/utils/tools'
import { getOpenCityList } from '@/api/tea-room'
import { LOCATION_CITY_KEY, LOCATION_LAT_KEY, LOCATION_LNG_KEY } from '@/hooks/useLocation'
import { LOCATION_CITY_KEY, LOCATION_LAT_KEY, LOCATION_LNG_KEY, LOCATION_CURRENT } from '@/hooks/useLocation'
const OSS = inject('OSS')
@ -68,16 +68,33 @@
const City = {
handleInit: async () => {
city.value = uni.getStorageSync(LOCATION_CITY_KEY)
const current = uni.getStorageSync(LOCATION_CURRENT)
if (current) {
latitude.value = current.latitude
longitude.value = current.longitude
city.value = current.city
} else {
latitude.value = uni.getStorageSync(LOCATION_LAT_KEY)
longitude.value = uni.getStorageSync(LOCATION_LNG_KEY)
city.value = uni.getStorageSync(LOCATION_CITY_KEY)
}
const res = await getOpenCityList()
openCityList.value = res.list
},
/**
* 将缓存设置为当前定位城市
* @param item
*/
handleSetCurretCity: () => {
const params = uni.getStorageSync(LOCATION_CURRENT)
City.handleChooseCity(params)
},
/**
* 选择城市
*/
handleChooseCity: (item: any) => {
const params = {
latitude: item.latitude,
longitude: item.longitude,

View File

@ -59,7 +59,7 @@
:fixed="true">
<view class="relative p-20rp mb-24rpx" v-for="(item, index) in list" :key="index" @click="Index.handleToReserveRoom(item.id, item.operation_type)">
<view class="absolute top--28rpx left-0 z-1" v-if="item.operation_type == 1">
<wd-img width="110rpx" height="110rpx" :src="`${OSS}images/home/home_image4.png`"/>
<wd-img width="110rpx" height="110rpx" :src="`${OSS}images/home/home_image6.png`"/>
</view>
<view class="mx-30rpx p-30rpx flex bg-white rounded-10rpx">

View File

@ -167,12 +167,12 @@
// 跳转到服务协议页面
handleToService: () => {
router.navigateTo('/pages/webview/webview?type=service')
},
// 跳转到隐私政策页面
handleToPrivacy: () => {
router.navigateTo('/pages/webview/webview?type=privacy')
},
}
</script>

View File

@ -193,7 +193,7 @@
</view> -->
<!-- 更多服务 -->
<!-- <view class="bg-white rounded-16rpx mx-30rpx mt-28rpx pb-34rpx">
<view class="bg-white rounded-16rpx mx-30rpx mt-28rpx pb-34rpx">
<view class="px-30rpx pt-30rpx py-24rpx">更多服务</view>
<view class="flex px-30rpx">
<view v-for="(item, index) in serviceMenuList" :key="index">
@ -210,7 +210,7 @@
</navigator>
</view>
</view>
</view> -->
</view>
</view>
<!-- 推广码 -->

View File

@ -92,8 +92,16 @@
})
onLoad(() => {
uni.$on('refreshOrderList', () => {
list.value = []
getMescroll().resetUpScroll()
})
})
onUnload(() => {
uni.$off('refreshOrderList')
})
const Reserve = {
// 上拉加载的回调: 其中num:当前页 从1开始, size:每页数据条数,默认10
upCallback: (mescroll) => {

View File

@ -0,0 +1,36 @@
<!-- 使用 type="home" 属性设置首页其他页面不需要设置默认为page -->
<route lang="jsonc" type="page">{
"layout": "tabbar",
"style": {
// 'custom' 表示开启自定义导航栏,默认 'default'
"navigationStyle": "custom"
}
}</route>
<template>
<view class="">
<web-view :src="src"></web-view>
</view>
</template>
<script lang="ts" setup>
const src = ref<string>('')
onLoad((args) => {
switch (args.type) {
case 'service':
// 服务协议
src.value = 'https://76458.com/yhxy.html'
break
case 'privacy':
// 隐私政策
src.value = 'https://76458.com/yszc.html'
break
default:
break
}
// if (options.type) {
// src.value = decodeURIComponent(options.url as string)
// }
})
</script>