feat(user): 个人中心底部添加太阳码扫码测试按钮

新增测试按钮用于模拟太阳码扫码跳转流程:
  scene=app=pregnancy 触发 _resolveAppScene
  → 调 box_app /api/mp/apps 查 H5 URL
  → 加载孕育无忧 web-view

改动:
  - pages/user/index.vue 模板: 底部添加测试按钮(根 view 内)
  - pages/user/index.vue script: goWxacodeTest 方法
  - pages/user/index.vue style: 按钮样式(紫色虚线边框)

HBuilderX 需重新编译后可用
This commit is contained in:
2026-07-08 17:58:16 +08:00
parent f18a21ea73
commit 5079289a84

View File

@@ -29,6 +29,10 @@
<!-- #ifdef MP --> <!-- #ifdef MP -->
<editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal> <editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
<!-- #endif --> <!-- #endif -->
<!-- 太阳码扫码模拟(开发测试) -->
<view class="dev-test-section" @click="goWxacodeTest">
<text class="dev-test-link">太阳码扫码测试 (孕育无忧)</text>
</view>
</view> </view>
</template> </template>
<script> <script>
@@ -629,6 +633,14 @@ export default {
} }
} }
} }
,
goWxacodeTest() {
console.log("[user] 太阳码扫码测试");
uni.navigateTo({
url: "/pages/annex/web_view/index?scene=app=pregnancy"
});
}
}; };
</script> </script>
@@ -667,4 +679,17 @@ export default {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
} }
.dev-test-section {
text-align: center;
padding: 30rpx 0 30rpx;
background: transparent;
}
.dev-test-link {
font-size: 24rpx;
color: #b8a9c9;
border: 1px dashed #d5c6e0;
padding: 12rpx 30rpx;
border-radius: 30rpx;
display: inline-block;
}
</style> </style>