| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <template>
- <view class="container">
- <view class="header">
- <text class="icon">🏪</text>
- <text class="title">服务商中心</text>
- </view>
- <view class="info-card" v-if="vendorInfoData">
- <view class="info-row">
- <text class="info-label">服务商类型</text>
- <text class="info-value">{{ getTypeLabel(vendorInfoData.vendorType) }}</text>
- </view>
- <view class="info-row">
- <text class="info-label">真实姓名</text>
- <text class="info-value">{{ vendorInfoData.realName || '未设置' }}</text>
- </view>
- <view class="info-row">
- <text class="info-label">联系电话</text>
- <text class="info-value">{{ vendorInfoData.phone || '未设置' }}</text>
- </view>
- </view>
- <view class="menu-list">
- <view class="menu-item" @click="goToProducts">
- <text>📦 商品管理</text>
- <text class="arrow">›</text>
- </view>
- <view class="menu-item" @click="goToOrders">
- <text>📋 订单管理</text>
- <text class="arrow">›</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { vendorInfo } from '../../utils/api'
- export default {
- data() {
- return {
- vendorTypes: [
- { value: 'planner', label: '成长规划师' },
- { value: 'activity_provider', label: '活动提供商' },
- { value: 'product_supplier', label: '商品供应商' }
- ],
- vendorInfoData: null
- }
- },
- onLoad() {
- this.loadVendorInfo()
- },
- methods: {
- getTypeLabel(value) {
- const item = this.vendorTypes.find(t => t.value === value)
- return item ? item.label : value
- },
- async loadVendorInfo() {
- try {
- const res = await vendorInfo()
- this.vendorInfoData = res.data
- } catch (e) {
- // handled by api.js
- }
- },
- goToProducts() {
- uni.navigateTo({ url: '/pages/vendor/products/products' })
- },
- goToOrders() {
- uni.navigateTo({ url: '/pages/vendor/orders/orders' })
- }
- }
- }
- </script>
- <style>
- .container {
- padding: 30rpx;
- background: #f8f8f8;
- min-height: 100vh;
- }
- .header {
- text-align: center;
- padding: 40rpx 0;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .icon {
- font-size: 100rpx;
- margin-bottom: 20rpx;
- }
- .title {
- font-size: 36rpx;
- font-weight: bold;
- color: #333;
- }
- .info-card {
- background: #fff;
- border-radius: 20rpx;
- padding: 30rpx;
- margin-bottom: 30rpx;
- }
- .info-row {
- display: flex;
- justify-content: space-between;
- padding: 15rpx 0;
- border-bottom: 2rpx solid #f5f5f5;
- }
- .info-row:last-child {
- border-bottom: none;
- }
- .info-label {
- font-size: 28rpx;
- color: #999;
- }
- .info-value {
- font-size: 28rpx;
- color: #333;
- }
- .menu-list {
- background: #fff;
- border-radius: 20rpx;
- }
- .menu-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx;
- border-bottom: 2rpx solid #f5f5f5;
- font-size: 30rpx;
- }
- .menu-item:last-child {
- border-bottom: none;
- }
- .arrow {
- color: #ccc;
- font-size: 36rpx;
- }
- .coming-soon {
- text-align: center;
- padding: 60rpx;
- color: #ccc;
- font-size: 26rpx;
- }
- </style>
|