6
0
Fork 0

添加需求

hui.zhou
h30830569 2022-05-30 11:34:34 +08:00
parent 61f37a1faf
commit b0e05bfe58
7 changed files with 337 additions and 7 deletions

View File

@ -18,9 +18,15 @@
<view class=" relative -top-50rpx">
<cu-avatar size="130" :src="user.avatar?user.avatar:''"></cu-avatar>
</view>
<view class="flex items-center -mt-60rpx ml-base">
<view class=" text-txBase font-extrabold">用户名:</view>
<view class=" text-txGray ml-15rpx">{{user.phone}}</view>
<view class="flex items-center -mt-60rpx ml-base justify-between flex-1">
<view class="flex items-center">
<view class=" text-txBase font-extrabold">用户名:</view>
<view class=" text-txGray ml-15rpx">{{user.phone}}</view>
</view>
<view class="flex items-center flex-1 justify-end font-extrabold" @tap="$u.routeAuth('/pageB/comm_rec/index')" >
<view class="mr-5rpx">返佣记录</view>
<u-icon name="arrow-right" size="26"></u-icon>
</view>
</view>
</view>
<view class="-mt-30rpx flex items-center justify-between text-center text-txBase ">

View File

@ -0,0 +1,78 @@
<template>
<view class="px-30rpx pt-20rpx">
<view class="sticky top-0 z-1500 bg-hex-F5F5F5 rounded-full grid grid-cols-3 text-28rpx text-hex-333 leading-40rpx py-10rpx">
<view class="text-center">时间</view>
<view class="text-center">金额</view>
<view class="text-center">信息</view>
</view>
<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
:up="upOption">
<block v-for="(item,index) in dataList" :key="index">
<view class="grid grid-cols-3 text-28rpx text-h666 py-18rpx mt-16rpx ">
<view class="text-center line-1 ">{{item.name}}</view>
<view class="text-center price-text">{{item.price}}</view>
<view class="text-center " v-if="item.success_time">{{item.success_time.substring(0,10)}}</view>
</view>
<u-line></u-line>
</block>
</mescroll-body>
</view>
</template>
<script>
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
export default {
mixins: [MescrollMixin], // 使mixin
data() {
return {
downOption: {
auto: false,
},
upOption: {
page: {
size: 20
},
noMoreSize: 1,
},
dataList: [], //
};
},
computed:{
height() {
const {
windowHeight,
statusBarHeight
} = this.$u.sys();
return windowHeight - statusBarHeight - 44 + 'px';
},
},
methods: {
downCallback() {
this.mescroll.resetUpScroll();
},
async upCallback(page) {
this.loadData(page);
},
loadData(page) {
this.$api.get(`/v1/vip/buy`, {
params: {
page: page.num,
per_page: page.size
}
}).then(res => {
this.mescroll.endSuccess(res.data.length)
if (page.num == 1) this.dataList = [];
this.dataList = this.dataList.concat(res.data,);
}).catch(err => {
this.mescroll.endErr()
})
},
}
}
</script>
<style lang="scss">
page{
background: #ffffff;
}
</style>

View File

@ -585,6 +585,14 @@
"enablePullDownRefresh": false,
"navigationStyle": "default"
}
},
{
"path": "comm_rec/index",
"style": {
"navigationBarTitleText": "佣金记录",
"enablePullDownRefresh": false,
"navigationStyle": "default"
}
}
]
}

View File

