1 line
9.1 KiB
JavaScript
1 line
9.1 KiB
JavaScript
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["member/fans/endorsement"],{1028:function(t,n,e){"use strict";(function(t){var i=e("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(e("7ca3")),s=e("8f59");function a(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,i)}return e}function r(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?a(Object(e),!0).forEach((function(n){(0,o.default)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var u={data:function(){return{options:{},invite_qrcode:"",UserInfo:{},UserBase:{},isShowBtn:!1,ProductInfo:null,isShowMag:!1,Level1Discount:0,Level2Discount:0,Level3Discount:0,imgUrl:"",ProductUrl:"",StoreName:"",StoreLogo:"",buyname:"",PromotionRule:"",htmlString:"",RuleEnabled:!0,flag:!0,CashData:{},shareData:{},PageQRCodeInfo:{Path:"",IsShare:!1,IsShareBox:!1,IsJT:!1}}},components:{shareBoxMp:function(){e.e("components/share-box-mp").then(function(){return resolve(e("49ce"))}.bind(null,e)).catch(e.oe)},shareBoxApp:function(){e.e("components/share-box-app").then(function(){return resolve(e("68b1"))}.bind(null,e)).catch(e.oe)}},computed:(0,s.mapState)(["Config","StateCode","notice","plantformInfo","shopInfo","userInfo","hasLogin"]),onLoad:function(n){t.setNavigationBarTitle({title:this.__("我要代言")});var e=this;this.getPlantformInfo((function(t){e.setData({StoreName:t.name,StoreLogo:t.logo,Level1Discount:e.plantformInfo.plantform_fx_cps_rate_1,Level2Discount:e.plantformInfo.plantform_fx_cps_rate_2,imgUrl:e.plantformInfo.logo})})),this.setData({options:n}),e.$.isNull(n.type)?this.setData({ProductUrl:"/pages/product/detail",buyname:e.__("去购买")}):this.setData({ProductUrl:"/pages/product/detail",buyname:e.__("去预约")});e=this;e.$.isNull(this.userInfo)?this.forceUserInfo((function(t){t&&(e.setData({isShowBtn:!e.$.isNull(n.uid)}),e.showButton(),e.getPageInfo(e.$.isNull(n.uid)?e.userInfo.user_id:n.uid))})):(this.setData({isShowBtn:!e.$.isNull(n.uid)}),this.showButton(),this.getPageInfo(e.$.isNull(n.uid)?this.userInfo.user_id:n.uid),e.$.isNull(n.pid)?e.$.setNavigationBarTitle({title:e.__("我要代言")}):(e.$.setNavigationBarTitle({title:e.__("我要推广")}),this.setData({ProductInfo:n}),this.getPlantformInfo((function(t){e.setData({flag:!0,RuleEnabled:t.promotion}),e.htmlString=t.promotion.replace(/\\/g,"").replace(/<img/g,'<img style="display:none;"')}))))},onBackPress:function(){if(this.$refs.shareBoxApp.showBoxView)return this.$refs.shareBoxApp.cancel(),!0},onUnload:function(){this.$refs.shareBoxApp.showBoxView&&this.$refs.shareBoxApp.cancel()},onNavigationBarButtonTap:function(n){0===n.index?this.onShareBox():t.showToast({title:"你点了收藏按钮",icon:"none"})},onShareAppMessage:function(){var t,n;return this.setData({isShowMag:!1}),this.$.isNull(this.ProductInfo)?(t="/member/fans/endorsement?uid="+this.userInfo.user_id,n=this.UserInfo.user_nickname+this.__("偷偷的告诉你,粉丝也能赚钱哦~")):(t="/member/fans/endorsement?pid="+this.ProductInfo.pid+"&pname="+this.ProductInfo.pname+"&pprice="+this.ProductInfo.pprice+"&ppic="+this.ProductInfo.ppic+"&uid="+this.userInfo.user_id+"&type="+this.ProductInfo.type,n=this.__("我发现这个商品很好,非常适合你哦!")),{title:n,desc:n,path:t}},methods:r(r({},(0,s.mapMutations)(["login","logout","getPlantformInfo","forceUserInfo","getUserInfo"])),{},{showButton:function(){this.userInfo.user_id;this.setData({CashData:{isShowDistributionButton:!0}})},share:function(){this.getPageInfo(this.userInfo.user_id),this.setData({isShowBtn:!1})},getPageInfo:function(t){var n=this,e={user_id:t,path:"pages/index/index?uid="+t,width:430},i=n.$.sprintf("%s/h5/pages/index/index?uid=%d",n.Config.SiteUrl,t);i=n.$.sprintf("%s/pages/index/index?uid=%d",n.Config.SiteUrl,t),e["poster_type"]=2,e["path"]=i,n.$.request({url:this.Config.URL.fx.poster,data:e,method:"POST",success:function(t,e,i,o){200==e?n.setData({invite_qrcode:t.qrcode,Level1Discount:t.plantform_fx_cps_rate_1,Level2Discount:t.plantform_fx_cps_rate_2,Level3Discount:t.plantform_fx_cps_rate_3}):n.setData({flag:!1,ispage:!1})}}),n.$.request({url:this.Config.URL.user.overview,data:e,success:function(t,e,i,o){200==e&&n.setData({UserInfo:t.member_info,UserBase:t.base})}})},closeMsk:function(){this.setData({isShowMag:!1})},onShareBox:function(t){var n,e,i=this.$.sprintf("%s/h5/pages/index/index?uid=%d",this.Config.SiteUrl,this.userInfo.user_id);i=this.$.sprintf("%s/pages/index/index?uid=%d",this.Config.SiteUrl,this.userInfo.user_id),this.$.isNull(this.ProductInfo)?("/member/fans/endorsement?uid="+this.userInfo.user_id,n=this.userInfo.user_nickname+this.__("偷偷的告诉你,粉丝也能赚钱哦~"),e=this.StoreLogo):("/member/fans/endorsement?pid="+this.ProductInfo.pid+"&pname="+this.ProductInfo.pname+"&pprice="+this.ProductInfo.pprice+"&ppic="+this.ProductInfo.ppic+"&uid="+this.userInfo.user_id+"&type="+this.ProductInfo.type,n=this.__("我发现这个商品很好,非常适合你哦!"),e=this.ProductInfo.ppic),this.setData({shareData:{shareTitle:n,shareText:n,href:i,image:e,price:0}}),this.$refs.shareBoxMp.show()},cancelShare:function(t){},showCodeImg:function(t){},shareQRCode:function(t){},saveImg:function(t){},previewImg:function(){this.$.previewImage({current:this.invite_qrcode,urls:[this.invite_qrcode]})}})};n.default=u}).call(this,e("df3c")["default"])},4174:function(t,n,e){"use strict";e.r(n);var i=e("1028"),o=e.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(s);n["default"]=o.a},"58da":function(t,n,e){"use strict";var i=e("7558"),o=e.n(i);o.a},"70d5":function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){}));var i=function(){var t=this,n=t.$createElement,e=(t._self._c,t.CashData.isShowDistributionButton||t.isShowBtn?t.sprintf(t.__("我是%s"),t.UserInfo.user_nickname):null),i=t.CashData.isShowDistributionButton||t.isShowBtn?t.sprintf(t.__("我为%s代言"),t.StoreName):null,o=(t.CashData.isShowDistributionButton||t.isShowBtn)&&null!=t.ProductInfo?t.__("为您推荐"):null,s=(t.CashData.isShowDistributionButton||t.isShowBtn)&&null!=t.ProductInfo?t.__("¥"):null,a=(t.CashData.isShowDistributionButton||t.isShowBtn)&&t.RuleEnabled&&0==t.flag?t.__("推广规则"):null,r=(t.CashData.isShowDistributionButton||t.isShowBtn)&&t.RuleEnabled&&0==t.flag?t.sprintf(t.__("当你的粉丝在店铺内支付订单后,订单中的所有商品,都有相应的收益比例:一级粉丝 %s%% ,二级粉丝 %s%% 。将支付订单金额和收益比例相乘后,累计计算出你此单的总收益。* 注: - 不计算收益的内容:运费、优惠券、关税,以及收益比例为0的商品;"),t.Level1Discount,t.Level2Discount):null,u=(t.CashData.isShowDistributionButton||t.isShowBtn)&&t.RuleEnabled&&0==t.flag?t.__(" - 如果发生了退货退款,需要按照实际退货数量对收益进行相应的扣除;- 按照国家法律规定,当你的月累计收入达到相关税金起征点后,商家会为你代缴税款,你的收益将是税后收入;"):null,l=!t.CashData.isShowDistributionButton&&!t.isShowBtn||t.RuleEnabled&&0==t.flag?null:t.__("推广规则"),f=!t.CashData.isShowDistributionButton&&!t.isShowBtn||t.RuleEnabled&&0==t.flag?null:t.__("成功邀请一位好友,可获积分奖励:"),h=!t.CashData.isShowDistributionButton&&!t.isShowBtn||t.RuleEnabled&&0==t.flag?null:t.__("枚"),c=!t.CashData.isShowDistributionButton&&!t.isShowBtn||t.RuleEnabled&&0==t.flag?null:t.__("当好友产生消费时,再获得相应佣金奖励"),d=(t.CashData.isShowDistributionButton||t.isShowBtn)&&null==t.ProductInfo&&t.isShowBtn&&t.CashData.isShowDistributionButton?t.__("我也要代言"):null,p=(t.CashData.isShowDistributionButton||t.isShowBtn)&&null!=t.ProductInfo&&t.isShowBtn?t.__("我也要推广"):null,_=(t.CashData.isShowDistributionButton||t.isShowBtn)&&null==t.ProductInfo&&0==t.isShowBtn&&t.CashData.isShowDistributionButton?t.__("分享赚钱"):null,m=0==t.CashData.isShowDistributionButton&&0==t.isShowBtn?t.__("对不起,您现在还没有分销权限"):null,g=0==t.CashData.isShowDistributionButton&&0==t.isShowBtn?t.__("多多购物有助于获取权限哦。"):null;t.$mp.data=Object.assign({},{$root:{m0:e,m1:i,m2:o,m3:s,m4:a,m5:r,m6:u,m7:l,m8:f,m9:h,m10:c,m11:d,m12:p,m13:_,m14:m,m15:g}})},o=[]},"72cf":function(t,n,e){"use strict";(function(t,n){var i=e("47a9");e("90c2");i(e("3240"));var o=i(e("e77f"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(o.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},7558:function(t,n,e){t.exports={theme_bg:"#f30213"}},e77f:function(t,n,e){"use strict";e.r(n);var i=e("70d5"),o=e("4174");for(var s in o)["default"].indexOf(s)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(s);e("58da");var a=e("828b"),r=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);n["default"]=r.exports}},[["72cf","common/runtime","common/vendor"]]]); |