chore: update data
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
// https://github.com/vueuse/head
|
||||
// you can use this to manipulate the document head in any components,
|
||||
import { useWeixin } from './composables/weixin'
|
||||
|
||||
// they will be rendered correctly in the html results with vite-ssg
|
||||
useHead({
|
||||
title: '好的,今天我们来做菜!',
|
||||
@@ -8,6 +10,8 @@ useHead({
|
||||
{ name: 'description', content: '好的,今天我们来做菜!' },
|
||||
],
|
||||
})
|
||||
|
||||
useWeixin()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
41
src/composables/weixin.ts
Normal file
41
src/composables/weixin.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { isClient } from '@vueuse/core'
|
||||
|
||||
const shareOptions = {
|
||||
title: '好的,今天我们来做菜',
|
||||
link: 'https://cook.yunyoujun.cn',
|
||||
imgUrl: '/favicon.svg',
|
||||
success: () => {},
|
||||
}
|
||||
|
||||
const jsApiList = [
|
||||
'updateAppMessageShareData',
|
||||
'updateTimelineShareData',
|
||||
]
|
||||
|
||||
/**
|
||||
* 微信分享
|
||||
*/
|
||||
export function useWeixin() {
|
||||
if (isClient) {
|
||||
useScriptTag('http://res.wx.qq.com/open/js/jweixin-1.6.0.js', async() => {
|
||||
const data = await fetch('http://api.welomo.com/wx/r/?token_id=12691').then(res => res.json())
|
||||
|
||||
const wx = window.wx
|
||||
if (wx) {
|
||||
wx.config({
|
||||
debug: true,
|
||||
appId: data.appId,
|
||||
timestamp: data.timestamp,
|
||||
nonceStr: data.nonceStr,
|
||||
signature: data.signature,
|
||||
jsApiList,
|
||||
})
|
||||
|
||||
wx.ready(() => {
|
||||
wx.updateAppMessageShareData(shareOptions)
|
||||
wx.updateTimelineShareData(shareOptions)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -446,3 +446,7 @@ biangbiang面,面条,https://www.bilibili.com/video/BV1844y157GL,简单,,油泼,
|
||||
白菜卷火锅,白菜、菌菇、胡萝卜、香肠,https://www.bilibili.com/video/BV1wY411n7Vk,,,,一口大锅
|
||||
蒸蛋羹(硬核0失败版),鸡蛋,https://www.bilibili.com/video/BV1x441117r4,,,,一口大锅
|
||||
爆汁肉饼,猪肉、鸡蛋,https://www.bilibili.com/video/BV1Cm4y1X7ej,,,,一口大锅
|
||||
番茄酸汤火锅,番茄、胡萝卜、菌菇、洋葱、豆腐、面条、白萝卜、土豆、白菜、猪肉、牛肉、午餐肉,https://www.bilibili.com/video/BV1yz4y1C7Qu,困难,,,一口大锅
|
||||
乱炖鸡胸,鸡胸肉、洋葱、菌菇、胡萝卜、土豆,https://www.bilibili.com/video/BV1Qb411u7Vu,普通,,,一口大锅
|
||||
骨头汤锅底(全鸡版),骨头、土豆、胡萝卜、花菜、白萝卜、西葫芦、芹菜、菌菇、豆腐、包菜、白菜、午餐肉、鸡翅、猪肉、虾、牛肉、面条、方便面,https://www.bilibili.com/video/BV1bi4y187ro,困难,,,一口大锅
|
||||
万能高汤(鸡蛋+猪肉),猪肉、鸡蛋、土豆、胡萝卜、花菜、白萝卜、西葫芦、芹菜、菌菇、豆腐、包菜、白菜、午餐肉、鸡翅、虾、牛肉、面条、方便面,https://www.bilibili.com/video/BV1zD4y197Us,困难,,,一口大锅
|
||||
|
||||
|
1
src/shims.d.ts
vendored
1
src/shims.d.ts
vendored
@@ -1,5 +1,6 @@
|
||||
declare interface Window {
|
||||
// extend the window
|
||||
wx: any
|
||||
}
|
||||
|
||||
// with vite-plugin-md, markdowns can be treat as Vue components
|
||||
|
||||
Reference in New Issue
Block a user