@ -142,6 +142,136 @@
</view>
</scroll-view>
</view>
<!-- 精品书籍 -->
<view class="bg-white m-auto shdow mt-base px-base" v-if="boutique_books.length">
<indexTitle name="精品书籍"></indexTitle>
<scroll-view scroll-x="true" class="mt-base scroll">
<view
class="scroll-item mt-10rpx mr-20rpx"
v-for="(item, index) in boutique_books"
@tap="$u.route('/pages/product_details/index', { skuId: item.id })"
:key="index"
>
<u-image
border-radius="15rpx"
width="260rpx"
height="260rpx"
:src="`${item.cover}?x-oss-process=image/resize,w_260/quality,q_90`"
:lazy-load="true"
></u-image>
<view class="text-md w-240rpx line-1 text-hex-bgBase h-40rpx">{{ item.name }}</view>
<view class="text-md text-txBase">{{ item.sell_price }}</view>
<view class="flex items-center" v-if="item.vip_price">
<view class="text-lg -mt-5rpx text-txSvip">{{ item.vip_price }}</view>
<image class="w-58rpx h-58rpx ml-10rpx" src="/static/svg/svip.svg" mode=""></image>
</view>
</view>
</scroll-view>
</view>
<!-- 自然水景 -->
<view class="bg-white m-auto shdow mt-base px-base" v-if="natural_water_feature.length">
<indexTitle name="自然水景"></indexTitle>
<scroll-view scroll-x="true" class="mt-base scroll">
<view
class="scroll-item mt-10rpx mr-20rpx"
v-for="(item, index) in natural_water_feature"
@tap="$u.route('/pages/product_details/index', { skuId: item.id })"
:key="index"
>
<u-image
border-radius="15rpx"
width="260rpx"
height="260rpx"
:src="`${item.cover}?x-oss-process=image/resize,w_260/quality,q_90`"
:lazy-load="true"
></u-image>
<view class="text-md w-240rpx line-1 text-hex-bgBase h-40rpx">{{ item.name }}</view>
<view class="text-md text-txBase">{{ item.sell_price }}</view>
<view class="flex items-center" v-if="item.vip_price">
<view class="text-lg -mt-5rpx text-txSvip">{{ item.vip_price }}</view>
<image class="w-58rpx h-58rpx ml-10rpx" src="/static/svg/svip.svg" mode=""></image>
</view>
</view>
</scroll-view>
</view>
<!-- 观赏生物  -->
<view class="bg-white m-auto shdow mt-base px-base" v-if="ornamental_creatures.length">
<indexTitle name="观赏生物"></indexTitle>
<scroll-view scroll-x="true" class="mt-base scroll">
<view
class="scroll-item mt-10rpx mr-20rpx"
v-for="(item, index) in ornamental_creatures"
@tap="$u.route('/pages/product_details/index', { skuId: item.id })"
:key="index"
>
<u-image
border-radius="15rpx"
width="260rpx"
height="260rpx"
:src="`${item.cover}?x-oss-process=image/resize,w_260/quality,q_90`"
:lazy-load="true"
></u-image>
<view class="text-md w-240rpx line-1 text-hex-bgBase h-40rpx">{{ item.name }}</view>
<view class="text-md text-txBase">{{ item.sell_price }}</view>
<view class="flex items-center" v-if="item.vip_price">
<view class="text-lg -mt-5rpx text-txSvip">{{ item.vip_price }}</view>
<image class="w-58rpx h-58rpx ml-10rpx" src="/static/svg/svip.svg" mode=""></image>
</view>
</view>
</scroll-view>
</view>
<!-- 珊瑚水草  -->
<view class="bg-white m-auto shdow mt-base px-base" v-if="coral_aquatic_plants.length">
<indexTitle name="珊瑚水草"></indexTitle>
<scroll-view scroll-x="true" class="mt-base scroll">
<view
class="scroll-item mt-10rpx mr-20rpx"
v-for="(item, index) in coral_aquatic_plants"
@tap="$u.route('/pages/product_details/index', { skuId: item.id })"
:key="index"
>
<u-image
border-radius="15rpx"
width="260rpx"
height="260rpx"
:src="`${item.cover}?x-oss-process=image/resize,w_260/quality,q_90`"
:lazy-load="true"
></u-image>
<view class="text-md w-240rpx line-1 text-hex-bgBase h-40rpx">{{ item.name }}</view>
<view class="text-md text-txBase">{{ item.sell_price }}</view>
<view class="flex items-center" v-if="item.vip_price">
<view class="text-lg -mt-5rpx text-txSvip">{{ item.vip_price }}</view>
<image class="w-58rpx h-58rpx ml-10rpx" src="/static/svg/svip.svg" mode=""></image>
</view>
</view>
</scroll-view>
</view>
<!-- 设备耗材 -->
<view class="bg-white m-auto shdow mt-base px-base" v-if="equipment_consumables.length">
<indexTitle name="设备耗材"></indexTitle>
<scroll-view scroll-x="true" class="mt-base scroll">
<view
class="scroll-item mt-10rpx mr-20rpx"
v-for="(item, index) in equipment_consumables"
@tap="$u.route('/pages/product_details/index', { skuId: item.id })"
:key="index"
>
<u-image
border-radius="15rpx"
width="260rpx"
height="260rpx"
:src="`${item.cover}?x-oss-process=image/resize,w_260/quality,q_90`"
:lazy-load="true"
></u-image>
<view class="text-md w-240rpx line-1 text-hex-bgBase h-40rpx">{{ item.name }}</view>
<view class="text-md text-txBase">{{ item.sell_price }}</view>
<view class="flex items-center" v-if="item.vip_price">
<view class="text-lg -mt-5rpx text-txSvip">{{ item.vip_price }}</view>
<image class="w-58rpx h-58rpx ml-10rpx" src="/static/svg/svip.svg" mode=""></image>
</view>
</view>
</scroll-view>
</view>
<view class="flex items-center justify-center mt-base">
<view class="w-25rpx h-1rpx bg-txBase"></view>
<view class="text-xl font-extrabold text-txBase mx-10rpx">猜你喜欢</view>
@ -201,6 +331,11 @@ export default {
},
noMoreSize: 1,
},
boutique_books:[],//
natural_water_feature:[],//
ornamental_creatures:[],//
coral_aquatic_plants:[],//
equipment_consumables:[]//
};
},
computed: {
@ -227,8 +362,99 @@ export default {
this.$store.dispatch('user/getNewsNum');
},
methods: {
//-
async getrecGoods(){
return new Promise((resolve, reject) => {
this.$api
.get('/v1/product/part', {
params: {
part:'boutique_books',
},
})
.then((res) => {
this.boutique_books=res.data
resolve(res);
})
.catch((err) => {
reject(err);
});
});
},
//
async getnatural_water_feature(){
return new Promise((resolve, reject) => {
this.$api
.get('/v1/product/part', {
params: {
part:'natural_water_feature',
},
})
.then((res) => {
this.natural_water_feature=res.data
resolve(res);
})
.catch((err) => {
reject(err);
});
});
},
//
async getornamental_creatures(){
return new Promise((resolve, reject) => {
this.$api
.get('/v1/product/part', {
params: {
part:'ornamental_creatures',
},
})
.then((res) => {
this.ornamental_creatures=res.data
resolve(res);
})
.catch((err) => {
reject(err);
});
});
},
//
async getcoral_aquatic_plants(){
return new Promise((resolve, reject) => {
this.$api
.get('/v1/product/part', {
params: {
part:'coral_aquatic_plants',
},
})
.then((res) => {
this.coral_aquatic_plants=res.data
resolve(res);
})
.catch((err) => {
reject(err);
});
});
},
//
async getequipment_consumables(){
return new Promise((resolve, reject) => {
this.$api
.get('/v1/product/part', {
params: {
part:'equipment_consumables',
},
})
.then((res) => {
this.equipment_consumables=res.data
resolve(res);
})
.catch((err) => {
reject(err);
});
});
},
//
init() {
return Promise.all([this.getHot(), this.getBanner(), this.getRecommend()]);
return Promise.all([this.getHot(), this.getBanner(), this.getRecommend(),this.getrecGoods(),this.getnatural_water_feature(),this.getornamental_creatures(),this.getcoral_aquatic_plants(),this.getequipment_consumables()]);
},
async downCallback() {
await this.init();

View File

@ -138,13 +138,20 @@
<!-- <view class="text-md text-txBase ">查看全部</view> -->
</view>
<view class="grid grid-cols-4 py-base">
<view
<!-- <view
@tap="$u.routeAuth('/pageA/user_sign/index')"
class="my-base flex items-center justify-center flex-col text-md text-txBase"
v-if="!isVerify"
>
<image class="w-58rpx h-58rpx" src="@/static/images/user/sign_in.png" mode=""></image>
<view class="mt-5rpx">签到积分</view>
</view> -->
<view
@tap="$u.route('/pages/web_view/index', { url: config.about_us })"
class="my-base flex items-center justify-center flex-col text-md text-txBase"
>
<image class="w-58rpx h-58rpx" src="@/static/images/user/commission.png" mode=""></image>
<view class="mt-5rpx">佣金说明</view>
</view>
<view @tap="$u.routeAuth('/pageA/collection/index')" class="my-base flex items-center justify-center flex-col text-md text-txBase">
<image class="w-58rpx h-58rpx" src="@/static/images/user/my_collection.png" mode=""></image>

View File

@ -31,8 +31,8 @@
<text>{{item1.name}}</text>
</view>
<!-- 广告位 -->
<view class="my-20rpx" v-if="item1.icon">
<image class="w-full h-200rpx" :src="item1.icon" mode="aspectFill"></image>
<view class="my-20rpx shdow2 h-200rpx" v-if="item1.icon">
<image class="w-full h-full rounded-15rpx " :src="item1.icon" mode="aspectFill"></image>
</view>
<view class="item-container">
<view @click="$u.route('/pages/search/search_result', {category: item2.id,})" class="thumb-box" v-for="(item2, index2) in item1.children" :key="index2">
@ -188,6 +188,11 @@
</script>
<style lang="scss" scoped>
.shdow2{
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.2);
border-radius: 15rpx;
}
.u-wrap {
height: calc(100vh);
/* #ifdef H5 */

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB