胶囊和跳转

parent 14350536
...@@ -40,25 +40,22 @@ const emit = defineEmits(['toSearch']); ...@@ -40,25 +40,22 @@ const emit = defineEmits(['toSearch']);
const title = ref('小程序平台'); const title = ref('小程序平台');
const { countInfo, addCount } = useCountStore(); const { countInfo, addCount } = useCountStore();
const test = ref(''); const test = ref('');
onMounted(() => { onLoad(() => {
// xma.xh.getUserProfile({ xma.xh.getMenuButtonBoundingClientRect({
// range: ['ACCOUNT', 'MOBILE', 'CITIZEN'], success(res) {
// async success(info) { console.log('宽度', res.width); // 宽度,单位:px
// const info2 = JSON.stringify(info); console.log('高度', res.height); // 高度,单位:px
// test.value = info2; console.log('上边界坐标', res.top); // 上边界坐标,单位:px
// }, console.log('右边界坐标', res.right); // 右边界坐标,单位:px
// }); console.log('下边界坐标', res.bottom); // 下边界坐标,单位:px
console.log('左边界坐标', res.left); // 左边界坐标,单位:px
},
});
}); });
const search = (res) => { const search = (res) => {
const keyword = res.detail.value; const keyword = res.detail.value;
emit('toSearch', keyword); emit('toSearch', keyword);
}; };
const test2 = () => {
xma.navigateTo({
url: '/pages/shop/shop',
});
};
// 返回上一级 // 返回上一级
const back = () => { const back = () => {
......
...@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index'; ...@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
import { getToken } from '../../utils/auth'; import { getToken } from '../../utils/auth';
onLoad(async (options) => { onLoad(async (options) => {
// await signIn(); await signIn();
if (!getToken()) await signIn2(); // if (!getToken()) await signIn2();
const { type } = options; const { type } = options;
switch (type) { switch (type) {
case '0': case '0':
...@@ -24,7 +24,12 @@ onLoad(async (options) => { ...@@ -24,7 +24,12 @@ onLoad(async (options) => {
xma.reLaunch({ url: '/pages/assistingAgriculture/index/building?categoryId=3266' }); xma.reLaunch({ url: '/pages/assistingAgriculture/index/building?categoryId=3266' });
break; break;
case '3': case '3':
xma.reLaunch({ url: '/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268' }); xma.reLaunch({
url: '/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268',
});
break;
default:
xma.reLaunch({ url: '/pages/index/index' });
} }
}); });
onMounted(async () => { onMounted(async () => {
......
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