Commit e56386d9 authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents f6f57af3 14350536
<template> <template>
<view class="search" :style="{ background: background }"> <view class="search" :style="{ background: background }">
<wd-icon name="thin-arrow-left" class="icon" @tap="back" :style="{ color: backIcon }"></wd-icon> <wd-icon
v-if="show"
name="thin-arrow-left"
class="icon"
@tap="back"
:style="{ color: backIcon }"
></wd-icon>
<slot></slot> <slot></slot>
<view class="searchBox"> <view class="searchBox">
<image <image
...@@ -25,6 +31,10 @@ const props = defineProps({ ...@@ -25,6 +31,10 @@ const props = defineProps({
type: String, type: String,
default: 'white', default: 'white',
}, },
show: {
type: Boolean,
default: true,
},
}); });
const emit = defineEmits(['toSearch']); const emit = defineEmits(['toSearch']);
const title = ref('小程序平台'); const title = ref('小程序平台');
......
...@@ -2,7 +2,12 @@ ...@@ -2,7 +2,12 @@
<view class="container"> <view class="container">
<view class="top"> <view class="top">
<!-- 搜索 --> <!-- 搜索 -->
<Search background="rgba(255, 255, 255, 0.8)" backIcon="black" @toSearch="toSearch"> <Search
background="rgba(255, 255, 255, 0.8)"
backIcon="black"
@toSearch="toSearch"
:show="false"
>
<image class="food" src="../../static/index/food.png" mode="widthFix" /> <image class="food" src="../../static/index/food.png" mode="widthFix" />
</Search> </Search>
<!-- 类别选择 --> <!-- 类别选择 -->
......
...@@ -9,10 +9,26 @@ import testJson from '../../static/json/test.json'; ...@@ -9,10 +9,26 @@ import testJson from '../../static/json/test.json';
import { getTokenUser } from '../../api/index'; import { getTokenUser } from '../../api/index';
import { getToken } from '../../utils/auth'; import { getToken } from '../../utils/auth';
onMounted(async () => { onLoad(async (options) => {
// await signIn(); // await signIn();
if (!getToken()) await signIn2(); if (!getToken()) await signIn2();
xma.reLaunch({ url: '/pages/index/index' }); const { type } = options;
switch (type) {
case '0':
xma.reLaunch({ url: '/pages/assistingAgriculture/index/index' });
break;
case '1':
xma.reLaunch({ url: '/pages/index/index' });
break;
case '2':
xma.reLaunch({ url: '/pages/assistingAgriculture/index/building?categoryId=3266' });
break;
case '3':
xma.reLaunch({ url: '/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268' });
}
});
onMounted(async () => {
// xma.reLaunch({ url: '/pages/index/index' });
}); });
// 登录 // 登录
......
...@@ -72,7 +72,7 @@ const getList = async () => { ...@@ -72,7 +72,7 @@ const getList = async () => {
}; };
const shopGto = (item) => { const shopGto = (item) => {
xma.navigateTo({ xma.navigateTo({
url: `/pages/storeEntry/detail${item ? `?content=${JSON.stringify(item)}` : ''}`, url: `/pages/storeEntry/detail${item ? `?content=${item}` : ''}`,
success: function (res) { success: function (res) {
// 通过eventChannel向被打开页面传送数据 // 通过eventChannel向被打开页面传送数据
res.eventChannel.emit('acceptDataFromOpenerPage', { data: item }); res.eventChannel.emit('acceptDataFromOpenerPage', { data: item });
......
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