完善茶艺师接口对接
This commit is contained in:
@ -68,7 +68,9 @@ export interface IGetStoreVerificationCodeParams {
|
||||
}
|
||||
|
||||
export function getVerificationCode(data: IGetStoreVerificationCodeParams) {
|
||||
return http.Post('/storeapi/sms/sendCode', data)
|
||||
return http.Post('/storeapi/sms/sendCode', data, {
|
||||
meta: { ignoreAuth: true }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@ -82,7 +84,9 @@ export interface IResetPasswordParams {
|
||||
}
|
||||
|
||||
export function resetPassword(data: IResetPasswordParams) {
|
||||
return http.Post('/storeapi/storeLogin/resetPassword', data)
|
||||
return http.Post('/teamapi/teamLogin/resetPassword', data, {
|
||||
meta: { ignoreAuth: true }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
class="bg-white rounded-16rpx px-30rpx py-36rpx flex justify-between items-center mb-20rpx"
|
||||
v-for="(item, index) in useStore.storeList" :key="item.id">
|
||||
<view class="flex items-center">
|
||||
<wd-img width="70rpx" height="70rpx" round src="https://shchazhi.oss-cn-hangzhou.aliyuncs.com/fronted/icon/icon_avatar.png" mode="aspectFit" />
|
||||
<wd-img width="70rpx" height="70rpx" round :src="`${OSS}icon/icon_avatar.png`" mode="aspectFit" />
|
||||
<view class="w-360rpx line-1 ml-24rpx">{{ item.name }}</view>
|
||||
</view>
|
||||
<view class="flex-1 flex justify-end">
|
||||
@ -36,10 +36,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { useStoreStore } from '@/store'
|
||||
import { switchStore } from '@/api/store'
|
||||
|
||||
import { router } from '@/utils/tools'
|
||||
|
||||
// 读取仓库
|
||||
const OSS = inject('OSS')
|
||||
const useStore = useStoreStore()
|
||||
|
||||
// 店铺列表
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
|
||||
<view class="bg-white rounded-16rpx mt-20rpx mx-30rpx px-30rpx py-32rpx">
|
||||
<!-- 头像 -->
|
||||
<view class="flex justify-between items-center mb-54rpx">
|
||||
<!-- <view class="flex justify-between items-center mb-54rpx">
|
||||
<view class="font-400 text-[#303133] text-30rpx leading-42rpx">头像</view>
|
||||
<view class="flex justify-end">
|
||||
<view class="flex items-center">
|
||||
@ -83,7 +83,7 @@
|
||||
<wd-icon name="arrow-right" size="32rpx" color="#C0C4CC" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 姓名 -->
|
||||
<view class="flex justify-between items-center mb-54rpx" @click="showEditNicknamePopup = true">
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<view class="mb-22rpx" v-for="item in list" :key="item.id">
|
||||
<view class="mx-64rpx flex justify-between items-center mb-10rpx">
|
||||
<view class="flex items-center" @click="UserList.handleToDetail(item?.user?.id)">
|
||||
<wd-img width="100rpx" height='100rpx' src="https://shchazhi.oss-cn-hangzhou.aliyuncs.com/fronted/icon/icon_avatar.png" :round="true"></wd-img>
|
||||
<wd-img width="100rpx" height='100rpx' :src="`${OSS}icon/icon_avatar.png`" :round="true"></wd-img>
|
||||
<view class="ml-20rpx">
|
||||
<view class="flex items-center">
|
||||
<view class="font-bold text-28rpx text-[#303133] leading-40rpx mr-12rpx">{{ item?.user?.nickname }}</view>
|
||||
|
||||
@ -22,7 +22,7 @@ export function createApp() {
|
||||
app.use(routeInterceptor)
|
||||
app.use(requestInterceptor)
|
||||
app.use(VueQueryPlugin)
|
||||
app.provide('OSS', 'https://shchazhi.oss-cn-hangzhou.aliyuncs.com/fronted/')
|
||||
app.provide('OSS', 'https://chaz.oss-cn-shanghai.aliyuncs.com/fronted/')
|
||||
app.provide('navbarHeight', getNavBarHeight())
|
||||
app.provide('capsuleOffset', getCapsuleOffset())
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@
|
||||
<view class="schedule-content">
|
||||
<view class="schedule-header-row">
|
||||
<text class="schedule-type">预约单</text>
|
||||
<text class="schedule-status">{{ order.status || '待服务' }}</text>
|
||||
<text class="schedule-status">{{ TeaSpecialistManageStatusTextValue[order.order_status].title }}</text>
|
||||
</view>
|
||||
<view class="schedule-location-row">
|
||||
<text class="schedule-location">{{ order.location || order.store_name }}</text>
|
||||
|
||||
@ -42,6 +42,15 @@
|
||||
<wd-button custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border" @click="Login.handleToLogin">立即登录</wd-button>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center mt-64rpx">
|
||||
<view class="w-32rpx h-32rpx">
|
||||
<wd-checkbox v-model="agree" checked-color="#4C9F44" size="large"> </wd-checkbox>
|
||||
</view>
|
||||
<view class="font-400 text-26rpx leading-40rpx text-[#8F959E] ml-14rpx flex-1" @click="agree = !agree">
|
||||
我已阅读并同意 <text class="text-[#4C9F44]" @click.stop="Login.handleToService">《服务协议》</text> 和<text class="text-[#4C9F44]" @click.stop="Login.handleToPrivacy">《隐私政策》</text>,未注册手机号登录后将自动你为您创建账号
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-44rpx font-400 text-28rpx text-[#4C9F44] leading-40rpx" @click="router.navigateTo('/pages/login/password')">
|
||||
忘记密码?
|
||||
</view>
|
||||
@ -59,16 +68,18 @@
|
||||
const OSS = inject('OSS')
|
||||
const toast = useToast()
|
||||
|
||||
/** 表单相关 **/
|
||||
// 服务协议条款
|
||||
const agree = ref<boolean>(false)
|
||||
|
||||
// 表单相关
|
||||
const model = reactive<{
|
||||
mobile: string
|
||||
passowrd: string
|
||||
}>({
|
||||
mobile: '', // 18857339563
|
||||
mobile: '', // 13011223344
|
||||
passowrd: ''
|
||||
})
|
||||
|
||||
|
||||
onLoad((args) => {
|
||||
// 读取缓存的账号密码
|
||||
const savedMobile = uni.getStorageSync('loginMobile')
|
||||
@ -80,12 +91,18 @@
|
||||
if (savedPassword) {
|
||||
model.passowrd = savedPassword
|
||||
}
|
||||
|
||||
if (savedMobile && savedPassword) {
|
||||
// 自动登录
|
||||
agree.value = true
|
||||
}
|
||||
})
|
||||
|
||||
const Login = {
|
||||
// 登录
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
handleToLogin: async () => {
|
||||
// TODO 如果是edit的话就是修改手机号
|
||||
if (!testMobile(model.mobile)) {
|
||||
toast.info('请输入正确的账号')
|
||||
return
|
||||
@ -96,6 +113,11 @@
|
||||
return
|
||||
}
|
||||
|
||||
if (!agree.value) {
|
||||
toast.info('请同意服务协议和隐私政策')
|
||||
return
|
||||
}
|
||||
|
||||
uni.showLoading({
|
||||
title: '登录中...'
|
||||
})
|
||||
@ -114,12 +136,20 @@
|
||||
router.reLaunch('/pages/index/index')
|
||||
}, 1000)
|
||||
} catch (error) {
|
||||
toast.info('登录失败,请稍后重试')
|
||||
uni.hideLoading()
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
// 跳转到服务协议页面
|
||||
handleToService: () => {
|
||||
router.navigateTo('/pages/webview/webview?type=service')
|
||||
},
|
||||
|
||||
// 跳转到隐私政策页面
|
||||
handleToPrivacy: () => {
|
||||
router.navigateTo('/pages/webview/webview?type=privacy')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -50,8 +50,8 @@
|
||||
<view class="form-item mb-24rpx">
|
||||
<text class="label-text mb-12rpx block text-28rpx text-[#303133] leading-40rpx">出生年月</text>
|
||||
<view class="date-select rounded-16rpx bg-[#F5F7FA]">
|
||||
<wd-datetime-picker v-model="formData.both" type="year-month" placeholder="请选择出生年月" :min-date="new Date(1970, 0, 1).getTime()" :max-date="Date.now()"
|
||||
custom-class="!bg-transparent" @confirm="ProfileEdit.handleDateConfirm">
|
||||
<wd-datetime-picker v-model="formData.both" type="date" placeholder="请选择出生年月"
|
||||
custom-class="!bg-transparent" @confirm="ProfileEdit.handleDateConfirm" :minDate="new Date(1970, 0, 1).getTime()" :maxDate="new Date().getTime()">
|
||||
<wd-input v-model="both" readonly no-border
|
||||
custom-class="!bg-transparent" custom-input-class="!h-88rpx !px-24rpx !text-28rpx">
|
||||
<template #suffix>
|
||||
@ -258,7 +258,7 @@
|
||||
const d = new Date(value)
|
||||
const year = d.getFullYear()
|
||||
const month = d.getMonth() + 1
|
||||
const day = d.getDay()
|
||||
const day = d.getDate()
|
||||
both.value = `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`
|
||||
formData.value.both = value / 1000 // 转为秒
|
||||
},
|
||||
|
||||
35
src/pages/webview/webview.vue
Normal file
35
src/pages/webview/webview.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<!-- 使用 type="home" 属性设置首页,其他页面不需要设置,默认为page -->
|
||||
<route lang="jsonc" type="page">{
|
||||
"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>
|
||||
@ -11,7 +11,8 @@ import {
|
||||
} from '@/api/login'
|
||||
import { toast } from '@/utils/toast'
|
||||
|
||||
const defaultAvatar = 'https://shchazhi.oss-cn-hangzhou.aliyuncs.com/fronted/icon/icon_avatar.png'
|
||||
const OSS = inject('OSS')
|
||||
const defaultAvatar = `${OSS}icon/icon_avatar.png`
|
||||
|
||||
// 初始化状态
|
||||
const userInfoState: IUserInfoVo = {
|
||||
|
||||
@ -79,4 +79,4 @@ $uni-font-size-paragraph: 15px;
|
||||
/* chazhi 自定义 */
|
||||
$cz-page-background: #F6F7F9; // 页面背景色
|
||||
$cz-theme-color: #4C9F44; // 页面背景色
|
||||
$OSS: 'https://shchazhi.oss-cn-hangzhou.aliyuncs.com/fronted/';
|
||||
$OSS: 'https://chaz.oss-cn-shanghai.aliyuncs.com/fronted/';
|
||||
|
||||
Reference in New Issue
Block a user