调试接口
This commit is contained in:
12
env/.env
vendored
12
env/.env
vendored
@ -2,7 +2,7 @@ VITE_APP_TITLE = '茶址'
|
|||||||
VITE_APP_PORT = 9000
|
VITE_APP_PORT = 9000
|
||||||
|
|
||||||
VITE_UNI_APPID = '__UNI__D1E5001'
|
VITE_UNI_APPID = '__UNI__D1E5001'
|
||||||
VITE_WX_APPID = 'wx63e106209b842919'
|
VITE_WX_APPID = 'wx5b2c2c1cfc757c47'
|
||||||
|
|
||||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||||
VITE_APP_PUBLIC_BASE=/
|
VITE_APP_PUBLIC_BASE=/
|
||||||
@ -10,17 +10,21 @@ VITE_APP_PUBLIC_BASE=/
|
|||||||
# 登录页面
|
# 登录页面
|
||||||
VITE_LOGIN_URL = '/pages/login/login'
|
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是否需要配置代理
|
# h5是否需要配置代理
|
||||||
VITE_APP_PROXY=false
|
VITE_APP_PROXY=false
|
||||||
VITE_APP_PROXY_PREFIX = '/api'
|
VITE_APP_PROXY_PREFIX = '/api'
|
||||||
|
|
||||||
# 第二个请求地址 (目前alova中可以使用)
|
# 第二个请求地址 (目前alova中可以使用)
|
||||||
VITE_SERVER_BASEURL = 'https://cz.stnav.com'
|
VITE_SERVER_BASEURL = 'https://76458.com'
|
||||||
|
|
||||||
# 默认上海经纬度
|
# 默认上海经纬度
|
||||||
VITE_DEFAULT_LONGITUDE = 121.4737
|
VITE_DEFAULT_LONGITUDE = 121.4737
|
||||||
VITE_DEFAULT_LATITUDE = 31.2304
|
VITE_DEFAULT_LATITUDE = 31.2304
|
||||||
|
|
||||||
|
# 上传图片请求地址
|
||||||
|
VITE_UPLOAD_BASEURL = 'https://76458.com/storeapi/upload/image'
|
||||||
|
VITE_UPLOAD_IMAGE_URL = 'https://76458.com/'
|
||||||
@ -135,7 +135,7 @@
|
|||||||
|
|
||||||
// 上传文件
|
// 上传文件
|
||||||
const fileList = ref<any[]>([])
|
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) // 是否显示退款详情弹出框
|
const showEditNicknamePopup = ref<boolean>(false) // 是否显示退款详情弹出框
|
||||||
@ -192,7 +192,8 @@
|
|||||||
const response = JSON.parse(e.file.response)
|
const response = JSON.parse(e.file.response)
|
||||||
if (response.code) {
|
if (response.code) {
|
||||||
const avatarUrl = response.data.url
|
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
|
user.value.avatar = avatarUrl
|
||||||
toast.info('头像上传成功')
|
toast.info('头像上传成功')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -90,10 +90,10 @@
|
|||||||
<view class="text-[#303133] text-26rpx leading-48rpx font-500" v-if="isGroupBuying">{{ teaRoomPackage.introduce }}</view>
|
<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">已售
|
<view class="text-[#6A6363] flex-1 text-22rpx leading-32rpx text-right">已售
|
||||||
<template v-if="isGroupBuying">
|
<template v-if="isGroupBuying">
|
||||||
{{ teaRoomPackage.sold > 10 ? teaRoomPackage.sold + '+' : teaRoomPackage.sold }}
|
{{ teaRoomPackage.sold > 10 ? '10+' : teaRoomPackage.sold }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ teaRoom.room?.sold > 10 ? teaRoom.room?.sold + '+' : teaRoom.room?.sold }}
|
{{ teaRoom.room?.sold > 10 ? '10+' : teaRoom.room?.sold }}
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -89,7 +89,7 @@
|
|||||||
</wd-tabs>
|
</wd-tabs>
|
||||||
|
|
||||||
<view class="mx-30rpx mt-34rpx">
|
<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="flex items-center mr-12rpx">
|
||||||
<view class="bg-[#C9C9C9] w-20rpx h-20rpx rounded-10rpx mr-10rpx"></view>
|
<view class="bg-[#C9C9C9] w-20rpx h-20rpx rounded-10rpx mr-10rpx"></view>
|
||||||
<view>过期</view>
|
<view>过期</view>
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
<wd-radio checked-color="#4C9F44" size='large' shape="dot" :value="index"></wd-radio>
|
<wd-radio checked-color="#4C9F44" size='large' shape="dot" :value="index"></wd-radio>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!isUseCoupon">
|
<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
|
<view
|
||||||
class="w-104rpx h-52rpx mt-16rpx text-26rpx font-400 text-[#4C9F44] leading-52rpx text-center border-[2rpx] border-[#4C9F44] rounded-10rpx"
|
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)">
|
@click="RoomList.handleToPage(ReserveServiceCategory.ReserveRoom, item.store_id, item.id, item.price)">
|
||||||
@ -60,7 +60,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="absolute bottom-0 right-0">
|
<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
|
<view
|
||||||
class="w-104rpx h-52rpx mt-16rpx text-26rpx font-400 text-[#4C9F44] leading-52rpx text-center border-[2rpx] border-[#4C9F44] rounded-10rpx"
|
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)">
|
@click="RoomList.handleToPage(ReserveServiceCategory.GroupBuying, item.store_id, item.id, item.price)">
|
||||||
|
|||||||
@ -83,7 +83,7 @@
|
|||||||
},
|
},
|
||||||
"quickapp": {},
|
"quickapp": {},
|
||||||
"mp-weixin": {
|
"mp-weixin": {
|
||||||
"appid": "wx63e106209b842919",
|
"appid": "wx5b2c2c1cfc757c47",
|
||||||
"setting": {
|
"setting": {
|
||||||
"urlCheck": false,
|
"urlCheck": false,
|
||||||
"es6": true,
|
"es6": true,
|
||||||
|
|||||||
@ -172,7 +172,6 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/webview/webview",
|
"path": "pages/webview/webview",
|
||||||
"type": "page",
|
"type": "page",
|
||||||
"needLogin": true,
|
|
||||||
"layout": "tabbar",
|
"layout": "tabbar",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<view class="mt-52rpx mx-30rpx">
|
<view class="mt-52rpx mx-30rpx">
|
||||||
<view class="text-[#333] leading-42rpx text-30rpx font-bold">当前定位</view>
|
<view class="text-[#333] leading-42rpx text-30rpx font-bold">当前定位</view>
|
||||||
<view class="mt-40rpx">
|
<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>
|
<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 class="text-26rpx text-[#606266] leading-36rpx">{{ city || LOCATION_DEFAULT_CITY }}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
@click="City.handleChooseCity(item)"
|
@click="City.handleChooseCity(item)"
|
||||||
>
|
>
|
||||||
<wd-img width="28rpx" height="28rpx" :src="`${OSS}icon/icon_location2.png`"></wd-img>
|
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { router } from '@/utils/tools'
|
import { router } from '@/utils/tools'
|
||||||
import { getOpenCityList } from '@/api/tea-room'
|
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')
|
const OSS = inject('OSS')
|
||||||
|
|
||||||
@ -68,16 +68,33 @@
|
|||||||
|
|
||||||
const City = {
|
const City = {
|
||||||
handleInit: async () => {
|
handleInit: async () => {
|
||||||
|
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)
|
city.value = uni.getStorageSync(LOCATION_CITY_KEY)
|
||||||
|
}
|
||||||
const res = await getOpenCityList()
|
const res = await getOpenCityList()
|
||||||
openCityList.value = res.list
|
openCityList.value = res.list
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将缓存设置为当前定位城市
|
||||||
|
* @param item
|
||||||
|
*/
|
||||||
|
handleSetCurretCity: () => {
|
||||||
|
const params = uni.getStorageSync(LOCATION_CURRENT)
|
||||||
|
City.handleChooseCity(params)
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选择城市
|
* 选择城市
|
||||||
*/
|
*/
|
||||||
handleChooseCity: (item: any) => {
|
handleChooseCity: (item: any) => {
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
latitude: item.latitude,
|
latitude: item.latitude,
|
||||||
longitude: item.longitude,
|
longitude: item.longitude,
|
||||||
|
|||||||
@ -59,7 +59,7 @@
|
|||||||
:fixed="true">
|
: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="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">
|
<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>
|
||||||
|
|
||||||
<view class="mx-30rpx p-30rpx flex bg-white rounded-10rpx">
|
<view class="mx-30rpx p-30rpx flex bg-white rounded-10rpx">
|
||||||
|
|||||||
@ -167,12 +167,12 @@
|
|||||||
|
|
||||||
// 跳转到服务协议页面
|
// 跳转到服务协议页面
|
||||||
handleToService: () => {
|
handleToService: () => {
|
||||||
|
router.navigateTo('/pages/webview/webview?type=service')
|
||||||
},
|
},
|
||||||
|
|
||||||
// 跳转到隐私政策页面
|
// 跳转到隐私政策页面
|
||||||
handleToPrivacy: () => {
|
handleToPrivacy: () => {
|
||||||
|
router.navigateTo('/pages/webview/webview?type=privacy')
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -193,7 +193,7 @@
|
|||||||
</view> -->
|
</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="px-30rpx pt-30rpx py-24rpx">更多服务</view>
|
||||||
<view class="flex px-30rpx">
|
<view class="flex px-30rpx">
|
||||||
<view v-for="(item, index) in serviceMenuList" :key="index">
|
<view v-for="(item, index) in serviceMenuList" :key="index">
|
||||||
@ -210,7 +210,7 @@
|
|||||||
</navigator>
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 推广码 -->
|
<!-- 推广码 -->
|
||||||
|
|||||||
@ -92,6 +92,14 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
uni.$on('refreshOrderList', () => {
|
||||||
|
list.value = []
|
||||||
|
getMescroll().resetUpScroll()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
onUnload(() => {
|
||||||
|
uni.$off('refreshOrderList')
|
||||||
})
|
})
|
||||||
|
|
||||||
const Reserve = {
|
const Reserve = {
|
||||||
|
|||||||
36
src/pages/webview/webview.vue
Normal file
36
src/pages/webview/webview.vue
Normal 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>
|
||||||
Reference in New Issue
Block a user