Commit 9f8cc38c authored by 张娇(东信)'s avatar 张娇(东信)

Merge remote-tracking branch 'origin/master'

parents 911010a0 5b6bbe4d
......@@ -25,13 +25,6 @@
<text class="three-text">{{ item.oriPrice }}</text>
<text class="four-text">{{ item.prodName }}</text>
</view>
<!-- <view class="groupPurchasePrice">
<image class="img" src="../../static/index/groupBuying.png" mode="widthFix" />
<text class="one-text">¥39</text>
<view class="two-text">8.8折</view>
<text class="three-text">¥59.8</text>
<text class="four-text">游戏通宵补血套餐</text>
</view> -->
</view>
</view>
</template>
......
......@@ -40,6 +40,7 @@
</view>
</view>
</view>
<wd-status-tip image="content" tip="暂无内容" v-if="shopCardData.simpleProds.length === 0" />
</view>
</template>
......
......@@ -77,8 +77,8 @@
></wd-icon>
</view>
</view>
<view class="bootom-bottom">
<!-- <view
<!-- <view class="bootom-bottom">
<view
@tap="choice(index)"
class="item"
:class="{ light: active === index }"
......@@ -86,8 +86,8 @@
:key="index"
>
{{ item }}
</view> -->
</view>
</view>
</view> -->
<!-- 美食类别 -->
<Classification v-show="rotate" :category="categoryData" @foodCategory="foodCategory" />
<!-- 附近筛选 -->
......@@ -468,15 +468,17 @@ page {
}
}
.bootom {
height: 124rpx;
position: sticky;
top: 0;
height: 70rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
border-radius: 6rpx;
background: #ffffff;
position: relative;
margin-top: 10rpx;
margin-bottom: 20rpx;
z-index: 999;
.bootom-top {
display: flex;
align-items: center;
......
......@@ -7,6 +7,7 @@
<view class="itemPicker">
<view class="item01">
<text class="label">评分</text>
<!-- 评分 -->
<wd-rate
prop="merchantServices"
v-model="formdata.merchantServices"
......@@ -20,23 +21,25 @@
<text>{{ merList[formdata.merchantServices] }}</text>
</view>
</view>
<!-- 内容描述 -->
<wd-textarea
prop="evaluation"
v-model="formdata.evaluation"
placeholder="亲,分享您的看法,给其他人一个参考哦!"
/>
<text class="textarea">上传图片/视频</text>
<!-- 图片上传 -->
<view class="wdUpload" prop="images">
<wd-upload
multiple
:action="action"
@change="handleFile"
:file-list="formdata.images"
:file-list="fList"
:before-remove="beforeRemove"
:header="headers"
></wd-upload>
</view>
<!-- 匿名评价 -->
<wd-cell title="匿名评价" prop="isAnonymous" class="itemSwichval">
<wd-switch
size="48rpx"
......@@ -63,7 +66,8 @@
import Header from './components/Header/index.vue';
import { getToken } from '@/utils/auth';
import { evaluation } from '@/api/order';
import { useToast } from 'wot-design-uni';
const uToast = useToast();
const form = ref();
const token = getToken();
// 上传图片地址
......@@ -74,7 +78,6 @@ const headers = ref();
*/
const shopname = ref<string>('');
onLoad((options) => {
console.log(options);
shopname.value = options?.shopName;
formdata.orderNumber = options?.orderNumber;
headers.value = { Authorization: 'Bearer ' + token };
......@@ -83,18 +86,40 @@ onLoad((options) => {
const formdata = reactive<{
orderNumber: string;
evaluation: string;
images: string;
images: string[];
isAnonymous: number;
descriptionMatches: number;
merchantServices: number;
}>({
orderNumber: '',
evaluation: '',
images: '',
images: [],
isAnonymous: 0,
descriptionMatches: 0,
merchantServices: 0,
});
const rules = {};
/**
* 表单验证规则
*/
const rules = {
images: [
{
required: true,
message: '请上传图片',
validator: (value: any) => {
if (value) {
console.log('123456');
} else {
console.log('963852');
}
},
},
],
evaluation: [{ required: true, message: '请填写评价内容' }],
merchantServices: [{ required: true, message: '请选择商家服务评分' }],
};
/**
* 显示推荐菜
*/
......@@ -118,16 +143,15 @@ const handlemerchant = (item: { value: number }) => {
/**
* 图片上传
*/
const fileList = ref<any[]>([]);
const fList = ref<any[]>([]);
function handleFile({ fileList: files }) {
console.log('fileList', formdata.images);
fileList.value = files;
fList.value = files;
}
/**
* 图片地址处理
*/
const proImage = () => {
const data = fileList.value.map((item) => {
const data = fList.value.map((item) => {
return JSON.parse(item.response).data.url;
});
return data.join(',');
......@@ -135,34 +159,41 @@ const proImage = () => {
const overshow = ref<boolean>(false);
const resolves = ref();
const beforeRemove = ({ file, fileList, resolve }) => {
const beforeRemove = ({ resolve }) => {
overshow.value = true;
resolves.value = resolve;
};
const deleteImg = () => {
console.log(resolves.value(true));
resolves.value(true);
overshow.value = false;
};
/**
* Release提交
*/
const handleSubmit = async () => {
await evaluation({
...formdata,
// images: proImage(),
});
xma.showToast({
title: '评价成功',
duration: 1000,
icon: 'none',
images: proImage(),
});
uToast.success('评价成功');
xma.redirectTo({
url: `/pages/order/order?status=not_eval`,
});
console.log(formdata);
};
// const handleSubmit = async () => {
// console.log(form.value.validate());
// form.value
// .validate()
// .then(({ valid, errors }) => {
// if (valid) {
// uToast.info({ msg: '校验通过' });
// }
// })
// .catch((error: any) => {
// console.log(error, 'error');
// });
// };
</script>
<style lang="scss" scoped>
.container {
......@@ -207,6 +238,9 @@ const handleSubmit = async () => {
margin-top: 25rpx;
margin-bottom: 172rpx;
padding: 20rpx;
:deep(.wd-textarea) {
padding: 0 30rpx;
}
.itemPicker {
display: flex;
......
......@@ -5,16 +5,21 @@
<view class="content">
<!-- 列表 -->
<view class="listcon">
<view class="pubList" v-for="item in list" :key="item.id">
<view
class="pubList"
v-for="item in list"
:key="item.shopId"
@click="item.shopStatus != [1, 2, 3] ? shopGto(item.shopId) : ''"
>
<!-- 列表头部 -->
<view class="titlecon">
<span>{{ item.shopName }}</span>
<span>{{ item.shopStatus }}</span>
<span>{{ shopStatus[item.shopStatus] }}</span>
</view>
<!-- 列表详细 -->
<view class="delbox">
<view class="listPic">
<img :src="item.shopLogo" />
<img :src="itemUrl + item.shopLogo" />
</view>
<view class="deltxt">
......@@ -38,13 +43,22 @@
</view>
<view class="shbox" v-if="list.length > 0">审核被拒可点击修改重新提交</view>
</view>
<view class="butCon"><button class="butXz" @click="shopGto">申请入驻</button></view>
<view class="butCon"><button class="butXz" @click="shopGto()">申请入驻</button></view>
</view>
</template>
<script setup>
import Header from '@/pages/order/components/Header/index.vue';
import { shopList } from '@/api/storeEntry';
const itemUrl = import.meta.env.VITE_APP_IMG_URL;
const shopStatus = reactive({
0: '停业中',
1: '营业中',
2: '平台下线',
3: '平台下线待审核',
4: '开店申请中',
5: '开店申请待审核',
});
const list = ref([]);
const getList = async () => {
const { data: res } = await shopList();
......@@ -52,12 +66,12 @@ const getList = async () => {
if (res.length > 0) {
list.value = res;
} else {
// shopGto();
shopGto();
}
};
const shopGto = () => {
const shopGto = (item) => {
xma.redirectTo({
url: `/pages/storeEntry/detail`,
url: `/pages/storeEntry/detail${item ? `?id=${item}` : ''}`,
});
};
getList();
......
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