|
@@ -39,7 +39,7 @@
|
|
|
<view class="" style="height: 284upx;"></view>
|
|
|
|
|
|
<!-- 输入框 -->
|
|
|
- <view class="input-code" :class="{heiden : isScroll === true}">
|
|
|
+ <view class="input-code" :animation="animationData">
|
|
|
<input type="text" v-model="ordernum" maxlength="-1" placeholder-style="color:#b8bbbb;font-size:28upx;" class="code" placeholder="请输入验证码核验">
|
|
|
<view class="search" @tap="searchOrder">搜索</view>
|
|
|
</view>
|
|
@@ -195,8 +195,6 @@
|
|
|
<view class="title">
|
|
|
<view class="left">
|
|
|
<text class="future">产品销售数量走势
|
|
|
- <!-- <text class="num">0</text>
|
|
|
- <text class="yesterday">昨日全天:<text class="daynum">0</text></text> -->
|
|
|
</text>
|
|
|
</view>
|
|
|
<view class="right">
|
|
@@ -206,7 +204,8 @@
|
|
|
</view>
|
|
|
<view class="qiun-charts">
|
|
|
<canvas canvas-id="shopsellEcharts" id="shopsellEcharts" class="shopsellEcharts" disable-scroll=true @touchend="shopSellEndTouch"></canvas>
|
|
|
- <image class="shopsellimg" :src="shopsellimg"></image>
|
|
|
+ <text class="loadingMore" v-if="loadingMore1">加载中...</text>
|
|
|
+ <image class="shopsellimg" :src="shopsellimg" v-if="!loadingMore1"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 产品销售金额走势 -->
|
|
@@ -214,8 +213,6 @@
|
|
|
<view class="title">
|
|
|
<view class="left">
|
|
|
<text class="future">产品销售金额走势
|
|
|
- <!-- <text class="num">0</text>
|
|
|
- <text class="yesterday">昨日全天:<text class="daynum">0</text></text> -->
|
|
|
</text>
|
|
|
</view>
|
|
|
<view class="right">
|
|
@@ -225,17 +222,15 @@
|
|
|
</view>
|
|
|
<view class="qiun-charts">
|
|
|
<canvas canvas-id="shopmoneyEcharts" id="shopmoneyEcharts" class="shopmoneyEcharts" @touchstart="shopMoneyTouch"></canvas>
|
|
|
- <image class="shopmoneyimg" :src="shopmoneyimg"></image>
|
|
|
+ <text class="loadingMore" v-if="loadingMore2">加载中...</text>
|
|
|
+ <image class="shopmoneyimg" :src="shopmoneyimg" v-if="!loadingMore2"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 未来7天预定 -->
|
|
|
<view class="echarts future">
|
|
|
<view class="title">
|
|
|
<view class="left">
|
|
|
- <text class="future">未来七天预定
|
|
|
- <!-- <text class="num">0</text>
|
|
|
- <text class="yesterday">昨日全天:<text class="daynum">0</text></text> -->
|
|
|
- </text>
|
|
|
+ <text class="future">未来七天预定</text>
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
<view class="today-icon"></view><text class="title">今日</text>
|
|
@@ -243,7 +238,8 @@
|
|
|
</view>
|
|
|
<view class="qiun-charts">
|
|
|
<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" @touchstart="touchLineA"></canvas>
|
|
|
- <image class="futureimg" :src="futureimg"></image>
|
|
|
+ <text class="loadingMore" v-if="loadingMore3">加载中...</text>
|
|
|
+ <image class="futureimg" :src="futureimg" v-if="!loadingMore3"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -255,7 +251,8 @@
|
|
|
</view>
|
|
|
<view class="shop-echarts">
|
|
|
<canvas canvas-id="shopecharts" id="shopecharts" class="shopecharts" @touchstart="touchPie"></canvas>
|
|
|
- <image class="shopimg" :src="shopimg"></image>
|
|
|
+ <text class="loadingMore" v-if="loadingMore4">加载中...</text>
|
|
|
+ <image class="shopimg" :src="shopimg" v-if="!loadingMore4"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -283,7 +280,10 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- isScroll: false,
|
|
|
+ loadingMore1: true,
|
|
|
+ loadingMore2: true,
|
|
|
+ loadingMore3: true,
|
|
|
+ loadingMore4: true,
|
|
|
//用户信息
|
|
|
userInfo: uni.getStorageSync('wechatUserInfo'),
|
|
|
loading: true,
|
|
@@ -353,7 +353,7 @@ export default {
|
|
|
shopsellimg: '',
|
|
|
shopmoneyimg: '',
|
|
|
futureimg: '',
|
|
|
- shopimg: '',
|
|
|
+ shopimg: ''
|
|
|
};
|
|
|
},
|
|
|
// 此处定义传入的数据
|
|
@@ -365,11 +365,7 @@ export default {
|
|
|
},
|
|
|
// 监听也面滚动
|
|
|
onPageScroll (e) {
|
|
|
- console.log(e);
|
|
|
- this.isScroll = true
|
|
|
- if ( !e.scrollTop) {
|
|
|
- this.isScroll = false
|
|
|
- }
|
|
|
+
|
|
|
},
|
|
|
// 页面生命周期 监听页面加载
|
|
|
onLoad() {
|
|
@@ -535,6 +531,7 @@ export default {
|
|
|
|
|
|
// 商品销售数量走势
|
|
|
async shopSellTrend() {
|
|
|
+ this.loadingMore1 = true
|
|
|
if (this.shopID === 0) {
|
|
|
this.shopI = '';
|
|
|
}
|
|
@@ -636,6 +633,7 @@ export default {
|
|
|
fileType: 'png',
|
|
|
canvasId: id,
|
|
|
success: function (res) {
|
|
|
+ _self.loadingMore1 = false
|
|
|
_self.shopsellimg = res.tempFilePath;
|
|
|
},
|
|
|
fail: function (res) {},
|
|
@@ -654,6 +652,7 @@ export default {
|
|
|
|
|
|
// 商品销售金额走势
|
|
|
async shopSellMoneyTrend() {
|
|
|
+ this.loadingMore2 = true
|
|
|
if (this.shopID === 0) {
|
|
|
this.shopI = '';
|
|
|
}
|
|
@@ -754,6 +753,7 @@ export default {
|
|
|
fileType: 'png',
|
|
|
canvasId: id,
|
|
|
success: function (res) {
|
|
|
+ _self.loadingMore2 = false
|
|
|
_self.shopmoneyimg = res.tempFilePath;
|
|
|
},
|
|
|
fail: function (res) {},
|
|
@@ -772,6 +772,7 @@ export default {
|
|
|
|
|
|
// 未来七天
|
|
|
async futureDayData() {
|
|
|
+ this.loadingMore3 = true
|
|
|
if (this.shopID === 0) {
|
|
|
this.shopID = '';
|
|
|
}
|
|
@@ -858,6 +859,7 @@ export default {
|
|
|
fileType: 'png',
|
|
|
canvasId: canvasId,
|
|
|
success: function (res) {
|
|
|
+ _self.loadingMore3 = false
|
|
|
_self.futureimg = res.tempFilePath;
|
|
|
},
|
|
|
fail: function (res) {},
|
|
@@ -876,10 +878,10 @@ export default {
|
|
|
|
|
|
// 商品销售占比
|
|
|
async shopSellData() {
|
|
|
+ this.loadingMore4 = true
|
|
|
await this.$http
|
|
|
.get('/homePage/getData1', {
|
|
|
- // date: this.today,
|
|
|
- date: '2020-07-28',
|
|
|
+ date: this.today,
|
|
|
shopId: this.shopID,
|
|
|
})
|
|
|
.then(async (res) => {
|
|
@@ -940,6 +942,7 @@ export default {
|
|
|
fileType: 'png',
|
|
|
canvasId: canvasId,
|
|
|
success: function (res) {
|
|
|
+ _self.loadingMore4 = false
|
|
|
_self.shopimg = res.tempFilePath;
|
|
|
},
|
|
|
fail: function (res) {},
|
|
@@ -1338,8 +1341,20 @@ canvas {
|
|
|
|
|
|
/* 样式的width和height一定要与定义的cWidth和cHeight相对应 */
|
|
|
.qiun-charts {
|
|
|
+ position: relative;
|
|
|
width: 690rpx;
|
|
|
height: 300rpx;
|
|
|
+ .loadingMore {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 690rpx;
|
|
|
+ height: 300rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 300upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #cccece;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.charts {
|
|
@@ -1402,8 +1417,20 @@ canvas {
|
|
|
}
|
|
|
|
|
|
.shop-echarts {
|
|
|
+ position: relative;
|
|
|
width: 690rpx;
|
|
|
height: 300rpx;
|
|
|
+ .loadingMore {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 690rpx;
|
|
|
+ height: 300rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 300upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #cccece;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.shopecharts {
|