完善医疗项目页面

This commit is contained in:
2026-04-10 10:02:10 +08:00
parent 3304b98bee
commit d5bd898896
186 changed files with 1059 additions and 247 deletions

View File

@@ -0,0 +1,38 @@
<!-- 机构端 - 资质管理页面 -->
<template>
<view class="page">
<!-- #ifdef MP-WEIXIN -->
<view class="detail-navbar">
<view class="detail-navbar-back" @click="uni.navigateBack()">
<text class="back-arrow"></text>
<text class="back-text">返回</text>
</view>
<text class="detail-navbar-title">资质管理</text>
<view style="width: 120rpx;"></view>
</view>
<!-- #endif -->
<view class="content">
<text class="tip">资质管理功能开发中,敬请期待</text>
</view>
</view>
</template>
<script lang="uts">
export default {
data() {
return {}
}
}
</script>
<style>
.page { background-color: #f5f5f5; min-height: 100vh; }
.detail-navbar { display: flex; flex-direction: row; align-items: flex-end; background-color: #ffffff; border-bottom-width: 1rpx; border-bottom-style: solid; border-bottom-color: #eeeeee; box-sizing: border-box; padding-top: var(--status-bar-height); height: calc(88rpx + var(--status-bar-height)); }
.detail-navbar-back { display: flex; flex-direction: row; align-items: center; padding: 0 30rpx; height: 88rpx; width: 120rpx; }
.back-arrow { font-size: 44rpx; color: #333333; line-height: 1; margin-right: 4rpx; }
.back-text { font-size: 28rpx; color: #333333; }
.detail-navbar-title { flex: 1; text-align: center; font-size: 32rpx; font-weight: 600; color: #1a1a1a; height: 88rpx; line-height: 88rpx; }
.content { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 120rpx 40rpx; }
.tip { font-size: 28rpx; color: #999; }
</style>

View File

@@ -156,15 +156,18 @@
async loadLevels() {
const res = await supa.from('ml_member_levels').select('*').order('level_rank', { ascending: true }).execute()
if (res.data != null) {
this.levels = (res.data as any[]).map((item: any) => {
const obj = item as UTSJSONObject
return {
const raw = res.data as any[]
const levels: MemberLevel[] = []
for (let i = 0; i < raw.length; i++) {
const obj = raw[i] as UTSJSONObject
levels.push({
id: obj.getString('id') || '',
name: obj.getString('name') || '',
discount_rate: obj.getNumber('discount_rate') || 1.0,
level_rank: obj.getNumber('level_rank') || 0
} as MemberLevel
})
} as MemberLevel)
}
this.levels = levels
}
},
async loadUsers() {
@@ -467,66 +470,415 @@
</script>
<style>
.members-page { background-color: #f8f9fa; min-height: 100vh; }
/* ===== tabs 横排 ===== */
.tabs { display: flex; flex-direction: row; background: #fff; padding: 20rpx 0; border-bottom: 1rpx solid #eee; }
.tab { flex: 1; text-align: center; font-size: 28rpx; color: #666; }
.tab.active { color: rgb(66, 121, 240); font-weight: bold; }
.members-page {
display: flex;
flex-direction: column;
background-color: #f8f9fa;
min-height: 100vh;
box-sizing: border-box;
}
.list-container { padding: 20rpx; }
.section-card { background: #fff; border-radius: 16rpx; padding: 30rpx; }
/* ===== 卡片头部横排 ===== */
.card-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 30rpx; }
.card-title { font-size: 32rpx; font-weight: bold; }
.add-btn { color: rgb(66, 121, 240); font-size: 26rpx; }
.tabs {
display: flex;
flex-direction: row;
align-items: center;
background: #ffffff;
padding: 0;
border-bottom: 1rpx solid #eeeeee;
box-sizing: border-box;
}
/* ===== 等级列表项横排(左名称+折扣 / 右操作)===== */
.level-item { display: flex; flex-direction: row; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #f5f5f5; padding: 20rpx 0; }
.level-info { display: flex; flex-direction: column; flex: 1; }
.level-name { font-size: 30rpx; color: #333; margin-bottom: 4rpx; }
.level-rate { font-size: 24rpx; color: #FF9500; }
.level-actions { display: flex; flex-direction: row; align-items: center; }
.action-edit { color: rgb(66, 121, 240); font-size: 26rpx; margin-right: 24rpx; }
.action-del { color: #FF3B30; font-size: 26rpx; }
.tab {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 88rpx;
font-size: 28rpx;
color: #666666;
position: relative;
box-sizing: border-box;
}
.search-bar { display: flex; flex-direction: row; align-items: center; padding: 20rpx; background: #fff; margin-bottom: 20rpx; border-radius: 12rpx; }
.search-input { flex: 1; height: 72rpx; background: #f5f5f5; border-radius: 36rpx; padding: 0 30rpx; font-size: 26rpx; }
.search-btn { margin-left: 20rpx; color: rgb(66, 121, 240); line-height: 72rpx; font-size: 28rpx; }
.tab.active {
color: rgb(66, 121, 240);
font-weight: bold;
}
/* ===== 用户列表项横排(左头像 / 中信息 / 右操作)===== */
.user-item { display: flex; flex-direction: row; align-items: center; background: #fff; padding: 24rpx; border-radius: 16rpx; margin-bottom: 20rpx; }
.user-avatar { width: 90rpx; height: 90rpx; border-radius: 45rpx; background: #eee; flex-shrink: 0; }
.user-info { flex: 1; margin-left: 24rpx; display: flex; flex-direction: column; }
/* 姓名行:昵称 + 等级标签横排 */
.user-title-row { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; margin-bottom: 4rpx; }
.user-name { font-size: 30rpx; font-weight: bold; color: #333; margin-right: 10rpx; }
.user-email { font-size: 22rpx; color: #999; margin-bottom: 4rpx; }
.user-phone { font-size: 24rpx; color: #999; }
.user-tier-tag { background: #FF9500; color: #fff; font-size: 20rpx; padding: 2rpx 12rpx; border-radius: 4rpx; }
/* ===== 操作按钮区横排 ===== */
.user-actions { display: flex; flex-direction: row; align-items: center; flex-shrink: 0; margin-left: 16rpx; }
.action-set { font-size: 24rpx; color: rgb(66, 121, 240); padding: 10rpx 16rpx; background-color: #e8f0fe; border-radius: 8rpx; }
.action-set.discount-btn { color: #FF9800; background-color: #FFF8E1; margin-left: 12rpx; }
.tab.active::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 44rpx;
height: 4rpx;
background: rgb(66, 121, 240);
border-radius: 2rpx;
}
/* 弹窗样式 */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; flex-direction: row; align-items: center; justify-content: center; z-index: 999; }
.modal-content { background: #fff; width: 600rpx; border-radius: 24rpx; padding: 40rpx; }
.modal-title { text-align: center; font-size: 34rpx; font-weight: bold; margin-bottom: 30rpx; }
.form-item { margin-bottom: 30rpx; }
.label { font-size: 26rpx; color: #666; margin-bottom: 12rpx; display: block; }
.input { background: #f5f5f5; height: 80rpx; border-radius: 12rpx; padding: 0 20rpx; font-size: 28rpx; }
/* ===== modal 按钮横排 ===== */
.modal-btns { display: flex; flex-direction: row; justify-content: flex-end; margin-top: 40rpx; }
.btn { padding: 16rpx 40rpx; border-radius: 12rpx; font-size: 28rpx; margin-left: 20rpx; }
.btn.cancel { background: #eee; color: #666; }
.btn.confirm { background: rgb(66, 121, 240); color: #fff; }
.list-container {
flex: 1;
height: calc(100vh - 176rpx);
padding: 20rpx;
box-sizing: border-box;
}
/* ===== 等级选择横向排列 ===== */
.tier-options { display: flex; flex-direction: row; flex-wrap: wrap; }
.tier-option { padding: 16rpx 30rpx; background: #f5f5f5; margin: 10rpx; border-radius: 36rpx; font-size: 26rpx; }
.tier-option.selected { background: rgb(66, 121, 240); color: #fff; }
.section-card {
background: #ffffff;
border-radius: 16rpx;
padding: 30rpx;
box-sizing: border-box;
}
.card-header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-bottom: 30rpx;
box-sizing: border-box;
}
.card-title {
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 1.4;
}
.add-btn {
font-size: 26rpx;
color: rgb(66, 121, 240);
line-height: 1.4;
}
.level-list {
display: flex;
flex-direction: column;
}
.level-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 24rpx 0;
border-bottom: 1rpx solid #f5f5f5;
box-sizing: border-box;
}
.level-info {
flex: 1;
display: flex;
flex-direction: column;
margin-right: 20rpx;
box-sizing: border-box;
}
.level-name {
font-size: 30rpx;
color: #333333;
font-weight: 500;
line-height: 1.4;
margin-bottom: 8rpx;
}
.level-rate {
font-size: 24rpx;
color: #ff9500;
line-height: 1.4;
}
.level-actions {
display: flex;
flex-direction: row;
align-items: center;
flex-shrink: 0;
}
.action-edit,
.action-del {
font-size: 24rpx;
line-height: 1.4;
padding: 8rpx 0;
}
.action-edit {
color: rgb(66, 121, 240);
margin-right: 24rpx;
}
.action-del {
color: #ff3b30;
}
.user-list {
display: flex;
flex-direction: column;
}
.empty-tip {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
min-height: 220rpx;
background: #ffffff;
border-radius: 16rpx;
font-size: 28rpx;
color: #999999;
box-sizing: border-box;
}
.user-item {
display: flex;
flex-direction: row;
align-items: center;
background: #ffffff;
padding: 24rpx;
border-radius: 16rpx;
margin-bottom: 20rpx;
box-sizing: border-box;
}
.user-avatar {
width: 90rpx;
height: 90rpx;
border-radius: 45rpx;
background: #eeeeee;
flex-shrink: 0;
}
.user-info {
flex: 1;
display: flex;
flex-direction: column;
margin-left: 24rpx;
margin-right: 20rpx;
box-sizing: border-box;
}
.user-title-row {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
margin-bottom: 8rpx;
}
.user-name {
font-size: 30rpx;
font-weight: bold;
color: #333333;
line-height: 1.4;
margin-right: 12rpx;
}
.user-tier-tag {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 36rpx;
padding: 0 14rpx;
background: #ff9500;
color: #ffffff;
font-size: 20rpx;
border-radius: 18rpx;
line-height: 1;
box-sizing: border-box;
margin-top: 4rpx;
}
.user-email {
font-size: 24rpx;
color: #666666;
line-height: 1.4;
margin-bottom: 6rpx;
}
.user-phone {
font-size: 24rpx;
color: #999999;
line-height: 1.4;
}
.user-actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
flex-shrink: 0;
}
.action-set {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 60rpx;
padding: 0 20rpx;
font-size: 24rpx;
color: rgb(66, 121, 240);
background-color: #e8f0fe;
border-radius: 30rpx;
box-sizing: border-box;
margin-left: 12rpx;
margin-top: 8rpx;
}
.action-set.discount-btn {
color: #ff9800;
background-color: #fff8e1;
}
.search-bar {
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx;
background: #ffffff;
margin-bottom: 20rpx;
border-radius: 12rpx;
box-sizing: border-box;
}
.search-input {
flex: 1;
height: 72rpx;
background: #f5f5f5;
border-radius: 36rpx;
padding: 0 30rpx;
font-size: 26rpx;
box-sizing: border-box;
}
.search-btn {
margin-left: 20rpx;
height: 72rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
color: rgb(66, 121, 240);
font-size: 28rpx;
}
.modal {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
z-index: 999;
padding: 30rpx;
box-sizing: border-box;
}
.modal-content {
width: 600rpx;
max-width: 100%;
background: #ffffff;
border-radius: 24rpx;
padding: 40rpx;
box-sizing: border-box;
}
.modal-title {
text-align: center;
font-size: 34rpx;
font-weight: bold;
color: #333333;
line-height: 1.4;
margin-bottom: 30rpx;
}
.form-item {
display: flex;
flex-direction: column;
margin-bottom: 30rpx;
}
.label {
font-size: 26rpx;
color: #666666;
line-height: 1.4;
margin-bottom: 12rpx;
}
.input {
background: #f5f5f5;
height: 80rpx;
border-radius: 12rpx;
padding: 0 20rpx;
font-size: 28rpx;
box-sizing: border-box;
}
.modal-btns {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
margin-top: 40rpx;
}
.btn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
min-width: 160rpx;
height: 76rpx;
padding: 0 32rpx;
border-radius: 12rpx;
font-size: 28rpx;
box-sizing: border-box;
margin-left: 20rpx;
}
.btn.cancel {
background: #eeeeee;
color: #666666;
}
.btn.confirm {
background: rgb(66, 121, 240);
color: #ffffff;
}
.tier-options {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin: -10rpx;
}
.tier-option {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 16rpx 30rpx;
background: #f5f5f5;
margin: 10rpx;
border-radius: 36rpx;
font-size: 26rpx;
color: #333333;
box-sizing: border-box;
}
.tier-option.selected {
background: rgb(66, 121, 240);
color: #ffffff;
}
</style>

View File

@@ -84,11 +84,7 @@
const session = supa.getSession()
this.merchantId = session?.user?.getString('id') || uni.getStorageSync('user_id') || ''
} catch (e) {}
},
async loadPromotions() {
this.loading = true
this.loadPromotions()
try {
const response = await supa
.from('ml_coupon_templates')

View File

@@ -100,7 +100,12 @@
},
onLoad() {
this.initMerchantId()
// 同步设置 merchantId不用 async 包裹,避免 generator 内 this 绑定异常
try {
const session = supa.getSession()
this.merchantId = session?.user?.getString('id') || uni.getStorageSync('user_id') || ''
} catch (e) {}
this.loadReviews()
},
onShow() {
@@ -108,17 +113,10 @@
},
methods: {
async initMerchantId() {
try {
const session = supa.getSession()
this.merchantId = session?.user?.getString('id') || uni.getStorageSync('user_id') || ''
} catch (e) {}
},
async loadReviews() {
if (!this.merchantId || this.merchantId.split('-').length !== 5) return
if (this.loading) return
this.loading = true
try {
let query = supa
.from('ml_product_reviews')
@@ -127,7 +125,6 @@
.order('created_at', { ascending: false })
.page(this.page)
.limit(this.limit)
const response = await query.execute()
if (response.error != null || !response.data) {
@@ -186,7 +183,8 @@
if (!this.loadingMore && this.hasMore) {
this.loadingMore = true
this.page++
this.loadReviews().then(() => { this.loadingMore = false })
const resetMore = () => { this.loadingMore = false }
this.loadReviews().then(resetMore).catch(resetMore)
}
},
@@ -253,44 +251,334 @@
</script>
<style>
.reviews-page { background-color: #f5f5f5; min-height: 100vh; }
.filter-tabs { display: flex; flex-direction: row; background-color: #fff; padding: 0 20rpx; margin-bottom: 20rpx; }
.filter-tab { flex: 1; text-align: center; padding: 24rpx 0; font-size: 26rpx; color: #666; position: relative; }
.filter-tab.active { color: rgb(66, 121, 240); font-weight: bold; }
.filter-tab.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 40rpx; height: 4rpx; background-color: rgb(66, 121, 240); border-radius: 2rpx; }
.reviews-list { padding: 0 20rpx; height: calc(100vh - 120rpx); }
.loading-container, .empty-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 100rpx 0; }
.empty-icon { font-size: 100rpx; margin-bottom: 20rpx; }
.empty-text, .loading-text { font-size: 28rpx; color: #999; }
.review-card { background-color: #fff; border-radius: 16rpx; margin-bottom: 20rpx; padding: 24rpx; }
.review-header { display: flex; flex-direction: row; align-items: center; margin-bottom: 20rpx; }
.user-avatar { width: 70rpx; height: 70rpx; border-radius: 50%; margin-right: 16rpx; background-color: #f5f5f5; }
.user-info { flex: 1; }
.user-name { font-size: 26rpx; color: #333; font-weight: 500; display: block; margin-bottom: 8rpx; }
.rating { display: flex; flex-direction: row; }
.star { font-size: 22rpx; color: #ddd; margin-right: 4rpx; }
.star.filled { color: #FFB800; }
.review-time { font-size: 22rpx; color: #999; }
.review-product { font-size: 24rpx; color: #666; margin-bottom: 12rpx; }
.review-content { font-size: 26rpx; color: #333; line-height: 1.5; margin-bottom: 16rpx; }
.review-images { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12rpx; margin-bottom: 16rpx; }
.review-image { width: 120rpx; height: 120rpx; border-radius: 8rpx; }
.review-reply { background-color: #f5f5f5; padding: 16rpx; border-radius: 8rpx; margin-top: 16rpx; }
.reply-label { font-size: 24rpx; color: rgb(66, 121, 240); font-weight: 500; display: block; margin-bottom: 8rpx; }
.reply-content { font-size: 24rpx; color: #666; }
.review-actions { margin-top: 16rpx; text-align: right; }
.action-btn { display: inline-block; padding: 12rpx 24rpx; font-size: 24rpx; background-color: #E3F2FD; color: rgb(66, 121, 240); border-radius: 24rpx; }
.load-more { padding: 30rpx 0; text-align: center; }
.load-more-text { font-size: 24rpx; color: #999; }
.modal-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.5); display: flex; align-items: flex-end; justify-content: center; z-index: 1000; }
.modal-content { width: 100%; background-color: #fff; border-radius: 24rpx 24rpx 0 0; padding-bottom: env(safe-area-inset-bottom); }
.modal-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 30rpx; border-bottom: 1rpx solid #f5f5f5; }
.modal-title { font-size: 32rpx; font-weight: bold; color: #333; }
.modal-close { font-size: 44rpx; color: #999; }
.modal-body { padding: 30rpx; }
.reply-input { width: 100%; height: 200rpx; border: 1rpx solid #e5e5e5; border-radius: 8rpx; padding: 20rpx; font-size: 28rpx; box-sizing: border-box; }
.modal-footer { display: flex; flex-direction: row; border-top: 1rpx solid #f5f5f5; }
.modal-btn { flex: 1; height: 88rpx; line-height: 88rpx; text-align: center; font-size: 28rpx; }
.modal-btn.cancel { color: #666; border-right: 1rpx solid #f5f5f5; }
.modal-btn.confirm { color: rgb(66, 121, 240); font-weight: bold; }
</style>
.reviews-page {
display: flex;
flex-direction: column;
background-color: #f5f5f5;
min-height: 100vh;
box-sizing: border-box;
}
.filter-tabs {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background-color: #ffffff;
padding: 0 20rpx;
margin-bottom: 20rpx;
border-bottom: 1rpx solid #f2f2f2;
box-sizing: border-box;
}
.filter-tab {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 88rpx;
font-size: 26rpx;
color: #666666;
position: relative;
box-sizing: border-box;
}
.filter-tab.active {
color: rgb(66, 121, 240);
font-weight: bold;
}
.filter-tab.active::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 44rpx;
height: 4rpx;
background-color: rgb(66, 121, 240);
border-radius: 2rpx;
}
.reviews-list {
flex: 1;
height: calc(100vh - 176rpx);
padding: 0 20rpx 20rpx;
box-sizing: border-box;
}
.loading-container,
.empty-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 0;
box-sizing: border-box;
}
.empty-icon {
font-size: 100rpx;
line-height: 1;
margin-bottom: 20rpx;
}
.empty-text,
.loading-text {
font-size: 28rpx;
color: #999999;
line-height: 1.4;
}
.review-card {
background-color: #ffffff;
border-radius: 16rpx;
margin-bottom: 20rpx;
padding: 24rpx;
box-sizing: border-box;
}
.review-header {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 20rpx;
box-sizing: border-box;
}
.user-avatar {
width: 72rpx;
height: 72rpx;
border-radius: 36rpx;
margin-right: 16rpx;
background-color: #f5f5f5;
flex-shrink: 0;
}
.user-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
box-sizing: border-box;
}
.user-name {
font-size: 26rpx;
color: #333333;
font-weight: 500;
line-height: 1.4;
margin-bottom: 8rpx;
}
.rating {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: nowrap;
}
.star {
font-size: 22rpx;
line-height: 1;
color: #dddddd;
margin-right: 4rpx;
}
.star.filled {
color: #ffb800;
}
.review-time {
margin-left: 16rpx;
font-size: 22rpx;
color: #999999;
line-height: 1.4;
text-align: right;
flex-shrink: 0;
}
.review-product {
margin-bottom: 12rpx;
}
.product-name {
font-size: 24rpx;
color: #666666;
line-height: 1.4;
}
.review-content {
font-size: 26rpx;
color: #333333;
line-height: 1.6;
margin-bottom: 16rpx;
}
.review-images {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-bottom: 16rpx;
}
.review-image {
width: 120rpx;
height: 120rpx;
border-radius: 8rpx;
margin-right: 12rpx;
margin-bottom: 12rpx;
background-color: #f5f5f5;
}
.review-reply {
display: flex;
flex-direction: column;
background-color: #f7f8fa;
padding: 18rpx 20rpx;
border-radius: 10rpx;
margin-top: 16rpx;
box-sizing: border-box;
}
.reply-label {
font-size: 24rpx;
color: rgb(66, 121, 240);
font-weight: 500;
line-height: 1.4;
margin-bottom: 8rpx;
}
.reply-content {
font-size: 24rpx;
color: #666666;
line-height: 1.6;
}
.review-actions {
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
margin-top: 16rpx;
}
.action-btn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 12rpx 24rpx;
font-size: 24rpx;
line-height: 1.4;
background-color: #e8f0fe;
color: rgb(66, 121, 240);
border-radius: 24rpx;
box-sizing: border-box;
}
.load-more {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 30rpx 0;
}
.load-more-text {
font-size: 24rpx;
color: #999999;
line-height: 1.4;
}
.modal-mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: center;
z-index: 1000;
}
.modal-content {
width: 100%;
background-color: #ffffff;
border-radius: 24rpx 24rpx 0 0;
padding-bottom: env(safe-area-inset-bottom);
box-sizing: border-box;
}
.modal-header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1rpx solid #f2f2f2;
box-sizing: border-box;
}
.modal-title {
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 1.4;
}
.modal-close {
font-size: 44rpx;
color: #999999;
line-height: 1;
}
.modal-body {
padding: 30rpx;
box-sizing: border-box;
}
.reply-input {
width: 100%;
height: 220rpx;
border: 1rpx solid #e5e5e5;
border-radius: 12rpx;
padding: 20rpx;
font-size: 28rpx;
line-height: 1.6;
box-sizing: border-box;
background-color: #ffffff;
}
.modal-footer {
display: flex;
flex-direction: row;
align-items: center;
border-top: 1rpx solid #f2f2f2;
}
.modal-btn {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 88rpx;
font-size: 28rpx;
box-sizing: border-box;
}
.modal-btn.cancel {
color: #666666;
border-right: 1rpx solid #f2f2f2;
}
.modal-btn.confirm {
color: rgb(66, 121, 240);
font-weight: bold;
}
</style>

View File

@@ -0,0 +1,71 @@
<!-- 机构端 - 搜索页面 -->
<template>
<view class="page">
<!-- #ifdef MP-WEIXIN -->
<view class="detail-navbar">
<view class="detail-navbar-back" @click="uni.navigateBack()">
<text class="back-arrow"></text>
<text class="back-text">返回</text>
</view>
<text class="detail-navbar-title">搜索</text>
<view style="width: 120rpx;"></view>
</view>
<!-- #endif -->
<view class="search-bar-row">
<input
class="search-input"
type="text"
placeholder="搜索商品、订单、用户…"
:value="keyword"
@input="onInput"
@confirm="doSearch"
/>
<view class="search-btn" @click="doSearch">
<text class="search-btn-text">搜索</text>
</view>
</view>
<view class="content" v-if="!searched">
<text class="tip">输入关键字开始搜索</text>
</view>
<view class="content" v-else>
<text class="tip">暂无搜索结果</text>
</view>
</view>
</template>
<script lang="uts">
export default {
data() {
return {
keyword: '' as string,
searched: false as boolean
}
},
methods: {
onInput(e : InputEvent) {
this.keyword = e.detail.value
},
doSearch() {
if (!this.keyword.trim()) return
this.searched = true
}
}
}
</script>
<style>
.page { background-color: #f5f5f5; min-height: 100vh; }
.detail-navbar { display: flex; flex-direction: row; align-items: flex-end; background-color: #ffffff; border-bottom-width: 1rpx; border-bottom-style: solid; border-bottom-color: #eeeeee; box-sizing: border-box; padding-top: var(--status-bar-height); height: calc(88rpx + var(--status-bar-height)); }
.detail-navbar-back { display: flex; flex-direction: row; align-items: center; padding: 0 30rpx; height: 88rpx; width: 120rpx; }
.back-arrow { font-size: 44rpx; color: #333333; line-height: 1; margin-right: 4rpx; }
.back-text { font-size: 28rpx; color: #333333; }
.detail-navbar-title { flex: 1; text-align: center; font-size: 32rpx; font-weight: 600; color: #1a1a1a; height: 88rpx; line-height: 88rpx; }
.search-bar-row { display: flex; flex-direction: row; align-items: center; background-color: #ffffff; padding: 20rpx 30rpx; margin-bottom: 20rpx; }
.search-input { flex: 1; height: 72rpx; background-color: #f5f5f5; border-radius: 36rpx; padding: 0 30rpx; font-size: 28rpx; }
.search-btn { margin-left: 20rpx; padding: 0 30rpx; height: 72rpx; line-height: 72rpx; background-color: rgb(66, 121, 240); border-radius: 36rpx; }
.search-btn-text { font-size: 28rpx; color: #ffffff; }
.content { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 120rpx 40rpx; }
.tip { font-size: 28rpx; color: #999; }
</style>

View File

@@ -1,117 +1,39 @@
VM12683 vendor.js:6839 GET http://119.146.131.237:9126/rest/v1/ml_shops?select=*&limit=1&merchant_id=eq.demo-merchant-001 400 (Bad Request)(env: Windows,mp,1.06.2504030; lib: 3.14.2)
(anonymous) @ VM12683 vendor.js:6839
invokeApi @ VM12683 vendor.js:6217
promiseApi @ VM12683 vendor.js:6715
(anonymous) @ VM12746 ak-req.js:250
doOnce @ VM12746 ak-req.js:248
_loop$ @ VM12746 ak-req.js:310
s @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
s @ VM12687 regeneratorRuntime.js:1
_ @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
fulfilled @ VM12683 vendor.js:9601
Promise.then (async)
step @ VM12683 vendor.js:9614
(anonymous) @ VM12683 vendor.js:9616
__awaiter @ VM12683 vendor.js:9598
request @ VM12746 ak-req.js:177
_callee19$ @ VM12684 aksupa.js:1838
s @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12683 vendor.js:9616
__awaiter @ VM12683 vendor.js:9598
requestWithAutoRefresh @ VM12684 aksupa.js:1832
_callee11$ @ VM12684 aksupa.js:1492
s @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12683 vendor.js:9616
__awaiter @ VM12683 vendor.js:9598
select @ VM12684 aksupa.js:1425
_callee$ @ VM12684 aksupa.js:715
s @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12683 vendor.js:9616
__awaiter @ VM12683 vendor.js:9598
execute @ VM12684 aksupa.js:691
_callee2$ @ shop-edit.uvue:108
s @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12683 vendor.js:9616
__awaiter @ VM12683 vendor.js:9598
loadShop @ shop-edit.uvue:101
_callee$ @ shop-edit.uvue:95
s @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12687 regeneratorRuntime.js:1
(anonymous) @ VM12683 vendor.js:9616
__awaiter @ VM12683 vendor.js:9598
initMerchantId @ shop-edit.uvue:86
onLoad @ shop-edit.uvue:82
callWithErrorHandling @ VM12683 vendor.js:1733
callWithAsyncErrorHandling @ VM12683 vendor.js:1740
hook.__weh.hook.__weh @ VM12683 vendor.js:2725
invokeArrayFns @ VM12683 vendor.js:259
callHook @ VM12683 vendor.js:8827
methods.onLoad @ VM12683 vendor.js:9367
Show 30 more frames
Error: MiniProgramError
{"errMsg":"navigateTo:fail page \"pages/mall/merchant/health-management\" is not found"}
at Object.errorReport (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at Function.thirdErrorReport (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at Object.thirdErrorReport (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at i (VM12659 WASubContext.js:1)
at Object.cb (VM12659 WASubContext.js:1)
at X._privEmit (VM12659 WASubContext.js:1)
at X.emit (VM12659 WASubContext.js:1)
at VM12659 WASubContext.js:1
at n (VM12659 WASubContext.js:1)
at He (VM12659 WASubContext.js:1)(env: Windows,mp,1.06.2504030; lib: 3.14.2)
VM12683 vendor.js:7499 {reason: {…}, promise: Promise}(env: Windows,mp,1.06.2504030; lib: 3.14.2)
onError2 @ VM12683 vendor.js:7499
(anonymous) @ VM12683 vendor.js:6764
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"SocketTask.send:fail SocketTask.readyState is not OPEN"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at WAServiceMainContext.js?t=wechat&v=3.14.2:1
at a (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at ze (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at Object.He (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at ae (WAServiceMainContext.js?t=wechat&v=3.14.2:1)(env: Windows,mp,1.06.2504030; lib: 3.14.2)
Error: MiniProgramError
{"errMsg":"navigateTo:fail page \"pages/mall/merchant/ai-consultation\" is not found"}
at Object.errorReport (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at Function.thirdErrorReport (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at Object.thirdErrorReport (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at i (VM12659 WASubContext.js:1)
at Object.cb (VM12659 WASubContext.js:1)
at X._privEmit (VM12659 WASubContext.js:1)
at X.emit (VM12659 WASubContext.js:1)
at VM12659 WASubContext.js:1
at n (VM12659 WASubContext.js:1)
at He (VM12659 WASubContext.js:1)(env: Windows,mp,1.06.2504030; lib: 3.14.2)
VM12683 vendor.js:7499 {reason: {…}, promise: Promise}(env: Windows,mp,1.06.2504030; lib: 3.14.2)
onError2 @ VM12683 vendor.js:7499
(anonymous) @ VM12683 vendor.js:6764
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"SocketTask.send:fail SocketTask.readyState is not OPEN"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at WAServiceMainContext.js?t=wechat&v=3.14.2:1
at a (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at ze (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at Object.He (WAServiceMainContext.js?t=wechat&v=3.14.2:1)
at ae (WAServiceMainContext.js?t=wechat&v=3.14.2:1)(env: Windows,mp,1.06.2504030; lib: 3.14.2)
mp.esm.js:126 TypeError: this.loadReviews is not a function
at Proxy.onShow (reviews.uvue:107)
at callWithErrorHandling (vue.runtime.esm.js:1356)
at callWithAsyncErrorHandling (vue.runtime.esm.js:1363)
at Array.hook.__weh.hook.__weh (vue.runtime.esm.js:2461)
at invokeArrayFns (uni-shared.es.js:469)
at Proxy.callHook (uni.mp.esm.js:944)
at ai.mpOptions.<computed> [as onShow] (uni.mp.esm.js:984)
at ai.<anonymous> (VM16334 WASubContext.js:1)
at ai.s.__callPageLifeTime__ (VM16334 WASubContext.js:1)
at VM16334 WASubContext.js:1(env: Windows,mp,1.06.2504030; lib: 3.14.2)
onError2 @ mp.esm.js:126
callWithErrorHandling @ vue.runtime.esm.js:1356
callWithAsyncErrorHandling @ vue.runtime.esm.js:1363
hook.__weh.hook.__weh @ vue.runtime.esm.js:2461
invokeArrayFns @ uni-shared.es.js:469
callHook @ uni.mp.esm.js:944
errorHandler @ vue.runtime.esm.js:5331
callWithErrorHandling @ vue.runtime.esm.js:1356
handleError @ vue.runtime.esm.js:1396
callWithErrorHandling @ vue.runtime.esm.js:1358
callWithAsyncErrorHandling @ vue.runtime.esm.js:1363
hook.__weh.hook.__weh @ vue.runtime.esm.js:2461
invokeArrayFns @ uni-shared.es.js:469
callHook @ uni.mp.esm.js:944
mpOptions.<computed> @ uni.mp.esm.js:984
TypeError: this.loadReviews is not a function
at Proxy._callee$ (reviews.uvue:116)
at s (regeneratorRuntime.js?forceSync=true:1)
at Generator.<anonymous> (regeneratorRuntime.js?forceSync=true:1)
at Generator.next (regeneratorRuntime.js?forceSync=true:1)
at tslib.es6.js:76
at new Promise (<anonymous>)
at Object.__awaiter (tslib.es6.js:72)
at Proxy.initMerchantId (reviews.uvue:111)
at Proxy.onLoad (reviews.uvue:103)
at callWithErrorHandling (vue.runtime.esm.js:1356)(env: Windows,mp,1.06.2504030; lib: 3.14.2)
mp.esm.js:126 {reason: TypeError: this.loadReviews is not a function
at Proxy._callee$ (weapp:///pages/mall/merchant/r…, promise: Promise}(env: Windows,mp,1.06.2504030; lib: 3.14.2)