From 935c5880a4819848e3e09a7ce6366728ae88bb35 Mon Sep 17 00:00:00 2001 From: taiyuan Date: Mon, 28 Dec 2020 10:19:54 +0800 Subject: [PATCH] 首页、分类、助力活动页增加分享到朋友圈 --- app.wxss | 16 ++++++++++------ pages/goods/categoryList/categoryList.js | 9 ++++++++- pages/index/index/index.js | 12 +++++++++++- pages/user/assistance/assistance.js | 18 +++++++++++++++++- pages/user/index/index.wxml | 6 +++--- 5 files changed, 49 insertions(+), 12 deletions(-) diff --git a/app.wxss b/app.wxss index 8193c82..5abb5bb 100644 --- a/app.wxss +++ b/app.wxss @@ -446,12 +446,12 @@ background: #ffe3e2; /* 图标字体(ty) */ @font-face { font-family: 'iconfont'; /* project id 2054717 */ - src: url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.eot'); - src: url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.eot?#iefix') format('embedded-opentype'), - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.woff2') format('woff2'), - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.woff') format('woff'), - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.ttf') format('truetype'), - url('//at.alicdn.com/t/font_2054717_kp0q24eh5l.svg#iconfont') format('svg'); + src: url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.eot'); + src: url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.eot?#iefix') format('embedded-opentype'), + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.woff2') format('woff2'), + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.woff') format('woff'), + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.ttf') format('truetype'), + url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.svg#iconfont') format('svg'); } .iconfont { @@ -462,6 +462,10 @@ background: #ffe3e2; -moz-osx-font-smoothing: grayscale; } +.icon-shanchu:before { + content: "\e61b"; +} + .icon-buqian:before { content: "\e65f"; } diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js index e337e35..1b7fe42 100644 --- a/pages/goods/categoryList/categoryList.js +++ b/pages/goods/categoryList/categoryList.js @@ -1012,6 +1012,13 @@ Page({ if(!url || url=='') return; if(url[0]!='/') url='/'+url; getApp().goto(url); - } + }, + + + onShareTimeline() { + return { + title: '商品分类-' + getApp().globalData.config.store_name, + } + }, }); \ No newline at end of file diff --git a/pages/index/index/index.js b/pages/index/index/index.js index 9535eaf..811ce34 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -884,7 +884,17 @@ Page({ }, - + onShareTimeline() { + // getApp().getConfig(function(t) { + // return { + // title: '首页-' + getApp().globalData.config.store_name, + // } + // }); + + return { + title: '首页-' + getApp().globalData.config.store_name, + } + }, }); \ No newline at end of file diff --git a/pages/user/assistance/assistance.js b/pages/user/assistance/assistance.js index 7e78f41..959e9fd 100644 --- a/pages/user/assistance/assistance.js +++ b/pages/user/assistance/assistance.js @@ -228,6 +228,22 @@ Page({ var help_id = this.data.help_id; var taskid=e.currentTarget.dataset.taskid; getApp().goto("/pages/user/assistance/task_assistance?help_id=" + help_id+"&taskid="+taskid); - } + }, + + onShareAppMessage(res) { + if (res.from === 'button') { + // 来自页面内转发按钮 + console.log(res.target) + } + return { + // title: '自定义转发标题', + } + }, + + onShareTimeline() { + return { + title: '好友助力-' + getApp().globalData.config.store_name, + } + }, }) diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml index 4a3e699..13e40e9 100644 --- a/pages/user/index/index.wxml +++ b/pages/user/index/index.wxml @@ -213,19 +213,19 @@ - + 助力活动 - + 我的权益 - + {{item.name}} -- libgit2 0.21.4