|
@@ -6,43 +6,60 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import shortcut from '@system.shortcut';
|
|
|
+import prompt from '@system.prompt';
|
|
|
|
|
|
export default {
|
|
|
data: {
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
onInit() {
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
- createShortcut(){
|
|
|
+ createShortcut() {
|
|
|
// 创建快捷方式
|
|
|
- this.$app.$def.createShortcut()
|
|
|
+ shortcut.hasInstalled({
|
|
|
+ success: (ret) => {
|
|
|
+ if (!ret) {
|
|
|
+ shortcut.install({
|
|
|
+ message: "添加【追书云】到桌面,方便下次阅读",
|
|
|
+ success: () => {
|
|
|
+ prompt.showToast("添加成功!");
|
|
|
+ this.$emit("addshort", { installed: true });
|
|
|
+ },
|
|
|
+ fail: (code) => {
|
|
|
+ this.$emit("addshort", { installed: false });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
- .short{
|
|
|
- &-wrap{
|
|
|
- position: fixed;
|
|
|
- bottom: 140px;
|
|
|
- height: 80px;
|
|
|
- justify-content: center;
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
- &-content{
|
|
|
- background-color: #EF5952;
|
|
|
- border-radius: 40px;
|
|
|
- width: 600px;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- }
|
|
|
- &-text {
|
|
|
- color:#fff;
|
|
|
- font-size: 30px;
|
|
|
- font-weight: bold;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- }
|
|
|
+.short {
|
|
|
+ &-wrap {
|
|
|
+ position: fixed;
|
|
|
+ bottom: 140px;
|
|
|
+ height: 80px;
|
|
|
+ justify-content: center;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ &-content {
|
|
|
+ background-color: #ef5952;
|
|
|
+ border-radius: 40px;
|
|
|
+ width: 600px;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+ &-text {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 30px;
|
|
|
+ font-weight: bold;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|