小钻风 4 years ago
parent f486f0bdf0
commit 8ed8d26304

@ -1,3 +1,4 @@
2021-03-19,17:29:56,3-19,371,357
2021-03-18,20:29:41,3-18,1348,438
2021-03-17,20:29:57,3-17,445,190
2021-03-16,20:23:18,3-16,213,78

1 2021-03-18 2021-03-19 20:29:41 17:29:56 3-18 3-19 1348 371 438 357
1 2021-03-19 17:29:56 3-19 371 357
2 2021-03-18 2021-03-18 20:29:41 20:29:41 3-18 3-18 1348 1348 438 438
3 2021-03-17 2021-03-17 20:29:57 20:29:57 3-17 3-17 445 445 190 190
4 2021-03-16 2021-03-16 20:23:18 20:23:18 3-16 3-16 213 213 78 78

@ -17,7 +17,7 @@
Progressbar(remain, total, r,colorStart,colorEnd) {
const context = wx.createContext();
// 线
context.beginPath();
// context.beginPath();
context.arc(this.convert_length(200), this.convert_length(200), r, 0, 2 * Math.PI);
context.setLineWidth(12);
context.setStrokeStyle('#CCCCCC');
@ -32,8 +32,8 @@
// arc312
context.rotate(-90 * Math.PI / 180);
const grd = context.createLinearGradient(0, 0, 100, 90);
grd.addColorStop(1, '#FFFFFF');
grd.addColorStop(0, '#000000');
grd.addColorStop(1, '#E0AE5C');
grd.addColorStop(0, '#ECD5A7');
context.setLineWidth(12);
context.lineCap='round';
context.setStrokeStyle(grd);
@ -52,12 +52,12 @@
</script>
<style lang="scss">
.box{
.progress {
display: inline-block;
width: 400rpx;
height: 400rpx;
}
}
// .box{
// .progress {
// display: inline-block;
// width: 400rpx;
// height: 400rpx;
// }
// }
</style>

@ -1,60 +1,62 @@
import Vue from 'vue'
import App from './App'
//引入uview UI
import uView from 'uview-ui';
Vue.use(uView);
// 引入过滤器
import * as filters from 'plugins/filters.js'
import store from './store'
Vue.prototype.$store = store
//全局注册自定义组件
import goodsList from 'components/goodsList.vue'
import orderGoods from 'components/orderGoods.vue'
import largeImageList from 'components/largeImageList.vue'
import tipModel from 'components/userTipModel.vue'
Vue.component('tip-model', tipModel)
Vue.component('goods-list', goodsList)
Vue.component('order-goods', orderGoods)
Vue.component('large-image-list', largeImageList)
// 测试域名
Vue.prototype.BASE_URL = "https://testapi.reecook.cn"
Vue.prototype.IMAGE_URL = "https://testcdn.reecook.cn/static"
// 正式域名
// Vue.prototype.BASE_URL = "https://api.reecook.cn"
// Vue.prototype.IMAGE_URL = "https://cdn.reecook.cn/static"
//腾讯地图key
Vue.prototype.MAP_KEY = "SPVBZ-2EXWJ-WTEFC-K7ANJ-VG7G6-V7FQ6"
//小程序静态资源存储地址由于小程序代码包大小限制比较大的静态资源图片放在了宝塔上对应域名下的recook-weapp文件夹里面
Vue.prototype.STATIC_URL = Vue.prototype.IMAGE_URL + "/recook-weapp/"
//过滤器 保留两位小数
Vue.filter('toFixed', (param, num) => {
// console.log(param,typeof param,parseFloat(param))
return parseFloat(param).toFixed(num);
})
//全局过滤器
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
// http拦截器此为需要加入的内容
import httpInterceptor from '@/utils/http.interceptor.js'
// 这里需要写在最后是为了等Vue创建对象完成引入"app"对象(也即页面的"this"实例)
Vue.use(httpInterceptor, app)
// http接口API集中管理引入部分
// import httpApi from '@/utils/http.api.js'
// Vue.use(httpApi, app)
import Vue from 'vue'
import App from './App'
//引入uview UI
import uView from 'uview-ui';
Vue.use(uView);
// 引入过滤器
import * as filters from 'plugins/filters.js'
import store from './store'
Vue.prototype.$store = store
//全局注册自定义组件
import goodsList from 'components/goodsList.vue'
import orderGoods from 'components/orderGoods.vue'
import largeImageList from 'components/largeImageList.vue'
import tipModel from 'components/userTipModel.vue'
// import Progress from 'components/Progress.vue'
// Vue.component('Progress', Progress)
Vue.component('tip-model', tipModel)
Vue.component('goods-list', goodsList)
Vue.component('order-goods', orderGoods)
Vue.component('large-image-list', largeImageList)
// 测试域名
Vue.prototype.BASE_URL = "https://testapi.reecook.cn"
Vue.prototype.IMAGE_URL = "https://testcdn.reecook.cn/static"
// 正式域名
// Vue.prototype.BASE_URL = "https://api.reecook.cn"
// Vue.prototype.IMAGE_URL = "https://cdn.reecook.cn/static"
//腾讯地图key
Vue.prototype.MAP_KEY = "SPVBZ-2EXWJ-WTEFC-K7ANJ-VG7G6-V7FQ6"
//小程序静态资源存储地址由于小程序代码包大小限制比较大的静态资源图片放在了宝塔上对应域名下的recook-weapp文件夹里面
Vue.prototype.STATIC_URL = Vue.prototype.IMAGE_URL + "/recook-weapp/"
//过滤器 保留两位小数
Vue.filter('toFixed', (param, num) => {
// console.log(param,typeof param,parseFloat(param))
return parseFloat(param).toFixed(num);
})
//全局过滤器
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
// http拦截器此为需要加入的内容
import httpInterceptor from '@/utils/http.interceptor.js'
// 这里需要写在最后是为了等Vue创建对象完成引入"app"对象(也即页面的"this"实例)
Vue.use(httpInterceptor, app)
// http接口API集中管理引入部分
// import httpApi from '@/utils/http.api.js'
// Vue.use(httpApi, app)
app.$mount()

@ -7,7 +7,7 @@
累计总收益(瑞币)
</view>
<view class="num">
10000.00
{{totalEarning?totalEarning:'0.00'}}
</view>
</view>
<view class="">
@ -20,54 +20,73 @@
自购收益
</view>
<view class="">
1000.00
{{amountData.purchaseAmount?amountData.purchaseAmount:'0.00'}}
</view>
</view>
<view class="foot-line">
</view>
<view class="item">
<view class="">
导购收益
</view>
<view class="">
{{amountData.guideAmount?amountData.guideAmount:'0.00'}}
</view>
</view>
<view class="foot-line">
</view>
<view class="item">
<view class="">
店铺补贴
</view>
<view class="">
{{amountData.teamAmount?amountData.teamAmount:'0.00'}}
</view>
</view>
<view class="foot-line">
</view>
<view class="item">
<view class="">
店铺补贴
</view>
<view class="">
1000.00
</view>
</view>
<view class="foot-line">
</view>
<view class="item">
<view class="">
自购收益
</view>
<view class="">
1000.00
</view>
</view>
</view>
</view>
</view>
</template>
<script>
<script>
export default {
data() {
return {
bgImage: this.STATIC_URL + 'bg01.png',
roleLevel: 0,
badgeImage: '',
amountData: null,
totalEarning:null, //
}
},
created() {
this.roleLevel = this.$store.state.roleLevel
this.bgImage = this.IMAGE_URL + this.$options.filters['roleFilter'](this.roleLevel, 'otherBg')
this.badgeImage = this.IMAGE_URL + this.$options.filters['roleFilter'](this.roleLevel, 'badge')
// this.role = this.$options.filters['roleFilter'](this.roleLevel, 'txt')
},
methods:{
},
methods: {
getData() {
this.$u.post('/api/v2/app/user/income/accumulate', {
}).then(res => {
if (res.data.code == "FAIL") {
this.$u.toast(res.data.msg);
return
}
console.log(res)
this.amountData = res.data.data
this.totalEarning = this.amountData.purchaseAmount + this.amountData.guideAmount + this.amountData.teamAmount
})
}
},
onLoad() {
this.getData()
}
}
</script>
@ -75,41 +94,46 @@
<style lang="scss">
.card-box {
width: 608rpx;
height: 304rpx;
height: 304rpx;
overflow: hidden;
border-radius: 8rpx;
margin: 40rpx auto;
margin: 40rpx auto;
box-shadow: 5rpx 5rpx 10rpx 3rpx rgba(0, 0, 0, 0.3);
}
.card-title{
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
.txt{
font-size: 32rpx;
color: rgba(58,57,67,0.5);
}
.num{
font-size: 68rpx;
color: rgba(58,57,67,1);
}
.card-title {
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
.txt {
font-size: 32rpx;
color: rgba(58, 57, 67, 0.5);
}
.num {
font-size: 68rpx;
color: rgba(58, 57, 67, 1);
}
}
.foot-box {
height: 124rpx;
background: #FCFCFC;
.item{
text-align: center;
flex: 1;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.foot-line{
width: 2rpx;
height: 44rpx;
background: #D8D8D8;
border: 2rpx solid #979797;
background: #FCFCFC;
.item {
text-align: center;
flex: 1;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
}
.foot-line {
width: 2rpx;
height: 44rpx;
background: #D8D8D8;
border: 2rpx solid #979797;
}
}
</style>

@ -241,7 +241,9 @@
padding: 0 30rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.11);
// .cuIcon-*{
// }
.member-head {
padding: 48rpx 0 20rpx 0;
font-size: 28rpx;

@ -2,8 +2,14 @@
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"pages": [
{
"path": "pages/Progress",
"style": {
"navigationBarTitleText": "发现",
"enablePullDownRefresh": false
}
},{
"path": "pages/index/index",
"style": {
"navigationBarBackgroundColor": "#5B80A0",
@ -530,7 +536,7 @@
"navigationStyle": "custom"
}
}
],
// ()
/**
@ -573,8 +579,8 @@
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
},
{
"path": "myShop/teamAdd",
"style": {
@ -588,27 +594,27 @@
"navigationStyle": "custom", //
"navigationBarTextStyle": "white"
}
},
{
"path": "myIncome/cumulative",
"style": {
"navigationBarTitleText": "累计总收益",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "mineShop/recommendBg",
"style": {
"navigationBarTitleText": "推荐升级"
}
},
{
"path": "mineShop/rewardBg",
"style": {
"navigationBarTitleText": "获取平台奖励"
}
},
{
"path": "myIncome/cumulative",
"style": {
"navigationBarTitleText": "累计总收益",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "mineShop/recommendBg",
"style": {
"navigationBarTitleText": "推荐升级"
}
},
{
"path": "mineShop/rewardBg",
"style": {
"navigationBarTitleText": "获取平台奖励"
}
},
{
"path": "myIncome/purchase",
@ -618,23 +624,23 @@
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "myIncome/shopSubsidy",
"style": {
"navigationBarTitleText": "店铺补贴",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "myIncome/shopSubsidyDetails",
"style": {
"navigationBarTitleText": "店铺补贴",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white"
}
},
{
"path": "myIncome/shopSubsidy",
"style": {
"navigationBarTitleText": "店铺补贴",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white"
}
},
{
"path": "myIncome/shopSubsidyDetails",
"style": {
"navigationBarTitleText": "店铺补贴",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white"
}
},
// {
// "path": "myIncome/guide",

@ -0,0 +1,69 @@
<template>
<view class="box">
<canvas class="progress" canvas-id="progress"></canvas>
</view>
</template>
<script>
export default {
data() {
return {
};
},
onLoad: function() {
this.Progressbar(35, 100, 50);
},
methods: {
Progressbar(remain, total, x,colorStart,colorEnd) {
let r = this.convert_length(60)
const context = wx.createContext();
// 线
context.beginPath();
context.arc(this.convert_length(120), this.convert_length(120), r, 0, 2 * Math.PI);
context.setLineWidth(this.convert_length(8));
context.setStrokeStyle('#FFFFFF');
context.stroke();
//
const deg = ((remain/total).toFixed(2))*2*Math.PI;
// 线
context.beginPath();
// 400200,200
context.arc(0, this.convert_length(120), r, 0, deg);
context.translate(0, this.convert_length(120));
// arc312
context.rotate(-90 * Math.PI / 180);
const grd = context.createLinearGradient(0, r, 0, this.convert_length(120));
grd.addColorStop(1, 'red');
grd.addColorStop(0, '#2B85E4');
context.setLineWidth(this.convert_length(8));
context.lineCap='round';
context.setStrokeStyle(grd);
context.stroke();
wx.drawCanvas({
canvasId: 'progress',
actions: context.getActions()
});
},
// rpx
convert_length(length) {
return Math.round(wx.getSystemInfoSync().windowWidth * length / 750);
}
},
};
</script>
<style lang="scss">
.box{
width: 100%;
.progress {
// display: inline-block;
width: 240rpx;
margin: 0 auto;
height: 240rpx;
}
}
</style>

@ -94,8 +94,8 @@
<view>自购收益 <text class="text-gray cuIcon-question" style="font-size: 24rpx;font-weight: 400; padding-left: 8rpx;"
@tap.stop="tipModel(true,'purchase')"></text></view>
</view>
<navigator url="/packageA/myIncome/purchase" :hover-class="false" class="flex more">
图表分析<text class="cuIcon-right"></text>
<navigator url="/packageA/myIncome/purchase" :hover-class="false" class="flex more">
图表分析<text class="cuIcon-right"></text>
</navigator>
</view>
<view class="money-box flex justify-between align-center">
@ -159,8 +159,8 @@
<view>店铺补贴 <text class="text-gray cuIcon-question" style="font-size: 24rpx;font-weight: 400; padding-left: 8rpx;"
@tap.stop="tipModel(true,'team')"></text></view>
</view>
<navigator url="/packageA/myIncome/shopSubsidy" :hover-class="false" class="flex more">
图表分析<text class="cuIcon-right"></text>
<navigator url="/packageA/myIncome/shopSubsidy" :hover-class="false" class="flex more">
图表分析<text class="cuIcon-right"></text>
</navigator>
</view>
<view class="money-box flex justify-between align-center">
@ -355,7 +355,6 @@
<script>
export default {
data() {
return {
tipModelTitle: '',
@ -490,17 +489,8 @@
return
}
this.myIncomeData = res.data.data
// console.log(res.data.data)
this.totalEarning = this.myIncomeData.purchase.amount + this.myIncomeData.team.amount + this.myIncomeData.guide.amount
});
// this.$u.post('/api/v2/app/user/income', {}).then(res => {
// console.log(res.data);
// if (res.data.code == "FAIL") {
// this.$u.toast(res.data.msg);
// return
// }
// this.myIncomeData = res.data.data
// console.log(res.data.data)
// });
},
//
toMyIncome() {
@ -518,7 +508,7 @@
return
}
let info = res.data.data
this.totalEarning = info.accumulateIncome.all
// this.totalEarning = info.accumulateIncome.all
});
},
//
@ -696,6 +686,7 @@
position: relative;
z-index: 10;
font-size: 20rpx;
.top-nav-box {
position: absolute;
top: 0;

Loading…
Cancel
Save