|
@@ -1,8 +1,10 @@
|
|
|
<template>
|
|
|
+
|
|
|
<view class="page" :style="{'min-height':(h-th)+'px'}">
|
|
|
<u-navbar bgColor="transparent">
|
|
|
- <view class="u-nav-slot" slot="left">
|
|
|
- <text>{{merchantName}}</text>
|
|
|
+ <view class="u-nav-slot" slot="left" style="display: flex;" @tap="shShow=true">
|
|
|
+ <text>{{name}}</text>
|
|
|
+ <u-icon name="arrow-down" size="28" :bold="true" color="#fff"></u-icon>
|
|
|
</view>
|
|
|
</u-navbar>
|
|
|
<view class="bg" :style="{'padding-top':(mt+10)+'px'}">
|
|
@@ -91,6 +93,8 @@
|
|
|
<text>¥{{item.price}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-picker :show="shShow" :columns="nameList" @close="shShow=false" @cancel="shShow=false" @confirm="confirm"
|
|
|
+ :immediateChange="true" itemHeight="88"></u-picker>
|
|
|
<Tabbares :tabbarid="0"></Tabbares>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -99,41 +103,85 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- merchantName:uni.getStorageSync('merchantName'),
|
|
|
+ merchantName: uni.getStorageSync('merchantName'),
|
|
|
emg: 'https://i.ringzle.com/file/20240224/91173dde1cb44b139129e12ad4971f1d.png',
|
|
|
icons: ['https://i.ringzle.com/file/20240224/70ab9f9d1a144c95927dedc6e84bcce7.png',
|
|
|
'https://i.ringzle.com/file/20240224/3f990c250f444ac9a5d9f334f322c98e.png',
|
|
|
'https://i.ringzle.com/file/20240224/7ca1bfa6e348438e83edc5af0589f847.png'
|
|
|
],
|
|
|
- info:{},
|
|
|
- list:[],
|
|
|
+ info: {},
|
|
|
+ list: [],
|
|
|
+ nameList: [],
|
|
|
+ shShow: false,
|
|
|
+ shList: [],
|
|
|
+ name: ''
|
|
|
}
|
|
|
},
|
|
|
- onLoad(opt){
|
|
|
+ onLoad(opt) {
|
|
|
// if(opt.merchantName ){
|
|
|
// this.merchantName =opt.merchantName ;
|
|
|
// }
|
|
|
this.getData();
|
|
|
this.getList();
|
|
|
+ this.getType()
|
|
|
},
|
|
|
methods: {
|
|
|
+ getType() {
|
|
|
+ this.$api.post('/merchant/register/getMerchantStoreList').then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.shList = res.data.data;
|
|
|
+ let shs = [];
|
|
|
+ this.shList.forEach(d => shs.push(d.merchantName));
|
|
|
+ this.nameList = [shs];
|
|
|
+ let id = uni.getStorageSync('homestayId');
|
|
|
+ if (!uni.getStorageSync('homestayId')) id = uni.getStorageSync('merchantId');
|
|
|
+ let t = this.shList.find(d => d.merchantId == id);
|
|
|
+ this.name = t ? t.merchantName : ''
|
|
|
+ } else this.$showToast(res.data.msg);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ confirm(e) {
|
|
|
+ console.log(e);
|
|
|
+ this.name = e.value[0];
|
|
|
+ this.shShow = false;
|
|
|
+
|
|
|
+ let t = this.shList.find(d => d.merchantName == this.name);
|
|
|
+ console.log('000', t);
|
|
|
+ if (t) {
|
|
|
+ if (t.merchantType != 2) { //酒店民宿
|
|
|
+ uni.setStorageSync('homestayId', t.merchantId);
|
|
|
+ uni.setStorageSync('merchantId', '');
|
|
|
+ this.list = [];
|
|
|
+ } else {
|
|
|
+ this.item = null;
|
|
|
+ this.list = [];
|
|
|
+ uni.setStorageSync('homestayId', '');
|
|
|
+ uni.setStorageSync('merchantId', t.merchantId);
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/home/index'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
getData() {
|
|
|
- this.$api.get('/merchant/merchantFisherman/home/getMerchantFishermanAppHome/'+ uni.getStorageSync('merchantId')).then(res => {
|
|
|
+ this.$api.get('/merchant/merchantFisherman/home/getMerchantFishermanAppHome/' + uni.getStorageSync(
|
|
|
+ 'merchantId')).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
this.info = res.data.data;
|
|
|
- }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
- getList(){
|
|
|
- this.$api.post('/merchant/merchantFisherman/home/getMerchantFishermanOrderList',{
|
|
|
- dateTime:new Date().Format('yyyy-MM-dd'),
|
|
|
- dateType:'1',
|
|
|
- fishermanId:uni.getStorageSync('merchantId')
|
|
|
-
|
|
|
+ getList() {
|
|
|
+ this.$api.post('/merchant/merchantFisherman/home/getMerchantFishermanOrderList', {
|
|
|
+ dateTime: new Date().Format('yyyy-MM-dd'),
|
|
|
+ dateType: '1',
|
|
|
+ fishermanId: uni.getStorageSync('merchantId')
|
|
|
+
|
|
|
}).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
this.list = res.data.data;
|
|
|
- }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
toHref(url) {
|
|
@@ -155,8 +203,8 @@
|
|
|
background: #F3F4F4;
|
|
|
padding-bottom: 40rpx;
|
|
|
box-sizing: border-box;
|
|
|
- width:100%;
|
|
|
- overflow-x:hidden;
|
|
|
+ width: 100%;
|
|
|
+ overflow-x: hidden;
|
|
|
|
|
|
.list {
|
|
|
width: calc(100% - 36rpx);
|