From 3bc16a1d3afee0d1ba5c39b1415309e1fe2c63a1 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 11 六月 2020 10:13:17 +0800 Subject: [PATCH] Merge branch 'master' of ssh://193.112.35.168:29418/flqFront --- AppInside/cloudPushOrder/openCloudPushOrder.html | 140 ++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 120 insertions(+), 20 deletions(-) diff --git a/AppInside/cloudPushOrder/openCloudPushOrder.html b/AppInside/cloudPushOrder/openCloudPushOrder.html index 2ccefbd..d3645f3 100644 --- a/AppInside/cloudPushOrder/openCloudPushOrder.html +++ b/AppInside/cloudPushOrder/openCloudPushOrder.html @@ -15,9 +15,14 @@ <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <script src="http://img.flqapp.com/resource/js/app2019112217.js"></script> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> + <style type="text/css"> + [v-cloak] { + display: none !important; + } + </style> </head> <body> - <div id="root"> + <div id="root" v-cloak> <div class="div_header"> <div class="div_header_title"> <div class="div_header_1" @click="selectTab(1)"> @@ -40,9 +45,9 @@ <div class="div_cloudPushOrderManage"> <div class="div_top_header"> <div class="" style="display: -webkit-flex;"> - <img :src="userInfo.por" class="headPortrait"> + <img :src="userInfo.portrait" class="headPortrait"> <div> - <div class="nickName">鏉版媺鏂�</div> + <div class="nickName">{{userInfo.nickName}}</div> <div class="desc">寮�閫氫簯鍙戝崟锛岃嚜鍔ㄥ垎浜交鏉捐禋閽�</div> </div> </div> @@ -85,22 +90,22 @@ </div> <div class="div_contentBG2"> - <div style="display: -webkit-flex;"> - <div class="div_money1"> - <div class="moneyPrice"> - <span style="font-size: 0.32rem;">锟�</span>20.00 + <div style="display: -webkit-flex; flex-wrap: wrap;"> + + <div class="div_item" v-for="(item, index) in listMenu" @click="touchOpenPackage(item,index)"> + <div class="div_money1"> + <div class="moneyPrice"> + <span style="font-size: 0.32rem;">锟�</span>{{item.money}} + </div> + <div class="openDate">{{item.desc}}</div> + <img src="img/icon_money_select.png" class="img_moneySelect" :id="nameId(item,index)" style="opacity: 0;"> </div> - <div class="openDate"> - 1涓湀 - </div> - <img src="img/icon_money_select.png" class="img_moneySelect"> </div> - <div class="div_money_normol"> - 鍗冲皢寮�鏀� - </div> + + <div class="div_money_normol">鍗冲皢寮�鏀�</div> </div> - <div class="div_open"> + <div class="div_open" @click="openVIP"> 绔嬪嵆寮�閫� </div> <div style="display: -webkit-flex;align-items: center;margin-top: 0.2rem;"> @@ -116,6 +121,10 @@ </div> <img src="img/icon_back.png" style="width:0.1rem;height: 0.17rem;margin-left: 0.09rem;"> </div> + + <div style="height: 0.4rem;"></div> + + </div> <div class="div_contentBG3"> @@ -138,16 +147,19 @@ <script> // "http://api.flqapp.com"; var host = "http://api.flqapp.com"; - var host1 = "http://192.168.1.114:8848"; + var host1 = "http://192.168.1.114:8848"; + $(function() { var app = new Vue({ el: '#root', data: { selectTabType: 1, + selectOpenPakeg: null, isOpenCloud: false, //鏄惁浜嗗紑閫氫簯鍙戝崟鏉冮檺 isWxLogin: false, //鏄惁鐧诲綍浜嗗井淇� userInfo: {}, - dataList: [{}, {}] + dataList: [{}, {}], + listMenu: [] }, watch: { @@ -164,12 +176,100 @@ app.selectTabType = type }, + touchOpenPackage: function(item, index) { + var id = app.nameId(item, index); + if (app.selectOpenPakeg == id) return; + $('#' + id).css('opacity', '1') + $('#' + app.selectOpenPakeg).css('opacity', '0') + app.selectOpenPakeg = id; + + }, + + nameId: function(item, index) { + return index; + }, + + openVIP: function() { + if (app.selectOpenPakeg == null) { + yesApp.toast('璇烽�夋嫨寮�閫氭椂闀�'); + return; + } + var type = app.listMenu[app.selectOpenPakeg].type; + + yesApp.showLoading(); + var uid = yesApp.getUid(); + var params = { + uid: uid, + type: type + }; + params = yesApp.getRequestBaseParams(params); + $.ajax({ + type: "GET", + data: JSON.parse(params), + url: host + "/fanli/api/v2/user/cloud/pay", + dataType: "jsonp", + async: false, + success: function(result) { + yesApp.hideLoading(); + if (result.code == 0) { + if (result.data.link.length == 0 || result.data.link == null || result.data.link == '') return; + yesApp.jumpWeb(result.data.link, null); + + } else { + yesApp.toast(result.msg); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + yesApp.hideLoading(); + yesApp.toast('澶辫触浜�') + if (textStatus === 'timeout') { + setTimeout(function() {}, 2000); + } + } + }); + }, + openRecord: function() { yesApp.jumpWeb(host1 + '/flqFront/AppInside/cloudPushOrder/openRecord.html', null); - } - } - }); + }, + fetcCloudInfo: function() { + yesApp.showLoading(); + var uid = yesApp.getUid(); + var params = { + uid: uid, + }; + params = yesApp.getRequestBaseParams(params); + $.ajax({ + type: "GET", + data: JSON.parse(params), + url: host + "/fanli/api/v2/user/cloud/getCloudInfo", + dataType: "jsonp", + async: false, + success: function(result) { + yesApp.hideLoading(); + if (result.code == 0) { + app.userInfo = result.data; + app.listMenu = result.data.listMenu; + + } else { + yesApp.toast(result.msg); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + yesApp.toast('澶辫触浜�') + + yesApp.hideLoading(); + if (textStatus === 'timeout') { + setTimeout(function() {}, 2000); + } + } + }); + } + }, + + }); + app.fetcCloudInfo(); }); </script> </html> -- Gitblit v1.8.0