| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages_course-becomeVIP"],{"7dd6":function(e,t,n){"use strict";n.r(t);var o=n("c8a9"),i=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);t["default"]=i.a},8277:function(e,t,n){"use strict";var o=n("827c"),i=n.n(o);i.a},"827c":function(e,t,n){var o=n("c129");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var i=n("967d").default;i("62fb6508",o,!0,{sourceMap:!1,shadowMode:!1})},c129:function(e,t,n){var o=n("c86c");t=o(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */uni-page-body[data-v-b6e7c1d8]{background-color:#fff}body.?%PAGE?%[data-v-b6e7c1d8]{background-color:#fff}.subname[data-v-b6e7c1d8]{background-color:#0a0;color:#fff}.subavt[data-v-b6e7c1d8]{background-color:#fff;border:%?2?% #0a0 solid;color:#0a0}.boxweixin[data-v-b6e7c1d8]{width:%?44?%;height:%?44?%;border-radius:50%;text-align:center;line-height:%?34?%;color:#0a0}.boxnosel[data-v-b6e7c1d8]{border:#757575 %?4?% solid}.boxsel[data-v-b6e7c1d8]{border:#0a0 %?4?% solid}.button-container[data-v-b6e7c1d8]{position:relative;width:%?240?%}.hidden-input[data-v-b6e7c1d8]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;z-index:2}.custom-button[data-v-b6e7c1d8]{position:relative;z-index:1;\r\n /* 其他样式 */width:100%;margin:0 auto;height:%?80?%;line-height:%?60?%;font-size:%?28?%;padding:%?10?% %?20?%}.submitname[data-v-b6e7c1d8]{width:90%;margin:0 auto;text-align:center;padding:%?30?%;margin-top:%?40?%}.sub[data-v-b6e7c1d8]{background-color:#f0f0f0;color:#0a0}.subact[data-v-b6e7c1d8]{background-color:#0a0;color:#fff}.userlogo[data-v-b6e7c1d8]{height:%?760?%}.getlogo[data-v-b6e7c1d8]{width:%?240?%;background-color:#fff}[data-v-b6e7c1d8] .u-popup{flex:0!important}.userlogo[data-v-b6e7c1d8]{height:%?760?%}.getlogo[data-v-b6e7c1d8]{width:calc(60% - %?40?%);margin:0 auto;background-color:#fff;padding:%?10?% %?20?%}.getlogo uni-image[data-v-b6e7c1d8]{width:%?80?%!important;height:%?80?%!important}.footer-tips[data-v-b6e7c1d8]{position:fixed;width:100%;bottom:%?44?%;text-align:center;font-family:PingFang SC;font-weight:500;font-size:12px;color:#bbb;-webkit-transform:scale(.8);transform:scale(.8)}.content uni-image[data-v-b6e7c1d8]{width:%?300?%;height:%?300?%}.bolds[data-v-b6e7c1d8]{color:#999;font-size:16px;height:auto;line-height:inherit;margin-bottom:0;width:304px;word-break:break-all;text-align:center;margin:%?50?% 0 %?100?% 0}.sure[data-v-b6e7c1d8]{width:%?500?%;background-color:#1777ff;line-height:%?88?%;text-align:center;border-radius:%?8?%;color:#fff}.btns[data-v-b6e7c1d8]{position:relative;width:%?630?%;height:%?80?%}.btns .author-btn[data-v-b6e7c1d8]{z-index:100;position:absolute;width:%?630?%;height:%?80?%;line-height:%?80?%;text-align:center;background:#1777ff;border-radius:%?40?%;font-size:%?30?%;font-family:PingFang SC;font-weight:500;color:#fff}',""]),e.exports=t},c790:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"content hb column justify-center align-center bgf"},[n("v-uni-image",{attrs:{src:e.imgPath+"/app/image/becomevip.png",mode:"widthFix"}}),e.userInfo.userId?n("v-uni-view",{staticClass:"justify-start align-center fs24 base-color-9"},[n("v-uni-view",[e._v(e._s(e.nameuser)+"#")]),n("v-uni-view",[e._v(e._s(e.userInfo.userId))])],1):e._e(),n("v-uni-view",{staticClass:"bolds"},[e._v("成为会员,享受更多权益")]),n("v-uni-view",{staticClass:"sure",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.registerCourse.apply(void 0,arguments)}}},[e._v(e._s(1==e.isVip?"您已成为会员":e.viptext))])],1)},i=[]},c8a9:function(e,t,n){"use strict";n("6a54");var o=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("dc8a"),n("8f71"),n("bf0f"),n("fd3c"),n("e966"),n("0c26"),n("5c47"),n("af8f"),n("5ef2"),n("d4b5");var i=o(n("2634")),r=o(n("2fdc")),a=n("8c06"),s=n("e42c"),c={data:function(){return{isVip:0,isWechat:!1,isLogin:!1,companyid:"",companyUserId:"",userInfo:{},tagIds:[],isbecomevip:0,viptext:"申请成为会员",userlogo:!1,userinfos:{nickname:"",avatar:""},headImg:"",authType:0,userdisabled:!1,projectId:"",H5course:{}}},computed:{imgPath:function(){return this.$store.state.imgpath},imgname:function(){return this.$store.state.logoname},appid:function(){return this.$store.state.appid},nameuser:function(){return this.userinfos.nickname},avataruser:function(){return this.userinfos.avatar}},onLoad:function(e){var t=this;return(0,r.default)((0,i.default)().mark((function n(){var o,r,a,s;return(0,i.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:uni.$on("usercode",(function(e){console.log("huoqu ",e),t.goLogin(e)})),uni.$on("vipMsg",(function(e){console.log("vipMsg ",e),t.viptext=e})),"https://userapp.whhm.ylrzcloud.com/prod-api",uni.setStorageSync("requestPath","https://userapp.whhm.ylrzcloud.com/prod-api"),uni.getStorageSync("userInfo")&&"{}"!=uni.getStorageSync("userInfo")?t.userInfo=uni.getStorageSync("userInfo"):t.userInfo={},o=uni.getStorageSync("TOKEN_KEY"),t.isLogin=!!o,r="",e.becomeVip?r=e.becomeVip?JSON.parse(e.becomeVip):{}:(a=decodeURIComponent(Object.keys(e)[0]),r=JSON.parse(a.split("becomeVip=")[1]),console.log(r)),console.log(r),t.isLogin=!!o,t.companyid=r.companyId||"",t.companyUserId=r.companyUserId||0,t.projectId=r.projectId,t.H5course.companyId=r.companyId,t.H5course.companyUserId=r.companyUserId,t.H5course.projectId=r.projectId,uni.setStorageSync("H5course",t.H5course),console.log(t.H5course),null==r.tagids||""==r.tagids?t.tagIds=[]:(t.tagIds=r.tagids,s=t.tagIds.split(",").map((function(e){return parseInt(e.trim(),10)})).filter((function(e){return!isNaN(e)})),t.tagIds=s),t.code=e.code,t.code&&!t.isLogin&&t.loginByMp();case 22:case"end":return n.stop()}}),n)})))()},onShow:function(){uni.getStorageSync("userInfo")&&"{}"!=uni.getStorageSync("userInfo")?this.userInfo=uni.getStorageSync("userInfo"):this.userInfo={},this.userinfos=uni.getStorageSync("userinfos");var e=uni.getStorageSync("TOKEN_WEXIN");console.log(uni.getStorageSync("userinfos")),this.isLogin=!!e,this.isLogin&&1!=this.isVip&&this.registerCourse(),this.userInfo.userId||this.goLogin()},methods:{goLogin:function(e){var t=this;return(0,r.default)((0,i.default)().mark((function n(){return(0,i.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(console.log("huoqu111",e),!e){n.next=7;break}console.log("huoqu1222",e),uni.showLoading({title:"加载中"}),uni.login({provider:"weixin",success:function(){var n=(0,r.default)((0,i.default)().mark((function n(o){var r;return(0,i.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:console.log(o),r=o.code,(0,s.handleFsUserWx)({code:r,appId:t.appid,userId:e.userId}).then((function(e){200==e.code?(console.log(e),uni.hideLoading(),uni.showToast({icon:"none",title:"登录成功"}),t.userinfos=uni.getStorageSync("userinfos"),uni.getStorageSync("TOKEN_WEXIN"),t.userInfo=uni.getStorageSync("userInfo"),t.isLogin=!0,setTimeout((function(){t.registerCourse()}),200)):406==e.code?(uni.hideLoading(),uni.showToast({icon:"none",title:"该用户已成为其他销售会员"})):(uni.hideLoading(),uni.showToast({icon:"none",title:e.msg}))}));case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}),n.next=10;break;case 7:return n.next=9,t.$store.dispatch("getWebviewUrl");case 9:uni.navigateTo({url:"/pages_course/webview?H5course="+uni.getStorageSync("H5course")});case 10:case"end":return n.stop()}}),n)})))()},shouquan:function(){""==this.userinfos.nickname&&uni.showToast({icon:"none",title:"请先授权微信昵称"})},confimrname:function(){""!=this.userinfos.nickname?""!=this.userinfos.avatar?(uni.setStorageSync("userinfos",this.userinfos),this.editUserA(),this.userlogo=!1):uni.showToast({icon:"none",title:"请授权微信头像"}):uni.showToast({icon:"none",title:"请授权微信昵称"})},onChooseAvatar:function(e){var t=this;this.userinfos.avatar=e.detail.avatarUrl,console.log(e.detail.avatarUrl),uni.uploadFile({url:uni.getStorageSync("requestPath")+"/app/common/uploadOSS",filePath:e.detail.avatarUrl,name:"file",formData:{user:"test"},success:function(e){console.log(e);var n=JSON.parse(e.data);t.headImg=uni.getStorageSync("requestPath")+n.fileName,t.userinfos.avatar=n.url}})},onNickNameInput:function(e){console.log(e),this.userinfos.nickname=e.detail.value},nato:function(){var e=this;return(0,r.default)((0,i.default)().mark((function t(){return(0,i.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$store.dispatch("getWebviewUrl");case 2:uni.navigateTo({url:"/pages_course/webview"});case 3:case"end":return t.stop()}}),t)})))()},handleAgree:function(){console.log(144443),1==this.isVip?uni.showToast({title:"您已成为会员!",icon:"none",duration:2e3}):(this.goLogin(),uni.showToast({title:this.viptext,icon:"none",duration:2e3}))},getWechatCode:function(){if(this.isWechat){var e=this.getUrlCode().code,t=window.location.href;if(null==e||""===e){var n=t.split("/registerCourse");uni.setStorageSync("beforLoginPage",n[1]),window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx0d021524695f1943&redirect_uri="+encodeURIComponent(t)+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"}else this.code=e,this.loginByMp()}else uni.showToast({title:"请在微信浏览器中打开",icon:"error"})},getUrlCode:function(){var e=location.search,t=new Object;if(-1!=e.indexOf("?"))for(var n=e.substr(1),o=n.split("&"),i=0;i<o.length;i++)t[o[i].split("=")[0]]=o[i].split("=")[1];return t},loginByMp:function(){var e=this;null!=this.code&&(uni.showLoading({title:"处理中..."}),(0,a.loginByMp)({code:this.code}).then((function(t){if(uni.hideLoading(),200==t.code){uni.setStorageSync("TOKEN_KEY",t.token),uni.setStorageSync("userInfo",JSON.stringify(t.user)),e.userInfo=t.user;uni.getStorageSync("beforLoginPage");e.isLogin=!0,e.registerCourse()}else uni.showToast({title:t.msg,icon:"none"})}),(function(e){})))},registerCourse:function(){var e=this;console.log(123333),this.isVip=0,null==this.tagIds&&(this.tagIds="");var t={userId:this.userInfo.userId,companyUserId:this.companyUserId,companyId:this.companyid,tagIds:this.tagIds,projectId:this.projectId};this.isLogin?(0,s.registerCourses)(t).then((function(t){200==t.code?(e.isVip=1,e.isbecomevip=1,e.viptext="您已成为会员",uni.showToast({title:"注册成功",icon:"none"})):(e.isbecomevip=1,e.viptext=t.msg,uni.showToast({icon:"none",title:t.msg}))})):this.getWechatCode()}}};t.default=c},e42c:function(e,t,n){"use strict";n("6a54");var o=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.H5logoinApp=function(e,t){return r(t&&1==t?"/app/wx/h5/mp/courseLoginByMp":"/app/wx/h5/mp/loginByMp",e,"POST","application/json;charset=UTF-8")},t.checkUserInfo=function(e){return r("/course_uniapp/app/user/checkUserInfo",e,"GET","application/json;charset=UTF-8")},t.courseAnswer=function(e){return r("/course_uniapp/app/course/wx/h5/courseAnswer",e,"POST","application/json;charset=UTF-8","https://h5api.his.cdwjyyh.com")},t.editUser=function(e){return r("/course_uniapp/app/user/editUser",e,"POST","application/json;charset=UTF-8")},t.getErrMsg=function(e){return r("/course_uniapp/app/course/wx/h5/getErrMsg",e,"POST","application/x-www-form-urlencoded","https://h5api.his.cdwjyyh.com")},t.getFinishCourseVideo=function(e){return r("/course_uniapp/app/course/wx/h5/updateWatchDuration",e,"POST","application/json;charset=UTF-8","https://h5api.his.cdwjyyh.com")},t.getH5CourseByVideoId=function(e){return r("/course_uniapp/app/course/wx/h5/getH5CourseByVideoId",e,"GET","","https://h5api.his.cdwjyyh.com")},t.getH5CourseVideoDetails=function(e){return r("/course_uniapp/app/course/wx/h5/videoDetails",e,"GET","","https://h5api.his.cdwjyyh.com")},t.getIntegralByH5Video=function(e){return r("/app/course/getIntegralByH5Video",e,"POST","application/json;charset=UTF-8","https://h5api.his.cdwjyyh.com")},t.getInternetTraffic=function(e){return r("/course_uniapp/app/course/wx/h5/getInternetTraffic",e,"POST","application/json;charset=UTF-8","https://h5api.his.cdwjyyh.com")},t.getIsAddKf=function(e){return r("/course_uniapp/app/course/wx/h5/isAddKf",e,"POST","application/json;charset=UTF-8","https://h5api.his.cdwjyyh.com")},t.getRealLink=function(e){return r("/app/course/getRealLink",e,"GET","","https://h5api.his.cdwjyyh.com")},t.getusername=function(e){return r("/companyapp/app/wx/h5/mp/userInfo",e,"POST","application/json;charset=UTF-8")},t.handleFsUserWx=function(e){return r("/course_uniapp/app/wx/h5/mp/handleFsUserWx",e,"POST","application/json;charset=UTF-8")},t.loginByMiniApp=function(e){return r("/course_uniapp/app/wx/miniapp/loginByMa",e,"POST","application/json;charset=UTF-8")},t.registerCourses=function(e){return r("/course_uniapp/companyapp/app/fs/user/beMember",e,"POST","application/json;charset=UTF-8")},t.sendReward=function(e){return r("/course_uniapp/app/course/wx/h5/sendReward",e,"POST","application/json;charset=UTF-8","https://h5api.his.cdwjyyh.com")};var i=o(n("d4c0")),r=(new i.default).http},eda4:function(e,t,n){"use strict";n.r(t);var o=n("c790"),i=n("7dd6");for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);n("8277");var a=n("828b"),s=Object(a["a"])(i["default"],o["b"],o["c"],!1,null,"b6e7c1d8",null,!1,o["a"],void 0);t["default"]=s.exports}}]);
|