jt
2023-08-25 273e2da8372cfd54f91a1117ccaaf6d3c9085e90
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<template>
    <!-- 版本升级弹窗开始 -->
    <uni-popup ref="promotion" type="center">
        <view class="promotion">
            <view class="operates" v-if="showBtns==true">
                <text @click="cancel">取消</text>
                <text @click="sure">确认</text>
            </view>
            <view class="operates" v-else>
                <cmd-progress :percent="percentage" stroke-color="linear-gradient(to right, #ef32d9, #89fffd)"></cmd-progress>
            </view>
        </view>
    </uni-popup>
    <!-- 版本升级弹窗结束 -->
</template>
 
// <script>
// import cmdProgress from "@/components/cmd-progress/cmd-progress.vue" //进度条
// export default {
//         components: {
//             cmdProgress
//         },
//         data() {
//             return {
//                 downloadUrl: "", //安卓app下载链接
//                 percentage: 0, //下载进度
//                 showBtns: true,
//             }
//         },
//         onShow() {
//             this.query(); //版本升级
//         },
//         watch: {
//             //监听进度条
//             percentage(e) {
//                 if (e >= 100) {
//                     this.$refs.promotion.close()
//                 }
//             }
//         },
//         methods: {
//             //查询当前版本号
//             query() {
//                 //#ifdef APP-PLUS
//                 plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
//                     var version = wgtinfo.version //客户端版本号
//                     this.check(version) //检测是否需要更新
//                 })
//                 //#endif
//             },
//             //检测是否需要更新
//             async check(version) {
//                 let res = await edition.edition();
//                 let resp = res.data;
//                 if (resp) {
//                     const obj = resp.data.filter(item => {
//                         return item.groupName == 'version'
//                     })
//                     //获取当前版本号
//                     const versionNum = obj[0].title //服务端版本号
//                     this.downloadUrl = obj[0].content //app下载链接
//                     if (version != versionNum) {
//                         this.$refs.promotion.open();
//                     } else {
//                         console.log('当前已是最新版本')
//                     }
//                 }
//             },
//             //确认更新
//             sure() {
//                 //关闭按钮
//                 this.showBtns = false;
//                 let sys = uni.getSystemInfoSync().platform //检查系统
//                 if (sys == 'ios') {
//                     // this.getIosInfo()
//                 } else if (sys == "android") {
//                     this.updateAPP() // 调用下载方法app内下载
//                 }
//             },
//             //取消更新
//             cancel() {
//                 this.$refs.promotion.close();
//             },
//             // //链接苹果商店下载
//             // getIosInfo() {
//             //     let appleId = “你的appid”
//             //     plus.runtime.launchApplication({
//             //         action: "itms-apps://itunes.apple.com/cn/app/id" + appleId + "?mt=8"
//             //     }, function(e) {
//             //         console.log('Open system default browser failed: ' + e.message);
//             //     });
//             // },
//             //安卓更新
//             updateAPP() {
//                 let _this = this;
//                 let url = this.downloadUrl;
//                 // 官方API
//                 var dtask = plus.downloader.createDownload(url, {}, function(d, status) {
 
 
//                     //d为下载的文件对象
//                     if (status == 200) {
//                         //下载成功,d.filename是文件在保存在本地的相对路径,使用下面的API可转为平台绝对路径
//                         var fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
//                         plus.runtime.openFile(d.filename); //选择软件打开文件
//                         uni.showToast({
//                             icon: 'none',
//                             title: '更新成功'
//                         })
//                     } else {
//                         //下载失败
//                         plus.downloader.clear(); //清除下载任务
//                         uni.showToast({
//                             icon: 'none',
//                             title: '更新失败'
//                         })
//                     }
//                 })
//                 //开始下载
//                 dtask.start();
//                 //监听下载进度
//                 dtask.addEventListener('statechanged', function(task) {
//                     _this.percentage = parseInt(
//                         (parseFloat(task.downloadedSize) /
//                             parseFloat(task.totalSize)) *
//                         100
//                     );
//                     if (_this.percentage == 100) {
//                         this.$refs.promotion.close();
//                     }
//                     // console.log('下载进度:' + _this.percentage)
//                 })
//             },
//         }
// </script>
    
    .fn_yousanjiao{
        position: relative;
    }
    .fn_yousanjiao::after{
        position: absolute;
        display: block;
        content: '';
        z-index: 1;
        transform: rotate(-45deg);
        left: -10px;
        top: -10px;
        border: 10px solid;
        border-color: transparent transparent red;
    }
    .class_attr_title {
        font-size: 34rpx;
        padding-bottom: 22rpx;
        position: relative;
    }
    .class_attr_title .title_line {
        border-bottom: 2rpx solid #aaa;
        position: relative;
        bottom: -50rpx;
        width: calc(100% - 150rpx);
        margin-left: 100px;
    }
    .class_attr_title .title_icon {
        border-radius: 50%;
        width: 80rpx;
        height: 80rpx;
        display: inline-block;
        vertical-align: middle;
        padding-top: 20rpx;
        text-align: center;
        color: #fff;
    }
    .class_attr_title i {
        color: #2c6aa0!important;
    }
    .class_attr_title .title_icon i {
        font-size: 40rpx;
    }
    .class_attr_title .title {
        padding: 0 22rpx;
        display: inline-block;
        background-color: #fff;
        position: relative;
        bottom: -4rpx;
    }
    .class_attr_title .arrow {
        position: absolute;
        top: 18rpx;
        right: 2rpx;
        font-size: 40rpx;
    }
    input::-webkit-input-placeholder {
        font-size: 12rpx;
    }
    textarea{
        width: 98%;
        border: 1px solid #d5d5d5;
        padding: 10rpx 8rpx 12rpx;
        background: #FFF;
        border-radius: 0 !important;
        font-size: 28rpx;
        font-family: inherit;
        box-shadow: none !important;
        transition-duration: 0.1s;
        color: #858585;
    }
    input{
        border: 1px solid #d5d5d5;
        width: 98%;
        height: 52rpx;
        background: #FFF;
        border-radius: 0 !important;
        color: #858585;
        padding: 10rpx 8rpx 12rpx;
        font-size: 28rpx;
        font-family: inherit;
        box-shadow: none !important;
        transition-duration: 0.1s;
    }
    .class_attr_body .form-group {
        margin: 0px 30rpx;
        /* margin-left: -12px;
        margin-right: -12px; */
    }
    .form-group > label[class*="col-"] {
        margin-bottom: 8rpx;
        font-size: 32rpx;
    }
    .form-group label {
        vertical-align: middle;
        line-height: 60rpx;
    }
    .no-padding-right {
        padding-right: 0 !important;
    }
    .col-xs-12 {
        width: 100%;
    }
    .text-right{
        margin-right: 12px;
    }
    .section__iput{
        border: 1px solid #d5d5d5;
        width: 98%;
        height: 52rpx;
        background: #FFF;
        border-radius: 0 !important;
        color: #858585;
        padding: 10rpx 8rpx 12rpx;
        font-size: 28rpx;
        font-family: inherit;
        box-shadow: none !important;
        transition-duration: 0.1s;
    }
    
</style>