<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<title>快省云发单</title>
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
<link rel="stylesheet" type="text/css" href="css/base.css" />
|
<link rel="stylesheet" type="text/css" href="css/cloudPushOrderManage.css" />
|
<script>
|
window.onresize = function() {
|
document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
|
};
|
window.onresize();
|
</script>
|
<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>
|
<link href="css/load.css" rel="stylesheet" />
|
<style type="text/css">
|
[v-cloak] {
|
display: none !important;
|
}
|
</style>
|
</head>
|
<body>
|
<div id="root">
|
<div class="div_header">
|
<div class="div_header_title">
|
<div class="div_header_1" @click="selectTab(1)">
|
<p>云发单管理</p>
|
</div>
|
<div class="div_header_mid">
|
<div></div>
|
</div>
|
<div class="div_header_2" @click="selectTab(2)">
|
<p>发单商品库</p>
|
</div>
|
</div>
|
<div class="div_header_line">
|
<div class="div_header_line_1"></div>
|
<div class="div_header_line_2"></div>
|
</div>
|
</div>
|
|
<!-- 云发单管理 -->
|
<div v-if="selectTabType==1" class="div_cloudPushOrderManage" v-cloak>
|
<div class="div_top_header">
|
<div class="" style="display: -webkit-flex;">
|
<img :src="userInfo.portrait" class="headPortrait">
|
<div>
|
<div class="nickName">{{userInfo.nickName}}</div>
|
<div v-if="!openState" class="desc">开通云发单,自动分享轻松赚钱</div>
|
|
<div v-else class="desc">
|
开通时间:{{userInfo.openTime}} 剩余<span style="color: #E5005C;font-size: 0.36rem; font-weight: bold;"> {{userInfo.countdown}} </span>天
|
</div>
|
|
<div v-if="!openState" class="openPushOrderManage" @click="openCloudPushOrder()">开通</div>
|
<div v-else class="openPushOrderManage">续费</div>
|
</div>
|
</div>
|
</div>
|
<!-- 云发单管理未登录 -->
|
<div v-if="!isWxLogin" class="div_cloudPushOrderManage_notLogin" v-cloak>
|
<div class="div_cloudPushOrderManage_notLogin_content1">
|
<div class="login_wx" @click="loginWX()">
|
<p>登录微信</p>
|
</div>
|
<div class="content1_desc">
|
请先登录微信,微信在线才能发单哦~
|
</div>
|
</div>
|
|
<div class="div_cloudPushOrderManage_notLogin_content2">
|
<div style="display: -webkit-flex; padding-top: 0.45rem;align-items: center;">
|
<img src="img/icon_1.png" class="img1">
|
<img src="img/icon_arrow.png" class="icon_arrow">
|
<img src="img/icon_2.png" class="icon_img">
|
<img src="img/icon_arrow.png" class="icon_arrow">
|
<img src="img/icon_3.png" class="icon_img">
|
<img src="img/icon_arrow.png" class="icon_arrow">
|
<img src="img/icon_4.png" class="icon_img">
|
<img src="img/icon_arrow.png" class="icon_arrow">
|
<img src="img/icon_5.png" class="icon_img">
|
</div>
|
<div style="display: -webkit-flex;color: #666666;font-size: 0.24rem; margin-top: 0.17rem;">
|
<div class="" style="width: 20%; height: 0.24rem; display: -webkit-flex;justify-content: center;align-items: center;">
|
登录微信
|
</div>
|
<div class="" style="width: 20%; height: 0.24rem; display: -webkit-flex;justify-content: center;align-items: center;">
|
激活微信群
|
</div>
|
<div class="" style="width: 20%; height: 0.24rem; display: -webkit-flex;justify-content: center;align-items: center;">
|
选品/采集
|
</div>
|
<div class="" style="width: 20%; height: 0.24rem; display: -webkit-flex;justify-content: center;align-items: center;">
|
选群/朋友圈
|
</div>
|
<div class="" style="width: 20%; height: 0.24rem; display: -webkit-flex;justify-content: center;align-items: center;">
|
自动发单
|
</div>
|
</div>
|
</div>
|
|
<div class="div_cloudPushOrderManage_notLogin_content3">
|
<div style="height: 0.77rem; display: -webkit-flex; align-items: center;">
|
<div style="font-size: 0.26rem;font-weight: bold;color: #2BA245; margin-left: 0.25rem;">
|
云发单
|
</div>
|
<div style="background-color: #2BA245; width: 2px;height: 0.3rem;margin-left: 0.22rem;"></div>
|
<div style="font-size: 0.26rem;color: #000000; margin-left: 0.19rem;">
|
自动群发单/朋友圈发圈
|
</div>
|
</div>
|
<div class="div_image_fmt">
|
<img :src="userInfo.head" class="image_fmt">
|
</div>
|
|
</div>
|
</div>
|
<!-- 云发单管理已经登录 -->
|
<div v-if="isWxLogin" class="div_cloudPushOrderManage_login" v-cloak>
|
<div class="div_cloudPushOrderManage_login_content1">
|
<div style="display: -webkit-flex; justify-content: space-between;">
|
<div>
|
<div style="color:#333333; display:-webkit-flex;font-size: 0.36rem;height: 0.36rem;align-items: center; margin-left: 0.28rem;margin-top: 0.34rem;">
|
微信已登录
|
</div>
|
<div style="color:#666666; display:-webkit-flex;font-size: 0.3rem;height: 0.3rem;align-items: center; margin-left: 0.28rem;margin-top: 0.22rem;">
|
{{userInfo.wxName}}
|
</div>
|
</div>
|
<div style="height: 1.54rem;display: -webkit-flex;align-items: center;">
|
<p style="color: #FFFFFF; font-size: 0.24rem; background-color: #2BA245; width: 2rem;height: 0.5rem;border-radius: 0.25rem;display:-webkit-flex;align-items: center;justify-content: center;margin-right: 0.26rem;">
|
退出登录
|
</p>
|
</div>
|
</div>
|
</div>
|
|
<div class="div_cloudPushOrderManage_login_content2">
|
<div>
|
朋友圈发单
|
</div>
|
<img src="img/icon_off.png">
|
</div>
|
|
<div class="div_cloudPushOrderManage_login_content3">
|
<div class="div_cloudPushOrderManage_login_content3_header">
|
<div>
|
微信群发单
|
</div>
|
<img src="img/icon_refresh.png">
|
</div>
|
<div class="" style="margin-top: 0.2rem; background-color: #FFF3D3; display: -webkit-flex;align-items: center;justify-content: center;margin-left: 0.15rem;margin-right: 0.1rem;">
|
<p style="font-size: 0.24rem;color: #666666; padding-top: 0.25rem;padding-left: 0.25rem;padding-bottom: 0.25rem;padding-right: 0.05rem;">
|
请选择自己为群主的微信群,并把群保存到微信通讯录中,且向“微信群"发送“快省爆款推荐”激活云发单
|
<p>
|
</div>
|
<div class="div_list">
|
<div class="div_item" v-for="(item, index) in dataList">
|
<div style="height: 0.33rem;"></div>
|
<div class="div_item_content">
|
<div>微信群名称微信群名称微信群名称</div>
|
<img src="img/icon_off.png">
|
</div>
|
</div>
|
</div>
|
<div style="color: #999999; font-size: 0.22rem;height: 0.22rem;display: -webkit-flex;justify-content: center;align-items: center;margin-top: 0.51rem;">
|
发单建议频率不要过高,以免影响群友
|
</div>
|
<div style="height: 0.33rem;"></div>
|
</div>
|
</div>
|
|
<div style="height: 0.2rem;"></div>
|
</div>
|
|
<!-- 发单商品库 -->
|
<div v-if="selectTabType==2" class="div_goodsLibrary" v-cloak>
|
<div class="div_goodsLibrary_content1">
|
<div>
|
<div style="color: #333333;font-size: 0.34rem;height: 0.34rem; display: -webkit-flex;align-items: center;margin-left: 0.25rem;margin-top: 0.23rem;">
|
自动采集官方推荐
|
</div>
|
<div style="color: #666666;font-size: 0.2rem;height: 0.22rem; display: -webkit-flex;align-items: center;margin-left: 0.25rem;margin-top: 0.14rem;">
|
官方精选1个小时内仅发送一个商品(9:00~21:00)
|
</div>
|
</div>
|
<img v-if="!official" src="img/icon_off.png" style="width: 1.02rem;height: 0.62rem;margin-top: 0.27rem;margin-right: 0.2rem;"
|
@click="openGFRecomend">
|
<img v-else src="img/icon_on.png" style="width: 1.02rem;height: 0.62rem;margin-top: 0.27rem;margin-right: 0.2rem;"
|
@click="openGFRecomend">
|
</div>
|
|
<div class="div_goodsLibrary_content2">
|
<div>
|
<div style="color: #333333;font-size: 0.34rem;height: 0.34rem; display: -webkit-flex;align-items: center;margin-left: 0.25rem;margin-top: 0.23rem;">
|
优先发送自选商品
|
</div>
|
<div style="color: #666666;font-size: 0.2rem;height: 0.22rem; display: -webkit-flex;align-items: center;margin-left: 0.25rem;margin-top: 0.14rem;">
|
即选即发,注重质量不追求数量,避免骚扰群友
|
</div>
|
</div>
|
<img v-if="!custom" src="img/icon_off.png" style="width: 1.02rem;height: 0.62rem;margin-top: 0.27rem;margin-right: 0.2rem;"
|
@click="openFSGoods">
|
<img v-else src="img/icon_on.png" style="width: 1.02rem;height: 0.62rem;margin-top: 0.27rem;margin-right: 0.2rem;"
|
@click="openFSGoods">
|
</div>
|
|
<div class="div_goodsLibraryList">
|
<div class="div_item_goodsLibrary" v-for="(item, index) in goodsList">
|
|
<div class="div_goodsBG">
|
<img v-bind:src="item.goods.picUrl" class="goodsimg" />
|
<img v-if="item.goods.state==2" src="img/icon_send.png" class="topleftImg">
|
<img v-else-if="item.goods.state==1" src="img/icon_ydown.png" class="topleftImg">
|
</div>
|
|
<div class="div_item_rightBg">
|
<div class="div_goods_title_bg">
|
|
<img v-if="item.goods.shopType==10" src="img/icon_tb.png">
|
<img v-else-if="item.goods.shopType==11" src="img/icon_tm.png">
|
<img v-else-if="item.goods.shopType==20" src="img/icon_jd.png">
|
<img v-else-if="item.goods.shopType==30" src="img/icon_pdd.png" style="width: 0.81rem;">
|
<img v-else-if="item.goods.shopType==40" src="img/icon_wph.png" style="width: 0.9rem;">
|
<img v-else-if="item.goods.shopType==50" src="img/icon_sn.png" style="width: 1.12rem;">
|
|
<span v-if="item.goods.shopType==30" class="goods_title" style="text-indent: 0.93rem;">{{item.goods.title}}</span>
|
<span v-else-if="item.goods.shopType==40" class="goods_title" style="text-indent: 1.02rem;">{{item.goods.title}}</span>
|
<span v-else-if="item.goods.shopType==50" class="goods_title" style="text-indent: 1.24rem;">{{item.goods.title}}</span>
|
<span v-else class="goods_title">{{item.goods.title}}</span>
|
</div>
|
<div v-if="item.goods.labels" class="div_goods_labels_bg">
|
<div class="div_goods_label1"> {{item.goods.labels[0].content}} </div>
|
<div class="div_goods_label2"> 夏季爆款 </div>
|
</div>
|
|
<div class="div_store_bg">
|
<img v-if="item.goods.shopInfo" src="img/icon_store.png">
|
<div v-if="item.goods.shopInfo">{{item.goods.shopInfo.shopName}}</div>
|
</div>
|
|
<div class="div_coupon_bg">
|
<div v-if="item.goods.shopType!=40&&item.goods.hasCoupon" style="color: white;font-size: 0.24rem;font-weight: bold;width: 0.41rem;height: 0.36rem;background-color: #E5005C;display: flex;align-items: center;justify-content: center;border-radius: 0.06rem 0 0 0.06rem;">
|
券
|
</div>
|
<div v-else-if="item.goods.shopType==40" style="color: white;font-size: 0.24rem;background-color: #E5005C;border-radius: 0.06rem;">
|
{{item.goods.discount}}
|
</div>
|
|
<div v-if="item.goods.shopType!=40&&item.goods.hasCoupon" class="coupon_money"> ¥{{item.goods.couponInfo.amount}}
|
</div>
|
|
<div class="fanli_title"> 返{{item.goods.moneyInfo.fanliMoney}} </div>
|
</div>
|
|
<div class="div_payment_sales_bg">
|
<div>¥</div>
|
|
<div v-if="item.goods.couponPrice">{{item.goods.couponPrice}}</div>
|
<div v-else>{{item.goods.zkPrice}}</div>
|
|
<div>¥{{item.goods.zkPrice}}</div>
|
<div v-if="item.goods.shopType!=40">月销 {{item.goods.salesCount}}</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
|
</div>
|
|
<div class="dialogmask_notOpen">
|
<div class="dialog">
|
<img src="img/icon_close.png" @click="hiddenDialog()">
|
<div class="dialog_title">未开通提醒</div>
|
<div class="dialog_content">云发单首先要登录微信,且需要购买云发单服务,完成设置后,才会自动发单/发圈。</div>
|
<div class="dialog_commit" @click="pushOpenVip">去开通</div>
|
</div>
|
</div>
|
|
<div class="dialogmask_Tips">
|
<div class="dialog">
|
<img src="img/icon_close.png" @click="hiddenDialog()">
|
<div class="dialog_title">官方采集</div>
|
<div class="dialog_content">开启后30分钟内将会进行第一次发单,之后每1个小时发一个商品,你可随时关闭。</div>
|
<div class="dialog_commit" @click="commitAddTxRecord">知道了</div>
|
</div>
|
</div>
|
|
<div class="dialogmask_wx">
|
<div class="dialog_wx">
|
<img src="img/icon_close.png" @click="hiddenDialog()">
|
<div class="dialog_title">请使用手机微信扫描登录</div>
|
<div class="">
|
<img :src="qrCodeUrl" style="width: 4.46rem;height: 4.46rem;margin-left: 0.57rem;margin-top: 0.46rem;">
|
</div>
|
<div style="color: #E5005C;font-size: 0.24rem;height: 0.24rem;display: -webkit-flex;align-items: center;justify-content: center;margin-top: 0.2rem;">
|
登录方法
|
</div>
|
<div style="color: #E5005C;font-size: 0.24rem;height: 0.24rem;margin-top: 0.1rem;margin-left: 0.65rem;margin-right: 0.6rem;">
|
方法一:将二维码截图后发送其他手机,再使用手机微信扫一扫登录。<br>
|
方法二:将二维码截图发送至电脑,再用手机扫描二维码登录。
|
</div>
|
</div>
|
</div>
|
|
<div v-show="selectTabType==2" class="loading-more"></div>
|
</div>
|
</body>
|
|
<script src="js/load.js"></script>
|
|
<script>
|
// "http://api.flqapp.com";
|
var host = "http://192.168.1.253:8080";
|
var host1 = "http://192.168.1.114:8848";
|
var check = null;
|
var wId = null;
|
|
$(function() {
|
var app = new Vue({
|
el: '#root',
|
data: {
|
|
selectTabType: 1,
|
page: 1,
|
openState: false, // 是否了开通云发单权限
|
isWxLogin: false, // 是否登录了微信
|
circle: false, // 朋友圈-是否开启
|
qrCodeUrl: null,
|
userInfo: {},
|
dataList: [{}, {}],
|
custom: false, // 优先发送自选商品库
|
official: false, // 自动采集官方推荐
|
count: 0,
|
goodsList: [
|
// {
|
// goods: {
|
// shopInfo: {
|
// shopName: null
|
// }
|
// }
|
// },
|
]
|
},
|
watch: {
|
|
},
|
methods: {
|
selectTab: function(type) {
|
if (app.selectTabType == type) return;
|
$('.div_header_line_' + type).css('opacity', '1');
|
$('.div_header_' + type).css('color', '#E5005C');
|
|
$('.div_header_line_' + app.selectTabType).css('opacity', '0');
|
$('.div_header_' + app.selectTabType).css('color', '#000000');
|
|
document.body.scrollTop = document.documentElement.scrollTop = 0;
|
app.selectTabType = type;
|
app.stopMacloginCheck();
|
if (type == 2) { //切换到发单商品库
|
app.page = 1;
|
app.fetchGoodsList();
|
|
}
|
},
|
|
hiddenDialog: function() {
|
$('.dialogmask_notOpen').css('display', 'none')
|
$('.dialogmask_Tips').css('display', 'none')
|
$('.dialogmask_wx').css('display', 'none')
|
app.stopMacloginCheck();
|
},
|
// 开通云发单
|
openCloudPushOrder: function() {
|
yesApp.jumpWeb(host1 + '/flqFront/AppInside/cloudPushOrder/openCloudPushOrder.html', null);
|
},
|
// 登录微信
|
loginWX: function() {
|
if (app.openState) {
|
app.fetchQrcodeMaclogin();
|
|
} else {
|
yesApp.jumpWeb(host1 + '/flqFront/AppInside/cloudPushOrder/openCloudPushOrder.html', null);
|
}
|
},
|
|
openGFRecomend: function() {
|
if (app.openState) {
|
|
|
} else {
|
$('.dialogmask_notOpen').css('display', 'block')
|
}
|
},
|
|
openFSGoods: function() {
|
if (app.openState) {
|
|
|
} else {
|
$('.dialogmask_notOpen').css('display', 'block')
|
}
|
},
|
|
pushOpenVip: function() {
|
$('.dialogmask_notOpen').css('display', 'none')
|
yesApp.jumpWeb(host1 + '/flqFront/AppInside/cloudPushOrder/openCloudPushOrder.html', null);
|
},
|
|
commitAddTxRecord: function() {
|
|
},
|
|
fetchQrcodeMaclogin: 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/getQrcodeMaclogin",
|
dataType: "jsonp",
|
async: false,
|
success: function(result) {
|
yesApp.hideLoading();
|
if (result.code == 0) {
|
wid = result.data.wId;
|
|
app.qrCodeUrl = result.data.qrCodeUrl;
|
$('.dialogmask_wx').css('display', 'block');
|
app.setMacloginCheck();
|
|
} else {
|
yesApp.toast(result.msg);
|
}
|
},
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
yesApp.hideLoading();
|
if (textStatus === 'timeout') {
|
setTimeout(function() {}, 2000);
|
}
|
}
|
});
|
},
|
|
setMacloginCheck: function() {
|
var myVar = setInterval(function() {
|
app.fetchMacloginCheck();
|
}, 3000);
|
check = myVar;
|
},
|
|
fetchMacloginCheck: function() {
|
var uid = yesApp.getUid();
|
var params = {
|
uid: uid,
|
wId: wid
|
};
|
params = yesApp.getRequestBaseParams(params);
|
$.ajax({
|
type: "GET",
|
data: JSON.parse(params),
|
url: host + "/fanli/api/v2/user/cloud/macloginCheck",
|
dataType: "jsonp",
|
async: false,
|
success: function(result) {
|
if (result.code == 0) {
|
if (result.data.state) {
|
$('.dialogmask_wx').css('display', 'none');
|
app.stopMacloginCheck();
|
app.fetcCloudInfo();
|
}
|
|
} else {
|
yesApp.toast(result.msg);
|
}
|
},
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
yesApp.hideLoading();
|
if (textStatus === 'timeout') {
|
setTimeout(function() {}, 2000);
|
}
|
}
|
});
|
},
|
|
stopMacloginCheck: function() {
|
clearInterval(check);
|
},
|
// 云发单开通信息
|
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) {
|
if (parseInt(result.data.openState) == 0) {
|
app.openState = false;
|
|
} else if (parseInt(result.data.openState) == 1) {
|
app.openState = true;;
|
}
|
app.isWxLogin = result.data.loginState;
|
app.circle = result.data.circle;
|
app.userInfo = result.data;
|
|
} else {
|
yesApp.toast(result.msg);
|
}
|
},
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
yesApp.hideLoading();
|
if (textStatus === 'timeout') {
|
setTimeout(function() {}, 2000);
|
}
|
}
|
});
|
},
|
|
// 发单商品库
|
fetchGoodsList: function() {
|
yesApp.showLoading();
|
var uid = yesApp.getUid();
|
var params = {
|
uid: uid,
|
page: app.page
|
};
|
params = yesApp.getRequestBaseParams(params);
|
$.ajax({
|
type: "GET",
|
data: JSON.parse(params),
|
url: host + "/fanli/api/v2/user/cloud/getGoodsList",
|
dataType: "jsonp",
|
async: false,
|
success: function(result) {
|
yesApp.hideLoading();
|
if (result.code == 0) {
|
app.custom = result.data.custom;
|
app.official = result.data.official;
|
|
if (app.page == 1) {
|
app.goodsList = new Array();
|
}
|
app.page += 1;
|
app.count = result.data.count;
|
|
var list = app.goodsList.concat(result.data.list);
|
app.goodsList = list;
|
|
|
|
if (app.count <= app.goodsList.length) {
|
load.noMore();
|
}
|
|
} else {
|
yesApp.toast(result.msg);
|
}
|
},
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
yesApp.hideLoading();
|
if (textStatus === 'timeout') {
|
setTimeout(function() {}, 2000);
|
}
|
}
|
});
|
}
|
}
|
});
|
app.fetcCloudInfo();
|
});
|
|
//(浏览器窗口上边界内容高度)
|
function getDocumentTop() {
|
var scrollTop = 0,
|
bodyScrollTop = 0,
|
documentScrollTop = 0;
|
if (document.body) {
|
bodyScrollTop = document.body.scrollTop;
|
}
|
if (document.documentElement) {
|
documentScrollTop = document.documentElement.scrollTop;
|
}
|
scrollTop = (bodyScrollTop - documentScrollTop > 0) ? bodyScrollTop : documentScrollTop;
|
console.log("scrollTop:" + scrollTop);
|
return scrollTop;
|
}
|
|
//可视窗口高度(屏幕可以看见的高度)
|
function getWindowHeight() {
|
var windowHeight = 0;
|
if (document.compatMode == "CSS1Compat") {
|
windowHeight = document.documentElement.clientHeight;
|
} else {
|
windowHeight = document.body.clientHeight;
|
}
|
console.log("windowHeight:" + windowHeight);
|
return windowHeight;
|
}
|
|
//滚动条滚动高度(即整个网页的高度)
|
function getScrollHeight() {
|
var scrollHeight = 0,
|
bodyScrollHeight = 0,
|
documentScrollHeight = 0;
|
if (document.body) {
|
bodyScrollHeight = document.body.scrollHeight;
|
}
|
if (document.documentElement) {
|
documentScrollHeight = document.documentElement.scrollHeight;
|
}
|
scrollHeight = (bodyScrollHeight - documentScrollHeight > 0) ? bodyScrollHeight : documentScrollHeight;
|
console.log("scrollHeight:" + scrollHeight);
|
return scrollHeight;
|
}
|
</script>
|
</html>
|