pyt
2025-05-07 4381716fcab4518ec46ff93967d42b45a2b8b90f
H5/App.vue
@@ -1,13 +1,21 @@
<script>
   export default {
      onLaunch: function() {
         uni.setStorageSync('trial_run', true);
         // H5端动态插入提示
         // #ifdef H5
         const trialNode = document.createElement('div');
         trialNode.className = 'trial-run-tip';
         trialNode.innerHTML = '试运行版本';
         document.body.appendChild(trialNode);
         // #endif
      },
      onShow: function() {
      },
      onHide: function() {
      }
   }
</script>
@@ -15,5 +23,19 @@
<style lang="scss">
   @import "@/uni_modules/uview-ui/index.scss";
   @import "@/static/style/index.scss";
   /*每个页面公共css */
</style>
   /* 原样式保持不变 */
   .trial-run-tip {
      position: fixed;
      left: 10px;
      top: 0;
      z-index: 9999;
      padding: 4px 8px;
      background: rgba(0, 0, 0, 0.4);
      color: #fff;
      border-radius: 4px;
      font-size: 12px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      pointer-events: none;
   }
</style>