分销商品列表-分销账户信息
parent
4cb256af6c
commit
4a487b5894
|
@ -5,15 +5,9 @@
|
||||||
<view class="ss-flex ss-row-between card-box-header">
|
<view class="ss-flex ss-row-between card-box-header">
|
||||||
<view class="ss-flex">
|
<view class="ss-flex">
|
||||||
<view class="header-title ss-m-r-16">账户信息</view>
|
<view class="header-title ss-m-r-16">账户信息</view>
|
||||||
<button
|
<button class="ss-reset-button look-btn ss-flex" @tap="state.showMoney = !state.showMoney">
|
||||||
class="ss-reset-button look-btn ss-flex"
|
<uni-icons :type="state.showMoney ? 'eye-filled' : 'eye-slash-filled'" color="#A57A55"
|
||||||
@tap="state.showMoney = !state.showMoney"
|
size="20"></uni-icons>
|
||||||
>
|
|
||||||
<uni-icons
|
|
||||||
:type="state.showMoney ? 'eye-filled' : 'eye-slash-filled'"
|
|
||||||
color="#A57A55"
|
|
||||||
size="20"
|
|
||||||
></uni-icons>
|
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="ss-flex" @tap="sheep.$router.go('/pages/user/wallet/commission')">
|
<view class="ss-flex" @tap="sheep.$router.go('/pages/user/wallet/commission')">
|
||||||
|
@ -24,21 +18,21 @@
|
||||||
<!-- 收益 -->
|
<!-- 收益 -->
|
||||||
<view class="card-content ss-flex">
|
<view class="card-content ss-flex">
|
||||||
<view class="ss-flex-1 ss-flex-col ss-col-center">
|
<view class="ss-flex-1 ss-flex-col ss-col-center">
|
||||||
<view class="item-title">总收益(元)</view>
|
<view class="item-title">当前佣金(元)</view>
|
||||||
<view class="item-detail">
|
<view class="item-detail">
|
||||||
{{ state.showMoney ? agentInfo.total_income || '0.00' : '***' }}
|
{{ state.showMoney ? userInfo.brokeragePrice || '0.00' : '***' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ss-flex-1 ss-flex-col ss-col-center">
|
<view class="ss-flex-1 ss-flex-col ss-col-center">
|
||||||
<view class="item-title">我的佣金(元)</view>
|
<view class="item-title">昨天的佣金(元)</view>
|
||||||
<view class="item-detail">
|
<view class="item-detail">
|
||||||
{{ state.showMoney ? userInfo.commission || '0.00' : '***' }}
|
{{ state.showMoney ? userInfo.yesterdayPrice || '0.00' : '***' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ss-flex-1 ss-flex-col ss-col-center">
|
<view class="ss-flex-1 ss-flex-col ss-col-center">
|
||||||
<view class="item-title">我的消费(元)</view>
|
<view class="item-title">累计已提(元)</view>
|
||||||
<view class="item-detail">
|
<view class="item-detail">
|
||||||
{{ state.showMoney ? userInfo.total_consume || '0.00' : '***' }}
|
{{ state.showMoney ? userInfo.withdrawPrice || '0.00' : '***' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -48,7 +42,11 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { computed, reactive } from 'vue';
|
import {
|
||||||
|
computed,
|
||||||
|
reactive,
|
||||||
|
onMounted
|
||||||
|
} from 'vue';
|
||||||
|
|
||||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||||
const agentInfo = computed(() => sheep.$store('user').agentInfo);
|
const agentInfo = computed(() => sheep.$store('user').agentInfo);
|
||||||
|
@ -56,6 +54,10 @@
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
showMoney: false,
|
showMoney: false,
|
||||||
});
|
});
|
||||||
|
onMounted(async () => {
|
||||||
|
let res = await sheep.$api.commission.getSummary();
|
||||||
|
userInfo = res.data;
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -67,27 +69,33 @@
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.account-card-box {
|
.account-card-box {
|
||||||
background: #ffefd6;
|
background: #ffefd6;
|
||||||
|
|
||||||
.card-box-header {
|
.card-box-header {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
height: 72rpx;
|
height: 72rpx;
|
||||||
box-shadow: 0px 2px 6px #f2debe;
|
box-shadow: 0px 2px 6px #f2debe;
|
||||||
|
|
||||||
.header-title {
|
.header-title {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #a17545;
|
color: #a17545;
|
||||||
line-height: 30rpx;
|
line-height: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cicon-play-arrow {
|
.cicon-play-arrow {
|
||||||
color: #a17545;
|
color: #a17545;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
line-height: 30rpx;
|
line-height: 30rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-content {
|
.card-content {
|
||||||
height: 190rpx;
|
height: 190rpx;
|
||||||
background: #fdfae9;
|
background: #fdfae9;
|
||||||
|
|
||||||
.item-title {
|
.item-title {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
@ -95,6 +103,7 @@
|
||||||
line-height: 30rpx;
|
line-height: 30rpx;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-detail {
|
.item-detail {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
font-family: OPPOSANS;
|
font-family: OPPOSANS;
|
||||||
|
|
|
@ -11,12 +11,8 @@
|
||||||
<view class="user-name">{{ userInfo.nickname }}</view>
|
<view class="user-name">{{ userInfo.nickname }}</view>
|
||||||
<view class="user-info-box ss-flex">
|
<view class="user-info-box ss-flex">
|
||||||
<view class="tag-box ss-flex" v-if="agentInfo.level_info">
|
<view class="tag-box ss-flex" v-if="agentInfo.level_info">
|
||||||
<image
|
<image v-if="agentInfo.level_info?.image" class="tag-img"
|
||||||
v-if="agentInfo.level_info?.image"
|
:src="sheep.$url.cdn(agentInfo.level_info?.image)" mode="aspectFill">
|
||||||
class="tag-img"
|
|
||||||
:src="sheep.$url.cdn(agentInfo.level_info?.image)"
|
|
||||||
mode="aspectFill"
|
|
||||||
>
|
|
||||||
</image>
|
</image>
|
||||||
<text class="tag-title">{{ agentInfo.level_info?.name }}</text>
|
<text class="tag-title">{{ agentInfo.level_info?.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -31,12 +27,15 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { computed, reactive } from 'vue';
|
import {
|
||||||
|
computed,
|
||||||
|
reactive
|
||||||
|
} from 'vue';
|
||||||
|
|
||||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||||
const agentInfo = computed(() => sheep.$store('user').agentInfo);
|
const agentInfo = computed(() => sheep.$store('user').agentInfo);
|
||||||
const headerBg = sheep.$url.css('/static/img/shop/commission/background.png');
|
const headerBg = sheep.$url.css('/static/img/shop/commission/background.png');
|
||||||
|
console.log(userInfo);
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
showMoney: false,
|
showMoney: false,
|
||||||
});
|
});
|
||||||
|
@ -74,6 +73,7 @@
|
||||||
.card-top {
|
.card-top {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-bottom: 34rpx;
|
padding-bottom: 34rpx;
|
||||||
|
|
||||||
.user-name {
|
.user-name {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -2,53 +2,42 @@
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="推广商品" :onShareAppMessage="state.shareInfo">
|
<s-layout title="推广商品" :onShareAppMessage="state.shareInfo">
|
||||||
<view class="goods-item ss-m-20" v-for="item in state.pagination.data" :key="item.id">
|
<view class="goods-item ss-m-20" v-for="item in state.pagination.data" :key="item.id">
|
||||||
<s-goods-item
|
<s-goods-item size="lg" :img="item.picUrl" :title="item.name" :subTitle="item.subtitle" :price="item.price"
|
||||||
size="lg"
|
:originPrice="item.original_price" priceColor="#333"
|
||||||
:img="item.image"
|
@tap="sheep.$router.go('/pages/goods/index', { id: item.id })">
|
||||||
:title="item.title"
|
|
||||||
:subTitle="item.subtitle"
|
|
||||||
:price="item.price[0]"
|
|
||||||
:originPrice="item.original_price"
|
|
||||||
priceColor="#333"
|
|
||||||
@tap="sheep.$router.go('/pages/goods/index', { id: item.id })"
|
|
||||||
>
|
|
||||||
<template #rightBottom>
|
<template #rightBottom>
|
||||||
<view class="ss-flex ss-row-between">
|
<view class="ss-flex ss-row-between">
|
||||||
<view class="commission-num">预计佣金:¥{{ item.commission }}</view>
|
<view class="commission-num">预计佣金:¥{{ item.commission }}</view>
|
||||||
<button
|
<button class="ss-reset-button share-btn ui-BG-Main-Gradient" @tap.stop="onShareGoods(item)">
|
||||||
class="ss-reset-button share-btn ui-BG-Main-Gradient"
|
|
||||||
@tap.stop="onShareGoods(item)"
|
|
||||||
>
|
|
||||||
分享赚
|
分享赚
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</s-goods-item>
|
</s-goods-item>
|
||||||
</view>
|
</view>
|
||||||
<s-empty
|
<s-empty v-if="state.pagination.total === 0" icon="/static/goods-empty.png" text="暂无推广商品"></s-empty>
|
||||||
v-if="state.pagination.total === 0"
|
|
||||||
icon="/static/goods-empty.png"
|
|
||||||
text="暂无推广商品"
|
|
||||||
></s-empty>
|
|
||||||
<!-- 加载更多 -->
|
<!-- 加载更多 -->
|
||||||
<uni-load-more
|
<uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
|
||||||
v-if="state.pagination.total > 0"
|
|
||||||
:status="state.loadStatus"
|
|
||||||
:content-text="{
|
|
||||||
contentdown: '上拉加载更多',
|
contentdown: '上拉加载更多',
|
||||||
}"
|
}" @tap="loadmore" />
|
||||||
@tap="loadmore"
|
|
||||||
/>
|
|
||||||
</s-layout>
|
</s-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import $share from '@/sheep/platform/share';
|
import $share from '@/sheep/platform/share';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import {
|
||||||
import { computed, reactive } from 'vue';
|
onLoad,
|
||||||
|
onReachBottom
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
computed,
|
||||||
|
reactive
|
||||||
|
} from 'vue';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { showShareModal } from '@/sheep/hooks/useModal';
|
import {
|
||||||
|
showShareModal
|
||||||
|
} from '@/sheep/hooks/useModal';
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
pagination: {
|
pagination: {
|
||||||
|
@ -62,8 +51,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
function onShareGoods(goodsInfo) {
|
function onShareGoods(goodsInfo) {
|
||||||
state.shareInfo = $share.getShareInfo(
|
state.shareInfo = $share.getShareInfo({
|
||||||
{
|
|
||||||
title: goodsInfo.title,
|
title: goodsInfo.title,
|
||||||
image: sheep.$url.cdn(goodsInfo.image),
|
image: sheep.$url.cdn(goodsInfo.image),
|
||||||
desc: goodsInfo.subtitle,
|
desc: goodsInfo.subtitle,
|
||||||
|
@ -71,31 +59,29 @@
|
||||||
page: '2',
|
page: '2',
|
||||||
query: goodsInfo.id,
|
query: goodsInfo.id,
|
||||||
},
|
},
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
type: 'goods', // 商品海报
|
type: 'goods', // 商品海报
|
||||||
title: goodsInfo.title, // 商品标题
|
title: goodsInfo.title, // 商品标题
|
||||||
image: sheep.$url.cdn(goodsInfo.image), // 商品主图
|
image: sheep.$url.cdn(goodsInfo.image), // 商品主图
|
||||||
price: goodsInfo.price[0], // 商品价格
|
price: goodsInfo.price[0], // 商品价格
|
||||||
original_price: goodsInfo.original_price, // 商品原价
|
original_price: goodsInfo.original_price, // 商品原价
|
||||||
},
|
}, );
|
||||||
);
|
|
||||||
showShareModal();
|
showShareModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getGoodsList(page = 1, list_rows = 8) {
|
async function getGoodsList(page = 1, list_rows = 8) {
|
||||||
|
state.pagination.current_page = page;
|
||||||
state.loadStatus = 'loading';
|
state.loadStatus = 'loading';
|
||||||
let res = await sheep.$api.commission.goods({
|
let res = await sheep.$api.commission.goods({
|
||||||
list_rows,
|
pageSize: list_rows,
|
||||||
page,
|
pageNo: page,
|
||||||
});
|
});
|
||||||
if (res.error === 0) {
|
if (res.code === 0) {
|
||||||
let orderList = _.concat(state.pagination.data, res.data.data);
|
let orderList = _.concat(state.pagination.data, res.data.list);
|
||||||
state.pagination = {
|
state.pagination = {
|
||||||
...res.data,
|
...res.data,
|
||||||
data: orderList,
|
data: orderList,
|
||||||
};
|
};
|
||||||
if (state.pagination.current_page < state.pagination.last_page) {
|
if (state.pagination.data.length < state.pagination.total) {
|
||||||
state.loadStatus = 'more';
|
state.loadStatus = 'more';
|
||||||
} else {
|
} else {
|
||||||
state.loadStatus = 'noMore';
|
state.loadStatus = 'noMore';
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
<!-- 分销订单 -->
|
<!-- 分销订单 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="分销订单" :class="state.scrollTop ? 'order-warp' : ''" navbar="inner">
|
<s-layout title="分销订单" :class="state.scrollTop ? 'order-warp' : ''" navbar="inner">
|
||||||
<view
|
<view class="header-box" :style="[
|
||||||
class="header-box"
|
|
||||||
:style="[
|
|
||||||
{
|
{
|
||||||
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
||||||
paddingTop: Number(statusBarHeight + 108) + 'rpx',
|
paddingTop: Number(statusBarHeight + 108) + 'rpx',
|
||||||
},
|
},
|
||||||
]"
|
]">
|
||||||
>
|
|
||||||
<!-- 团队数据总览 -->
|
<!-- 团队数据总览 -->
|
||||||
<view class="team-data-box ss-flex ss-col-center ss-row-between">
|
<view class="team-data-box ss-flex ss-col-center ss-row-between">
|
||||||
<view class="data-card">
|
<view class="data-card">
|
||||||
|
@ -76,12 +73,7 @@
|
||||||
|
|
||||||
<!-- tab -->
|
<!-- tab -->
|
||||||
<su-sticky bgColor="#fff">
|
<su-sticky bgColor="#fff">
|
||||||
<su-tabs
|
<su-tabs :list="tabMaps" :scrollable="false" :current="state.currentTab" @change="onTabsChange">
|
||||||
:list="tabMaps"
|
|
||||||
:scrollable="false"
|
|
||||||
:current="state.currentTab"
|
|
||||||
@change="onTabsChange"
|
|
||||||
>
|
|
||||||
</su-tabs>
|
</su-tabs>
|
||||||
</su-sticky>
|
</su-sticky>
|
||||||
|
|
||||||
|
@ -103,14 +95,9 @@
|
||||||
<view class="order-time">{{ item.create_time }}</view>
|
<view class="order-time">{{ item.create_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<s-goods-item
|
<s-goods-item class="border-bottom" :img="item.order_item.goods_image"
|
||||||
class="border-bottom"
|
:title="item.order_item.goods_title" :skuText="item.order_item.goods_sku_text"
|
||||||
:img="item.order_item.goods_image"
|
:price="item.order_item.goods_price" :num="item.order_item.goods_num">
|
||||||
:title="item.order_item.goods_title"
|
|
||||||
:skuText="item.order_item.goods_sku_text"
|
|
||||||
:price="item.order_item.goods_price"
|
|
||||||
:num="item.order_item.goods_num"
|
|
||||||
>
|
|
||||||
<template #rightBottom>
|
<template #rightBottom>
|
||||||
<view class="ss-flex commission-box ss-row-between ss-m-t-10">
|
<view class="ss-flex commission-box ss-row-between ss-m-t-10">
|
||||||
<view class="ss-flex">
|
<view class="ss-flex">
|
||||||
|
@ -128,14 +115,9 @@
|
||||||
<s-empty v-if="state.pagination.total === 0" icon="/static/order-empty.png" text="暂无订单">
|
<s-empty v-if="state.pagination.total === 0" icon="/static/order-empty.png" text="暂无订单">
|
||||||
</s-empty>
|
</s-empty>
|
||||||
<!-- 加载更多 -->
|
<!-- 加载更多 -->
|
||||||
<uni-load-more
|
<uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
|
||||||
v-if="state.pagination.total > 0"
|
|
||||||
:status="state.loadStatus"
|
|
||||||
:content-text="{
|
|
||||||
contentdown: '上拉加载更多',
|
contentdown: '上拉加载更多',
|
||||||
}"
|
}" @tap="loadmore" />
|
||||||
@tap="loadmore"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- </view> -->
|
<!-- </view> -->
|
||||||
</s-layout>
|
</s-layout>
|
||||||
|
@ -143,10 +125,18 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import {
|
||||||
import { computed, reactive } from 'vue';
|
onLoad,
|
||||||
|
onReachBottom
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
computed,
|
||||||
|
reactive
|
||||||
|
} from 'vue';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { onPageScroll } from '@dcloudio/uni-app';
|
import {
|
||||||
|
onPageScroll
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||||
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
|
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
|
||||||
|
@ -171,8 +161,7 @@
|
||||||
scrollTop: false,
|
scrollTop: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const tabMaps = [
|
const tabMaps = [{
|
||||||
{
|
|
||||||
name: '全部',
|
name: '全部',
|
||||||
value: 'all',
|
value: 'all',
|
||||||
},
|
},
|
||||||
|
@ -228,7 +217,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getAgentInfo() {
|
async function getAgentInfo() {
|
||||||
const { error, data, msg } = await sheep.$api.commission.agent();
|
const {
|
||||||
|
error,
|
||||||
|
data,
|
||||||
|
msg
|
||||||
|
} = await sheep.$api.commission.agent();
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
state.agentInfo = data;
|
state.agentInfo = data;
|
||||||
}
|
}
|
||||||
|
@ -260,6 +253,7 @@
|
||||||
background: v-bind(headerBg) no-repeat,
|
background: v-bind(headerBg) no-repeat,
|
||||||
linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||||
background-size: 750rpx 100%;
|
background-size: 750rpx 100%;
|
||||||
|
|
||||||
// 团队信息总览
|
// 团队信息总览
|
||||||
.team-data-box {
|
.team-data-box {
|
||||||
.data-card {
|
.data-card {
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
"appid": "wxd4da84f87dcafd80",
|
||||||
|
"compileType": "miniprogram",
|
||||||
|
"libVersion": "3.2.4",
|
||||||
|
"packOptions": {
|
||||||
|
"ignore": [],
|
||||||
|
"include": []
|
||||||
|
},
|
||||||
|
"setting": {
|
||||||
|
"coverView": true,
|
||||||
|
"es6": true,
|
||||||
|
"postcss": true,
|
||||||
|
"minified": true,
|
||||||
|
"enhance": true,
|
||||||
|
"showShadowRootInWxmlPanel": true,
|
||||||
|
"packNpmRelationList": [],
|
||||||
|
"babelSetting": {
|
||||||
|
"ignore": [],
|
||||||
|
"disablePlugins": [],
|
||||||
|
"outputPath": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"condition": {},
|
||||||
|
"editorSetting": {
|
||||||
|
"tabIndent": "insertSpaces",
|
||||||
|
"tabSize": 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
|
"projectname": "uni3",
|
||||||
|
"setting": {
|
||||||
|
"compileHotReLoad": true
|
||||||
|
}
|
||||||
|
}
|
|
@ -41,10 +41,11 @@ export default {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params,
|
params,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// 分销商品
|
// 分销商品
|
||||||
goods: (params) =>
|
goods: (params) =>
|
||||||
request({
|
request({
|
||||||
url: 'commission/goods',
|
url: '/app-api/product/spu/page',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params,
|
params,
|
||||||
}),
|
}),
|
||||||
|
@ -62,4 +63,9 @@ export default {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data,
|
data,
|
||||||
}),
|
}),
|
||||||
|
getSummary: (data) =>
|
||||||
|
request({
|
||||||
|
url: '/app-api/trade/brokerage-user/get-summary',
|
||||||
|
method: 'GET',
|
||||||
|
}),
|
||||||
};
|
};
|
|
@ -128,7 +128,7 @@ http.interceptors.response.use(
|
||||||
// 成功时的提示
|
// 成功时的提示
|
||||||
if (
|
if (
|
||||||
(response.data.error === 0 || response.data.code === 0) &&
|
(response.data.error === 0 || response.data.code === 0) &&
|
||||||
( response.data.msg !== '' || response.config.custom.successMsg !== '' ) &&
|
(response.data.msg !== '' || response.config.custom.successMsg !== '') &&
|
||||||
response.config.custom.showSuccess
|
response.config.custom.showSuccess
|
||||||
) {
|
) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -215,8 +215,8 @@ const request = (config) => {
|
||||||
}
|
}
|
||||||
// TODO 芋艿:额外拼接
|
// TODO 芋艿:额外拼接
|
||||||
if (config.url.indexOf('/app-api/') >= 0) {
|
if (config.url.indexOf('/app-api/') >= 0) {
|
||||||
// config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
|
config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
|
||||||
config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
|
// config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
|
||||||
}
|
}
|
||||||
return http.middleware(config);
|
return http.middleware(config);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue