Fix(分销详情):[#1738]分销详情的说明文本对接
This commit is contained in:
@@ -554,3 +554,10 @@ export function getUserPointInfo(param) {
|
|||||||
export function getUserPointBill(param) {
|
export function getUserPointBill(param) {
|
||||||
return request.get('/user/points/bill', param, { login: true })
|
return request.get('/user/points/bill', param, { login: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 用户分销说明
|
||||||
|
*/
|
||||||
|
export function getUserSpreadRule(param) {
|
||||||
|
return request.get('/userSpreadRule', param, { login: false })
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="flex-grow: 1;font-size: 24rpx;">
|
<view class="" style="flex-grow: 1;font-size: 24rpx;">
|
||||||
返佣说明:1.下线客户下单成功后,平台设置为默认7天收货成功,佣金便自动计算添加到上线的返佣;2.如过程中下单客户有退货退款,则此订单返佣无效,会自动取消或相应扣除。
|
{{ ruleText }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getSpreadOrder } from "@/api/user";
|
import { getSpreadOrder, getUserSpreadRule } from "@/api/user";
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
export default {
|
export default {
|
||||||
name: "PromoterOrder",
|
name: "PromoterOrder",
|
||||||
@@ -77,39 +77,48 @@ export default {
|
|||||||
},
|
},
|
||||||
loaded: false,
|
loaded: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
loadTitle: "",
|
loadTitle: '',
|
||||||
count: ""
|
count: '',
|
||||||
};
|
ruleText: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted() {
|
||||||
this.getIndex();
|
this.getIndex()
|
||||||
|
this.getRuleText()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
!this.loading && this.getIndex();
|
!this.loading && this.getIndex()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getIndex: function() {
|
getRuleText() {
|
||||||
let there = this;
|
getUserSpreadRule().then(res => {
|
||||||
if (there.loaded == true || there.loading == true) return;
|
const { success, data } = res
|
||||||
there.loading = true;
|
if (success) {
|
||||||
|
this.ruleText = data.userSpreadRule || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getIndex() {
|
||||||
|
let there = this
|
||||||
|
if (there.loaded == true || there.loading == true) return
|
||||||
|
there.loading = true
|
||||||
getSpreadOrder(there.where).then(
|
getSpreadOrder(there.where).then(
|
||||||
res => {
|
res => {
|
||||||
there.loading = false;
|
there.loading = false
|
||||||
there.loaded = res.data.list.length < there.where.limit;
|
there.loaded = res.data.list.length < there.where.limit
|
||||||
there.loadTitle = there.loaded ? "人家是有底线的" : "上拉加载更多";
|
there.loadTitle = there.loaded ? "人家是有底线的" : "上拉加载更多"
|
||||||
there.where.page = there.where.page + 1;
|
there.where.page = there.where.page + 1
|
||||||
there.list.push.apply(there.list, res.data.list);
|
there.list.push.apply(there.list, res.data.list)
|
||||||
there.count = res.data.count;
|
there.count = res.data.count
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
})
|
||||||
},
|
}
|
||||||
300
|
)
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user