postInformation.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view class="publish-type-page">
  3. <!-- 顶部标题区域 -->
  4. <view class="page-header">
  5. <text class="main-title">选择要发布类型</text>
  6. <text class="sub-title">请根据您的需求选择合适的发布类型</text>
  7. </view>
  8. <!-- 发布选项区域 -->
  9. <view class="publish-options">
  10. <!-- 手动填写选项 -->
  11. <view class="option-card" @click="setActiveOption('manual')">
  12. <view class="option-header">
  13. <view class="icon-text-wrapper">
  14. <image class="option-icon" src="@/static/images/hand.png" mode="widthFix"></image>
  15. <view>
  16. <text class="option-title">手动填写</text>
  17. <text class="option-description">适合发布全新商品或定制珠宝。您可以详细设置商品分类、属性、价格和描述。</text>
  18. </view>
  19. </view>
  20. </view>
  21. <button class="publish-button" @click="handleManualPublish">点击发布</button>
  22. </view>
  23. <!-- 产品中心选择选项 -->
  24. <view class="option-card" @click="setActiveOption('template')">
  25. <view class="option-header">
  26. <view class="icon-text-wrapper">
  27. <image class="option-icon" src="@/static/images/product.png" mode="widthFix"></image>
  28. <view>
  29. <text class="option-title">从产品中心选择</text>
  30. <text class="option-description">从已有产品库中选择商品模板,快速发布相似商品。适合发布系列产品或标准款珠宝。</text>
  31. </view>
  32. </view>
  33. </view>
  34. <button class="publish-button" @click.stop="handleTemplatePublish">点击发布</button>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script setup>
  40. import { ref } from 'vue'
  41. const activeOption = ref('manual')
  42. const setActiveOption = (option) => {
  43. activeOption.value = option
  44. }
  45. const handleManualPublish = () => {
  46. uni.navigateTo({
  47. url: '/pages/merchantCenter/releaseProduct'
  48. })
  49. }
  50. const handleTemplatePublish = () => {
  51. uni.navigateTo({
  52. url: '/pages/merchantCenter/productCenter'
  53. })
  54. }
  55. </script>
  56. <style scoped>
  57. .publish-type-page {
  58. min-height: 100vh;
  59. background: #ffffff;
  60. padding: 100rpx 32rpx;
  61. }
  62. /* 页面标题 */
  63. .page-header {
  64. text-align: center;
  65. margin-bottom: 60rpx;
  66. }
  67. .main-title {
  68. display: block;
  69. font-size: 36rpx;
  70. color: #333;
  71. line-height: 50rpx;
  72. margin-bottom: 12rpx;
  73. }
  74. .sub-title {
  75. display: block;
  76. font-size: 28rpx;
  77. color: #666;
  78. line-height: 50rpx;
  79. }
  80. /* 发布选项 */
  81. .publish-options {
  82. display: flex;
  83. flex-direction: column;
  84. gap: 24rpx;
  85. }
  86. .option-card {
  87. background: #F9F7F0;
  88. border-radius: 12rpx;
  89. padding: 32rpx;
  90. }
  91. .option-header {
  92. display: flex;
  93. justify-content: space-between;
  94. margin-bottom: 20rpx;
  95. }
  96. .icon-text-wrapper {
  97. display: flex;
  98. gap: 20rpx;
  99. }
  100. .option-icon {
  101. width: 96rpx;
  102. }
  103. .option-title {
  104. font-size: 32rpx;
  105. color: #333;
  106. }
  107. .option-description {
  108. display: block;
  109. font-size: 24rpx;
  110. color: #666666;
  111. line-height: 36rpx;
  112. margin-bottom: 24rpx;
  113. }
  114. .publish-button {
  115. background: #F8C008;
  116. border: none;
  117. border-radius: 16rpx;
  118. color: #333333;
  119. font-size: 32rpx;
  120. height: 80rpx;
  121. line-height: 80rpx;
  122. width: 100%;
  123. text-align: center;
  124. }
  125. .publish-button:active {
  126. background: #ffb300;
  127. transform: scale(0.98);
  128. }
  129. </style>