123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>产品中心-创业帮</title>
- <meta name="keywords" content="产品中心-创业帮">
- <meta name="description" content="产品中心-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="产品中心-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- <style>
- .product-center .van-tabs__content .van-tab__pane{
- height:100%;
- }
- .van-tabs__content{overflow-y: auto; height:100vh !important;}
- .product_banner{height:auto;margin:.426667rem;}
- .tabs_btn .van-tab__text{display:flex;justify-content:center;align-items:center;line-height:0;}
- </style>
- </head>
- <body class="bgc-back ovh">
- <div class="iphonetitle"> </div>
- <div class="product-center" id="app">
- <van-nav-bar class="camp_title user_title_normal f16" title="创业帮产品" v-if="toptitleisshow" @click-left="goback" @click-right="gosort" right-text="产品排序" left-arrow v-cloak>
- <template #left>
- <van-icon name="arrow-left" color="#333" size="20"></van-icon>
- </template>
- </van-nav-bar>
- <van-tabs class="tabs_btn" v-model="active" swipeable animated line-width="20" line-height="2" :ellipsis="false" sticky>
- <van-tab v-for="product in productTypes" :title="product.Name">
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh" style="height:100%;min-height:0;">
- <div class="product-data mt16 ml16 mr16 bgcfff" v-cloak>
- <div class="pt16 pb16 pl16 pr16">
- <div class="pb16 tl"><strong class="db f16">机具管理</strong></div>
- <div class="tl">
- <van-row>
- <van-col span="8" @click="gomachinetotal">
- <div class="f12 c999 pb6">总机具数 ></div>
- <div class="index-num-b f18 c333 b">{{product.Machine.TotalMachineCount}}</div>
- </van-col>
- <van-col span="8" @click="gomachineunbind">
- <div class="f12 c999 pb6">未绑定 ></div>
- <div class="index-num-b f18 c333 b">{{product.Machine.UnBindCount}}</div>
- </van-col>
- <van-col span="8" @click="gomachinebind">
- <div class="f12 c999 pb6">已绑定 ></div>
- <div class="index-num-b f18 c333 b">{{product.Machine.BindCount}}</div>
- </van-col>
- </van-row>
- </div>
- <div class="product-data-button tc pt16">
- <van-button plain @click="machineapply">机具申请</van-button>
- <van-button plain @click="dialoutrecord">机具券</van-button>
- <van-button plain @click="orderdetail">订单查询</van-button>
- </div>
- </div>
- </div>
- <div class="product_banner ovh" v-for="item in product.Advertisment" :key="item.Id" @click="bannergo(product.Id)" v-if="product.Advertisment.length !== 0"><img :src="item.BannerPic" alt="" style="float:left;"></div>
- <div class="product-data mt16 ml16 mr16 bgcfff mb12" v-cloak>
- <div class="pt16 pb8">
- <div class="pb16 pl16 tl"><strong class="db f16">收益查看</strong></div>
- <div class="tl">
- <van-cell-group>
- <van-cell title="交易分润" :value="product.Profit.TradeProfit + '元'" is-link @click="trabsactiondetail"></van-cell>
- <van-cell title="激活奖励" :value="product.Profit.ActProfit + '元'" is-link @click="activedetail"></van-cell>
- <van-cell title="开机奖励" :value="product.Profit.OpenProfit + '元'" is-link @click="bootdetail"></van-cell>
- <van-cell title="分红奖励" :value="product.Profit.DividendsProfit + '元'" is-link @click="bonus"></van-cell>
- <van-cell title="分润补贴" :value="product.Profit.OtherProfit + '元'" is-link @click="subsidydetail"></van-cell>
- <van-cell title="流量卡分佣" :value="product.Profit.FluxProfit + '元'" is-link @click="profitdetail" v-if="product.Id !== 6"></van-cell>
- </van-cell-group>
- </div>
- </div>
- </div>
- </van-pull-refresh>
- </van-tab>
- </van-tabs>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script>
- function OnStart(){
- app.getproductinfo();
- };
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
- //--- PublicLib.SetStatusBarStyle({type:'light', isShow:1});
- //--- 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- refreshing: false,
- toptitleisshow:true,
- banner: [
- {
- id: 1,
- imgUrl: './temp/index-banner.png'
- },
- {
- id: 2,
- imgUrl: './temp/index-banner.png'
- }
- ],
- active: 0,
- showFilter: false,
- productTypes: [
- //- {
- //- Id: 7,
- //- Name: '盛付通电签',
- //- Machine: {
- //- TotalMachineCount: 1, //总机具数
- //- UnBindCount: 0, //未绑定机具数
- //- BindCount: 1, //已绑定机具数
- //- },
- //- Profit: {
- //- TradeProfit: 0.00, //交易分润
- //- ActProfit: 0.00, //激活奖励
- //- OpenProfit: 0.00, //开机奖励
- //- DividendsProfit: 0.00, //分红奖励
- //- OtherProfit: 0.00, //分润补贴
- //- FluxProfit: 0.00, //流量卡分佣
- //- },
- //- },
- //- {
- //- Id: 5,
- //- Name: '乐刷大POS',
- //- Machine: {
- //- TotalMachineCount: 100, //总机具数
- //- UnBindCount: 50, //未绑定机具数
- //- BindCount: 50, //已绑定机具数
- //- },
- //- Profit: {
- //- TradeProfit: 0.00, //交易分润
- //- ActProfit: 0.00, //激活奖励
- //- OpenProfit: 0.00, //开机奖励
- //- DividendsProfit: 0.00, //分红奖励
- //- OtherProfit: 0.00, //分润补贴
- //- FluxProfit: 0.00, //流量卡分佣
- //- },
- //- },
- ],
- enters: [
- {
- text: '我的业绩',
- icon: './static/images/product-banner1.png',
- value: 1
- },
- {
- text: '快钱资质',
- icon: './static/images/product-banner2.png',
- value: 2
- },
- {
- text: '操作视频',
- icon: './static/images/product-banner3.png',
- value: 3
- },
- ],
- loading: false,
- finished: false,
- refreshing: false,
- };
- },
- created() {
- this.getproductinfo();
- const name = JSON.parse(PublicLib.getCookieInfo('userInfo')).RealName;
- const issp = name.split('').some(item=>{
- return item === '*';
- });
- if(issp){
- return PublicLib.GoBack({Level:-1});
- };
- },
- methods: {
- onRefresh() {
- //- this.productTypes = [];
- // 清空列表数据
- this.getproductinfo();
- },
- page(pageid){
- switch(pageid){
- //- 操作视频
- case 3:
- PublicLib.Goto({Url:'option-video'});
- break;
- //- 块钱资质
- case 2:
- PublicLib.Goto({Url:'qualifications'});
- break;
- //- 我的业绩
- case 1:
- PublicLib.Goto({Url:'product-myperformance'});
- break;
- }
- },
- //- 获取整体机具信息
- async getproductinfo(){
- const UserId = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/pos/kqproducts/mainstatdata?t='+Math.random(6),JSON.stringify({UserId,Distribute:1}));
- if(res.status !== '1')return tips('机具信息获取失败!');
- this.refreshing = false;
- res.data.forEach(item=>{
- item.Profit.TradeProfit = item.Profit.TradeProfit.toFixed(2);
- item.Profit.ActProfit = item.Profit.ActProfit.toFixed(2);
- item.Profit.OpenProfit = item.Profit.OpenProfit.toFixed(2);
- item.Profit.DividendsProfit = item.Profit.DividendsProfit.toFixed(2);
- item.Profit.OtherProfit = item.Profit.OtherProfit.toFixed(2);
- item.Profit.FluxProfit = item.Profit.FluxProfit.toFixed(2);
- });
- const productlist = [];
- const list = PublicLib.getCookieInfo('productCenterList') ? PublicLib.getCookieInfo('productCenterList') : '[]';
- const testarr = JSON.parse(list) ? JSON.parse(list) : [];
- const productsnum = res.data.length - testarr.length;
- if(productsnum !== 0){
- for(let i = productsnum; i > 0; i--){
- testarr.push(res.data[res.data.length - i].Id);
- };
- };
- testarr.forEach((num)=>{
- res.data.forEach((item,index)=>{
- if(item.Id === Number(num)){
- productlist.push(item);
- };
- });
- });
- this.productTypes = productlist;
- //- this.productTypes.push(...res.data);
- },
- //- 中部banner跳转地址
- bannergo(id){
- if(id === 2){
- //- KDB
- PublicLib.putCookieInfo('goIndex',1);
- }else if(id === 1 || id === 3){
- //- JK
- PublicLib.putCookieInfo('goIndex',2);
- }else if(id === 4 || id === 5){
- //- LS
- PublicLib.putCookieInfo('goIndex',3);
- }else if(id === 6){
- //- LiS
- PublicLib.putCookieInfo('goIndex',4);
- }else if(id === 7){
- PublicLib.putCookieInfo('goIndex',5);
- }
- PublicLib.Goto({Url:'user-service-list'});
- },
- //- 总机具数
- gomachinetotal(){
- this.gomachine();
- PublicLib.Goto({Url:'product-machine-total-list'});
- },
- //- 已绑定机具
- gomachinebind(){
- this.gomachine();
- PublicLib.Goto({Url:'product-machine-bind-list'});
- },
- //- 未绑定机具
- gomachineunbind(){
- this.gomachine();
- PublicLib.Goto({Url:'product-machine-unbind-list'});
- },
- //- 跳转页面需要数据
- gomachine(){
- PublicLib.putCookieInfo('productMachineType', this.productTypes[this.active].Name);
- PublicLib.putCookieInfo('productMachineId', this.productTypes[this.active].Id);
- },
- //- 机具申请
- machineapply(){
- this.gomachine();
- PublicLib.Goto({Url:'product-machine-apply-1'});
- },
- //- 返回
- goback(){
- PublicLib.GoBack({Level:1});
- },
- //- 激活奖励
- activedetail(){
- this.gomachine();
- PublicLib.Goto({Url:'product-profit-activation'});
- },
- //- 开机奖励
- bootdetail(){
- this.gomachine();
- PublicLib.Goto({Url:'product-profit-boot'});
- },
- //- 流量卡分佣
- profitdetail(){
- this.gomachine();
- PublicLib.Goto({Url:'product-profit-flow'});
- },
- //- 分润补贴
- subsidydetail(){
- this.gomachine();
- PublicLib.Goto({Url:'product-profit-subsidy'});
- },
- //- 交易分润
- trabsactiondetail(){
- this.gomachine();
- PublicLib.Goto({Url:'product-profit-transaction'});
- },
- //- 分红奖励
- bonus(){
- this.gomachine();
- PublicLib.Goto({Url:'product-profit-shareoutbonus'});
- },
- //- 订单查询
- orderdetail(){
- PublicLib.putCookieInfo('producttype', this.productTypes[this.active].Id);
- PublicLib.Goto({Url:'mall-deal-list'});
- },
- //- 拨出记录
- dialoutrecord(){
- this.gomachine();
- //- PublicLib.Goto({Url:'product-profit-dialoutrecord'});
- PublicLib.Goto({Url:'product-machine-transfer'});
- },
- //- 排序
- gosort(){
- PublicLib.Goto({Url:'product-center-sort'});
- }
-
- }
- });
- </script>
- </body>
- </html>
|