集合名稱: form
預設欄位: 擁有者 / 建立於
新增欄位: 文字區塊,content
Learn More →
Learn More →
<!DOCTYPE html>
<html lang="zh-Hant">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.jsdelivr.net/npm/babel-preset-vue@2"></script>
<script src="https://cdn.jsdelivr.net/npm/babel-standalone@6"></script>
<script src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<script src="https://cdn.jsdelivr.net/npm/axios"></script>
<script src="https://cdn.jsdelivr.net/npm/scroll-behavior-polyfill@2"></script>
<script src="https://cdn.jsdelivr.net/npm/moment@2"></script>
<script src="https://cdn.jsdelivr.net/npm/moment@2/locale/zh-tw.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>
<script src="https://cdn.jsdelivr.net/npm/vconsole@3"></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/reseter.css"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100;300;400;500;700;900&display=swap"
/>
<title>網頁標題</title>
</head>
<body>
<div id="app">
</div>
</body>
<script>
const app = new Vue({
el: "#app",
data: { },
mounted: async function () { },
computed: { },
methods: { },
});
const vConsole = new window.VConsole();
</script>
</html>
這是一個在 GOSU 中常見的網頁基本架構,載入了 VUE / moment / sweetalert2 套件
並且在開發過程中我們會載入 vConsole 以方便除錯
<body>
<div id="app">
<div class="form-field">
<label>回覆者</label>
<input v-model="user" disabled="disabled" />
</div>
<div class="form-field">
<label>回報內容</label>
<textarea v-model="content" placeholder="回報內容"></textarea>
</div>
<div class="buttons">
<button v-on:click="submit">送出</button>
</div>
</div>
</body>
<script>
const app = new Vue({
el: "#app",
data: {
user: "${from.profile.name}",
content: "",
},
mounted: async function () {},
computed: {},
methods: {
submit: function () {
console.log({ content: this.content });
},
},
});
const vConsole = new window.VConsole();
</script>
const app = new Vue({
el: "#app",
data: {
user: "${from.profile.name}",
content: "",
},
mounted: async function () {
this.oauth = await axios({
method: "get",
url: "/oauth/line/verify/",
baseURL: "https://${from.bot.id}.api.gosu.bar",
withCredentials: true,
});
},
computed: {},
methods: {
submit: async function () {
try {
const res = await axios.post(
"https://directus.gosu.bar/gosu/proxy/${from.company.id}/items/form",
{
content: this.content,
},
{
headers: {
Authorization: "Bearer " + this.oauth.data.token.token,
},
}
);
Swal.fire("恭喜你!", "成功回報資料!", "success");
} catch (error) {
Swal.fire("糟糕!", "發生不明錯誤!", "error");
}
},
},
});
點擊 GOSU BAR 左方清單「內容管理」>「登入Directus,管理你的內容」 點擊 Directus 左方清單齒輪 ICON「管理者設定」 > 「集合與欄位」 點擊右上角藍色 + ICON「新建集合」 集合名稱輸入 qa,把下方預設欄位都取消掉 點擊 Translation + Create Item > 選擇一種語言:Taiwanese Mandarin(Taiwan) > 對應的欄位名稱: 問答機器人
Feb 11, 2022方法一(透過 Server Side Partner API 進行整合) sequenceDiagram participant USER as 使用者 participant LINE_APP as LINE APP participant BROWSER as 瀏覽器(品牌端前端網頁) participant SERVER as 品牌端伺服器 participant PARTNER_API as GOSU Partner API par 定時同步使用者資料 SERVER ->> PARTNER_API: 同步資料
Jan 24, 2022選擇流程 14785. 分享訊息 每一組分享的內容需要三個節點,可以透過複製的複製出多個 修改 第一個 /share-chapter-1 的節點,設定 API 路徑,改成不重複的路徑 ex share-chapter-2 、 /share-chapter-3 ... 修改 設定分享內容 主要格式為 tmp.contents = [內容A, 內容B, 內容C];
Oct 13, 2021EXCEL 資料欄位 PSR Hashed Employee ID PSR Hash 過的員工編號 將員工編號與 SALT 透過 SHA-2 進行雜湊,例如員工編號是 0001 , SALT 是 mIFvss44VkzMIncNO ,則透過 SHA-2 雜湊結果為 0d5df7978c601af330a22b53c278fee8a382c94e9ea1f580a65f9528e45d1595 範例資料: 0d5df7978c601af330a22b53c278fee8a382c94e9ea1f580a65f9528e45d1595 Account ID
Sep 28, 2021or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up