初始化上传医疗项目到 medical-mall

This commit is contained in:
2026-04-10 09:03:21 +08:00
parent ca8794ea3a
commit ce124e7119
421 changed files with 15139 additions and 2363 deletions

View File

@@ -1,4 +1,4 @@
<!-- 商家端 - 店铺编辑页面 -->
<!-- 机构端 - 机构信息编辑页面 -->
<template>
<view class="shop-edit-page">
<!-- #ifdef MP-WEIXIN -->
@@ -10,15 +10,15 @@
</view>
<!-- #endif -->
<view class="section">
<view class="section-title">店铺信息</view>
<view class="section-title">机构信息</view>
<view class="form-item">
<text class="label">店铺名称 *</text>
<input class="input" v-model="shop.shop_name" placeholder="请输入店铺名称" maxlength="50"/>
<text class="label">机构名称 *</text>
<input class="input" v-model="shop.shop_name" placeholder="请输入机构名称" maxlength="50"/>
</view>
<view class="form-item">
<text class="label">店铺Logo</text>
<text class="label">机构Logo</text>
<view class="logo-uploader" @click="chooseLogo">
<image v-if="shop.shop_logo" :src="shop.shop_logo" class="logo-preview" mode="aspectFill"/>
<view v-else class="logo-placeholder">+</view>
@@ -26,16 +26,16 @@
</view>
<view class="form-item">
<text class="label">店铺Banner</text>
<text class="label">机构Banner</text>
<view class="banner-uploader" @click="chooseBanner">
<image v-if="shop.shop_banner" :src="shop.shop_banner" class="banner-preview" mode="aspectFill"/>
<view v-else class="banner-placeholder">点击上传店铺Banner</view>
<view v-else class="banner-placeholder">点击上传机构Banner</view>
</view>
</view>
<view class="form-item">
<text class="label">店铺简介</text>
<textarea class="textarea" v-model="shop.description" placeholder="请输入店铺简介" maxlength="500"/>
<text class="label">机构简介</text>
<textarea class="textarea" v-model="shop.description" placeholder="请输入机构简介" maxlength="500"/>
</view>
</view>
@@ -99,6 +99,7 @@
},
async loadShop() {
if (!this.merchantId) return
try {
const response = await supa
.from('ml_shops')
@@ -180,7 +181,7 @@
async saveShop() {
if (!this.shop.shop_name) {
uni.showToast({ title: '请输入店铺名称', icon: 'none' })
uni.showToast({ title: '请输入机构名称', icon: 'none' })
return
}
@@ -246,7 +247,7 @@
<style>
.shop-edit-page { background-color: #f5f5f5; min-height: 100vh; padding-bottom: 160rpx; }
.section { background-color: #fff; margin-bottom: 20rpx; padding: 30rpx; }
.section-title { font-size: 30rpx; font-weight: bold; color: #333; margin-bottom: 30rpx; padding-bottom: 20rpx; border-bottom: 1rpx solid #f5f5f5; }
.section-title { font-size: 30rpx; font-weight: bold; color: #333; margin-bottom: 30rpx; padding-bottom: 20rpx; border-bottom: 1rpx solid #f5f5f5; padding-left: 16rpx; border-left: 6rpx solid rgb(66, 121, 240); }
.form-item { margin-bottom: 30rpx; }
.label { font-size: 28rpx; color: #333; display: block; margin-bottom: 16rpx; }
.input { height: 72rpx; border: 1rpx solid #e5e5e5; border-radius: 8rpx; padding: 0 20rpx; font-size: 28rpx; }
@@ -256,5 +257,5 @@
.logo-preview, .banner-preview { width: 100%; height: 100%; }
.logo-placeholder, .banner-placeholder { width: 100%; height: 100%; background-color: #f5f5f5; display: flex; align-items: center; justify-content: center; font-size: 40rpx; color: #999; border: 2rpx dashed #ddd; }
.submit-bar { position: fixed; bottom: 0; left: 0; right: 0; padding: 20rpx 30rpx; padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); background-color: #fff; box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.05); }
.submit-btn { height: 88rpx; line-height: 88rpx; text-align: center; font-size: 32rpx; font-weight: bold; border-radius: 44rpx; background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%); color: #fff; }
.submit-btn { height: 88rpx; line-height: 88rpx; text-align: center; font-size: 32rpx; font-weight: bold; border-radius: 44rpx; background: linear-gradient(135deg, rgb(66, 121, 240) 0%, #5856D6 100%); color: #fff; }
</style>