feat: 验证码
This commit is contained in:
@@ -18,6 +18,8 @@ SHOPRO_VERSION=v2.4.1
|
|||||||
#SHOPRO_DEV_BASE_URL=http://www.qflyqzy.net:48090
|
#SHOPRO_DEV_BASE_URL=http://www.qflyqzy.net:48090
|
||||||
|
|
||||||
#SHOPRO_DEV_BASE_URL=https://www.qflyqzy.net/yg-api
|
#SHOPRO_DEV_BASE_URL=https://www.qflyqzy.net/yg-api
|
||||||
|
# 伟伟
|
||||||
|
# SHOPRO_DEV_BASE_URL=http://192.168.1.4:48080
|
||||||
|
|
||||||
# 测试环境
|
# 测试环境
|
||||||
SHOPRO_DEV_BASE_URL=https://yougoutest.api.riananyoumu.com
|
SHOPRO_DEV_BASE_URL=https://yougoutest.api.riananyoumu.com
|
||||||
|
|||||||
@@ -83,13 +83,13 @@
|
|||||||
pagePath: '/pages/index/index',
|
pagePath: '/pages/index/index',
|
||||||
text: '首页',
|
text: '首页',
|
||||||
iconPath: '/static/index/1.png',
|
iconPath: '/static/index/1.png',
|
||||||
selectedIconPath: '/static/index/1_1.png',
|
selectedIconPath: '/static/index/blue_icon/1_1.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pagePath: '/pages/index/aiStore',
|
pagePath: '/pages/index/aiStore',
|
||||||
text: 'AI店铺',
|
text: 'AI店铺',
|
||||||
iconPath: '/static/index/2.png',
|
iconPath: '/static/index/2.png',
|
||||||
selectedIconPath: '/static/index/2_1.png',
|
selectedIconPath: '/static/index/blue_icon/2_1.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pagePath: '/pages/home/seed',
|
pagePath: '/pages/home/seed',
|
||||||
@@ -102,13 +102,13 @@
|
|||||||
pagePath: '/pages/cart/cart',
|
pagePath: '/pages/cart/cart',
|
||||||
text: '购物车',
|
text: '购物车',
|
||||||
iconPath: '/static/index/3.png',
|
iconPath: '/static/index/3.png',
|
||||||
selectedIconPath: '/static/index/3_1.png',
|
selectedIconPath: '/static/index/blue_icon/3_1.png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pagePath: '/pages/index/user',
|
pagePath: '/pages/index/user',
|
||||||
text: '我的',
|
text: '我的',
|
||||||
iconPath: '/static/index/4.png',
|
iconPath: '/static/index/4.png',
|
||||||
selectedIconPath: '/static/index/4_1.png',
|
selectedIconPath: '/static/index/blue_icon/4_1.png',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.textActive {
|
.textActive {
|
||||||
color: var(--color32, #fa7e31);
|
color: #3b5efb;
|
||||||
}
|
}
|
||||||
|
|
||||||
.safe-bottom {
|
.safe-bottom {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="card balance-card">
|
<view class="card balance-card">
|
||||||
<view class="balance-label">当前钱包余额</view>
|
<view class="balance-label">当前可提现金额</view>
|
||||||
<view class="balance-value">{{ $fen2yuan(walletBalanceCents || 0) }}</view>
|
<view class="balance-value">{{ $fen2yuan(walletBalanceCents || 0) }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
|
|
||||||
const refreshWallet = async () => {
|
const refreshWallet = async () => {
|
||||||
const res = await payApi.getWallet().catch(() => ({ code: -1 }));
|
const res = await payApi.getWallet().catch(() => ({ code: -1 }));
|
||||||
if (res?.code === 0) walletBalanceCents.value = res?.data?.balance ?? 0;
|
if (res?.code === 0) walletBalanceCents.value = res?.data?.withdrawAmount ?? 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onAmountBlur = () => {
|
const onAmountBlur = () => {
|
||||||
|
|||||||
+328
-132
@@ -1,163 +1,359 @@
|
|||||||
<template>
|
<template>
|
||||||
<s-pages title="AI店铺" tabbar="/pages/index/aiStore" :showLeftButton="false">
|
<s-pages title="AI店铺" navPreset="blue" tabbar="/pages/index/aiStore" :showLeftButton="false">
|
||||||
<view class="ai-store-page" style="min-height: 100vh">
|
<view class="ai-store-page h100 flex-column">
|
||||||
<view class="search_box flex-between">
|
<view class="top-area">
|
||||||
<view class="flex-center flex1 search_input">
|
<view class="tab-header">
|
||||||
<image style="width: 36rpx; height: 36rpx" src="/static/icon/search1.png" mode="scaleToFill" />
|
<view
|
||||||
<input
|
v-for="(tab, i) in nav"
|
||||||
v-model="keyword"
|
:key="tab.id"
|
||||||
class="flex1 input"
|
class="tab-item"
|
||||||
type="text"
|
:class="{ active: index === i }"
|
||||||
placeholder="搜索店铺.."
|
@click="navChange(i)"
|
||||||
placeholder-style="font-size:25rpx;color:#fff"
|
>
|
||||||
/>
|
{{ tab.name }}
|
||||||
|
</view>
|
||||||
|
<view class="tab-line" :style="{ left: index === 0 ? '25%' : '75%' }"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="search_btn flex-center" @click="onSearch">搜索</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="tab_box">
|
<view class="search-wrap flex-center">
|
||||||
<view class="tab-wrap">
|
<view class="search-input flex1 flex-center">
|
||||||
<!-- <view class="tab-header">
|
<uni-icons class="m-r-16" type="search" color="#9AA7C7" size="18" />
|
||||||
<view
|
<uni-easyinput
|
||||||
class="tab-item"
|
class="flex1"
|
||||||
v-for="(item, index) in tabList"
|
v-model="searchText"
|
||||||
:key="index"
|
type="text"
|
||||||
@click="changeTab(index)"
|
placeholder="搜索想要的商品"
|
||||||
:class="{ active: tabIndex === index }"
|
:inputBorder="false"
|
||||||
>
|
:styles="{ color: '#333', fontSize: '28rpx' }"
|
||||||
{{ item.name }}
|
placeholderStyle="color:#9AA7C7;font-size:28rpx;"
|
||||||
</view>
|
@blur="search"
|
||||||
<view class="tab-line" :style="{ left: `${tabIndex * 50 + 17.5}%` }"></view>
|
@clear="clearSearch"
|
||||||
</view> -->
|
/>
|
||||||
<view class="tab-content">
|
</view>
|
||||||
<view v-if="tabIndex === 0" class="tab-panel">
|
<view class="search-btn flex-center" @click="search">
|
||||||
<view class="panel-title">选品广场</view>
|
<uni-icons type="search" color="#FFFFFF" size="18" />
|
||||||
<view class="panel-desc">这里展示可选商品/店铺内容</view>
|
|
||||||
</view>
|
|
||||||
<view v-else class="tab-panel tab-panel-no-padding">
|
|
||||||
<aistore_tab2 />
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="m-t-16 m-b-8" v-if="timeRound.length && index === 0">
|
||||||
|
<scroll-view scroll-x class="time-scroll">
|
||||||
|
<view class="flex">
|
||||||
|
<view
|
||||||
|
v-for="(item, i) in timeRound"
|
||||||
|
:key="item.id || i"
|
||||||
|
class="timeNav m-r-20"
|
||||||
|
:class="{ activeTime: selectedTimeId === item.id }"
|
||||||
|
@click="changeTimeRound(item, i)"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="list-wrap flex1">
|
||||||
|
<card_pages
|
||||||
|
ref="pageCommodity"
|
||||||
|
:navList="nav"
|
||||||
|
:currentTab="index"
|
||||||
|
@upCallback="getData"
|
||||||
|
:height="height"
|
||||||
|
:oneShow="true"
|
||||||
|
>
|
||||||
|
<template #content>
|
||||||
|
<aistore_tab1 v-if="index === 0" :list="dataList" @addCar="addCar" @update="update" @shipment="shipment" />
|
||||||
|
<aistore_tab2 v-if="index === 1" :list="dataList" :source="index" @addCar="addCar" @update="update" @shipment="shipment" />
|
||||||
|
</template>
|
||||||
|
</card_pages>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="payShow">
|
||||||
|
<card_payment
|
||||||
|
ref="paymentRef"
|
||||||
|
@updataList="clearSearch"
|
||||||
|
@updatePrice="updatePrice"
|
||||||
|
:addShow="addShow"
|
||||||
|
:minSalesCountShow="navName === '折扣区'"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</s-pages>
|
</s-pages>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
|
import * as api from '@/sheep/api/ai/index';
|
||||||
|
import card_pages from '@/components/card_pages/card_pages';
|
||||||
|
import card_payment from '@/components/card_payment/card_payment';
|
||||||
|
import aistore_tab1 from './components/aistore_tab1.vue';
|
||||||
import aistore_tab2 from './components/aistore_tab2.vue';
|
import aistore_tab2 from './components/aistore_tab2.vue';
|
||||||
|
|
||||||
const keyword = ref('');
|
const searchText = ref('');
|
||||||
const tabList = ref([{ name: '选品广场' }, { name: '我的店铺' }]);
|
|
||||||
const tabIndex = ref(1);
|
|
||||||
|
|
||||||
const changeTab = (index) => {
|
const search = () => {
|
||||||
tabIndex.value = index;
|
pageCommodity.value?.downCallback();
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSearch = () => {};
|
const clearSearch = () => {
|
||||||
|
searchText.value = '';
|
||||||
|
pageCommodity.value?.downCallback();
|
||||||
|
};
|
||||||
|
|
||||||
|
const timeRound = ref([]);
|
||||||
|
const selectedTimeId = ref(null);
|
||||||
|
const navName = ref('');
|
||||||
|
|
||||||
|
function changeTimeRound(e) {
|
||||||
|
navName.value = e.name;
|
||||||
|
selectedTimeId.value = e?.id ?? null;
|
||||||
|
pageCommodity.value?.downCallback();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSpuTimeList() {
|
||||||
|
api.getSpuTimeList({}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
timeRound.value = res.data || [];
|
||||||
|
selectedTimeId.value = timeRound.value?.[0]?.id ?? null;
|
||||||
|
navName.value = timeRound.value?.[0]?.name ?? '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const getCartList = async () => {
|
||||||
|
const res = await api.getShopCartList({});
|
||||||
|
if (res.code === 0) {
|
||||||
|
payShow.value = Boolean(res.data.length || addShow.value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
getSpuTimeList();
|
||||||
|
getCartList();
|
||||||
|
});
|
||||||
|
|
||||||
|
const update = () => {
|
||||||
|
pageCommodity.value?.downCallback();
|
||||||
|
};
|
||||||
|
|
||||||
|
const system = uni.getSystemInfoSync();
|
||||||
|
const baseHeight =
|
||||||
|
system.windowHeight -
|
||||||
|
system.statusBarHeight -
|
||||||
|
uni.upx2px(88) -
|
||||||
|
uni.upx2px(76) -
|
||||||
|
uni.upx2px(48) -
|
||||||
|
uni.upx2px(20);
|
||||||
|
|
||||||
|
const index = ref(0);
|
||||||
|
const height = ref(`${baseHeight}px`);
|
||||||
|
const payShow = ref(false);
|
||||||
|
const addShow = ref(false);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => payShow.value,
|
||||||
|
() => {
|
||||||
|
const extra = payShow.value ? uni.upx2px(128) : 0;
|
||||||
|
height.value = `${baseHeight - extra}px`;
|
||||||
|
},
|
||||||
|
{ immediate: true },
|
||||||
|
);
|
||||||
|
|
||||||
|
const nav = ref([
|
||||||
|
{ name: '选品广场', id: 1 },
|
||||||
|
{ name: '我的店铺', id: 2 },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const pageCommodity = ref(null);
|
||||||
|
const dataList = ref([]);
|
||||||
|
|
||||||
|
const getData = async (mescroll) => {
|
||||||
|
if (mescroll?.dataObj?.index !== index.value) return;
|
||||||
|
|
||||||
|
let res = null;
|
||||||
|
if (index.value) {
|
||||||
|
res = await api.getOrderPage({
|
||||||
|
pageNo: mescroll?.num || 1,
|
||||||
|
pageSize: mescroll?.size || 10,
|
||||||
|
keyWord: searchText.value,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
res = await api.getSpuPage({
|
||||||
|
pageNo: mescroll?.num || 1,
|
||||||
|
pageSize: mescroll?.size || 10,
|
||||||
|
keyWord: searchText.value,
|
||||||
|
timeId: selectedTimeId.value,
|
||||||
|
...mescroll.params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res.code !== 0) {
|
||||||
|
pageCommodity.value?.getState(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let curPageData = [];
|
||||||
|
if (index.value) {
|
||||||
|
const list = res.data.list || [];
|
||||||
|
const arr = [];
|
||||||
|
list.forEach((e) => {
|
||||||
|
e.items1 = JSON.parse(JSON.stringify(e.items));
|
||||||
|
if (e?.items?.length) {
|
||||||
|
e.items.forEach((item) => {
|
||||||
|
item.skuArr = item.items;
|
||||||
|
item.status = e.status;
|
||||||
|
item.id = item.spuId;
|
||||||
|
item.spuId = e.payOrderId;
|
||||||
|
item.shoppingPlazaId = e.roundTimeId;
|
||||||
|
item.items1 = e.items1;
|
||||||
|
arr.push(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (arr.length) {
|
||||||
|
arr.forEach((e) => {
|
||||||
|
if (e.skuArr && e.skuArr.length) {
|
||||||
|
e.skuArr.forEach((item) => {
|
||||||
|
item.propertyText = '';
|
||||||
|
if (item?.properties) {
|
||||||
|
item.properties.forEach((e1) => {
|
||||||
|
item.propertyText += e1.valueName + ' ';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
curPageData = arr;
|
||||||
|
} else {
|
||||||
|
curPageData = res.data?.list || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mescroll?.num === 1) dataList.value = [];
|
||||||
|
dataList.value = dataList.value.concat(curPageData);
|
||||||
|
pageCommodity.value?.getState(true, curPageData.length);
|
||||||
|
};
|
||||||
|
|
||||||
|
const paymentRef = ref(null);
|
||||||
|
const addCar = (data) => {
|
||||||
|
payShow.value = true;
|
||||||
|
addShow.value = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
paymentRef.value?.addCar(data);
|
||||||
|
}, 500);
|
||||||
|
};
|
||||||
|
|
||||||
|
const navChange = (i) => {
|
||||||
|
index.value = i;
|
||||||
|
dataList.value = [];
|
||||||
|
pageCommodity.value?.downCallback();
|
||||||
|
payShow.value = !index.value;
|
||||||
|
};
|
||||||
|
|
||||||
|
const updatePrice = (val) => {
|
||||||
|
addShow.value = val;
|
||||||
|
getCartList();
|
||||||
|
};
|
||||||
|
|
||||||
|
function shipment() {
|
||||||
|
pageCommodity.value?.downCallback();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$primary-start: #ff7a45;
|
|
||||||
$primary-end: #ff4d7cc6;
|
|
||||||
|
|
||||||
.ai-store-page {
|
.ai-store-page {
|
||||||
// background: #fff5f1;
|
min-height: 100vh;
|
||||||
|
background: #2556ec;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_box {
|
.top-area {
|
||||||
margin-top: 30rpx;
|
padding: 24rpx 24rpx 0;
|
||||||
padding: 20rpx;
|
|
||||||
|
|
||||||
.search_input {
|
|
||||||
height: 72rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
padding-left: 28rpx;
|
|
||||||
margin-left: 24rpx;
|
|
||||||
border: 4rpx solid rgba(255, 122, 69, 0.35);
|
|
||||||
background: linear-gradient(90deg, rgba(255, 122, 69, 0.25), rgba(255, 77, 125, 0.25));
|
|
||||||
|
|
||||||
.input {
|
|
||||||
margin-left: 16rpx;
|
|
||||||
height: 100%;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.search_btn {
|
|
||||||
width: 120rpx;
|
|
||||||
height: 72rpx;
|
|
||||||
font-size: 25rpx;
|
|
||||||
margin: 0 20rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
color: #fff;
|
|
||||||
background: linear-gradient(90deg, $primary-start, $primary-end);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab_box {
|
.tab-header {
|
||||||
.tab-wrap {
|
position: relative;
|
||||||
width: 100%;
|
display: flex;
|
||||||
}
|
justify-content: center;
|
||||||
|
margin-top: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.tab-header {
|
.tab-item {
|
||||||
position: relative;
|
width: 50%;
|
||||||
display: flex;
|
text-align: center;
|
||||||
width: 100%;
|
font-size: 34rpx;
|
||||||
border-bottom: 1rpx solid rgba(255, 255, 255, 0.55);
|
line-height: 48rpx;
|
||||||
background: linear-gradient(90deg, $primary-start, $primary-end);
|
padding: 16rpx 0 22rpx;
|
||||||
}
|
color: rgba(255, 255, 255, 0.7);
|
||||||
|
|
||||||
.tab-item {
|
&.active {
|
||||||
flex: 1;
|
color: #ffffff;
|
||||||
padding: 30rpx 0;
|
|
||||||
font-size: 32rpx;
|
|
||||||
text-align: center;
|
|
||||||
color: rgba(255, 255, 255, 0.75);
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
color: #fff;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-line {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
width: 15%;
|
|
||||||
height: 6rpx;
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 10rpx 10rpx 0 0;
|
|
||||||
transition: left 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-content {
|
|
||||||
padding: 0 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-panel {
|
|
||||||
padding: 28rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
background: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-panel-no-padding {
|
|
||||||
padding: 0;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.panel-title {
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #333333;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.panel-desc {
|
.tab-line {
|
||||||
margin-top: 12rpx;
|
position: absolute;
|
||||||
font-size: 26rpx;
|
bottom: 6rpx;
|
||||||
color: #666666;
|
width: 72rpx;
|
||||||
}
|
height: 6rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
transition: left 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-wrap {
|
||||||
|
margin-top: 22rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input {
|
||||||
|
height: 76rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
padding: 0 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-btn {
|
||||||
|
width: 76rpx;
|
||||||
|
height: 76rpx;
|
||||||
|
margin-left: 18rpx;
|
||||||
|
border-radius: 38rpx;
|
||||||
|
background: linear-gradient(to bottom right, #2c8cfa 0%, #3d5efb 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-scroll {
|
||||||
|
width: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeNav {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 56rpx;
|
||||||
|
padding: 0 22rpx;
|
||||||
|
border-radius: 28rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.85);
|
||||||
|
background: rgba(255, 255, 255, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.activeTime {
|
||||||
|
color: #2556ec;
|
||||||
|
background: #ffffff;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-wrap {
|
||||||
|
margin-top: 18rpx;
|
||||||
|
background: #f1f5ff;
|
||||||
|
border-radius: 30rpx 30rpx 0 0;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ai-button1) {
|
||||||
|
background: linear-gradient(to bottom right, #2c8cfa 0%, #3d5efb 100%) !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<view class="p-t-16 p-b-24">
|
||||||
|
<view class="m-b-24" v-for="(v, i) in list" :key="i">
|
||||||
|
<aiOrder :data="v" @addCar="emit('addCar', $event)" :source="0" @update="emit('update')" @shipment="emit('shipment')" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import aiOrder from '@/components/ai_order/ai_order';
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const emit = defineEmits(['addCar', 'update', 'shipment']);
|
||||||
|
</script>
|
||||||
@@ -1,151 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="p-t-16 p-b-24">
|
||||||
<view class="border-card" v-for="item in list" :key="item.name">
|
<view class="m-b-24" v-for="(v, i) in list" :key="i">
|
||||||
<view class="card_top flex-between">
|
<aiOrder
|
||||||
<view class="title">{{ item.name }}</view>
|
:data="v"
|
||||||
<view class="QR_code_img">
|
@addCar="emit('addCar', $event)"
|
||||||
<image src="/static/index/2.png" mode="scaleToFill"></image>
|
:source="source"
|
||||||
</view>
|
@update="emit('update')"
|
||||||
</view>
|
@shipment="emit('shipment')"
|
||||||
<view class="info_text flex-row-start">
|
/>
|
||||||
等级:
|
|
||||||
<view class="tag">{{ item.grade }}</view>
|
|
||||||
<text>|</text>
|
|
||||||
达成时间:{{ item.createTime }}
|
|
||||||
</view>
|
|
||||||
<view class="chart_box flex-between">
|
|
||||||
<view class="chart_item">
|
|
||||||
<view class="chart_title flex-between">
|
|
||||||
<view>店铺总收益</view>
|
|
||||||
<image src="/static/aiStore/earnings.png" mode="scaleToFill"></image>
|
|
||||||
</view>
|
|
||||||
<view class="num_text">¥{{ item.price || 0.0 }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="chart_item">
|
|
||||||
<view class="chart_title flex-between">
|
|
||||||
<view>绿色积分</view>
|
|
||||||
<image src="/static/aiStore/leaf.png" mode="scaleToFill"></image>
|
|
||||||
</view>
|
|
||||||
<view class="num_text">{{ item.leaf }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import aiOrder from '@/components/ai_order/ai_order';
|
||||||
|
|
||||||
const list = ref([
|
defineProps({
|
||||||
{
|
list: {
|
||||||
name: '卓玛阳光防断洗发水',
|
type: Array,
|
||||||
price: 220.0,
|
default: () => [],
|
||||||
leaf: 4200,
|
|
||||||
grade: '超级店长',
|
|
||||||
createTime: '2026-01-15 09:15:00',
|
|
||||||
},
|
},
|
||||||
{
|
source: {
|
||||||
name: '治山贡鸡源头旗舰店',
|
type: Number,
|
||||||
price: 870.0,
|
default: 1,
|
||||||
leaf: 5600,
|
|
||||||
grade: '高级店长',
|
|
||||||
createTime: '2026-01-15 09:15:00',
|
|
||||||
},
|
},
|
||||||
]);
|
});
|
||||||
|
|
||||||
|
const emit = defineEmits(['addCar', 'update', 'shipment']);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$primary-start: #ff7a45c6;
|
|
||||||
$primary-end: #ff4d7c7d;
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 0 10rpx 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.border-card {
|
|
||||||
margin: 30rpx 0;
|
|
||||||
padding: 30rpx 40rpx;
|
|
||||||
border-radius: 22rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
background: linear-gradient(90deg, $primary-start 0%, $primary-end 100%);
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_top {
|
|
||||||
.title {
|
|
||||||
font-size: 35rpx;
|
|
||||||
position: relative;
|
|
||||||
padding-left: 35rpx;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
width: 20rpx;
|
|
||||||
height: 20rpx;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
background: rgba(255, 255, 255, 0.95);
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.QR_code_img {
|
|
||||||
width: 55rpx;
|
|
||||||
height: 55rpx;
|
|
||||||
padding: 10rpx;
|
|
||||||
border: rgba(255, 255, 255, 0.9) 1rpx solid;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.info_text {
|
|
||||||
font-size: 20rpx;
|
|
||||||
color: rgba(255, 255, 255, 0.85);
|
|
||||||
margin: 10rpx 0 20rpx;
|
|
||||||
|
|
||||||
.tag {
|
|
||||||
padding: 5rpx 15rpx;
|
|
||||||
color: $primary-start;
|
|
||||||
border-radius: 15rpx;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
text {
|
|
||||||
margin: 0 25rpx;
|
|
||||||
opacity: 0.9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.chart_box {
|
|
||||||
.chart_item {
|
|
||||||
width: 48%;
|
|
||||||
padding: 20rpx 30rpx 10rpx;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border: rgba(255, 255, 255, 0.6) 1rpx solid;
|
|
||||||
background: rgba(255, 255, 255, 0.18);
|
|
||||||
|
|
||||||
.chart_title {
|
|
||||||
font-size: 20rpx;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 30rpx;
|
|
||||||
height: 30rpx;
|
|
||||||
margin-left: 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.num_text {
|
|
||||||
font-size: 40rpx;
|
|
||||||
margin: 10rpx 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -222,6 +222,14 @@
|
|||||||
scrollColor: '#ffffff',
|
scrollColor: '#ffffff',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
if (props.navPreset === 'blue') {
|
||||||
|
return {
|
||||||
|
bg: '#2556EC',
|
||||||
|
color: '#ffffff',
|
||||||
|
scrollbg: '#000000',
|
||||||
|
scrollColor: '#ffffff',
|
||||||
|
};
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
bg: undefined,
|
bg: undefined,
|
||||||
color: undefined,
|
color: undefined,
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
Reference in New Issue
Block a user