Commit 5261c97c83f553002691010f6797a21feba895f9

Authored by pengye
1 parent edb89d9d

优惠券代金券菜品券、充值活动分享

@@ -215,6 +215,26 @@ Page({ @@ -215,6 +215,26 @@ Page({
215 * 用户点击右上角分享 215 * 用户点击右上角分享
216 */ 216 */
217 onShareAppMessage() { 217 onShareAppMessage() {
218 - 218 + let data=this.data.opt;
  219 + let use=this.data.use;
  220 + let detail=this.data.detail
  221 + let imageUrl,title;
  222 + if(use.is_cash=='1' || use.is_cash){
  223 + imageUrl='https://nosqn.colorcun.com/share_money.png';
  224 + title=detail.price == '0'?`免费获取${data.name}${use.cash}元代金券,点击查看详情。`:`仅需${detail.price}元,获取${data.name}${use.cash}元代金券,点击查看详情。`
  225 + }
  226 + if(use.is_discount=='1' || use.is_discount){
  227 + imageUrl='https://nosqn.colorcun.com/share_discount.png';
  228 + title=detail.price == '0'?`免费获取${data.name}${use.discount}折折扣券,点击查看详情。`:`仅需${detail.price}元,获取${data.name}${use.discount}折折扣券,点击查看详情。`
  229 + }
  230 + if(use.is_dish=='1' || use.is_dish){
  231 + imageUrl='https://nosqn.colorcun.com/share_dish.png';
  232 + title=detail.price == '0'?`免费获取${data.name}${detail.aname},点击查看详情。`:`仅需${detail.price}元,获取${data.name}${detail.aname},点击查看详情。`
  233 + }
  234 + return {
  235 + title,
  236 + path:`/pack-activity/pack/buyCoupon?id=${data.id}&name=${data.name}&oid=${data.oid}&rid=${data.rid}&sid=${data.sid}&types=1`,
  237 + imageUrl,
  238 + }
219 } 239 }
220 }) 240 })
@@ -25,7 +25,7 @@ page { @@ -25,7 +25,7 @@ page {
25 } 25 }
26 26
27 .info_left { 27 .info_left {
28 - width:200rpx ; 28 + width:40% ;
29 color: #515151; 29 color: #515151;
30 font-family: PingFang SC; 30 font-family: PingFang SC;
31 } 31 }
@@ -38,7 +38,7 @@ page { @@ -38,7 +38,7 @@ page {
38 38
39 .preferential { 39 .preferential {
40 color: #0143a3; 40 color: #0143a3;
41 - margin-right: 50rpx; 41 + margin-right: 10rpx;
42 } 42 }
43 43
44 .preferential text { 44 .preferential text {
@@ -385,11 +385,4 @@ Page({ @@ -385,11 +385,4 @@ Page({
385 onReachBottom() { 385 onReachBottom() {
386 386
387 }, 387 },
388 -  
389 - /**  
390 - * 用户点击右上角分享  
391 - */  
392 - onShareAppMessage() {  
393 -  
394 - }  
395 }) 388 })
@@ -135,6 +135,12 @@ Page({ @@ -135,6 +135,12 @@ Page({
135 * 用户点击右上角分享 135 * 用户点击右上角分享
136 */ 136 */
137 onShareAppMessage() { 137 onShareAppMessage() {
138 - 138 + let data=this.data.opt;
  139 + let detail=this.data.detail
  140 + return {
  141 + title:`${data.name}诚邀您参加${detail.rname},点击查看详情。`,
  142 + path:`/pack-activity/pack/vipRecharge?id=${data.id}&name=${data.name}&oid=${data.oid}&rid=${data.rid}&sid=${data.sid}&types=1`,
  143 + imageUrl:'https://nosqn.colorcun.com/share_recharge.png',
  144 + }
139 } 145 }
140 }) 146 })
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 <block wx:if="{{item.amount>0}}"> 51 <block wx:if="{{item.amount>0}}">
52 <view class="normsBox"> 52 <view class="normsBox">
53 <view class="content"> 53 <view class="content">
54 - <view class="single" style="color: rgba({{textColor}});">{{item.name}}<text wx:if="{{item.practiceName}}">({{item.practiceName}})</text></view> 54 + <view class="single" wx:if="{{item.name}}" style="color: rgba({{textColor}});">{{item.name}}</view>
55 <view wx:if="{{is_show_price!='0'}}" class="onwBoxWrap"> 55 <view wx:if="{{is_show_price!='0'}}" class="onwBoxWrap">
56 <view class="oneBox" style="color: rgba({{textColor}});" wx:for="{{item.specArr}}" wx:key="id"> 56 <view class="oneBox" style="color: rgba({{textColor}});" wx:for="{{item.specArr}}" wx:key="id">
57 <view wx:if="{{item.str}}">{{item.str}}</view> 57 <view wx:if="{{item.str}}">{{item.str}}</view>
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
86 <block wx:if="{{item.norms.length>0}}"> 86 <block wx:if="{{item.norms.length>0}}">
87 <view wx:for="{{item.norms}}" wx:for-index="idx" wx:key="id" class="normsBox"> 87 <view wx:for="{{item.norms}}" wx:for-index="idx" wx:key="id" class="normsBox">
88 <view class="content"> 88 <view class="content">
89 - <view class="single" style="color: rgba({{textColor}});">{{item.cookName}}<text wx:if="{{item.name}}">({{item.name}})</text></view> 89 + <view class="single" wx:if="{{item.cookName}}" style="color: rgba({{textColor}});">{{item.cookName}}</view>
90 <view wx:if="{{is_show_price!='0'}}" class="onwBoxWrap"> 90 <view wx:if="{{is_show_price!='0'}}" class="onwBoxWrap">
91 <view class="oneBox" style="color: rgba({{textColor}});" wx:for="{{item.specArr}}" wx:key="id"> 91 <view class="oneBox" style="color: rgba({{textColor}});" wx:for="{{item.specArr}}" wx:key="id">
92 <view wx:if="{{item.str}}">{{item.str}}</view> 92 <view wx:if="{{item.str}}">{{item.str}}</view>