Commit b43f80d8 authored by 陈宗胤(贵阳日报)'s avatar 陈宗胤(贵阳日报)
parents a316f690 16a4182f
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"qrcode": "^1.5.3", "qrcode": "^1.5.3",
"vue": "^3.3.11", "vue": "^3.3.11",
"vue-i18n": "^9.1.9", "vue-i18n": "^9.1.9",
"vue-router": "^4.4.3",
"wot-design-uni": "^1.3.7" "wot-design-uni": "^1.3.7"
}, },
"devDependencies": { "devDependencies": {
...@@ -16039,12 +16040,11 @@ ...@@ -16039,12 +16040,11 @@
} }
}, },
"node_modules/vue-router": { "node_modules/vue-router": {
"version": "4.3.3", "version": "4.4.3",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.3.3.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.4.3.tgz",
"integrity": "sha512-8Q+u+WP4N2SXY38FDcF2H1dUEbYVHVPtPCPZj/GTZx8RCbiB8AtJP9+YIxn4Vs0svMTNQcLIzka4GH7Utkx9xQ==", "integrity": "sha512-sv6wmNKx2j3aqJQDMxLFzs/u/mjA9Z5LCgy6BE0f7yFWMjrPLnS/sPNn8ARY/FXw6byV18EFutn5lTO6+UsV5A==",
"license": "MIT",
"dependencies": { "dependencies": {
"@vue/devtools-api": "^6.5.1" "@vue/devtools-api": "^6.6.3"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/posva" "url": "https://github.com/sponsors/posva"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"qrcode": "^1.5.3", "qrcode": "^1.5.3",
"vue": "^3.3.11", "vue": "^3.3.11",
"vue-i18n": "^9.1.9", "vue-i18n": "^9.1.9",
"vue-router": "^4.4.3",
"wot-design-uni": "^1.3.7" "wot-design-uni": "^1.3.7"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -10,13 +10,14 @@ ...@@ -10,13 +10,14 @@
> >
{{ item }} {{ item }}
</li> </li>
<li>选择日期</li>
</ul> </ul>
</view> </view>
</template> </template>
<script setup> <script setup>
import { defineProps } from 'vue'; import { defineProps } from 'vue';
const items = reactive(['智能排序', '距离优先', '好评优先', '销量优先', '低价优先', '低价优先']); const items = reactive(['日期不限', '今天', '明天', '一周内', '一月内', '本周末', '七夕节']);
const selectedItem = ref(null); const selectedItem = ref(null);
const props = defineProps({ const props = defineProps({
width: { width: {
......
...@@ -54,6 +54,7 @@ function back() { ...@@ -54,6 +54,7 @@ function back() {
padding-left: 20rpx; padding-left: 20rpx;
padding-top: 75rpx; padding-top: 75rpx;
box-sizing: border-box; box-sizing: border-box;
z-index: 999;
.arrow { .arrow {
width: 15rpx; width: 15rpx;
height: 24rpx; height: 24rpx;
......
...@@ -21,7 +21,16 @@ export function getPresaleList(data) { ...@@ -21,7 +21,16 @@ export function getPresaleList(data) {
// 筑农严选分类 // 筑农严选分类
export function getStrictSelection(data) { export function getStrictSelection(data) {
return request({ return request({
url: `/sgyrdd/category/getZnyx`, url: `/sgyrdd/category/getByParentId`,
method: 'GET',
data,
});
}
// 筑农预售分类
export function categoryPresaleList(data) {
return request({
url: '/sgyrdd/category/presaleList',
method: 'GET', method: 'GET',
data, data,
}); });
......
@font-face { @font-face {
font-family: "优设标题黑"; font-family: "YSBTH";
src: url('./优设标题黑.ttf'); src: url('./ysbth.TTF');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</view> </view>
<!-- 热门--> <!-- 热门-->
<view style="display: flex; flex-direction: row"> <view style="display: flex; flex-direction: row">
<view class="left-offer"> <view class="left-offer" @click="toSpecialOfferZoneList">
<text class="left-title">特价专区</text> <text class="left-title">特价专区</text>
<img <img
class="special-icon" class="special-icon"
...@@ -243,6 +243,12 @@ function toRouteDetails() { ...@@ -243,6 +243,12 @@ function toRouteDetails() {
url: '/pages/assistingAgriculture/RouteDetails/RouteDetails', url: '/pages/assistingAgriculture/RouteDetails/RouteDetails',
}); });
} }
function toSpecialOfferZoneList() {
// TODO: 跳转到特价专区
xma.navigateTo({
url: '/pages/assistingAgriculture/RuralTravel/specialOfferZoneList',
});
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -27,12 +27,14 @@ ...@@ -27,12 +27,14 @@
src="/static/assistingAgriculture/assets/culture.png" src="/static/assistingAgriculture/assets/culture.png"
style="width: 366rpx; height: 362rpx" style="width: 366rpx; height: 362rpx"
/> />
<view v-for="(item, index) in rightList" :key="index"> <view>
<img <view v-for="(item, index) in rightList" :key="index" @click="toPresale(item.categoryId)">
class="right-sort" <img
:src="item.icon" class="right-sort"
style="width: 336rpx; height: 176rpx; margin-left: 8rpx" :src="item.icon"
/> style="width: 336rpx; height: 176rpx; margin-left: 8rpx"
/>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -65,12 +67,12 @@ ...@@ -65,12 +67,12 @@
<scroll-view class="tabs" show-scrollbar="false" scroll-x :scroll-with-animation="true"> <scroll-view class="tabs" show-scrollbar="false" scroll-x :scroll-with-animation="true">
<text <text
@tap="choice(index, item.categoryId)" @tap="choice(index, item.categoryId)"
v-for="(item, index) in tabsData" v-for="(item, index) in tabsList"
:key="index" :key="index"
class="text" class="text"
:class="light === index ? 'light' : ''" :class="light === index ? 'light' : ''"
> >
{{ item.text }} {{ item.categoryName }}
</text> </text>
</scroll-view> </scroll-view>
<!-- 列表--> <!-- 列表-->
...@@ -110,8 +112,13 @@ ...@@ -110,8 +112,13 @@
<script setup> <script setup>
import Search from '../../../components/assistingAgriculture/index/Search.vue'; import Search from '../../../components/assistingAgriculture/index/Search.vue';
import { getStrictSelection } from '../../../api/assistingAgriculture/building'; import {
getGoodSaleProdList,
getPlatformProdList,
getStrictSelection,
} from '../../../api/assistingAgriculture/building';
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import { useRoute } from 'vue-router';
const current = ref(0); const current = ref(0);
const rightList = ref([]); const rightList = ref([]);
const light = ref(0); const light = ref(0);
...@@ -122,16 +129,6 @@ const swiperList = ref([ ...@@ -122,16 +129,6 @@ const swiperList = ref([
'../../../static/assistingAgriculture/assets/village.png', '../../../static/assistingAgriculture/assets/village.png',
]); ]);
// 分类列表数据 // 分类列表数据
const tabsData = ref([
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '水果生鲜' },
{ img: '/static/assistingAgriculture/assets/presale.png', text: '米面粮油' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '农家干货' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '鲜货预售' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '水果生鲜' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '米面粮油' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '农家干货' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '鲜货预售' },
]);
const detailList = ref([ const detailList = ref([
{ img: '/static/assistingAgriculture/assets/fruit.png', price: '2555', text: '这是草莓这是草莓' }, { img: '/static/assistingAgriculture/assets/fruit.png', price: '2555', text: '这是草莓这是草莓' },
{ {
...@@ -145,8 +142,20 @@ const detailList = ref([ ...@@ -145,8 +142,20 @@ const detailList = ref([
const choice = (index) => { const choice = (index) => {
light.value = index; light.value = index;
}; };
const params = {
current: 1,
size: 10,
};
const router = useRoute();
const params1 = {
current: 1,
size: 10,
categoryId: router.query.categoryId,
};
onMounted(async () => { onMounted(async () => {
getStrictSelectionList(); getStrictSelectionList();
getGoodSaleProd();
platformProdList();
}); });
// 筑农严选分类 // 筑农严选分类
const getStrictSelectionList = () => { const getStrictSelectionList = () => {
...@@ -157,18 +166,27 @@ const getStrictSelectionList = () => { ...@@ -157,18 +166,27 @@ const getStrictSelectionList = () => {
rightList.value = res.data.splice(0, 2); rightList.value = res.data.splice(0, 2);
}); });
}; };
// 好货热卖
const getGoodSaleProd = () => {
getGoodSaleProdList(params).then((res) => {});
};
// 筑农严选首页-分类查询商品列表
const platformProdList = () => {
getPlatformProdList(params1).then((res) => {});
};
// 跳转预售
const toPresale = (id) => {
xma.navigateTo({
url: `/pages/assistingAgriculture/index/presale?categoryId=${id}`,
});
};
function handleClick(e) { function handleClick(e) {
console.log(e); console.log(e);
} }
function onChange(e) { function onChange(e) {
console.log(e); console.log(e);
} }
function toPresale() {
// TODO: 跳转到预售
xma.navigateTo({
url: '/pages/assistingAgriculture/index/presale',
});
}
function toDetail() { function toDetail() {
// TODO: 跳转到详情页 // TODO: 跳转到详情页
xma.navigateTo({ xma.navigateTo({
...@@ -386,4 +404,23 @@ page { ...@@ -386,4 +404,23 @@ page {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;
} }
.container1 {
display: flex;
}
.left-box {
width: 33.33%;
background-color: lightblue;
}
.right-box {
width: 66.66%;
display: flex;
flex-direction: column;
}
.right-top-box {
height: 100%;
background-color: lightgreen;
}
</style> </style>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<view style="display: flex; flex-direction: row"> <view style="display: flex; flex-direction: row">
<view <view
class="borderClass" class="borderClass"
@click="toBuilding(index)" @click="toBuilding(item)"
v-for="(item, index) in sortList" v-for="(item, index) in sortList"
:key="index" :key="index"
> >
...@@ -59,11 +59,9 @@ import { ...@@ -59,11 +59,9 @@ import {
getPresaleCategory, getPresaleCategory,
getPresaleList, getPresaleList,
getSortList, getSortList,
getStrictSelection,
} from '../../../api/assistingAgriculture/building'; } from '../../../api/assistingAgriculture/building';
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { groupImgList } from '@/api'; import { groupImgList } from '@/api';
const list = ref([]); const list = ref([]);
const sortList = ref([]); const sortList = ref([]);
const swiperList = ref([]); const swiperList = ref([]);
...@@ -91,6 +89,7 @@ onMounted(async () => { ...@@ -91,6 +89,7 @@ onMounted(async () => {
getList(); getList();
getPresaleCategoryList(); getPresaleCategoryList();
getPresale(); getPresale();
platformProdList();
}); });
// 获取筑农专区分类; // 获取筑农专区分类;
const getList = () => { const getList = () => {
...@@ -127,26 +126,25 @@ const getPresale = () => { ...@@ -127,26 +126,25 @@ const getPresale = () => {
}); });
}); });
}; };
const onChange = (e) => { const onChange = (e) => {
// console.log(e); // console.log(e);
}; };
function toBuilding(index) { const toBuilding = (item) => {
if (index === 0) { if (item.categoryName === '筑农严选') {
// TODO: 跳转到筑农严选 // 跳转到筑农严选
xma.navigateTo({ xma.navigateTo({
url: '/pages/assistingAgriculture/index/building', url: `/pages/assistingAgriculture/index/building?categoryId=${item.categoryId}`,
}); });
} else if (index === 1) { } else if (item.categoryName === '乡村旅居') {
console.log(111); // 跳转到乡村旅居
} else if (index === 2) {
// TODO: 跳转到乡村旅居
xma.navigateTo({ xma.navigateTo({
url: '/pages/assistingAgriculture/RuralTravel/RuralTravel', url: `/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=${item.categoryId}`,
}); });
} else if (index === 3) { } else {
console.log(222); console.log(222);
} }
} };
// 跳转详情页 // 跳转详情页
function toDetail() { function toDetail() {
// TODO: 跳转到详情页 // TODO: 跳转到详情页
...@@ -278,8 +276,8 @@ page { ...@@ -278,8 +276,8 @@ page {
color: #fa5151; color: #fa5151;
} }
::v-deep .icon { ::v-deep .icon {
width: 40 rpx; width: 40rpx;
height: 40 rpx; height: 40rpx;
margin-left: 40 rpx; margin-left: 40rpx;
} }
</style> </style>
...@@ -143,8 +143,13 @@ ...@@ -143,8 +143,13 @@
<script setup> <script setup>
import Search from '../../../components/assistingAgriculture/index/Search.vue'; import Search from '../../../components/assistingAgriculture/index/Search.vue';
import { useRoute } from 'vue-router';
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { getPresaleList } from '../../../api/assistingAgriculture/building'; import {
categoryPresaleList,
getPresaleList,
getPresaleProdList,
} from '../../../api/assistingAgriculture/building';
const swiperList = ref([]); const swiperList = ref([]);
const current = ref(0); const current = ref(0);
// 轮播图数据 // 轮播图数据
...@@ -228,8 +233,17 @@ const goodList = ref([ ...@@ -228,8 +233,17 @@ const goodList = ref([
price: 69.9, price: 69.9,
}, },
]); ]);
const router = useRoute();
const params = {
current: 1,
size: 10,
categoryId: router.query.categoryId,
};
const tabsList = ref([]);
onMounted(async () => { onMounted(async () => {
getPresale(); getPresale();
getPresaleProd();
presaleSortList();
}); });
// 预售板块轮播图 // 预售板块轮播图
const getPresale = () => { const getPresale = () => {
...@@ -244,6 +258,19 @@ const getPresale = () => { ...@@ -244,6 +258,19 @@ const getPresale = () => {
}); });
}); });
}; };
// 筑农预售分类
const presaleSortList = () => {
categoryPresaleList({ level: 1 }).then((res) => {
console.log(res, 111);
tabsList.value = res.data;
});
};
// 筑农首页-分类查询商品列表
const getPresaleProd = () => {
getPresaleProdList(params).then((res) => {
console.log(res, 222);
});
};
// 左侧数据列表 // 左侧数据列表
const LeftList = ref([]); const LeftList = ref([]);
// 右侧数据列表 // 右侧数据列表
......
...@@ -56,10 +56,86 @@ ...@@ -56,10 +56,86 @@
</view> </view>
</view> </view>
</view> </view>
<view class="product"> </view>
<view class="header"> <view class="product">
<view class="icon">物流</view> <view class="header">
<text class="title">焗中焗盐焗鸡麻辣鸡</text> <view class="icon">物流</view>
<text class="title">焗中焗盐焗鸡麻辣鸡</text>
</view>
<view class="product-list">
<view class="product-item">
<view class="left">
<image src="/static/ticket/logo.png" class="img" mode="aspectFill"></image>
<view class="infobox">
<view class="name">盐焗鸡</view>
<view class="num">1斤</view>
</view>
</view>
<view class="right">
<view class="textbox">
<text>实付¥</text>
<text class="price">48.00</text>
</view>
<text class="num">x1</text>
</view>
</view>
<view class="product-item">
<view class="left">
<image src="/static/ticket/logo.png" class="img" mode="aspectFill"></image>
<view class="infobox">
<view class="name">盐焗鸡</view>
<view class="num">1斤</view>
</view>
</view>
<view class="right">
<view class="textbox">
<text>实付¥</text>
<text class="price">48.00</text>
</view>
<text class="num">x1</text>
</view>
</view>
</view>
<view class="totalbox">
<view class="total-item">
<text>商品总价:</text>
<text>¥98.70</text>
</view>
<view class="total-item">
<text>运费:</text>
<text>¥10.00</text>
</view>
<view class="total-item">
<text>店铺优惠:</text>
<text>¥0.00</text>
</view>
<view class="total-item">
<text>实付</text>
<view class="pricebox">
<text class="text">共2件 合计:</text>
<text class="icon"></text>
<text class="price">108.</text>
<text class="icon">70</text>
</view>
</view>
</view>
<view class="totalbox">
<text class="title">订单信息</text>
<view class="total-item">
<text>订单号:</text>
<text>5555222222111111</text>
</view>
<view class="total-item">
<text>运费:</text>
<text>¥10.00</text>
</view>
<view class="total-item">
<text>下单时间:</text>
<text>2024-05-22 17:25:54</text>
</view>
<view class="total-item">
<text>支付方式:</text>
<text>微信</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -266,16 +342,192 @@ page { ...@@ -266,16 +342,192 @@ page {
} }
} }
} }
}
.product {
display: flex;
flex-direction: column;
background-color: #fff;
margin-top: 10rpx;
padding: 30rpx 0;
.product { .header {
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
gap: 14rpx;
padding: 0 30rpx;
.icon {
background-color: #ff0909;
color: #fff;
font-family:
PingFang SC,
PingFang SC;
font-size: 24rpx;
padding: 2rpx 8rpx;
border-radius: 8rpx;
}
.title {
font-family:
PingFang SC,
PingFang SC;
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
}
.product-list {
display: flex;
flex-direction: column;
gap: 22rpx;
margin-top: 34rpx;
padding: 0 30rpx;
.header { .product-item {
display: flex; display: flex;
justify-content: space-between;
.left {
display: flex;
gap: 26rpx;
.img {
width: 100rpx;
height: 100rpx;
border-radius: 12rpx;
}
.infobox {
display: flex;
flex-direction: column;
gap: 12rpx;
.name {
font-family:
PingFang SC,
PingFang SC;
font-weight: bold;
font-size: 28rpx;
color: #333333;
}
.num {
font-family:
PingFang SC,
PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #999999;
}
}
}
.right {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 12rpx;
.textbox {
display: flex;
align-items: baseline;
gap: 4rpx;
text {
font-family:
PingFang SC,
PingFang SC;
font-size: 24rpx;
color: #333333;
}
.price {
font-family: PingFang SC;
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
}
.num {
font-family: PingFang SC;
font-size: 24rpx;
color: #999999;
}
}
}
}
.totalbox {
display: flex;
flex-direction: column;
gap: 28rpx;
margin-top: 40rpx;
padding: 0 30rpx;
border-bottom: 1rpx solid #ededed;
.title {
font-family:
PingFang SC,
PingFang SC;
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.total-item {
display: flex;
justify-content: space-between;
align-items: center;
text {
font-family:
PingFang SC,
PingFang SC;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.pricebox {
display: flex;
align-items: baseline;
.text {
font-family:
PingFang SC,
PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #333333;
}
.icon {
font-family:
PingFang SC,
PingFang SC;
font-weight: bold;
font-size: 24rpx;
color: #ff0909;
}
.price {
font-family:
PingFang SC,
PingFang SC;
font-weight: bold;
font-size: 32rpx;
color: #ff0909;
}
}
} }
} }
.totalbox:last-child {
border-bottom: none;
}
} }
} }
} }
......
...@@ -348,7 +348,7 @@ page { ...@@ -348,7 +348,7 @@ page {
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
overflow: hidden; overflow: hidden;
.title-icon { .title-icon {
font-family: '优设标题黑'; font-family: 'YSBTH';
font-size: 24 * 2rpx; font-size: 24 * 2rpx;
margin-left: 30rpx; margin-left: 30rpx;
color: #ffffff; color: #ffffff;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
</template> </template>
<script setup> <script setup>
import { debounce } from '@/utils/common';
const emits = defineEmits(['payment']); const emits = defineEmits(['payment']);
const selectType = ref('TENPAY'); const selectType = ref('TENPAY');
const show = ref(false); const show = ref(false);
...@@ -45,10 +46,10 @@ function radioChange(evt) { ...@@ -45,10 +46,10 @@ function radioChange(evt) {
selectType.value = value; selectType.value = value;
} }
const toPay = () => { const toPay = debounce(() => {
emits('payment', { selectType: selectType.value, orderNumber: orderNumber.value }); emits('payment', { selectType: selectType.value, orderNumber: orderNumber.value });
show.value = false; show.value = false;
}; });
const orderNumber = ref(''); const orderNumber = ref('');
const open = (e) => { const open = (e) => {
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
<view class="status-text">{{ statusList[orderDetail.orderStore.status] }}</view> <view class="status-text">{{ statusList[orderDetail.orderStore.status] }}</view>
</view> </view>
<view class="detail" v-if="orderDetail.orderStore.status == 3"> <view class="detail" v-if="orderDetail.orderStore.status == 3">
请在{{ orderDetail.orderStore.receiverTime.slice(0, 4) }}{{ 请在{{ orderDetail.orderStore.writeOffEnd.slice(0, 4) }}{{
orderDetail.orderStore.receiverTime.slice(5, 7) orderDetail.orderStore.writeOffEnd.slice(5, 7)
}}{{ orderDetail.orderStore.receiverTime.slice(8, 10) }}前到店消费 }}{{ orderDetail.orderStore.writeOffEnd.slice(8, 10) }}前到店消费
</view> </view>
</view> </view>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
> >
<view class="column"> <view class="column">
<text class="title">券码信息(1张可用)</text> <text class="title">券码信息(1张可用)</text>
<text class="text">{{ orderDetail.orderStore.receiverTime }} 到期</text> <text class="text">{{ orderDetail.orderStore.writeOffEnd }} 到期</text>
</view> </view>
<view class="btn" @tap="handleRefund(orderDetail.orderStore.orderNumber)"> <view class="btn" @tap="handleRefund(orderDetail.orderStore.orderNumber)">
申请退款 申请退款
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<image mode="aspectFill" :src="fileDomain + item.orderItems[0].pic" /> <image mode="aspectFill" :src="fileDomain + item.orderItems[0].pic" />
<view class="info-box"> <view class="info-box">
<view class="text">下单时间:{{ item.createTime.slice(0, 16) }}</view> <view class="text">下单时间:{{ item.createTime.slice(0, 16) }}</view>
<view class="text">预约时间:{{ item.receiverTime }}</view> <!-- <view class="text">预约时间:{{ item.receiverTime }}</view> -->
<view class="text">数量:{{ item.orderItems[0].prodCount }}</view> <view class="text">数量:{{ item.orderItems[0].prodCount }}</view>
<view class="text">实付:¥{{ item.actualTotal }}</view> <view class="text">实付:¥{{ item.actualTotal }}</view>
</view> </view>
...@@ -376,6 +376,19 @@ const payNow = async (data) => { ...@@ -376,6 +376,19 @@ const payNow = async (data) => {
dataList.value[changeIndex.value].orderNumber = outTradeNo; dataList.value[changeIndex.value].orderNumber = outTradeNo;
pendingPaymentOrder.value = outTradeNo; pendingPaymentOrder.value = outTradeNo;
window.location.href = paymentUrl; window.location.href = paymentUrl;
// 设置一个延时器
const start = Date.now();
setTimeout(() => {
const end = Date.now();
if (end - start < 1200) {
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma.showToast({
title: '未安装App',
icon: 'error',
});
// 这里可以跳转到应用下载页面
}
}, 1000);
}; };
/** /**
......
...@@ -3,52 +3,56 @@ ...@@ -3,52 +3,56 @@
<Header title="评论"></Header> <Header title="评论"></Header>
<view class="content"> <view class="content">
<wd-form ref="form" :model="formdata" :rules="rules" class="remake"> <wd-form ref="form" :model="formdata" :rules="rules" class="remake">
<text class="textarea">{{ shopname }}</text> <wd-cell-group>
<view class="itemPicker"> <text class="textarea">{{ shopname }}</text>
<view class="item01"> <view class="itemPicker">
<text class="label">评分</text> <view class="item01" prop="merchantServices">
<!-- 评分 --> <text class="label">评分</text>
<wd-rate <!-- 评分 -->
prop="merchantServices" <wd-rate
v-model="formdata.merchantServices" v-model="formdata.merchantServices"
active-color="#ff0000" active-color="#ff0000"
size="50rpx" size="50rpx"
space="10px" space="10px"
@change="handlemerchant" @change="handlemerchant"
/>
</view>
<view class="item02">
<text>{{ merList[formdata.merchantServices] }}</text>
</view>
</view>
<!-- 内容描述 -->
<view prop="evaluation">
<wd-textarea
v-model="formdata.evaluation"
placeholder="亲,分享您的看法,给其他人一个参考哦!"
/> />
</view> </view>
<view class="item02"> <wd-cell title-width="0px"></wd-cell>
<text>{{ merList[formdata.merchantServices] }}</text> <text class="textarea">上传图片/视频</text>
<!-- 图片上传 -->
<view class="wdUpload" prop="images">
<wd-upload
multiple
:action="action"
@change="handleFile"
:file-list="formdata.images"
:before-remove="beforeRemove"
:header="headers"
></wd-upload>
</view> </view>
</view>
<!-- 内容描述 --> <!-- 匿名评价 -->
<wd-textarea <wd-cell title="匿名评价" prop="isAnonymous" class="itemSwichval">
prop="evaluation" <wd-switch
v-model="formdata.evaluation" size="48rpx"
placeholder="亲,分享您的看法,给其他人一个参考哦!" active-color="#EC1B1B"
/> v-model="formdata.isAnonymous"
<text class="textarea">上传图片/视频</text> active-value="1"
<!-- 图片上传 --> inactive-value="0"
<view class="wdUpload" prop="images"> />
<wd-upload </wd-cell>
multiple </wd-cell-group>
:action="action"
@change="handleFile"
:file-list="fList"
:before-remove="beforeRemove"
:header="headers"
></wd-upload>
</view>
<!-- 匿名评价 -->
<wd-cell title="匿名评价" prop="isAnonymous" class="itemSwichval">
<wd-switch
size="48rpx"
active-color="#EC1B1B"
v-model="formdata.isAnonymous"
active-value="1"
inactive-value="0"
/>
</wd-cell>
</wd-form> </wd-form>
<wd-button type="error" block @click="handleSubmit">发布</wd-button> <wd-button type="error" block @click="handleSubmit">发布</wd-button>
...@@ -103,21 +107,33 @@ const formdata = reactive<{ ...@@ -103,21 +107,33 @@ const formdata = reactive<{
* 表单验证规则 * 表单验证规则
*/ */
const rules = { const rules = {
images: [ // images: [
{ // {
required: true, // required: true,
message: '请上传图片', // message: '请上传图片1',
validator: (value: any) => { // validator: (value: any) => {
if (value) { // if (value.length) {
console.log('123456'); // console.log('上传成功');
} else { // } else {
console.log('963852'); // console.log('请上传图片');
} // }
}, // },
}, // },
], // ],
evaluation: [{ required: true, message: '请填写评价内容' }], evaluation: [{ required: true, message: '请填写评价内容' }],
merchantServices: [{ required: true, message: '请选择商家服务评分' }], // merchantServices: [
// {
// required: true,
// message: '请选择商家服务评分',
// validator: (value: any) => {
// if (value >= 1 && value <= 5) {
// console.log('评分成功');
// } else {
// console.log('请选择评分');
// }
// },
// },
// ],
}; };
/** /**
...@@ -146,6 +162,7 @@ const handlemerchant = (item: { value: number }) => { ...@@ -146,6 +162,7 @@ const handlemerchant = (item: { value: number }) => {
const fList = ref<any[]>([]); const fList = ref<any[]>([]);
function handleFile({ fileList: files }) { function handleFile({ fileList: files }) {
fList.value = files; fList.value = files;
formdata.images = files;
} }
/** /**
* 图片地址处理 * 图片地址处理
...@@ -170,7 +187,7 @@ const deleteImg = () => { ...@@ -170,7 +187,7 @@ const deleteImg = () => {
/** /**
* Release提交 * Release提交
*/ */
const handleSubmit = async () => { const hdSubmit = async () => {
await evaluation({ await evaluation({
...formdata, ...formdata,
images: proImage(), images: proImage(),
...@@ -181,19 +198,21 @@ const handleSubmit = async () => { ...@@ -181,19 +198,21 @@ const handleSubmit = async () => {
}); });
}; };
// const handleSubmit = async () => { const handleSubmit = async () => {
// console.log(form.value.validate()); form.value
// form.value .validate()
// .validate() .then(({ valid, errors }) => {
// .then(({ valid, errors }) => { console.log('valid', errors);
// if (valid) { if (valid) {
// uToast.info({ msg: '校验通过' }); // uToast.info({ msg: '校验通过' });
// } console.log('校验通过');
// }) hdSubmit();
// .catch((error: any) => { }
// console.log(error, 'error'); })
// }); .catch((error: any) => {
// }; console.log(error, 'error');
});
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
...@@ -238,8 +257,9 @@ const handleSubmit = async () => { ...@@ -238,8 +257,9 @@ const handleSubmit = async () => {
margin-top: 25rpx; margin-top: 25rpx;
margin-bottom: 172rpx; margin-bottom: 172rpx;
padding: 20rpx; padding: 20rpx;
:deep(.wd-textarea) { :deep(.wd-textarea) {
padding: 0 30rpx; padding: 30rpx 0;
} }
.itemPicker { .itemPicker {
...@@ -291,6 +311,15 @@ const handleSubmit = async () => { ...@@ -291,6 +311,15 @@ const handleSubmit = async () => {
:deep(.wd-upload__status-content) { :deep(.wd-upload__status-content) {
background-color: #000; background-color: #000;
} }
:deep(.wd-upload) {
gap: 20rpx;
.wd-upload__preview {
width: calc((100% - 60rpx) / 4);
margin: 0;
border-radius: 12rpx;
overflow: hidden;
}
}
} }
} }
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<view class="subsidy-content" @click="jumpPage"> <view class="subsidy-content" @click="jumpPage">
<view class="subsidy"> <view class="subsidy">
<image mode="aspectFill" src="@/static/shop/subsidy.png" /> <image mode="aspectFill" src="@/static/shop/subsidy.png" />
<text class="multi-line">{{ merchantCoupons.activityName }}</text> <text class="multi-line">{{ merchantCoupons.activityName || 暂无优惠券 }}</text>
</view> </view>
<view class="more"> <view class="more">
<text>更多</text> <text>更多</text>
......
...@@ -2281,32 +2281,6 @@ ...@@ -2281,32 +2281,6 @@
dependencies: dependencies:
"@types/istanbul-lib-report" "*" "@types/istanbul-lib-report" "*"
"@types/graceful-fs@^4.1.2":
version "4.1.9"
resolved "https://registry.npmmirror.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz"
integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==
dependencies:
"@types/node" "*"
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
version "2.0.6"
resolved "https://registry.npmmirror.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz"
integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==
"@types/istanbul-lib-report@*":
version "3.0.3"
resolved "https://registry.npmmirror.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz"
integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==
dependencies:
"@types/istanbul-lib-coverage" "*"
"@types/istanbul-reports@^3.0.0":
version "3.0.4"
resolved "https://registry.npmmirror.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz"
integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==
dependencies:
"@types/istanbul-lib-report" "*"
"@types/json-schema@*", "@types/json-schema@^7.0.12": "@types/json-schema@*", "@types/json-schema@^7.0.12":
"integrity" "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" "integrity" "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="
"resolved" "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz" "resolved" "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz"
...@@ -2329,11 +2303,6 @@ ...@@ -2329,11 +2303,6 @@
"resolved" "https://registry.npmmirror.com/@types/prettier/-/prettier-2.7.3.tgz" "resolved" "https://registry.npmmirror.com/@types/prettier/-/prettier-2.7.3.tgz"
"version" "2.7.3" "version" "2.7.3"
"@types/prettier@^2.1.5":
version "2.7.3"
resolved "https://registry.npmmirror.com/@types/prettier/-/prettier-2.7.3.tgz"
integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==
"@types/semver@^7.5.0": "@types/semver@^7.5.0":
"integrity" "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" "integrity" "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ=="
"resolved" "https://registry.npmmirror.com/@types/semver/-/semver-7.5.8.tgz" "resolved" "https://registry.npmmirror.com/@types/semver/-/semver-7.5.8.tgz"
...@@ -2356,23 +2325,6 @@ ...@@ -2356,23 +2325,6 @@
dependencies: dependencies:
"@types/yargs-parser" "*" "@types/yargs-parser" "*"
"@types/stack-utils@^2.0.0":
version "2.0.3"
resolved "https://registry.npmmirror.com/@types/stack-utils/-/stack-utils-2.0.3.tgz"
integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==
"@types/yargs-parser@*":
version "21.0.3"
resolved "https://registry.npmmirror.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz"
integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==
"@types/yargs@^16.0.0":
version "16.0.9"
resolved "https://registry.npmmirror.com/@types/yargs/-/yargs-16.0.9.tgz"
integrity sha512-tHhzvkFXZQeTECenFoRljLBYPZJ7jAVxqqtEI0qTLOmuultnFp4I9yKE17vTuhf7BkhCu7I4XuemPgikDVuYqA==
dependencies:
"@types/yargs-parser" "*"
"@typescript-eslint/eslint-plugin@^6.15.0": "@typescript-eslint/eslint-plugin@^6.15.0":
"integrity" "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==" "integrity" "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA=="
"resolved" "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz" "resolved" "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz"
...@@ -2664,7 +2616,7 @@ ...@@ -2664,7 +2616,7 @@
"@vue/compiler-dom" "3.4.29" "@vue/compiler-dom" "3.4.29"
"@vue/shared" "3.4.29" "@vue/shared" "3.4.29"
"@vue/devtools-api@^6.5.0", "@vue/devtools-api@^6.5.1": "@vue/devtools-api@^6.5.0", "@vue/devtools-api@^6.6.3":
"integrity" "sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==" "integrity" "sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw=="
"resolved" "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.3.tgz" "resolved" "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.3.tgz"
"version" "6.6.3" "version" "6.6.3"
...@@ -7512,12 +7464,12 @@ ...@@ -7512,12 +7464,12 @@
"@intlify/shared" "9.13.1" "@intlify/shared" "9.13.1"
"@vue/devtools-api" "^6.5.0" "@vue/devtools-api" "^6.5.0"
"vue-router@^4.1.6": "vue-router@^4.1.6", "vue-router@^4.4.3":
"integrity" "sha512-8Q+u+WP4N2SXY38FDcF2H1dUEbYVHVPtPCPZj/GTZx8RCbiB8AtJP9+YIxn4Vs0svMTNQcLIzka4GH7Utkx9xQ==" "integrity" "sha512-sv6wmNKx2j3aqJQDMxLFzs/u/mjA9Z5LCgy6BE0f7yFWMjrPLnS/sPNn8ARY/FXw6byV18EFutn5lTO6+UsV5A=="
"resolved" "https://registry.npmmirror.com/vue-router/-/vue-router-4.3.3.tgz" "resolved" "https://registry.npmmirror.com/vue-router/-/vue-router-4.4.3.tgz"
"version" "4.3.3" "version" "4.4.3"
dependencies: dependencies:
"@vue/devtools-api" "^6.5.1" "@vue/devtools-api" "^6.6.3"
"vue-template-compiler@^2.7.14": "vue-template-compiler@^2.7.14":
"integrity" "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==" "integrity" "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ=="
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment