添加资质信息
This commit is contained in:
@ -290,3 +290,28 @@ export interface IGetStoreRechargeListParams {
|
|||||||
export function getStoreRechargeList(data: IGetStoreRechargeListParams) {
|
export function getStoreRechargeList(data: IGetStoreRechargeListParams) {
|
||||||
return http.Post<any>('/storeapi/user/storeRechargeLists', data)
|
return http.Post<any>('/storeapi/user/storeRechargeLists', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加门店资质信息
|
||||||
|
*/
|
||||||
|
export interface IAddStoreQualiParams {
|
||||||
|
store_id: number // 门店id
|
||||||
|
name: string // 企业名称
|
||||||
|
legal_person: string // 法人
|
||||||
|
card: string // 统一社会信用代码
|
||||||
|
license_img: string // 营业执照图片
|
||||||
|
effective: number // 营业执照有效期 1-长期 2-非长期
|
||||||
|
start_time: string // 营业执照开始时间
|
||||||
|
end_time: string // 营业执照结束时间
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addStoreQual(data: IAddStoreQualiParams) {
|
||||||
|
return http.Post('/storeapi/store/addQual', data)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取门店资质信息
|
||||||
|
*/
|
||||||
|
export function getStoreQual(store_id: number) {
|
||||||
|
return http.Post<any>('/storeapi/store/qualDetails', { store_id })
|
||||||
|
}
|
||||||
30
src/bundle/store-license/add-guide.vue
Normal file
30
src/bundle/store-license/add-guide.vue
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<route lang="jsonc" type="page">
|
||||||
|
{
|
||||||
|
"needLogin": true,
|
||||||
|
"layout": "default",
|
||||||
|
"style": {
|
||||||
|
"navigationBarBackgroundColor": "#FFF",
|
||||||
|
"navigationBarTitleText": "资质信息"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<view class="mt-182rpx flex justify-center">
|
||||||
|
<wd-img width="372rpx" height="326rpx" :src="`${OSS}icon/icon_empty.png`"/>
|
||||||
|
</view>
|
||||||
|
<view class="mt-32rpx font-400 text-30rpx text-[#9CA3AF] text-center">暂无资质消息</view>
|
||||||
|
|
||||||
|
<view class="bg-[#4C9F44] text-white rounded-8rpx w-630rpx h-90rpx leading-90rpx text-center mx-auto mt-300rpx" @click="router.navigateTo('/bundle/store-license/add')">
|
||||||
|
去添加
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { router } from '@/utils/tools'
|
||||||
|
|
||||||
|
const OSS = inject('OSS')
|
||||||
|
|
||||||
|
</script>
|
||||||
197
src/bundle/store-license/add.vue
Normal file
197
src/bundle/store-license/add.vue
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
<route lang="jsonc" type="page">{
|
||||||
|
"layout": "default",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
}</route>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="pb-100rpx">
|
||||||
|
<navbar title="添加资质信息" custom-class='!bg-[#F6F7F8]'></navbar>
|
||||||
|
|
||||||
|
<view class="mx-30rpx bg-white rounded-16rpx py-26rpx px-30rpx mt-38rpx">
|
||||||
|
<view class="flex items-center">
|
||||||
|
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx font-bold">经营资质</view>
|
||||||
|
<view class="flex items-center">
|
||||||
|
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mt-52rpx">
|
||||||
|
<view>
|
||||||
|
<view class="text-26rpx leading-32rpx text-#606266">证件号码</view>
|
||||||
|
<view class="mt-20rpx border-b border-b-solid border-b-[#F6F7F8] pb-20rpx">
|
||||||
|
<wd-input no-border placeholder="请输入证件号码" v-model="form.card"></wd-input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mt-22rpx">
|
||||||
|
<view class="text-26rpx leading-32rpx text-#606266">企业名称</view>
|
||||||
|
<view class="mt-20rpx border-b border-b-solid border-b-[#F6F7F8] pb-20rpx">
|
||||||
|
<wd-input no-border placeholder="请输入企业名称" v-model="form.name"></wd-input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mt-22rpx">
|
||||||
|
<view class="text-26rpx leading-32rpx text-#606266">法定代表</view>
|
||||||
|
<view class="mt-20rpx border-b border-b-solid border-b-[#F6F7F8] pb-20rpx">
|
||||||
|
<wd-input no-border placeholder="请输入法定代表" v-model="form.legal_person"></wd-input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mt-22rpx">
|
||||||
|
<view class="text-26rpx leading-32rpx text-#606266">有效期</view>
|
||||||
|
<view class="mt-20rpx">
|
||||||
|
<wd-radio-group v-model="form.operation_type" size="large" shape="dot" checked-color="#4C9F44" inline>
|
||||||
|
<wd-radio :value="1" border>
|
||||||
|
<view class="leading-36rpx font-400 text-30rpx ml-12rpx mr-60rpx">永久有效</view>
|
||||||
|
</wd-radio>
|
||||||
|
<wd-radio :value="2" border>
|
||||||
|
<view class="leading-36rpx font-400 text-30rpx ml-12rpx">有固定期限</view>
|
||||||
|
</wd-radio>
|
||||||
|
</wd-radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex items-center mt-48rpx" v-if="form.operation_type == 2">
|
||||||
|
<view class="">
|
||||||
|
<wd-datetime-picker v-model="startTime" type="date" :maxDate="Date.now()" :minDate="0" @confirm="Add.handleAddConfirmTime">
|
||||||
|
<wd-input no-border readonly v-model="form.start_time" placeholder="请选择起始日期" custom-class="!bg-[#F6F7F8] !rounded-16rpx !px-28rpx !py-20rpx"></wd-input>
|
||||||
|
</wd-datetime-picker>
|
||||||
|
</view>
|
||||||
|
<view class="text-30rpx leading-42rpx text-[#303133] mx-20rpx">至</view>
|
||||||
|
<view class="">
|
||||||
|
<wd-datetime-picker v-model="endTime" type="date" :maxDate="Date.now()" :minDate="0" @confirm="Add.handleEndConfirmTime">
|
||||||
|
<wd-input no-border v-model="form.end_time" readonly placeholder="请选择截止日期" custom-class="!bg-[#F6F7F8] !rounded-16rpx !px-28rpx !py-20rpx"></wd-input>
|
||||||
|
</wd-datetime-picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx mx-30rpx">
|
||||||
|
<view class="flex items-center">
|
||||||
|
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx font-bold">营业执照</view>
|
||||||
|
<view class="flex items-center">
|
||||||
|
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="mt-32rpx">
|
||||||
|
<wd-upload
|
||||||
|
:header="{'token': token}"
|
||||||
|
v-model:file-list="fileList"
|
||||||
|
:limit="1"
|
||||||
|
image-mode="scaleToFill"
|
||||||
|
:action="action">
|
||||||
|
<view class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
||||||
|
<view class="">
|
||||||
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`" mode="aspectFill" />
|
||||||
|
</view>
|
||||||
|
<view class="font-400 text-26rpx leading-36rpx text-#303133">营业执照</view>
|
||||||
|
</view>
|
||||||
|
</wd-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="text-26rpx leading-36rpx text-[#606266] mt-76rpx mx-30rpx">
|
||||||
|
*提交表单申请,工作人员将在3个工作日内与您电话联系,如需及时了解,请直接电话咨询,我们将在第一时间解答
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="bg-[#4C9F44] text-white rounded-8rpx w-630rpx h-90rpx leading-90rpx text-center mx-auto mt-92rpx" @click="Add.handleSubmit">
|
||||||
|
提交申请
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { addStoreQual, type IAddStoreQualiParams } from '@/api/store'
|
||||||
|
import { useToast } from 'wot-design-uni'
|
||||||
|
import { useStoreStore } from '@/store'
|
||||||
|
import { router, removeImageUrlPrefix } from '@/utils/tools'
|
||||||
|
|
||||||
|
const useStore = useStoreStore()
|
||||||
|
const toast = useToast()
|
||||||
|
|
||||||
|
const form = reactive({
|
||||||
|
store_id: 0,
|
||||||
|
card: '', // 证件号码
|
||||||
|
name: '', // 企业名称
|
||||||
|
legal_person: '', // 法定代表
|
||||||
|
operation_type: 1, // 有效期 1-长期 2-非长期
|
||||||
|
start_time: '',
|
||||||
|
end_time: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
const token = ref<string>('') // 用户token
|
||||||
|
const OSS = inject('OSS')
|
||||||
|
const startTime = ref<number>(Date.now())
|
||||||
|
const endTime = ref<number>(Date.now())
|
||||||
|
|
||||||
|
// 上传文件
|
||||||
|
const fileList = ref<any[]>([]) // 营业执照
|
||||||
|
const action = import.meta.env.VITE_UPLOAD_BASEURL
|
||||||
|
|
||||||
|
onLoad((options) => {
|
||||||
|
token.value = uni.getStorageSync('token')
|
||||||
|
|
||||||
|
if (options && options.store_id) {
|
||||||
|
form.store_id = Number(options.store_id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const Add = {
|
||||||
|
handleAddConfirmTime: (date: {value: number}) => {
|
||||||
|
form.start_time = Add.handleFormatTime(date.value)
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEndConfirmTime: (date: {value: number}) => {
|
||||||
|
form.end_time = Add.handleFormatTime(date.value)
|
||||||
|
},
|
||||||
|
|
||||||
|
handleFormatTime: (value: any) => {
|
||||||
|
const d = new Date(value)
|
||||||
|
const year = d.getFullYear()
|
||||||
|
const month = (d.getMonth() + 1).toString().padStart(2, '0')
|
||||||
|
const day = d.getDate().toString().padStart(2, '0')
|
||||||
|
return `${year}-${month}-${day}`
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSubmit: async () => {
|
||||||
|
if (!form.card) return toast.error('请输入证件号码')
|
||||||
|
if (!form.name) return toast.error('请输入企业名称')
|
||||||
|
if (!form.legal_person) return toast.error('请输入法人名称')
|
||||||
|
if (form.operation_type === 2) {
|
||||||
|
if (!form.start_time) return toast.error('请选择起始日期')
|
||||||
|
if (!form.end_time) return toast.error('请选择截止日期')
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileList.value.length === 0) return toast.error('请上传营业执照')
|
||||||
|
|
||||||
|
const params: IAddStoreQualiParams = {
|
||||||
|
store_id: useStore.defaultStore.id,
|
||||||
|
name: form.name,
|
||||||
|
card: form.card,
|
||||||
|
legal_person: form.legal_person,
|
||||||
|
license_img: removeImageUrlPrefix(fileList.value)[0],
|
||||||
|
effective: form.operation_type,
|
||||||
|
start_time: form.operation_type === 1 ? '' : form.start_time,
|
||||||
|
end_time: form.operation_type === 1 ? '' : form.end_time
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await addStoreQual(params)
|
||||||
|
setTimeout(() => {
|
||||||
|
router.reLaunch('/pages/my/my')
|
||||||
|
}, 1000)
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
background-color: $cz-page-background;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
64
src/bundle/store-license/license.vue
Normal file
64
src/bundle/store-license/license.vue
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<route lang="jsonc" type="page">
|
||||||
|
{
|
||||||
|
"needLogin": true,
|
||||||
|
"layout": "default",
|
||||||
|
"style": {
|
||||||
|
"navigationBarBackgroundColor": "#FFF",
|
||||||
|
"navigationBarTitleText": "资质信息"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="flex flex-col min-h-screen">
|
||||||
|
<view class="bg-[#fff] mt-28rpx px-30rpx">
|
||||||
|
<view class="font-800 text-36rpx text-[#303133] leading-50rpx">经营资质</view>
|
||||||
|
<view class="flex items-center mt-28rpx text-28rpx leading-40rpx">
|
||||||
|
<view class="mr-20rpx text-[#606266]">证件号码:</view>
|
||||||
|
<view class="text-[#303133]">{{ licenses.card }}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex items-center mt-28rpx text-28rpx leading-40rpx">
|
||||||
|
<view class="mr-20rpx text-[#606266]">企业名称:</view>
|
||||||
|
<view class="text-[#303133]">{{ licenses.name }}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex items-center mt-28rpx text-28rpx leading-40rpx">
|
||||||
|
<view class="mr-20rpx text-[#606266]">法定代表:</view>
|
||||||
|
<view class="text-[#303133]">{{ licenses.legal_person }}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="flex items-center mt-28rpx text-28rpx leading-40rpx">
|
||||||
|
<view class="mr-20rpx text-[#606266]">有效期至:{{ licenses.effective == 1 ? '有效期至:永久有效' : licenses.end_time }}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="mt-24rpx mb-34rpx">
|
||||||
|
<wd-img width="624rpx" height="420rpx" :src="licenses.license_img" mode="aspectFit" @click="previewImage(licenses.license_img, [licenses.license_img])"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bg-[#F8F9FA] flex-1 px-42rpx">
|
||||||
|
<wd-divider color="#9CA3AF">免责声明</wd-divider>
|
||||||
|
<view class="text-22rpx text-[#9CA3AF] leading-40rpx">以上资质信息来源于商家自我声明和/或申报内容。商家需保证信息真实有效,平台也将定期核查。如与实际不符或有疑问,请联系平台客服。</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { getStoreQual } from '@/api/store'
|
||||||
|
import { useStoreStore } from '@/store'
|
||||||
|
import type { IAddStoreQualiParams } from '@/api/store'
|
||||||
|
import { previewImage } from '@/utils/tools'
|
||||||
|
|
||||||
|
const useStore = useStoreStore()
|
||||||
|
|
||||||
|
const licenses = ref<IAddStoreQualiParams>()
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
getStoreQual(useStore.defaultStore.id).then(res => {
|
||||||
|
licenses.value = res.details
|
||||||
|
})
|
||||||
|
// TODO: 拉取经营资质数据,赋值 licenses.value
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
:style="{ backgroundImage: `url('${OSS}images/store/my/image2.png')` }">
|
:style="{ backgroundImage: `url('${OSS}images/store/my/image2.png')` }">
|
||||||
<wd-navbar safe-area-inset-top :bordered="false" custom-style="background-color: transparent !important;">
|
<wd-navbar safe-area-inset-top :bordered="false" custom-style="background-color: transparent !important;">
|
||||||
<template #left>
|
<template #left>
|
||||||
<view class="ml-16rpx flex items-center"/>
|
<view class="ml-16rpx flex items-center" />
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<view class="right-slot mr-16rpx">
|
<view class="right-slot mr-16rpx">
|
||||||
@ -29,7 +29,8 @@
|
|||||||
<view class="user-info-bg relative z-10 ml-30rpx mr-30rpx flex items-center"
|
<view class="user-info-bg relative z-10 ml-30rpx mr-30rpx flex items-center"
|
||||||
:style="{ backgroundImage: `url('${OSS}images/store/my/image2.png')` }">
|
:style="{ backgroundImage: `url('${OSS}images/store/my/image2.png')` }">
|
||||||
<view class="relative z-10">
|
<view class="relative z-10">
|
||||||
<wd-img width="120rpx" height="120rpx" :src="(isLogin && user.avatar) ? user.avatar : `${OSS}images/store/my/image1.png`"
|
<wd-img width="120rpx" height="120rpx"
|
||||||
|
:src="(isLogin && user.avatar) ? user.avatar : `${OSS}images/store/my/image1.png`"
|
||||||
mode="aspectFill" round />
|
mode="aspectFill" round />
|
||||||
</view>
|
</view>
|
||||||
<view class="relative z-10 ml-22rpx flex flex-1 items-center justify-between">
|
<view class="relative z-10 ml-22rpx flex flex-1 items-center justify-between">
|
||||||
@ -53,22 +54,39 @@
|
|||||||
¥{{ isLogin ? user.user_money : '0.00' }}
|
¥{{ isLogin ? user.user_money : '0.00' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ml-0rpx mt-4rpx text-20rpx text-[#909399] leading-28rpx" @click="My.handleToWallet">
|
<view class="ml-0rpx mt-4rpx text-20rpx text-[#909399] leading-28rpx"
|
||||||
|
@click="My.handleToWallet">
|
||||||
钱包余额
|
钱包余额
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view class="tabs">
|
||||||
|
<wd-tabs v-model="tab" swipeable slidable="always" :lazy="false">
|
||||||
|
<wd-tab title="门店信息"></wd-tab>
|
||||||
|
<wd-tab title="门店服务"></wd-tab>
|
||||||
|
</wd-tabs>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- 门店信息区域 -->
|
<!-- 门店信息区域 -->
|
||||||
<view class="store-info-card mt-28rpx bg-white py-30rpx pl-30rpx">
|
<view class="store-info-card mt-28rpx bg-white pt-10rpx pl-30rpx">
|
||||||
|
<view class="my-tabs">
|
||||||
|
<wd-tabs v-model="tab" swipeable slidable="always" :lazy="false">
|
||||||
|
<wd-tab title="门店信息"></wd-tab>
|
||||||
|
<wd-tab title="门店服务"></wd-tab>
|
||||||
|
</wd-tabs>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<template v-if="tab == 0">
|
||||||
|
<view class="mt-34rpx">
|
||||||
<view class="mb-24rpx text-32rpx text-[#303133] font-bold leading-44rpx">
|
<view class="mb-24rpx text-32rpx text-[#303133] font-bold leading-44rpx">
|
||||||
{{ storeInfo.name }}
|
{{ storeInfo.name }}
|
||||||
</view>
|
</view>
|
||||||
<view class="mb-16rpx flex items-center text-24rpx text-[#606266] leading-40rpx">
|
<view class="mb-16rpx flex items-center text-24rpx text-[#606266] leading-40rpx">
|
||||||
<text class="w-140rpx">门店ID:</text>
|
<text class="w-140rpx">门店ID:</text>
|
||||||
<text class="flex-1 text-[#000]">{{ storeInfo.id > 0 ? storeInfo.id : '-'}}</text>
|
<text class="flex-1 text-[#000]">{{ storeInfo.id > 0 ? storeInfo.id : '-' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="mb-16rpx flex items-center text-24rpx text-[#606266] leading-40rpx">
|
<view class="mb-16rpx flex items-center text-24rpx text-[#606266] leading-40rpx">
|
||||||
<text class="w-140rpx">门店地址:</text>
|
<text class="w-140rpx">门店地址:</text>
|
||||||
@ -77,23 +95,25 @@
|
|||||||
<view class="relative mb-16rpx flex items-center">
|
<view class="relative mb-16rpx flex items-center">
|
||||||
<view class="flex items-center text-24rpx text-[#606266] leading-40rpx">
|
<view class="flex items-center text-24rpx text-[#606266] leading-40rpx">
|
||||||
<text class="w-140rpx">营业时间:</text>
|
<text class="w-140rpx">营业时间:</text>
|
||||||
<text class="flex-1 text-[#000]">{{ `${storeInfo.start_time }-${storeInfo.end_time }` || '-' }}</text>
|
<text class="flex-1 text-[#000]">{{ `${storeInfo.start_time}-${storeInfo.end_time}` ||
|
||||||
|
'-' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="modify-btn absolute right-0 flex items-center px-20rpx py-8rpx"
|
<view class="modify-btn absolute right-0 flex items-center px-20rpx py-8rpx"
|
||||||
:style="{ backgroundImage: `url('${OSS}images/store/my/image3.png')` }"
|
:style="{ backgroundImage: `url('${OSS}images/store/my/image3.png')` }"
|
||||||
@click="router.navigateTo('/bundle/store/edit-store')">
|
@click="router.navigateTo('/bundle/store/edit-store')">
|
||||||
<wd-img width="24rpx" height="24rpx" :src="`${OSS}images/store/my/image4.png`" class="mr-8rpx" />
|
<wd-img width="24rpx" height="24rpx" :src="`${OSS}images/store/my/image4.png`"
|
||||||
|
class="mr-8rpx" />
|
||||||
<text class="text-24rpx text-[#fff]">修改</text>
|
<text class="text-24rpx text-[#fff]">修改</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center text-24rpx text-[#606266] leading-40rpx" @click="My.handleCall(storeInfo.contact_phone)">
|
<view class="flex items-center text-24rpx text-[#606266] leading-40rpx"
|
||||||
|
@click="My.handleCall(storeInfo.contact_phone)">
|
||||||
<text class="w-140rpx">联系电话:</text>
|
<text class="w-140rpx">联系电话:</text>
|
||||||
<text class="flex-1 text-[#000]">{{ storeInfo.contact_phone || '-' }}</text>
|
<text class="flex-1 text-[#000]">{{ storeInfo.contact_phone || '-' }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 门店视频/图片区域 -->
|
<!-- 门店视频/图片区域 -->
|
||||||
<view class="bg-white px-30rpx">
|
<view class="bg-white mt-40rpx">
|
||||||
<view class="mb-24rpx text-32rpx text-[#303133] font-bold leading-44rpx">
|
<view class="mb-24rpx text-32rpx text-[#303133] font-bold leading-44rpx">
|
||||||
<!-- 门店视频/图片 -->
|
<!-- 门店视频/图片 -->
|
||||||
门店图片
|
门店图片
|
||||||
@ -111,28 +131,43 @@
|
|||||||
<!-- 超出6张显示遮罩 -->
|
<!-- 超出6张显示遮罩 -->
|
||||||
<view v-if="mediaCount > 6 && index === 5"
|
<view v-if="mediaCount > 6 && index === 5"
|
||||||
class="absolute inset-0 flex items-center justify-center bg-black bg-opacity-50">
|
class="absolute inset-0 flex items-center justify-center bg-black bg-opacity-50">
|
||||||
<text class="text-32rpx text-[#fff] font-bold">+{{ Number(mediaCount - 6) }}</text>
|
<text class="text-32rpx text-[#fff] font-bold">+{{ Number(mediaCount - 6)
|
||||||
|
}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-if="tab == 1">
|
||||||
|
<view class="mt-34rpx">
|
||||||
|
<view class="flex flex-col items-center justify-center w-20%" @click="My.handleToLicense">
|
||||||
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_card3.png`" />
|
||||||
|
<view class="font-400 text-24rpx text-[#000]">资质信息</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { IUserResult } from '@/api/types/user'
|
import type { IUserResult } from '@/api/types/user'
|
||||||
import { getUserInfo, getUserBalance } from '@/api/user'
|
import { getUserInfo, getUserBalance } from '@/api/user'
|
||||||
import { useUserStore, useStoreStore } from '@/store'
|
import { useUserStore, useStoreStore } from '@/store'
|
||||||
import { router } from '@/utils/tools'
|
import { router } from '@/utils/tools'
|
||||||
import { getStoreDetails } from '@/api/store'
|
import { getStoreDetails, getStoreQual } from '@/api/store'
|
||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
const navbarHeight = inject('navbarHeight')
|
const navbarHeight = inject('navbarHeight')
|
||||||
const rightPadding = inject('capsuleOffset')
|
const rightPadding = inject('capsuleOffset')
|
||||||
const useStore = useStoreStore()
|
const useStore = useStoreStore()
|
||||||
|
|
||||||
|
// tab
|
||||||
|
const tab = ref<number>(0)
|
||||||
|
|
||||||
// 登录信息相关
|
// 登录信息相关
|
||||||
const user = ref<IUserResult>({
|
const user = ref<IUserResult>({
|
||||||
id: 0,
|
id: 0,
|
||||||
@ -170,7 +205,6 @@ const storeInfo = ref({
|
|||||||
const storeMediaList = ref([])
|
const storeMediaList = ref([])
|
||||||
const mediaCount = ref<number>(0)
|
const mediaCount = ref<number>(0)
|
||||||
|
|
||||||
|
|
||||||
onShow(async () => {
|
onShow(async () => {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
isLogin.value = userStore.isLoggedIn
|
isLogin.value = userStore.isLoggedIn
|
||||||
@ -181,7 +215,6 @@ onShow(async () => {
|
|||||||
|
|
||||||
// 获取用户余额
|
// 获取用户余额
|
||||||
const res2 = await getUserBalance(useStore.defaultStore.id)
|
const res2 = await getUserBalance(useStore.defaultStore.id)
|
||||||
console.log("🚀 ~ res2:", res2)
|
|
||||||
user.value.user_money = res2.store_msg.balance || '0.00'
|
user.value.user_money = res2.store_msg.balance || '0.00'
|
||||||
userStore.setUserMoney(Number(user.value.user_money))
|
userStore.setUserMoney(Number(user.value.user_money))
|
||||||
}
|
}
|
||||||
@ -204,7 +237,6 @@ onLoad(() => {
|
|||||||
user.value[key] = ''
|
user.value[key] = ''
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
@ -302,39 +334,51 @@ const My = {
|
|||||||
if (account.length <= 7)
|
if (account.length <= 7)
|
||||||
return account
|
return account
|
||||||
return `${account.substring(0, 3)}****${account.substring(account.length - 4)}`
|
return `${account.substring(0, 3)}****${account.substring(account.length - 4)}`
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到资质信息页面
|
||||||
|
*/
|
||||||
|
handleToLicense: async () => {
|
||||||
|
const res = await getStoreQual(storeInfo.value.id)
|
||||||
|
if (res.details) {
|
||||||
|
router.navigateTo('/bundle/store-license/license')
|
||||||
|
} else {
|
||||||
|
router.navigateTo('/bundle/store-license/add-guide')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-bg {
|
.home-bg {
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: top center;
|
background-position: top center;
|
||||||
min-height: 450rpx;
|
min-height: 450rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-info-bg {
|
.user-info-bg {
|
||||||
background-size: 100% auto;
|
background-size: 100% auto;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: top center;
|
background-position: top center;
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
min-height: 200rpx;
|
min-height: 200rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.store-info-card {
|
.store-info-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
border-radius: 32rpx 32rpx 0 0;
|
border-radius: 32rpx 32rpx 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modify-btn {
|
.modify-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
@ -342,9 +386,38 @@ const My = {
|
|||||||
min-width: 160rpx;
|
min-width: 160rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-slot {
|
||||||
|
padding-right: v-bind(rightPadding);
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-tabs {
|
||||||
|
:deep() {
|
||||||
|
|
||||||
|
.wd-tabs,
|
||||||
|
.wd-tabs__nav {
|
||||||
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-slot {
|
.wd-tabs__nav-item {
|
||||||
padding-right: v-bind(rightPadding);
|
font-size: 30rpx !important;
|
||||||
|
color: #606266 !important;
|
||||||
|
line-height: 40rpx !important;
|
||||||
|
padding: 0 30rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wd-tabs__nav-item.is-active {
|
||||||
|
color: #303133 !important;
|
||||||
|
font-size: 30rpx !important;
|
||||||
|
line-height: 44rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wd-tabs__line {
|
||||||
|
background-color: #303133 !important;
|
||||||
|
width: 72rpx !important;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -176,3 +176,13 @@ export function removeImageUrlPrefix(file: any) {
|
|||||||
})
|
})
|
||||||
return fileList
|
return fileList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预览图片
|
||||||
|
*/
|
||||||
|
export function previewImage(current: string, urls: string[]) {
|
||||||
|
uni.previewImage({
|
||||||
|
current,
|
||||||
|
urls
|
||||||
|
})
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user