小钻风 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-18,20:29:41,3-18,1348,438
2021-03-17,20:29:57,3-17,445,190 2021-03-17,20:29:57,3-17,445,190
2021-03-16,20:23:18,3-16,213,78 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) { Progressbar(remain, total, r,colorStart,colorEnd) {
const context = wx.createContext(); const context = wx.createContext();
// 线 // 线
context.beginPath(); // context.beginPath();
context.arc(this.convert_length(200), this.convert_length(200), r, 0, 2 * Math.PI); context.arc(this.convert_length(200), this.convert_length(200), r, 0, 2 * Math.PI);
context.setLineWidth(12); context.setLineWidth(12);
context.setStrokeStyle('#CCCCCC'); context.setStrokeStyle('#CCCCCC');
@ -32,8 +32,8 @@
// arc312 // arc312
context.rotate(-90 * Math.PI / 180); context.rotate(-90 * Math.PI / 180);
const grd = context.createLinearGradient(0, 0, 100, 90); const grd = context.createLinearGradient(0, 0, 100, 90);
grd.addColorStop(1, '#FFFFFF'); grd.addColorStop(1, '#E0AE5C');
grd.addColorStop(0, '#000000'); grd.addColorStop(0, '#ECD5A7');
context.setLineWidth(12); context.setLineWidth(12);
context.lineCap='round'; context.lineCap='round';
context.setStrokeStyle(grd); context.setStrokeStyle(grd);
@ -52,12 +52,12 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.box{ // .box{
.progress { // .progress {
display: inline-block; // display: inline-block;
width: 400rpx; // width: 400rpx;
height: 400rpx; // height: 400rpx;
} // }
} // }
</style> </style>

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

@ -7,7 +7,7 @@
累计总收益(瑞币) 累计总收益(瑞币)
</view> </view>
<view class="num"> <view class="num">
10000.00 {{totalEarning?totalEarning:'0.00'}}
</view> </view>
</view> </view>
<view class=""> <view class="">
@ -20,54 +20,73 @@
自购收益 自购收益
</view> </view>
<view class=""> <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>
<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>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
bgImage: this.STATIC_URL + 'bg01.png', bgImage: this.STATIC_URL + 'bg01.png',
roleLevel: 0, roleLevel: 0,
badgeImage: '', badgeImage: '',
amountData: null,
totalEarning:null, //
} }
}, },
created() { created() {
this.roleLevel = this.$store.state.roleLevel this.roleLevel = this.$store.state.roleLevel
this.bgImage = this.IMAGE_URL + this.$options.filters['roleFilter'](this.roleLevel, 'otherBg') 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.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> </script>
@ -75,41 +94,46 @@
<style lang="scss"> <style lang="scss">
.card-box { .card-box {
width: 608rpx; width: 608rpx;
height: 304rpx; height: 304rpx;
overflow: hidden; overflow: hidden;
border-radius: 8rpx; border-radius: 8rpx;
margin: 40rpx auto; margin: 40rpx auto;
box-shadow: 5rpx 5rpx 10rpx 3rpx rgba(0, 0, 0, 0.3); box-shadow: 5rpx 5rpx 10rpx 3rpx rgba(0, 0, 0, 0.3);
} }
.card-title{
font-family: PingFangSC-Regular, PingFang SC; .card-title {
font-weight: 400; font-family: PingFangSC-Regular, PingFang SC;
.txt{ font-weight: 400;
font-size: 32rpx;
color: rgba(58,57,67,0.5); .txt {
} font-size: 32rpx;
.num{ color: rgba(58, 57, 67, 0.5);
font-size: 68rpx; }
color: rgba(58,57,67,1);
} .num {
font-size: 68rpx;
color: rgba(58, 57, 67, 1);
}
} }
.foot-box { .foot-box {
height: 124rpx; height: 124rpx;
background: #FCFCFC; background: #FCFCFC;
.item{
text-align: center; .item {
flex: 1; text-align: center;
font-size: 28rpx; flex: 1;
font-family: PingFangSC-Regular, PingFang SC; font-size: 28rpx;
font-weight: 400; font-family: PingFangSC-Regular, PingFang SC;
color: #333333; font-weight: 400;
} color: #333333;
.foot-line{
width: 2rpx;
height: 44rpx;
background: #D8D8D8;
border: 2rpx solid #979797;
} }
}
.foot-line {
width: 2rpx;
height: 44rpx;
background: #D8D8D8;
border: 2rpx solid #979797;
}
}
</style> </style>

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

@ -2,8 +2,14 @@
"easycom": { "easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
}, },
"pages": [ "pages": [
{ {
"path": "pages/Progress",
"style": {
"navigationBarTitleText": "发现",
"enablePullDownRefresh": false
}
},{
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarBackgroundColor": "#5B80A0", "navigationBarBackgroundColor": "#5B80A0",
@ -530,7 +536,7 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }
], ],
// () // ()
/** /**
@ -573,8 +579,8 @@
"navigationBarBackgroundColor": "#16182B", "navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{ {
"path": "myShop/teamAdd", "path": "myShop/teamAdd",
"style": { "style": {
@ -588,27 +594,27 @@
"navigationStyle": "custom", // "navigationStyle": "custom", //
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{ {
"path": "myIncome/cumulative", "path": "myIncome/cumulative",
"style": { "style": {
"navigationBarTitleText": "累计总收益", "navigationBarTitleText": "累计总收益",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B", "navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{ {
"path": "mineShop/recommendBg", "path": "mineShop/recommendBg",
"style": { "style": {
"navigationBarTitleText": "推荐升级" "navigationBarTitleText": "推荐升级"
} }
}, },
{ {
"path": "mineShop/rewardBg", "path": "mineShop/rewardBg",
"style": { "style": {
"navigationBarTitleText": "获取平台奖励" "navigationBarTitleText": "获取平台奖励"
} }
}, },
{ {
"path": "myIncome/purchase", "path": "myIncome/purchase",
@ -618,23 +624,23 @@
"navigationBarBackgroundColor": "#16182B", "navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{ {
"path": "myIncome/shopSubsidy", "path": "myIncome/shopSubsidy",
"style": { "style": {
"navigationBarTitleText": "店铺补贴", "navigationBarTitleText": "店铺补贴",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#16182B", "navigationBarBackgroundColor": "#16182B",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{ {
"path": "myIncome/shopSubsidyDetails", "path": "myIncome/shopSubsidyDetails",
"style": { "style": {
"navigationBarTitleText": "店铺补贴", "navigationBarTitleText": "店铺补贴",
"navigationStyle": "custom", // "navigationStyle": "custom", //
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
// { // {
// "path": "myIncome/guide", // "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;" <view>自购收益 <text class="text-gray cuIcon-question" style="font-size: 24rpx;font-weight: 400; padding-left: 8rpx;"
@tap.stop="tipModel(true,'purchase')"></text></view> @tap.stop="tipModel(true,'purchase')"></text></view>
</view> </view>
<navigator url="/packageA/myIncome/purchase" :hover-class="false" class="flex more"> <navigator url="/packageA/myIncome/purchase" :hover-class="false" class="flex more">
图表分析<text class="cuIcon-right"></text> 图表分析<text class="cuIcon-right"></text>
</navigator> </navigator>
</view> </view>
<view class="money-box flex justify-between align-center"> <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;" <view>店铺补贴 <text class="text-gray cuIcon-question" style="font-size: 24rpx;font-weight: 400; padding-left: 8rpx;"
@tap.stop="tipModel(true,'team')"></text></view> @tap.stop="tipModel(true,'team')"></text></view>
</view> </view>
<navigator url="/packageA/myIncome/shopSubsidy" :hover-class="false" class="flex more"> <navigator url="/packageA/myIncome/shopSubsidy" :hover-class="false" class="flex more">
图表分析<text class="cuIcon-right"></text> 图表分析<text class="cuIcon-right"></text>
</navigator> </navigator>
</view> </view>
<view class="money-box flex justify-between align-center"> <view class="money-box flex justify-between align-center">
@ -355,7 +355,6 @@
<script> <script>
export default { export default {
data() { data() {
return { return {
tipModelTitle: '', tipModelTitle: '',
@ -490,17 +489,8 @@
return return
} }
this.myIncomeData = res.data.data 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() { toMyIncome() {
@ -518,7 +508,7 @@
return return
} }
let info = res.data.data let info = res.data.data
this.totalEarning = info.accumulateIncome.all // this.totalEarning = info.accumulateIncome.all
}); });
}, },
// //
@ -696,6 +686,7 @@
position: relative; position: relative;
z-index: 10; z-index: 10;
font-size: 20rpx; font-size: 20rpx;
.top-nav-box { .top-nav-box {
position: absolute; position: absolute;
top: 0; top: 0;

Loading…
Cancel
Save