Authored by zhangxiaoru

copyURl

@@ -42,21 +42,24 @@ function point(type, trend) { @@ -42,21 +42,24 @@ function point(type, trend) {
42 } 42 }
43 43
44 $('.set-world').click(function() { 44 $('.set-world').click(function() {
  45 + let trendWord = $('.trend-world-area').val();
45 46
46 $.ajax({ 47 $.ajax({
47 type: 'GET', 48 type: 'GET',
48 url: '/activity/set-trend-world', 49 url: '/activity/set-trend-world',
49 data: { 50 data: {
50 - trendWord: $('.trend-world-area').val() 51 + trendWord: trendWord
51 }, 52 },
52 success: function(result) { 53 success: function(result) {
53 tip.show(result.message); 54 tip.show(result.message);
54 55
55 if (result.code === 200) { 56 if (result.code === 200) {
  57 + let copyUrl = `//m.yohobuy.com/?openby:yohobuy={"action":"go.copy","params":{"text":"${trendWord}","message":"复制成功"}}`; // eslint-disable-line
56 58
57 point(1, $('.trend-world-area').val()); 59 point(1, $('.trend-world-area').val());
58 60
59 $('.trend-code').html($('.trend-world-area').val()); 61 $('.trend-code').html($('.trend-world-area').val());
  62 + $('.copy-code').attr('href', copyUrl);
60 63
61 setTimeout(function() { 64 setTimeout(function() {
62 $('.set-trend-world').hide(); 65 $('.set-trend-world').hide();