postInformation.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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/merchantCenters/releaseProduct'
  48. })
  49. }
  50. const handleTemplatePublish = () => {
  51. uni.navigateTo({
  52. url: '/pages/merchantCenters/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. font-weight: bold;
  71. color: #333;
  72. line-height: 50rpx;
  73. margin-bottom: 12rpx;
  74. }
  75. .sub-title {
  76. display: block;
  77. font-size: 28rpx;
  78. color: #666;
  79. line-height: 50rpx;
  80. }
  81. /* 发布选项 */
  82. .publish-options {
  83. display: flex;
  84. flex-direction: column;
  85. gap: 24rpx;
  86. }
  87. .option-card {
  88. background: #F9F7F0;
  89. border-radius: 12rpx;
  90. padding: 32rpx;
  91. }
  92. .option-header {
  93. display: flex;
  94. justify-content: space-between;
  95. margin-bottom: 20rpx;
  96. }
  97. .icon-text-wrapper {
  98. display: flex;
  99. gap: 20rpx;
  100. }
  101. .option-icon {
  102. width: 116rpx;
  103. }
  104. .option-title {
  105. font-size: 32rpx;
  106. color: #333;
  107. font-weight: bold;
  108. }
  109. .option-description {
  110. display: block;
  111. font-size: 24rpx;
  112. color: #666666;
  113. line-height: 36rpx;
  114. margin-bottom: 24rpx;
  115. }
  116. .publish-button {
  117. background: #F8C008;
  118. border: none;
  119. border-radius: 16rpx;
  120. color: #333333;
  121. font-size: 32rpx;
  122. height: 80rpx;
  123. line-height: 80rpx;
  124. width: 100%;
  125. text-align: center;
  126. }
  127. .publish-button:active {
  128. background: #ffb300;
  129. transform: scale(0.98);
  130. }
  131. </style>