Преглед изворни кода

添加下载客户端弹层

mr-zhou-zhou пре 3 година
родитељ
комит
28508ce021

BIN
src/popup/popup-download-app/image/code.png


+ 3 - 0
src/popup/popup-download-app/index.ts

@@ -0,0 +1,3 @@
+import main from './src/main.vue';
+
+export default main;

+ 37 - 0
src/popup/popup-download-app/mixins/handle.ts

@@ -0,0 +1,37 @@
+export default <LibMixins>{
+
+    data(){
+        return {
+            // inputData:inputData(),
+            // controlData:[]
+        }
+    },
+
+    methods:{
+
+        // getReport(){
+        //     return this.$request({
+        //         url:'user_report/report_type_list',
+        //         token:true,
+        //         cache:true
+        //     }).then((data)=>{
+        //         this.controlData = data.data.map((item)=>{
+        //             return {
+        //                 label: item.type_name,
+        //                 value: item.id
+        //             }
+        //         });
+
+        //         if (this.controlData[0]) {
+        //             this.inputData[0].value = this.controlData[0].value;
+        //         }
+
+        //     })
+        // },
+    },
+
+    created(){
+        // this.getReport();
+    }
+
+}

+ 4 - 0
src/popup/popup-download-app/mixins/index.ts

@@ -0,0 +1,4 @@
+import popup from "$mixins/popup";
+import handle from './handle';
+
+export default [popup,handle];

+ 3 - 0
src/popup/popup-download-app/props.ts

@@ -0,0 +1,3 @@
+export default {
+
+}

+ 34 - 0
src/popup/popup-download-app/src/main.vue

@@ -0,0 +1,34 @@
+<template>
+  <popup v-model:value="value" content-animate="scale" :trigger="true" @close="$emit('destroy-popup')">
+    <section class="popup-download-container center">
+	    <section class=" popup-download-content flex center">
+		    <img src="../image/code.png" class="img"/>
+		    <div class="name">
+			  <span class="n-l">扫码下载</span>
+			  <span class="n-r">巧鱼APP</span>
+		    </div>
+	    </section>
+    </section>
+  </popup>
+</template>
+
+<script>
+import {
+  Popup,
+  icon
+} from '$components';
+import mixins from '../mixins';
+import props from '../props';
+export default {
+  name: "popup-download-app",
+  components:{
+    Popup,
+    icon,
+  },
+  mixins,
+  props
+}
+</script>
+
+<style scoped lang="scss" src="../style.scss"></style>
+<style lang="scss" src="../../popup-settle/components/skill-certification/global.scss"></style>

+ 46 - 0
src/popup/popup-download-app/style.scss

@@ -0,0 +1,46 @@
+/* 容器 */
+.popup-download-container{
+   width: 180px;
+   height: 210px;
+   background: linear-gradient(90deg, #EEC9FF 0%, #D7EBFF 100%);
+   border-radius: 10px;
+}
+/* 容器 */
+
+/* 头部 */
+.popup-report-close{
+	color:#fff;
+    font-size: 28px;
+}
+.popup-download-close-wrap{
+	position: absolute;
+	right: -10px;
+	top: -10px;
+	z-index: 10;
+}
+/* 头部 */
+
+/* 内容 */
+.popup-download-content{
+	width: 150px;
+	height: 176px;
+	background: #FFFFFF;
+	border-radius: 10px;
+}
+.popup-download-content .img{
+	width: 119px;
+	height: 116px;
+	background-color: #eee;
+}
+.name{
+	width: 100%;
+	text-align: center;
+	height: 38px;
+	line-height: 38px;
+	color:#333333;
+}
+.n-r{
+	color:#46C0FF;
+}
+
+/* 内容 */

+ 2 - 1
src/popup/popup-export/components.ts

@@ -32,5 +32,6 @@ export default {
     [PopupExportComponent.turntable]: defineAsyncComponent(()=> import('$popup/popup-turntable')),
     [PopupExportComponent.award]: defineAsyncComponent(()=> import('$popup/popup-award-pool')),
     [PopupExportComponent.prize]: defineAsyncComponent(()=> import('$popup/popup-prize')),
-    [PopupExportComponent.prizeRecord]: defineAsyncComponent(()=> import('$popup/popup-prize-record'))
+    [PopupExportComponent.prizeRecord]: defineAsyncComponent(()=> import('$popup/popup-prize-record')),
+	[PopupExportComponent.downloadApp]: defineAsyncComponent(()=> import('$popup/popup-download-app'))
 }

+ 4 - 1
src/popup/popup-export/const/index.ts

@@ -91,7 +91,10 @@ const enum PopupExportComponent {
     prize='popup-prize',
 
     // 中奖记录
-    prizeRecord='popup-prize-record'
+    prizeRecord='popup-prize-record',
+	
+	//下载客户端
+	downloadApp='popup-download-app'
 
 }
 

+ 4 - 1
src/views/view-footer/data/control.ts

@@ -49,7 +49,10 @@ export default <LibDataArray>[
     {
         label:'下载客户端',
         icon:require('../images/client.png'),
-        trigger: new LocationTrigger('https://www.baidu.com')
+        // trigger: new LocationTrigger('https://www.baidu.com'),
+        trigger: new FunctionTrigger(function (item){
+            return popup.$open(PopupExportComponent.downloadApp);
+        }),
     },
     {
         label:'帮助',

+ 5 - 1
src/views/view-header/data/control.ts

@@ -1,5 +1,6 @@
 import {FunctionTrigger,DownTrigger,LocationTrigger} from '$mixins/trigger/class/index';
 import popup from "$utils/tool/popup";
+import {PopupExportComponent} from "$popup/popup-export/const";
 
 export default <LibDataArray>[
     {
@@ -17,6 +18,9 @@ export default <LibDataArray>[
     {
         label:'客户端下载',
         icon:require('../images/client.png'),
-        trigger: new LocationTrigger('https://www.baidu.com')
+        // trigger: new LocationTrigger('https://www.baidu.com')
+        trigger: new FunctionTrigger(function (item){
+            return popup.$open(PopupExportComponent.downloadApp);
+        }),
     }
 ]