Commit e56386d9 authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents f6f57af3 14350536
<template>
<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>
<view class="searchBox">
<image
......@@ -25,6 +31,10 @@ const props = defineProps({
type: String,
default: 'white',
},
show: {
type: Boolean,
default: true,
},
});
const emit = defineEmits(['toSearch']);
const title = ref('小程序平台');
......
......@@ -2,7 +2,12 @@
<view class="container">
<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" />
</Search>
<!-- 类别选择 -->
......
......@@ -9,10 +9,26 @@ import testJson from '../../static/json/test.json';
import { getTokenUser } from '../../api/index';
import { getToken } from '../../utils/auth';
onMounted(async () => {
onLoad(async (options) => {
// await signIn();
if (!getToken()) await signIn2();
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 () => {
};
const shopGto = (item) => {
xma.navigateTo({
url: `/pages/storeEntry/detail${item ? `?content=${JSON.stringify(item)}` : ''}`,
url: `/pages/storeEntry/detail${item ? `?content=${item}` : ''}`,
success: function (res) {
// 通过eventChannel向被打开页面传送数据
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