feat(custom): 新增聚合积分支付
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-03-20 15:53:52 +08:00
parent 2646d025f4
commit 63733d0109
14 changed files with 437 additions and 409 deletions

View File

@@ -22,6 +22,10 @@ const tabsList = ref([
title: "活动赠送",
value: 4,
},
{
title: "聚合积分",
value: 5,
},
]);
const computerType = computed(() => {
@@ -81,13 +85,13 @@ const getList = async () => {
PageSize: page.value.PageSize,
Type: tabValue.value,
};
if (tabValue.value === 1 || tabValue.value === 3) {
if (tabValue.value === 1 || tabValue.value === 3 || tabValue.value === 5) {
res = await getBeanDetail(newData);
} else if (tabValue.value === 2) {
// delete data.value.Type;
Reflect.deleteProperty(data.value, "Type");
res = await getIntegralDetail(newData);
} else {
} else if (tabValue.value === 4) {
res = await getGiftRecord(newData);
}
data.value = res.data.data || [];
@@ -117,28 +121,31 @@ const getList = async () => {
<!-- <image class="img" src="https://picdm.sunbangyan.cn/2023/08/15/ste192.png"/> -->
</view>
</view>
<view class="tabs-box">
<view
v-for="item in tabsList"
:key="item.value"
@click="tabChange(item.value)"
>
<view class="text">{{ item.title }}</view>
<scroll-view scroll-x>
<view class="tabs-box">
<view
class="line"
:class="{ lineColor: item.value === tabValue }"
></view>
v-for="item in tabsList"
:key="item.value"
@click="tabChange(item.value)"
>
<view class="text">{{ item.title }}</view>
<view
class="line"
:class="{ lineColor: item.value === tabValue }"
></view>
</view>
</view>
</view>
</scroll-view>
<view v-if="data.length > 0">
<view v-if="tabValue === 1 || tabValue === 3">
<view v-if="tabValue === 1 || tabValue === 3 || tabValue === 5">
<view class="card-list" v-for="(item, index) in data" :key="index">
<view class="left">
<view>订单{{ item.oid }}</view>
<view>时间{{ item.add_time.slice(0, 10) }}</view>
</view>
<view class="right">
<view v-if="tabValue === 1" style="color: green"
<view v-if="tabValue === 1 || tabValue === 5" style="color: green"
>-
<text>{{ item.number }}积分</text>
</view>
@@ -245,12 +252,17 @@ const getList = async () => {
.tabs-box {
display: flex;
flex-direction: row;
justify-content: space-evenly;
// justify-content: space-evenly;
align-items: center;
height: auto;
background-color: #fff;
padding: 0 20px;
padding: 0 10px;
text-align: center;
overflow-x: auto;
view {
width: 200px;
}
.text {
margin: 10px 20px;

View File

@@ -4,6 +4,7 @@ import Taro from "@tarojs/taro";
import Pay from "@/components/Pay.vue";
import { getActiveOrderList, deleteActiveOrder } from "@/api/goods";
import { getOrderStatistics } from "@/api/order";
import { getUserPoint } from "@/api/admin";
const tabValue = ref(0);
@@ -94,13 +95,18 @@ const tabChange = (index: number) => {
getList();
};
Taro.useReachBottom(() => {
console.log("useReachBottom");
});
const openPay = (item: OrderList) => {
const openPay = async (item: OrderList) => {
isShowPay.value = true;
jfInfo.value = item.oid;
const mer_info = Taro.getStorageSync("mer_info");
const user_info = Taro.getStorageSync("userInfo");
const data = await getUserPoint({
phone: user_info.data.phone,
bid: mer_info.bid,
});
jfInfo.value = {
jh_info: data.data,
oid: item.oid,
};
};
const errPay = () => {
@@ -122,6 +128,12 @@ const closePay = () => {
getList();
};
const successPay = () => {
isShowPay.value = false;
jfInfo.value = {};
getList();
};
const toDetail = (item: any) => {
Taro.setStorageSync("item", item);
Taro.navigateTo({
@@ -271,6 +283,7 @@ const getTj = async () => {
:jfInfo="jfInfo"
:OrderType="2"
@errPay="errPay"
@successPay="successPay"
@closePay="closePay"
/>
</view>

View File

@@ -152,6 +152,7 @@
:jfInfo="jfInfo"
:OrderType="2"
@errPay="errPay"
@successPay="successPay"
@closePay="closePay"
/>
</view>
@@ -164,6 +165,7 @@ import { ref } from "vue";
import dayjs from "dayjs";
import duration from "dayjs/plugin/duration";
import Pay from "@/components/Pay.vue";
import { getUserPoint } from "@/api/admin";
dayjs.extend(duration);
@@ -218,9 +220,18 @@ const toAdder = () => {
});
};
const openPay = () => {
const openPay = async () => {
isShowPay.value = true;
jfInfo.value = Taro.getStorageSync("item");
const mer_info = Taro.getStorageSync("mer_info");
const user_info = Taro.getStorageSync("userInfo");
const data = await getUserPoint({
phone: user_info.data.phone,
bid: mer_info.bid,
});
jfInfo.value = {
jh_info: data.data,
oid: Taro.getStorageSync("item").oid,
};
};
const successPay = (val: boolean) => {

View File

@@ -17,10 +17,10 @@ const toPage = (url: string) => {
is-link
@click="toPage('/pages/users/user_setting/index')"
></nut-cell>
<nut-cell title="关于我们" is-link @click="toPage('1')"></nut-cell>
<!-- <nut-cell title="关于我们" is-link @click="toPage('1')"></nut-cell>
<nut-cell title="资质证明" is-link @click="toPage('1')"></nut-cell>
<nut-cell title="协议规则" is-link @click="toPage('1')"></nut-cell>
<nut-cell title="隐私设置" is-link @click="toPage('1')"></nut-cell>
<nut-cell title="隐私设置" is-link @click="toPage('1')"></nut-cell> -->
</nut-cell-group>
</view>
</template>