From 9f2e8c07d5c64967bc56d60d4067e7174598825d Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期四, 13 七月 2023 15:22:43 +0800
Subject: [PATCH] no message

---
 public/html/compareprice.html |   51 ++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 42 insertions(+), 9 deletions(-)

diff --git a/public/html/compareprice.html b/public/html/compareprice.html
index f32a983..56aa2f2 100644
--- a/public/html/compareprice.html
+++ b/public/html/compareprice.html
@@ -369,7 +369,11 @@
     })();
     function scanCode(str)
     {
-        alert(str);
+        app.copytxt(str);
+    }
+    function likeDataGet(data)
+    {
+        app.likeDataGet(data);
     }
     Vue.use(VueLazyload, {
         preLoad: 1.3,//
@@ -377,7 +381,7 @@
         loading: 'https://sr.ffquan.cn/cms_pic/20200612/brhjkf76vrkcrfpi79eg0.png',
         attempt: 1
     })
-    new Vue({
+  var app=  new Vue({
         el: '#comprice',
         data:{
           //posturl:'http://dfg.shop.com',
@@ -388,13 +392,46 @@
           txtplaceholder:'1銆佹敮鎸佹窐瀹濄�佸ぉ鐚�佷含涓溿�佹姈闊炽�佹嫾澶氬绛夊瀹剁數鍟� \r\n 2銆佽绮樿创鎮ㄩ渶瑕佽浆鎹㈢殑鍒嗕韩鏂囨/閾炬帴鍜屽彛浠�/鍟嗗搧閾炬帴;涓嶆敮鎸佸埜閾炬帴'
         },
         methods:{
+            likeDataGet:function(postData)
+            {
+                $.ajax({
+                    headers:{
+                        "token":this.getUrlPar("token")
+                    },
+                  
+                    url:_this.posturl+'/api/activity/cmsGet',
+                    type:"post",
+                    dataType:"json",
+                    async: false,
+                    data:{
+                        deviceType:postData.postData,
+                        deviceValue:postData.deviceValue,
+                        pageId:1,
+                        pageSize:10,
+                        type:1
+                    }
+                }).done(function(res){
+                    console.log(res);                   
+                })
+            },
+            getLikeGoods:function()
+            {
+                uni.postMessage({
+                    data: {
+                        action: 'getlike'
+                    }
+                })
+            },
             clear:function()
             {
                 this.txtareatxt='';
             },
-            coptest(str)
+            copytxt(str)
             {
-                alert(str);
+                if(str&&str.data&&str.data.length>0)
+                {
+                    this.txtareatxt=str.data;
+                }
             },
             fromcopy:function()
             {
@@ -403,9 +440,6 @@
                         action: 'copy'
                     }
                 })
-                /* navigator.clipboard.readText().then(function(clipText){
-                alert(clipText);
-               }) */
             },
             getCmsUrl:function(){
                 var _this = this;
@@ -414,7 +448,6 @@
                     headers:{
                         "token":this.getUrlPar("token")
                     },
-                  
                     url:_this.posturl+'/api/activity/cmsGet',
                     type:"post",
                     dataType:"json",
@@ -457,7 +490,7 @@
             },
         },
         mounted:function(){
-            this.getGoodsList();
+            this.getLikeGoods();
         }
     })
 </script>
\ No newline at end of file

--
Gitblit v1.9.3