Kaynağa Gözat

```
feat(video-rights): 添加视频权益订单功能

- 新增视频权益订单确认页面 (videoRightsOrderInfo)
- 新增视频权益提交订单页面 (videoRightsSubmitOrder)
- 在首页导航中添加视频权益入口,替换原有空链接
- 更新页面配置文件,注册新页面路由
- 在视频权益详情页添加跳转到订单提交页面的按钮
- 修复充电站点详情页地理位置参数可能为空的问题
- 更新 TypeScript 类型定义文件,包含新的页面路径
```

zouzexu 6 gün önce
ebeveyn
işleme
9cfae656dd

+ 16 - 0
src/pages.json

@@ -492,6 +492,22 @@
           "style": {
             "navigationBarTitleText": "详情"
           }
+        },
+        {
+          "path": "videoRightsOrderInfo/videoRightsOrderInfo",
+          "name": "video-rights-order-info",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "订单确认"
+          }
+        },
+        {
+          "path": "videoRightsSubmitOrder/videoRightsSubmitOrder",
+          "name": "video-rights-submit-order",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "订单确认"
+          }
         }
       ]
     }

+ 2 - 2
src/pages/index/index.vue

@@ -56,9 +56,9 @@ onReachBottom(() => {
 const navList = computed(() => {
   const list = [
     { icon: `${StaticUrl}/xsb.png`, title: '星闪豹', name: 'xsb-homeTabbar', show: true },
-    { icon: `${StaticUrl}/smqjh-index-cd.png`, title: '充电', name: 'charge-index', show: true }, // !isOnlineAudit.value
+    { icon: `${StaticUrl}/smqjh-index-cd.png`, title: '充电', name: 'charge-index', show: true },
     { icon: `${StaticUrl}/smqjh-sp.png`, title: '电影演出', name: 'film-index', show: true },
-    { icon: `${StaticUrl}/smqjh-vip.png`, title: '视频权益', name: '', show: !isOnlineAudit.value },
+    { icon: `${StaticUrl}/smqjh-vip.png`, title: '视频权益', name: 'video-rights-tabbar', show: true },
     { icon: `${StaticUrl}/smqjh-diancan.png`, title: '大牌点餐', name: '', show: !isOnlineAudit.value },
     { icon: `${StaticUrl}/smqjh-jiayou.png`, title: '加油', name: '', show: !isOnlineAudit.value },
     { icon: `${StaticUrl}/smqjh-jiudian.png`, title: '酒店民宿', name: '', show: !isOnlineAudit.value },

+ 1 - 1
src/subPack-charge/chargeSiteDetail/chargeSiteDetail.vue

@@ -30,7 +30,7 @@ onMounted(() => {
 const stationDetail = ref<Api.chargeStationDetail>()
 async function getStationDetail() {
   useGlobalLoading().loading({})
-  const res = await Apis.charge.detail({ data: { stationId: stationId.value, latitude: Location.value.latitude, longitude: Location.value.longitude } })
+  const res = await Apis.charge.detail({ data: { stationId: stationId.value, latitude: Location.value.latitude || 0, longitude: Location.value.longitude || 0 } })
   stationDetail.value = res.data
   useGlobalLoading().close()
 }

+ 3 - 2
src/subPack-videoRights/videoRightsDetail/videoRightsDetail.vue

@@ -1,5 +1,6 @@
 <script setup lang="ts">
 import { StaticUrl } from '@/config'
+import router from '@/router'
 
 definePage({
   name: 'video-rights-detail',
@@ -84,9 +85,9 @@ definePage({
       </view>
     </view>
     <view class="fixed bottom-0 h-174rpx w-full border-[1rpx_solid_#EEEEEE] bg-#FFF px-24rpx">
-      <view class="mt-10rpx h-80rpx w-702rpx rounded-46rpx bg-#9ED605 text-center text-#FFF line-height-[80rpx]">
+      <wd-button custom-class="w-702rpx mt-10rpx" block size="large" @click="router.push({ name: 'video-rights-submit-order' })">
         立即充值
-      </view>
+      </wd-button>
     </view>
   </view>
 </template>

+ 93 - 0
src/subPack-videoRights/videoRightsOrderInfo/videoRightsOrderInfo.vue

@@ -0,0 +1,93 @@
+<script setup lang="ts">
+import { StaticUrl } from '@/config'
+import router from '@/router'
+
+definePage({
+  name: 'video-rights-order-info',
+  islogin: false,
+  style: {
+    navigationBarTitleText: '订单确认',
+  },
+})
+</script>
+
+<template>
+  <view class="video-rights-order-info-page">
+    <view class="box-border px24rpx">
+      <view class="h-22rpx" />
+      <view class="flex items-center justify-center gap-16rpx">
+        <image class="h-40rpx w-40rpx" :src="`${StaticUrl}/videoRight-err.png`" />
+        <view class="text-32rpx text-#FF4D3A font-bold">
+          充值失败
+        </view>
+      </view>
+      <view class="flex items-center justify-center gap-16rpx">
+        <image class="h-40rpx w-40rpx" :src="`${StaticUrl}/videoRight-right.png`" />
+        <view class="text-32rpx text-#52C41A font-bold">
+          充值成功
+        </view>
+      </view>
+      <view class="mt-20rpx rounded-16rpx bg-#FFF p-24rpx">
+        <view class="flex items-center gap-20rpx">
+          <view class="h-160rpx w-160rpx">
+            image
+          </view>
+          <view>
+            <view class="text-32rpx font-bold">
+              网易云黑胶VIP月卡
+            </view>
+            <view class="mt-20rpx text-22rpx">
+              ×1
+            </view>
+          </view>
+        </view>
+        <view class="mt-26rpx h-2rpx w-full bg-#F0F0F0" />
+        <view class="mt-24rpx flex items-center justify-between text-28rpx">
+          <view>商品总价</view>
+          <view>¥18</view>
+        </view>
+        <view class="mt-24rpx flex items-center justify-between text-28rpx">
+          <view>已支付</view>
+          <view class="text-#FF4A39">
+            ¥18
+          </view>
+        </view>
+        <view class="mt-24rpx flex items-center justify-between text-28rpx">
+          <view>积分抵扣</view>
+          <view class="text-#FF4A39">
+            -18000
+          </view>
+        </view>
+        <view class="mt-26rpx h-2rpx w-full bg-#F0F0F0" />
+        <view class="mt-24rpx text-22rpx">
+          充值账号:18955487213
+        </view>
+      </view>
+      <view class="mt-20rpx rounded-16rpx bg-#FFF p-24rpx">
+        <view class="flex items-center justify-between">
+          <view class="text-28rpx text-#AAA">
+            订单编号
+          </view>
+          <view class="text-28rpx font-bold">
+            XN123458625484359845
+          </view>
+        </view>
+        <view class="mt-28rpx flex items-center justify-between">
+          <view class="text-28rpx text-#AAA">
+            订单编号
+          </view>
+          <view class="text-28rpx font-bold">
+            XN123458625484359845
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="fixed bottom-0 h-174rpx w-full border-[1rpx_solid_#EEEEEE] bg-#FFF px-24rpx">
+      <wd-button custom-class="w-702rpx mt-10rpx" block size="large" @click="router.back()">
+        返回
+      </wd-button>
+    </view>
+  </view>
+</template>
+
+<style lang="scss" scoped></style>

+ 113 - 0
src/subPack-videoRights/videoRightsSubmitOrder/videoRightsSubmitOrder.vue

@@ -0,0 +1,113 @@
+<script setup lang="ts">
+import { StaticUrl } from '@/config'
+import router from '@/router'
+
+definePage({
+  name: 'video-rights-submit-order',
+  islogin: false,
+  style: {
+    navigationBarTitleText: '订单确认',
+  },
+})
+</script>
+
+<template>
+  <view class="video-rights-submit-order-page">
+    <view class="box-border px24rpx">
+      <view class="mt-20rpx flex items-center gap-20rpx rounded-16rpx bg-#FFF p-24rpx">
+        <view class="h-160rpx w-160rpx">
+          image
+        </view>
+        <view>
+          <view class="text-32rpx font-bold">
+            网易云黑胶VIP月卡
+          </view>
+          <view class="mt-20rpx text-#FF4D3A">
+            <text class="text-22rpx font-500">
+              ¥
+            </text>
+            <text class="text-36rpx font-800">
+              18
+            </text>
+          </view>
+        </view>
+      </view>
+      <view class="mt-20rpx gap-20rpx rounded-16rpx bg-#FFF p-24rpx">
+        <view class="text-28rpx font-bold">
+          我的积分余额
+        </view>
+        <view class="mt-24rpx flex items-center gap-28rpx">
+          <view class="flex items-center gap-12rpx">
+            <text class="text-40rpx text-#9ED605 font-bold">
+              5000
+            </text>
+            <text class="text-24rpx">
+              积分
+            </text>
+          </view>
+          <image class="h-48rpx w-48rpx" :src="`${StaticUrl}/charge-acc.png`" />
+          <view class="flex items-center gap-12rpx">
+            <text class="text-40rpx text-#9ED605 font-bold">
+              50
+            </text>
+            <text class="text-24rpx">
+              元
+            </text>
+          </view>
+        </view>
+      </view>
+      <view class="mt-20rpx gap-20rpx rounded-16rpx bg-#FFF p-24rpx">
+        <view class="flex items-center gap-20rpx">
+          <view class="text-28rpx font-bold">
+            充值账户
+          </view>
+          <view class="flex items-center gap-8rpx">
+            <wd-icon name="warning" size="14px" color="#FF4A39 " />
+            <text class="text-24rpx text-#AAA">
+              请确认账号无误,充值成功后不支持退款
+            </text>
+          </view>
+        </view>
+        <view class="mt-24rpx flex items-center gap-20rpx">
+          <view class="rounded-26rpx bg-#9ED605 px24rpx py6rpx text-28rpx text-#FFF">
+            手机号码
+          </view>
+          <view class="rounded-26rpx bg-#F9F9F9 px24rpx py6rpx text-28rpx text-#AAA">
+            QQ号码
+          </view>
+        </view>
+        <view class="mt-32rpx rounded-16rpx bg-#F9F9F9 p-24rpx">
+          <input
+            placeholder="请输入您的充值账户"
+            placeholder-class="text-24rpx text-#AAA"
+          >
+        </view>
+      </view>
+    </view>
+    <view class="fixed bottom-0 h-174rpx w-full border-[1rpx_solid_#EEEEEE] bg-#FFF px-24rpx">
+      <view class="mt-20rpx w-702rpx flex items-center justify-between">
+        <view class="flex items-center gap-6rpx">
+          <view class="text-24rpx text-#AAA">
+            共1件
+          </view>
+          <view class="text-24rpx">
+            合计
+          </view>
+          <view class="text-#FF4D3A">
+            <text class="text-22rpx font-500">
+              ¥
+            </text>
+            <text class="text-32rpx font-bold">
+              18
+            </text>
+          </view>
+        </view>
+        <wd-button @click="router.push({ name: 'video-rights-order-info' })">
+          立即充值
+        </wd-button>
+      </view>
+    </view>
+  </view>
+</template>
+
+<style lang="scss" scoped></style>

+ 3 - 1
src/uni-pages.d.ts

@@ -45,7 +45,9 @@ interface NavigateToOptions {
        "/subPack-charge/chargeStart/chargeStart" |
        "/subPack-charge/index/index" |
        "/subPack-videoRights/commonTab/index" |
-       "/subPack-videoRights/videoRightsDetail/videoRightsDetail";
+       "/subPack-videoRights/videoRightsDetail/videoRightsDetail" |
+       "/subPack-videoRights/videoRightsOrderInfo/videoRightsOrderInfo" |
+       "/subPack-videoRights/videoRightsSubmitOrder/videoRightsSubmitOrder";
 }
 interface RedirectToOptions extends NavigateToOptions {}