1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| <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>
|
| <style lang="scss">
| @import "@/uni_modules/uview-ui/index.scss";
| @import "@/static/style/index.scss";
|
| /* 原样式保持不变 */
| .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>
|
|