Revert "no message"
This reverts commit 7ed6e5c827b302a7c91c5f16bcca67848a62bfd8.
| | |
| | | header("Access-Control-Allow-Origin:*"); |
| | | class Activity extends Api |
| | | { |
| | | protected $noNeedLogin = ['recordItemClick','fqb_plat_cate','run_countRecruitAct','test']; |
| | | protected $noNeedLogin = ['UpWxImg','recordItemClick','fqb_plat_cate','run_countRecruitAct','test']; |
| | | protected $noNeedRight = '*'; |
| | | /** |
| | | * è·åç¯æ¢æ¦ |
| | |
| | | $this->success('æå',['success'=>true]); |
| | | } |
| | | |
| | | public function UpWxImg() |
| | | { |
| | | $token=request()->param('token'); |
| | | $picPath=request()->param('picPath'); |
| | | //ä¸ä¼ æ°¸ä¹
ç´ æ |
| | | $url="https://api.weixin.qq.com/cgi-bin/material/add_material?access_token=".$token."&type=image"; |
| | | //2ã忥å°å¾®ä¿¡æå¡å¨ |
| | | if(class_exists('\CURLFile')){ //7.0 |
| | | $data = ['media' => new \CURLFile($picPath)]; |
| | | }else{ //5.6以å5.6ä»¥ä¸ |
| | | $data = array('media' => '@'.$picPath); |
| | | } |
| | | |
| | | $ch = curl_init(); |
| | | curl_setopt($ch, CURLOPT_URL, $url); |
| | | curl_setopt($ch, CURLOPT_RETURNTRANSFER , true); |
| | | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , false); |
| | | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST , false); |
| | | curl_setopt($ch, CURLOPT_POST, 1); |
| | | curl_setopt($ch, CURLOPT_POSTFIELDS, $data); |
| | | $res = curl_exec($ch); |
| | | curl_close($ch); |
| | | $wxrs_id_card=json_decode($res,true); |
| | | $id_card =$wxrs_id_card['media_id']; //å¾å°media_id |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @param mixed 大æ·å®¢çäºçº§ç±»ç®idï¼éè¿è¶
级åç±»APIè·åãä»
å
è®¸ä¼ ä¸ä¸ªäºçº§idï¼å½ä¸çº§ç±»ç®idåäºçº§ç±»ç®idåæ¶ä¼ å
¥æ¶ï¼ä¼èªå¨å¿½ç¥äºçº§ç±»ç®id |
| | | * @return void |
| | | */ |
| | | public function getGoodsList($cids,$subcid,$sort=0,$page = 1,$page_size,$tchaoshi=0,$secrend_search=0,$couponPriceLowerLimit="") |
| | | public function getGoodsList($cids,$subcid,$sort=0,$page = 1,$page_size,$tchaoshi=0,$secrend_search=0,$couponPriceLowerLimit) |
| | | { |
| | | $params = $this->setParams(['cids'=>$cids,'tchaoshi'=>$tchaoshi,'subcid'=>$subcid,'sort'=>$sort,'pageId'=>$page,'pageSize'=>$page_size]); |
| | | if($secrend_search>0) |
| | |
| | | } |
| | | foreach ($params as $key => $value) { |
| | | $enstrs=$enstrs.$key; |
| | | //$pvalue=preg_replace('/^\"|\"$/','',json_encode($value,JSON_UNESCAPED_UNICODE)); |
| | | // $pvalue=preg_replace('/^\"|\"$/','',json_encode($value,JSON_UNESCAPED_UNICODE)); |
| | | $pvalue=preg_replace('/^\"|\"$/','',json_encode($value,JSON_UNESCAPED_UNICODE+JSON_UNESCAPED_SLASHES)); |
| | | $enstrs=$enstrs.$pvalue; |
| | | } |
| | |
| | | class User extends Frontend |
| | | { |
| | | protected $layout = ''; |
| | | protected $noNeedLogin = ['login', 'registersms','register','register1', 'getInvitationInfo','phoneIsRegister']; |
| | | protected $noNeedLogin = ['login','targetapp','registersms','register','register1', 'getInvitationInfo','phoneIsRegister']; |
| | | protected $noNeedRight = ['*']; |
| | | |
| | | public function _initialize() |
| | |
| | | return $this->view->fetch(); |
| | | } |
| | | |
| | | /** |
| | | * 跳转app |
| | | */ |
| | | public function targetapp() |
| | | { |
| | | |
| | | $this->assign('appName',config('site.name')); |
| | | return $this->view->fetch(); |
| | | } |
| | | |
| | | /** |
| | | * 注åä¼å |
| | | */ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!doctype HTML> |
| | | <html> |
| | | <head> |
| | | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
| | | <meta content="telephone=no" name="format-detection" /> |
| | | <meta name="viewport" |
| | | content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=no,viewport-fit=cover" /> |
| | | <title>{$appName}</title> |
| | | <!-- å¼å
¥vuejsæ¡æ¶ --> |
| | | <script src="__CDN__/assets/index/js/vue.js"></script> |
| | | <script type="text/javascript" src="https://public.ffquan.cn/lib/clipboard.min.js"></script> |
| | | <script src="__CDN__/assets/index/js/axios.min.js"></script> |
| | | <script src="__CDN__/assets/index/js/md5.js"></script> |
| | | <script src="__CDN__/assets/index/js/xiguazhu.js"></script> |
| | | <script src="__CDN__/assets/index/js/xiguazhu2.js"></script> |
| | | <link rel="stylesheet" href="__CDN__/assets/index/css/index.css"> |
| | | </head> |
| | | |
| | | <body> |
| | | |
| | | </body> |
| | | |
| | | |
| | | <script> |
| | | const apiUrl = "ä½ çåå"; |
| | | const appName2 = ""; |
| | | |
| | | </script> |
| | | <!-- 请æ±åå妿䏿³ç´æ¥æ´é²åºæ¥ --> |
| | | <script src="__CDN__/assets/index/js/targetapp.js?v=0.0.1"></script> |
| | | |
| | | |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="item-v" @click="getShareLink(items)"> |
| | | <view class="item-img"> |
| | | <image :src="items.mainPic"> |
| | | </image> |
| | | </view> |
| | | <view class="item-txt"> |
| | | <view style="display: flex;"> |
| | | <image :src="items.labelImg"></image> |
| | | <view class="item-txt-title">{{items.title}}</view> |
| | | </view> |
| | | <view class="item-coupon"> |
| | | <view class="cop-con"> |
| | | <view class="cop-txt">å¸</view> |
| | | <view class="cop-money">Â¥{{items.couponPrice}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="item-bottom"> |
| | | <view class="item-price"> |
| | | <view>å¸åä»·<span class="item-price-prc">Â¥{{items.actualPrice}}</span></view> |
| | | <view style="text-decoration: line-through;">åä»·:{{items.originalPrice}}</view> |
| | | </view> |
| | | |
| | | <view class="item-copy">å¤å¶é¾æ¥</view> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | items: Object, |
| | | isrecord: { |
| | | type: Boolean, |
| | | default: false, |
| | | text: '' |
| | | }, |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | |
| | | copyText() { |
| | | // #ifdef H5 |
| | | this.$copyText(this.text).then( |
| | | res => { |
| | | uni.showToast({ |
| | | title: '伿 龿¥å·²å¤å¶ï¼ç°å¨æå¼ææºæ·å®ï¼é¢å伿 å¸å§~', |
| | | icon: 'none', |
| | | duration: 2500 |
| | | }) |
| | | } |
| | | ) |
| | | // #endif |
| | | // #ifndef H5 |
| | | uni.setClipboardData({ |
| | | data: this.text, |
| | | success: () => { |
| | | uni.showToast({ |
| | | title: '伿 龿¥å·²å¤å¶ï¼ç°å¨æå¼ææºæ·å®ï¼é¢å伿 å¸å§~', |
| | | icon: 'none', |
| | | duration: 2500 |
| | | }) |
| | | } |
| | | }) |
| | | // #endif |
| | | }, |
| | | getShareLink(items) { |
| | | |
| | | if (this.isrecord) { //è®°å½ç¹å» |
| | | this.recordClick(items.goodsId, items.sourceType, items.dtitle, items.actualPrice); |
| | | } |
| | | var goodsid = items.goodsId; |
| | | var that = this; |
| | | let postdata = { |
| | | goodsId: goodsid |
| | | }; |
| | | uni.showLoading({ |
| | | title: 'å¤å¶ä¸..', |
| | | mask: true |
| | | }); |
| | | this.$http.post('/api/taoke/get_privilege_link', |
| | | postdata |
| | | ).then(e => { |
| | | uni.hideLoading(); |
| | | if (e.code != 0) { |
| | | return; |
| | | } |
| | | this.text = e.data.info.longTpwd; |
| | | uni.getSystemInfo({ |
| | | success: function(res) { |
| | | if (res.osName == 'ios') { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: '伿 ä¿¡æ¯å¤å¶åï¼è¯·æå¼ææºæ·å®é¢å¸', |
| | | showCancel: false, |
| | | confirmText: 'å¤å¶ä¼æ ä¿¡æ¯', |
| | | success: function(res) { |
| | | if (res.confirm) { |
| | | that.copyText(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | else{ |
| | | that.copyText(); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | //this.oncopy(e.data.info.longTpwd); |
| | | }).catch(function(err) { |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | recordClick(goodsid, plat, title, act_price) { |
| | | let postdata = { |
| | | goodsid: goodsid, |
| | | plat: plat, |
| | | title: title, |
| | | act_price: act_price |
| | | } |
| | | this.$http.post('/api/activity/recordItemClick', |
| | | postdata |
| | | ).then(e => { |
| | | |
| | | }).catch(function(err) { |
| | | console.log(err); |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .item-price-prc { |
| | | color: #fe3a3f; |
| | | font-size: 1rem; |
| | | margin-right: 0.2rem; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .cop-txt { |
| | | padding: 0.1rem; |
| | | } |
| | | |
| | | .cop-money { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; |
| | | font-weight: 400; |
| | | color: #ff4d42; |
| | | background: #fff; |
| | | padding: 0.1rem; |
| | | } |
| | | |
| | | .cop-con { |
| | | display: inline-flex; |
| | | background: linear-gradient(0deg, #ff753c, #ff4b42); |
| | | color: #fff; |
| | | padding: 0.05rem; |
| | | font-size: 0.7rem; |
| | | |
| | | } |
| | | |
| | | .item-v { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 0.5rem; |
| | | background: #fff; |
| | | border-radius: 0.3rem; |
| | | width: 92%; |
| | | margin: 0 auto; |
| | | margin-bottom: 0.3rem; |
| | | } |
| | | |
| | | .item-img { |
| | | width: 20%; |
| | | } |
| | | |
| | | .item-img image { |
| | | width: 6rem; |
| | | height: 6rem; |
| | | } |
| | | |
| | | .item-txt { |
| | | width: 70%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-txt image { |
| | | width: 1.6rem; |
| | | height: 0.9rem; |
| | | } |
| | | |
| | | .item-txt-title { |
| | | font-size: 0.7rem; |
| | | margin-left: 0.3rem; |
| | | text-overflow: -o-ellipsis-lastline; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | width: 90%; |
| | | } |
| | | |
| | | .item-price { |
| | | display: flex; |
| | | font-size: 0.5rem; |
| | | align-items: baseline; |
| | | color: #8d8484; |
| | | } |
| | | |
| | | .item-bottom { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-copy { |
| | | width: 5.22rem; |
| | | height: 1.66rem; |
| | | background: linear-gradient(-90deg, #fe3a3f, #faa450); |
| | | font-size: 0.7rem; |
| | | font-weight: 500; |
| | | color: #fffefd; |
| | | line-height: 1.66rem; |
| | | text-align: center; |
| | | border: 0; |
| | | outline: 0; |
| | | float: right; |
| | | border-radius: 1rem; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "apph5", |
| | | "lockfileVersion": 2, |
| | | "requires": true, |
| | | "packages": { |
| | | "": { |
| | | "dependencies": { |
| | | "vue-clipboard2": "^0.3.3" |
| | | } |
| | | }, |
| | | "node_modules/clipboard": { |
| | | "version": "2.0.11", |
| | | "resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz", |
| | | "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", |
| | | "dependencies": { |
| | | "good-listener": "^1.2.2", |
| | | "select": "^1.1.2", |
| | | "tiny-emitter": "^2.0.0" |
| | | } |
| | | }, |
| | | "node_modules/delegate": { |
| | | "version": "3.2.0", |
| | | "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz", |
| | | "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" |
| | | }, |
| | | "node_modules/good-listener": { |
| | | "version": "1.2.2", |
| | | "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz", |
| | | "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", |
| | | "dependencies": { |
| | | "delegate": "^3.1.2" |
| | | } |
| | | }, |
| | | "node_modules/select": { |
| | | "version": "1.1.2", |
| | | "resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz", |
| | | "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" |
| | | }, |
| | | "node_modules/tiny-emitter": { |
| | | "version": "2.1.0", |
| | | "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz", |
| | | "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" |
| | | }, |
| | | "node_modules/vue-clipboard2": { |
| | | "version": "0.3.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz", |
| | | "integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==", |
| | | "dependencies": { |
| | | "clipboard": "^2.0.0" |
| | | } |
| | | } |
| | | }, |
| | | "dependencies": { |
| | | "clipboard": { |
| | | "version": "2.0.11", |
| | | "resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz", |
| | | "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", |
| | | "requires": { |
| | | "good-listener": "^1.2.2", |
| | | "select": "^1.1.2", |
| | | "tiny-emitter": "^2.0.0" |
| | | } |
| | | }, |
| | | "delegate": { |
| | | "version": "3.2.0", |
| | | "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz", |
| | | "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" |
| | | }, |
| | | "good-listener": { |
| | | "version": "1.2.2", |
| | | "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz", |
| | | "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", |
| | | "requires": { |
| | | "delegate": "^3.1.2" |
| | | } |
| | | }, |
| | | "select": { |
| | | "version": "1.1.2", |
| | | "resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz", |
| | | "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" |
| | | }, |
| | | "tiny-emitter": { |
| | | "version": "2.1.0", |
| | | "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz", |
| | | "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" |
| | | }, |
| | | "vue-clipboard2": { |
| | | "version": "0.3.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz", |
| | | "integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==", |
| | | "requires": { |
| | | "clipboard": "^2.0.0" |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "dependencies": { |
| | | "vue-clipboard2": "^0.3.3" |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | {{txt}} |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import comUtils from '../../utils/ComUtils.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | txt: '' |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | this.wxAuth(option.code); |
| | | }, |
| | | methods: { |
| | | fuzhi() { |
| | | var that = this; |
| | | uni.setClipboardData({ |
| | | data: that.code |
| | | }); |
| | | }, |
| | | wxAuth(code) { |
| | | uni.showLoading({ |
| | | title: 'ææä¸', |
| | | mask: true |
| | | }); |
| | | var that = this; |
| | | that.$http.post('/wxback/KfWx/GetAuthCode', { |
| | | code: code |
| | | }).then(e => { |
| | | console.log(e); |
| | | uni.hideLoading(); |
| | | if (e == true) |
| | | { |
| | | this.txt = "æææåï¼è¯·å
³éæ¤é¡µé¢" |
| | | } |
| | | else{ |
| | | this.txt =e; |
| | | } |
| | | |
| | | }).catch(function(err) { |
| | | console.log(err); |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .item-head { |
| | | text-align: center; |
| | | padding: 1rem; |
| | | font-weight: 600; |
| | | color: linear-gradient(-90deg, #fe3a3f, #faa450); |
| | | color: #fe3a3f; |
| | | background: linear-gradient(-90deg, #fe3a3f, #faa450); |
| | | -webkit-background-clip: text; |
| | | -webkit-text-fill-color: transparent; |
| | | } |
| | | |
| | | .bottom-show { |
| | | text-align: center; |
| | | width: 100%; |
| | | padding-bottom: 1rem; |
| | | color: #fe3a3f; |
| | | background: linear-gradient(-90deg, #fe3a3f, #faa450); |
| | | -webkit-background-clip: text; |
| | | -webkit-text-fill-color: transparent; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .txt-sty { |
| | | text-align: center; |
| | | } |
| | | |
| | | .main-cont {} |
| | | |
| | | .head-txt { |
| | | margin: 0.4rem 0 2rem 0; |
| | | } |
| | | |
| | | .head-img { |
| | | width: 5rem; |
| | | height: 5rem; |
| | | margin-top: 4rem; |
| | | } |
| | | |
| | | .ercode-img { |
| | | width: 16rem; |
| | | height: 16rem; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | new Vue({ |
| | | el: '#app', // éæ©å¨ |
| | | data: { |
| | | show: 0, |
| | | count: '', |
| | | timer: null, |
| | | agreeType: true, // |
| | | tel: "", //ææºå· |
| | | verification: '', //éªè¯ç |
| | | showType: false, |
| | | invitationInfo: "", |
| | | privacyAgreement:"", |
| | | userAgreement:"", |
| | | appName: "", |
| | | appLogo:"", |
| | | beian:"", |
| | | iosUrl:"", |
| | | androidUrl:"", |
| | | tips: "æåä½ ï¼æ³¨åæå~", |
| | | tips2: "æ¬¢è¿æ¨å å
¥ï¼èµ¶ç´§ä¸è½½APPï¼é¢åæ¨çæ°äººå
åä¸å±ç¦å©å§~", |
| | | goodslist: [ |
| | | {"image": "https://img.alicdn.com/i3/880734502/O1CN01eDKk7i1j7xhJ5c7jV_!!880734502.jpg_310x310.jpg_.webp", |
| | | "title": "ææé¢å
2æ¤" |
| | | }, |
| | | {"image": "https://img.alicdn.com/imgextra/i2/2201188731272/O1CN01sR96eg1LGcSFr2aTK_!!2201188731272.jpg_310x310.jpg_.webp", |
| | | "title": "Unifreeæ´è¸å·¾" |
| | | }, |
| | | {"image": "https://img.alicdn.com/imgextra/i4/2479240580/O1CN01g1cwOs1G9gTFkXFGZ_!!2479240580.png_310x310.jpg_.webp", |
| | | "title": "ææå°é£æ" |
| | | }, |
| | | {"image": "https://img.alicdn.com/i4/2203738468138/O1CN01glAoIC29zFvNJAGhW_!!2203738468138.jpg_310x310.jpg_.webp", |
| | | "title": "çæ²¹ææ²æµ´é²" |
| | | }, |
| | | {"image": "https://img.alicdn.com/imgextra/i4/438927567/O1CN01vaRzJN25ljmb0wxZR_!!438927567.jpg_310x310.jpg_.webp", |
| | | "title": "æ ç³èè·ç³" |
| | | }, |
| | | {"image": "https://img.alicdn.com/imgextra/i1/503512336/O1CN01wTeXWv1T7vxTSWEr2_!!503512336.jpg_310x310.jpg_.webp", |
| | | "title": "é«èç½é¸¡è¸è" |
| | | }, |
| | | {"image": "https://img.alicdn.com/imgextra/i4/441512085/O1CN017tZRxE1RGyY2vgJF2_!!441512085.jpg_310x310.jpg_.webp", |
| | | "title": "4åªé²èç²½å" |
| | | }, |
| | | {"image": "https://img.alicdn.com/imgextra/i1/1952819637/O1CN01rQrJu32L3nddEPV0l_!!1952819637.jpg_310x310.jpg_.webp", |
| | | "title": "å åæ è¯å·çº¸" |
| | | }, |
| | | {"image": "https://img.alicdn.com/i1/54801414/O1CN01jaEMbE1MJemh7RYJK_!!54801414.jpg_310x310.jpg_.webp", |
| | | "title": "大樱æ¡è½¦åå" |
| | | }], |
| | | }, |
| | | created() { |
| | | this. judgeWeb(); |
| | | this.goDownload(); |
| | | }, |
| | | mounted() { |
| | | |
| | | // 访é®vm1 dataçæ°æ® |
| | | }, |
| | | methods: { |
| | | getcode() { |
| | | const times = 60; // åè®¡æ¶æ¶é´ |
| | | if (!this.timer) { |
| | | this.count = times; |
| | | this.show = 1; |
| | | this.timer = setInterval(() => { |
| | | if (this.count > 0 && this.count <= times) { |
| | | this.count--; |
| | | } else { |
| | | this.show = 2; |
| | | clearInterval(this.timer); |
| | | this.timer = null; |
| | | } |
| | | }, 1000) |
| | | } |
| | | }, |
| | | //ç«å³ä¸è½½ |
| | | download() { |
| | | this.showType = true; |
| | | }, |
| | | //注åå³åæ |
| | | agreeCen() { |
| | | this.agreeType = !this.agreeType |
| | | }, |
| | | //å¤å¶ |
| | | handleClipboard() { |
| | | var _this = this; |
| | | var clipboardImg = new Clipboard('.yqm', { |
| | | text: function() { |
| | | return _this.invitationInfo.invitation_code; |
| | | }, |
| | | }); |
| | | clipboardImg.on('success', function(e) { |
| | | alert("é请ç å¤å¶æåï¼èµ¶å¿«ä¸è½½APPï¼å°½äº«ä¼æ å§~") |
| | | }); |
| | | |
| | | clipboardImg.on('error', function(e) { |
| | | alert("é请ç å¤å¶å¤±è´¥ï¼æ¨å¯ç´æ¥è³APP䏿³¨åå填忤é请ç ") |
| | | }); |
| | | }, |
| | | getInvitationInfo() { |
| | | var code = vmRequest("code"); |
| | | //alert(code); |
| | | //以param屿§ç形弿¥ä¼ éåæ° |
| | | axios({ |
| | | method: "post", //è¯·æ±æ¹å¼ |
| | | url: "/index/user/getInvitationInfo", //请æ±è·¯å¾ |
| | | params: { |
| | | "code": code |
| | | } //ä¼ éåæ° |
| | | //ä½¿ç¨ ç®å¤´è¡¨è¾¾å¼=> å¨ä»£æ¿åæçfunctionæ¥ååè°å½æ° |
| | | }).then(result => { |
| | | if (result.data.code == 1) { |
| | | alert(result.data.msg); |
| | | } else { |
| | | this.invitationInfo = result.data.info.user; |
| | | this.appName = result.data.info.appName; |
| | | this.privacyAgreement = result.data.info.privacyAgreement; |
| | | this.userAgreement = result.data.info.userAgreement; |
| | | this.appLogo = result.data.info.logo; |
| | | this.beian = result.data.info.beian; |
| | | this.iosUrl = result.data.info.appIosDownUrl; |
| | | this.androidUrl = result.data.info.appAndroidDownUrl; |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | phoneIsRegister() { |
| | | if (!this.tel) { |
| | | alert("ææºå·ä¸è½ä¸ºç©º") |
| | | return false; |
| | | } |
| | | axios({ |
| | | method: "post", //è¯·æ±æ¹å¼ |
| | | url: "/index/user/phoneIsRegister", //请æ±è·¯å¾ |
| | | params: { |
| | | "phone": this.tel |
| | | } //ä¼ éåæ° |
| | | //ä½¿ç¨ ç®å¤´è¡¨è¾¾å¼=> å¨ä»£æ¿åæçfunctionæ¥ååè°å½æ° |
| | | }).then(result => { |
| | | if (result.data.code == 1) { |
| | | alert(result.data.msg); |
| | | } else { |
| | | // å·ç æªæ³¨å åééªè¯ç è¯·æ± |
| | | // å·ç å·²ç»æ³¨å |
| | | console.log(result.data) |
| | | if(result.data.is_registered == 1){ |
| | | this.tips = "æ¨çå¸å·å·²ç»æ³¨å"; |
| | | this.tips2 = "æ¬¢è¿æ¨å å
¥"+this.appName+"ï¼èµ¶ç´§ä¸è½½APPï¼èµåä½£éå§~"; |
| | | this.showType = true; |
| | | this.show = 1 //ç»æéªè¯ç |
| | | //alert(result.data.message); |
| | | }else{ |
| | | this.sendCode(); |
| | | } |
| | | |
| | | |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | // åééªè¯ç |
| | | sendCode() { |
| | | console.log("åééªè¯ç ") |
| | | var timerChuo = new Date().getTime() |
| | | // æ¼åæ°æ® |
| | | var sendInfo = { |
| | | event: 'register', |
| | | mobile: this.tel, |
| | | }; |
| | | axios({ |
| | | method: "post", //è¯·æ±æ¹å¼ |
| | | url: "/api/sms/send", //请æ±è·¯å¾ |
| | | data: sendInfo |
| | | // headers: { |
| | | // 'Content-Type': 'application/json;charset=UTF-8' |
| | | // }, |
| | | //ä¼ éåæ° |
| | | //ä½¿ç¨ ç®å¤´è¡¨è¾¾å¼=> å¨ä»£æ¿åæçfunctionæ¥ååè°å½æ° |
| | | }).then(result => { |
| | | if (result.data.code == 1) { |
| | | // å·ç å·²ç»æ³¨å |
| | | alert( result.data.msg); |
| | | } else { |
| | | // å·ç æªæ³¨å åééªè¯ç è¯·æ± |
| | | //alert("éªè¯ç åéæå" + result.data.message); |
| | | this.getcode(); |
| | | } |
| | | }) |
| | | }, |
| | | goDownload() { |
| | | var marketUrl='dafanguan://{"url":"/pages/rankinglist/common_act","totype":"0"}'; |
| | | window.location = marketUrl; |
| | | }, |
| | | verifyBrand() |
| | | {//夿æºåç±»å |
| | | const userAgent = navigator.userAgent.toLowerCase() |
| | | const isIphone = userAgent.match(/(iphone|ipad|ipod)/i); |
| | | const isHuawei = userAgent.match(/huawei/i); |
| | | const isHonor = userAgent.match(/honor/i); |
| | | const isOppo = userAgent.match(/oppo/i); |
| | | const isOppoR15 = userAgent.match(/PACM00/i); |
| | | const isVivo = userAgent.match(/vivo/i); |
| | | const isXiaomi = userAgent.match(/mi\s/i); |
| | | const isXIAOMI = userAgent.match(/xiaomi/i); |
| | | const isXiaomi2s = userAgent.match(/mix\s/i); |
| | | const isRedmi = userAgent.match(/redmi/i); |
| | | |
| | | if (isIphone) { |
| | | return 'iphone' |
| | | } else if (isHuawei || isHonor) { |
| | | return 'huawei'; |
| | | } else if (isOppo || isOppoR15) { |
| | | return 'oppo'; |
| | | } else if (isVivo) { |
| | | return 'vivo'; |
| | | } else if (isXiaomi || isRedmi || isXiaomi2s || isXIAOMI) { |
| | | return 'xiaomi'; |
| | | } else { |
| | | return 'other'; |
| | | } |
| | | }, |
| | | judgeWeb() |
| | | { |
| | | var webName=this.isNeizhi(); |
| | | if(webName=='weixin') |
| | | { |
| | | alert("请ç¹å»å³ä¸è§ï¼éæ©'卿µè§å¨æå¼'~"); |
| | | } |
| | | else if(webName=='QQ') |
| | | { |
| | | alert("请ç¹å»å³ä¸è§ï¼éæ©'æµè§å¨'ï¼æå¼æ¬ç½å~"); |
| | | } |
| | | }, |
| | | isNeizhi() |
| | | {//夿æ¯å¦å
ç½®æµè§å¨ |
| | | var ua = navigator.userAgent.toLowerCase(); |
| | | // var browserName = "unknow"; |
| | | if (ua.match(/MicroMessenger/i) == "micromessenger") { |
| | | return "weixin"; |
| | | } else if (ua.match(/QQ/i) == "qq") { |
| | | return "QQ"; |
| | | } else if (ua.match(/Alipay/i) == "alipay" && payway == 2) { |
| | | return "alipay"; |
| | | } |
| | | }, |
| | | /* ç¨æ·æ³¨å */ |
| | | userRegist() { |
| | | if (!this.tel) { |
| | | alert("ææºå·ä¸è½ä¸ºç©º") |
| | | return false; |
| | | } |
| | | if (!this.verification) { |
| | | alert("éªè¯ç ä¸è½ä¸ºç©º") |
| | | return false; |
| | | } |
| | | if (this.agreeType) { |
| | | alert("请å
é
读并åæã"+this.appName+"ç¨æ·åè®®ããéç§æ¿çã") |
| | | return false; |
| | | } |
| | | // æ¼åæ°æ® |
| | | var sendInfo = { |
| | | mobile: this.tel, |
| | | captcha: this.verification, |
| | | invitation_code: this.invitationInfo.invitation_code |
| | | }; |
| | | axios({ |
| | | method: "post", //è¯·æ±æ¹å¼ |
| | | url: "/api/user/register", //请æ±è·¯å¾ |
| | | data: sendInfo, |
| | | headers: { |
| | | 'Content-Type': 'application/json;charset=UTF-8' |
| | | }, |
| | | //ä¼ éåæ° |
| | | //ä½¿ç¨ ç®å¤´è¡¨è¾¾å¼=> å¨ä»£æ¿åæçfunctionæ¥ååè°å½æ° |
| | | }).then(result => { |
| | | if (result.data.code == 0) { |
| | | // 注åæå |
| | | this.tips2 = "æ¬¢è¿æ¨å å
¥"+this.appName+"ï¼èµ¶ç´§ä¸è½½APPï¼èµåä½£éå§~"; |
| | | this.showType = true; |
| | | } else { |
| | | //失败 |
| | | alert("注å失败" + result.data.message); |
| | | |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | } |
| | | |
| | | }) |