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