Selaa lähdekoodia

```
feat(charge): 新增购券中心页面并优化用户界面

- 添加 chargeVoucher 页面到路由配置
- 在 manifest.json 和 pages.json 中注册新页面
- 更新 uni-pages.d.ts 类型定义文件

config: 更新开发环境服务器地址配置

- 注释掉邓同学的开发服务器地址
- 启用公共测试服务器地址

refactor(charge): 重构充电模块首页UI布局

- 优化用户信息显示区域,添加渠道名称展示
- 重构钱包模块,区分企业积分和平台券
- 更新订单列表和购券中心入口样式
- 添加退还功能按钮

fix(videoRights): 修复视频权益产品名称显示逻辑

- 当本地产品名称存在时优先显示本地名称
- 否则回退到原始产品名称
```

zouzexu 1 viikko sitten
vanhempi
commit
a4e5f84ee9

+ 2 - 2
src/config/index.ts

@@ -6,12 +6,12 @@ const mapEnvVersion = {
   // develop: 'http://192.168.1.101:8080',
   // develop: 'http://192.168.0.157:8080',
   // develop: 'http://192.168.1.253:8080',
-  develop: 'http://192.168.0.19:8080', // 邓
+  // develop: 'http://192.168.0.19:8080', // 邓
   // develop: 'http://192.168.0.217:8080', // 黄
   // develop: 'http://192.168.0.11:8080', // 王
   // develop: 'http://192.168.1.89:8080', // 田
   // develop: 'http://74949mkfh190.vicp.fun', // 付
-  // develop: 'http://47.109.84.152:8081',
+  develop: 'http://47.109.84.152:8081',
   // develop: 'https://5ed0f7cc.r9.vip.cpolar.cn',
   // develop: 'https://smqjh.api.zswlgz.com',
   /**

+ 9 - 0
src/pages.json

@@ -461,6 +461,15 @@
             "navigationStyle": "custom"
           }
         },
+        {
+          "path": "chargeVoucher/chargeVoucher",
+          "name": "charge-voucher",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "",
+            "navigationStyle": "custom"
+          }
+        },
         {
           "path": "index/index",
           "name": "charge-index",

+ 11 - 0
src/subPack-charge/chargeVoucher/chargeVoucher.vue

@@ -0,0 +1,11 @@
+<script setup lang="ts">
+definePage({ name: 'charge-voucher', islogin: false, style: { navigationBarTitleText: '', navigationStyle: 'custom' } })
+</script>
+
+<template>
+  <view class="">
+    view
+  </view>
+</template>
+
+<style lang="scss" scoped></style>

+ 76 - 30
src/subPack-charge/index/index.vue

@@ -98,49 +98,95 @@ function handleFilterClick(filterKey: number) {
             class="h-100rpx w-100rpx"
             :src="`${userInfo && userInfo?.avatarUrl ? userInfo.avatarUrl : `${StaticUrl}/charge-default-avatar.png`}`"
           />
-          <view class="flex items-center gap-16rpx">
-            <view class="text-32rpx text-#2B303A font-bold">
-              {{ userInfo?.nickName || '暂未登录' }}
-            </view>
-            <view v-if="!token" class="text-24rpx text-#9ED605" @click="router.replace({ name: 'smqjh-login' })">
-              授权登录
+          <view>
+            <view class="flex items-center gap-16rpx">
+              <view class="text-32rpx text-#2B303A font-bold">
+                {{ userInfo?.nickName || '暂未登录' }}
+              </view>
+              <view v-if="!token" class="text-24rpx text-#9ED605" @click="router.replace({ name: 'smqjh-login' })">
+                授权登录
+              </view>
+              <view v-else class="rounded-8rpx bg-#E9FFAC px12rpx py4rpx text-24rpx text-#9ED605">
+                {{ userInfo.channelName }}
+              </view>
             </view>
-            <view v-else class="rounded-8rpx bg-#9ED605 px12rpx py4rpx text-24rpx text-#FFF opacity-70">
-              {{ userInfo.channelName }}
+            <view class="mt-16rpx text-28rpx font-bold">
+              {{ userInfo?.mobile || '暂无手机号' }}
             </view>
           </view>
         </view>
-        <view class="mt-20rpx flex items-center justify-between gap-18rpx">
-          <view class="bg-#F3FFD1 p-24rpx">
-            <view class="flex items-center justify-between gap-48rpx text-28rpx text-#2B303A font-bold">
-              <view>我的积分</view>
-              <view>可用充电余额</view>
+        <view class="mt-20rpx rounded-16rpx bg-#F3FFD1 px-24rpx py-30rpx">
+          <view class="relative flex items-center justify-between">
+            <view class="flex items-center gap-30rpx">
+              <view class="h-40rpx w-40rpx">
+                icon
+              </view>
+              <view class="text-32rpx font-bold">
+                我的钱包
+              </view>
+            </view>
+            <view class="absolute right-[-24rpx] h-44rpx w-120rpx rounded-[22rpx_0_0_22rpx] bg-#9ED605 text-center text-28rpx text-#FFF line-height-[44rpx]">
+              退还
+            </view>
+          </view>
+          <view class="mt-24rpx flex items-center justify-around">
+            <view class="text-center">
+              <view class="text-28rpx">
+                企业积分
+              </view>
+              <view class="mt-16rpx text-40rpx text-#9ED605 font-bold">
+                {{ userAccountInfo?.availablePoints || '0.00' }}
+              </view>
             </view>
-            <view class="mt-24rpx flex items-center gap-30rpx text-28rpx text-#9ED605 font-500">
-              <view class="flex items-center gap-20rpx">
-                <text class="w-120rpx overflow-hidden truncate whitespace-nowrap">
-                  {{ userAccountInfo?.availablePoints || '0.00' }}
-                </text>
-                <image class="h-30rpx w-30rpx" :src="`${StaticUrl}/charge-acc.png`" />
-              </view>
-              <view class="w-120rpx overflow-hidden truncate whitespace-nowrap">
-                <text class="text-20rpx">
+            <view class="h-92rpx w-2rpx bg-#9ED605" />
+            <view class="text-center">
+              <view class="text-28rpx">
+                平台券
+              </view>
+              <view class="mt-16rpx text-40rpx text-#9ED605 font-bold">
+                <text class="text-24rpx">
-                </text>
-                {{ userAccountInfo?.balance || '0.00' }}
+                </text>5
               </view>
             </view>
           </view>
-          <view class="flex items-center gap-20rpx bg-#F3FFD1 p-24rpx" @click="router.push({ name: 'charge-order-list' })">
-            <view>
-              <view class="text-28rpx font-bold">
+        </view>
+      </view>
+      <view class="mt-24rpx flex justify-between">
+        <view class="flex items-center gap-18rpx rounded-16rpx bg-#FFF px-24rpx py-28rpx">
+          <view>
+            <view class="flex items-center gap-16rpx" @click="router.push({ name: 'charge-order-list' })">
+              <text class="text-32rpx font-bold">
                 充电订单
+              </text>
+              <view class="h-30rpx w-30rpx rounded-50% bg-#000 text-center line-height-[30rpx]">
+                <wd-icon name="arrow-right" color="#FFFFFF" size="30rpx" />
               </view>
-              <view class="mt-24rpx text-28rpx text-#9ED605 font-500">
-                {{ userAccountInfo?.chargingOrderCount || '0' }}
+            </view>
+            <view class="mt-16rpx text-24rpx">
+              查看充电订单
+            </view>
+          </view>
+          <view class="h-100rpx w-100rpx">
+            icon
+          </view>
+        </view>
+        <view class="flex items-center gap-18rpx rounded-16rpx bg-#FFF px-24rpx py-28rpx" @click="router.push({ name: 'charge-voucher' })">
+          <view>
+            <view class="flex items-center gap-16rpx">
+              <text class="text-32rpx font-bold">
+                购券中心
+              </text>
+              <view class="h-30rpx w-30rpx rounded-50% bg-#000 text-center line-height-[30rpx]">
+                <wd-icon name="arrow-right" color="#FFFFFF" size="30rpx" />
               </view>
             </view>
-            <image class="h-80rpx w-80rpx" :src="`${StaticUrl}/charge-order.png`" />
+            <view class="mt-16rpx text-24rpx">
+              平台券充值
+            </view>
+          </view>
+          <view class="h-100rpx w-100rpx">
+            icon
           </view>
         </view>
       </view>

+ 1 - 1
src/subPack-videoRights/commonTab/components/home.vue

@@ -66,7 +66,7 @@ function clearSearch() {
             </view>
             <view class="mx20rpx my-24rpx">
               <view class="text-28rpx font-bold">
-                {{ item.productName }}
+                {{ item.localProductName ? item.localProductName : item.productName }}
               </view>
               <view class="mt-30rpx flex items-center justify-between">
                 <view class="text-#FF4D3A">

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

@@ -43,6 +43,7 @@ interface NavigateToOptions {
        "/subPack-charge/chargeSearchList/chargeSearchList" |
        "/subPack-charge/chargeSiteDetail/chargeSiteDetail" |
        "/subPack-charge/chargeStart/chargeStart" |
+       "/subPack-charge/chargeVoucher/chargeVoucher" |
        "/subPack-charge/index/index" |
        "/subPack-videoRights/commonTab/index" |
        "/subPack-videoRights/videoRightsDetail/videoRightsDetail" |