积分商城修改
This commit is contained in:
@@ -123,7 +123,7 @@ function toFenxiao() {
|
||||
|
||||
function toIntegralMall() {
|
||||
uni.navigateTo({
|
||||
url: "/scoreShop/index/index",
|
||||
url: "/scoreShop/index/index?shopId="+uni.cache.get("shopId"),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,8 @@
|
||||
page: formData.form.page,
|
||||
size: formData.form.size,
|
||||
// status: formData.form.status,
|
||||
shopId: formData.shopId
|
||||
shopId: formData.shopId,
|
||||
id:formData.id
|
||||
})
|
||||
}
|
||||
if (res.totalPage == 0 || res.totalPage == 1 && res.totalRow <= 10) {
|
||||
@@ -215,6 +216,7 @@
|
||||
console.log('options',options);
|
||||
formData.shopId = options.shopId
|
||||
formData.active = options.type
|
||||
formData.id=options.id||''
|
||||
console.log(formData.info)
|
||||
getlist()
|
||||
getShopUserInfo()
|
||||
|
||||
@@ -1,30 +1,20 @@
|
||||
<template>
|
||||
<view class="min-page bg-f7">
|
||||
<up-navbar
|
||||
title="积分商城"
|
||||
bgColor="transparent"
|
||||
leftIconColor="#333"
|
||||
titleStyle="color:#333"
|
||||
@leftClick="back"
|
||||
></up-navbar>
|
||||
<up-navbar title="积分商城" bgColor="transparent" leftIconColor="#333" titleStyle="color:#333"
|
||||
@leftClick="back"></up-navbar>
|
||||
<view :style="{ backgroundImage: 'url(' + imgs.bg + ')' }" class="bg">
|
||||
<view class="top">
|
||||
<view>
|
||||
<view class="u-flex">
|
||||
<image :src="imgs.wujiaoxing" class="wujiaoxing"></image>
|
||||
<view class="number u-m-l-20 u-m-r-12">73954</view>
|
||||
<view class="number u-m-l-20 u-m-r-12">{{pointsUser?pointsUser.pointBalance:''}}</view>
|
||||
<view class="u-flex">
|
||||
<up-icon
|
||||
name="arrow-right"
|
||||
size="18"
|
||||
bold
|
||||
color="#9C571F"
|
||||
></up-icon>
|
||||
<up-icon name="arrow-right" size="18" bold color="#9C571F"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-t-10 u-flex color1" style="margin-left: 66rpx">
|
||||
<text @click="toPage('/scoreShop/order/index')">积分订单</text>
|
||||
<text class="u-m-l-44">积分明细</text>
|
||||
<text class="u-m-l-44" @click="toDetail">积分明细</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
@@ -35,18 +25,8 @@
|
||||
<view class="bottom">
|
||||
<view class="tab-box u-flex">
|
||||
<view class="tabs u-flex-1 u-flex">
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="tabActive === 0 ? 'active' : ''"
|
||||
@click="tabActive = 0"
|
||||
>优惠券</view
|
||||
>
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="tabActive === 1 ? 'active' : ''"
|
||||
@click="tabActive = 1"
|
||||
>其他商品</view
|
||||
>
|
||||
<view class="tab-item" :class="tabActive === 0 ? 'active' : ''" @click="tabActive = 0">优惠券</view>
|
||||
<view class="tab-item" :class="tabActive === 1 ? 'active' : ''" @click="tabActive = 1">其他商品</view>
|
||||
</view>
|
||||
<view class="u-flex" @click="toggleLayout">
|
||||
<image :src="layout === 'block' ? imgs.layout_block : imgs.layout" class="layout" />
|
||||
@@ -59,28 +39,35 @@
|
||||
<script setup>
|
||||
import * as pointGoodsApi from "@/common/api/order/pointGoods.js";
|
||||
import goodsList from "./components/goods-list.vue";
|
||||
import {
|
||||
onLoad
|
||||
} from "@dcloudio/uni-app";
|
||||
const imgs = {
|
||||
bg: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/3716211a58d84fda9ee596a1882c0704.png", //背景图
|
||||
huizhang:
|
||||
"https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/5d07600cc494490aa3adacfe51d8845d.png", //徽章
|
||||
wujiaoxing:
|
||||
"https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/d53e8d88462d4d838b12150062644d03.png", //五角星
|
||||
layout:
|
||||
"https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/cba40ceb38a64bbfbe144f2ab0d6197f.png", //布局
|
||||
layout_block:
|
||||
"https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/3/57a51ee2c74d4a638db2a81c6f6c8954.png",
|
||||
huizhang: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/5d07600cc494490aa3adacfe51d8845d.png", //徽章
|
||||
wujiaoxing: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/d53e8d88462d4d838b12150062644d03.png", //五角星
|
||||
layout: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/cba40ceb38a64bbfbe144f2ab0d6197f.png", //布局
|
||||
layout_block: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/3/57a51ee2c74d4a638db2a81c6f6c8954.png",
|
||||
};
|
||||
const layout = ref("block");
|
||||
|
||||
function toggleLayout() {
|
||||
layout.value = layout.value === "block" ? "list" : "block";
|
||||
}
|
||||
|
||||
function back() {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}
|
||||
|
||||
function toDetail() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/member/billDetails?type=2&shopId=' + query.shopId + '&id=' + (pointsUser.value.id ||
|
||||
'')
|
||||
})
|
||||
}
|
||||
|
||||
function toPage(url) {
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
@@ -90,12 +77,19 @@ const tabActive = ref(0);
|
||||
const query = reactive({
|
||||
page: 1,
|
||||
size: 10,
|
||||
shopId: uni.cache.get("shopId"),
|
||||
shopId: '',
|
||||
});
|
||||
const isEnd = ref(false);
|
||||
const pointsUser = ref(null)
|
||||
|
||||
function getList() {
|
||||
pointGoodsApi.pointGoodsPage(query);
|
||||
pointGoodsApi.pointGoodsPage(query).then(res => {
|
||||
pointsUser.value = res.pointsUser
|
||||
})
|
||||
}
|
||||
onLoad((opt) => {
|
||||
query.shopId = opt.id || ''
|
||||
})
|
||||
onShow(() => {
|
||||
query.page = 1;
|
||||
isEnd.value = false;
|
||||
@@ -110,37 +104,45 @@ onShow(() => {
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.top {
|
||||
padding: 138rpx 26rpx 48rpx 42rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
$color: #9c571f;
|
||||
|
||||
.huizhang {
|
||||
width: 218rpx;
|
||||
height: 212rpx;
|
||||
}
|
||||
|
||||
.wujiaoxing {
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
}
|
||||
|
||||
.color1 {
|
||||
color: $color;
|
||||
}
|
||||
|
||||
.number {
|
||||
color: $color;
|
||||
font-size: 64rpx;
|
||||
font-weight: 900;
|
||||
}
|
||||
}
|
||||
|
||||
.layout {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
|
||||
.min-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
width: 750rpx;
|
||||
flex: 1;
|
||||
@@ -158,11 +160,13 @@ onShow(() => {
|
||||
.tabs {
|
||||
justify-content: center;
|
||||
gap: 200rpx;
|
||||
|
||||
.tab-item {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
padding: 16rpx 0;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
display: block;
|
||||
position: absolute;
|
||||
@@ -175,6 +179,7 @@ onShow(() => {
|
||||
background-color: transparent;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
&.active::after {
|
||||
background-color: #ffaa62;
|
||||
}
|
||||
|
||||
@@ -41,16 +41,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
function toDuihuan() {
|
||||
uni.showToast({
|
||||
title: '待开放!',
|
||||
icon: 'none'
|
||||
function toDuihuan(item) {
|
||||
// uni.showToast({
|
||||
// title: '待开放!',
|
||||
// icon: 'none'
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url:'/scoreShop/index/index?shopId=' + item.shopId+'&id='+item.id
|
||||
})
|
||||
}
|
||||
|
||||
function toDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/member/billDetails?type=2&shopId=' + item.shopId
|
||||
url: '/pages/user/member/billDetails?type=2&shopId=' + item.shopId+'&id='+item.id
|
||||
})
|
||||
}
|
||||
onMounted(getData)
|
||||
|
||||
Reference in New Issue
Block a user