Skip to content

Commit

Permalink
feat: add new layout and fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyutim committed Jun 6, 2023
1 parent da76882 commit 4b8f790
Show file tree
Hide file tree
Showing 6 changed files with 575 additions and 440 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ F12 打开控制台,在 network 下,找到对应的 http 请求,然后找
3. 提示 session 失效等,需要更换 cookie(不一定需要重新登录,重新进入大麦页面获取即可)
4. 尽量不要多次重复尝试下订单,因为阿里系产品有风控,可能会限制账号或 ip 等。如果多次尝试导致出现账号无法登录的情况,切换个浏览器即可。
5. **不支持选座**
6. FAIL_SYS_USER_VALIDATE 类似的提示可能当前浏览器已经被限制,目前需要切换个浏览器。

## TODO

1. 可选择观演人
2. 页面排版优化
3. 使用优化
4. 其他平台支持
5. 倒计时提醒
6. 选座支持
2. 选座支持
3. 其他平台支持
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dependencies": {
"@arco-design/web-vue": "^2.47.0",
"@tauri-apps/api": "^1.3.0",
"dayjs": "^1.11.8",
"sass": "^1.62.1",
"vue": "^3.2.45"
},
Expand Down
85 changes: 85 additions & 0 deletions src/components/dm/Form.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<script setup lang="js">
import { reactive, ref, watch } from 'vue';
import { getQueryString } from '../../../utils/common';
import { Message, Notification } from "@arco-design/web-vue";
const form = reactive({
cookie: "",
itemId: "",
token: "", // 获取 sign 使用
url: "",
num: "1",
retry: "2",
});
watch(() => form.url, (url) => {
const search = url.split("html")[1]
const itemId = getQueryString('itemId', search)
if(itemId) {
form.itemId = itemId;
} else {
Message.warning("此url无法获取 itemId")
}
})
const props = defineProps({
handleSubmit: Function
})
function handleSubmit(e) {
props.handleSubmit(e)
}
</script>

<template>
<section>
<a-form
:model="form"
:style="{ width: '600px' }"
@submit="handleSubmit"
>
<a-form-item field="cookie" label="cookie" required>
<a-textarea
v-model="form.cookie"
placeholder="请输入 cookie"
allow-clear
/>
</a-form-item>

<a-form-item field="url" label="url">
<a-input v-model="form.url" placeholder="请输入商品详情页url">
</a-input>
</a-form-item>

<a-form-item
field="itemId"
tooltip="进入商品页面,查看页面路径上的 itemId"
label="itemId"
required
>
<a-input v-model="form.itemId" placeholder="请输入itemId..." />
</a-form-item>

<a-form-item
field="num"
label="购买张数"
required
tooltip="目前的购买张数必须跟实名信息个数一致"
>
<a-input v-model="form.num" placeholder="请输入购买数量..." />
</a-form-item>
<a-form-item
field="retry"
label="重试次数"
required
tooltip="下订单失败的重试次数"
>
<a-input v-model="form.retry" disabled />
</a-form-item>

<a-form-item>
<a-button html-type="submit">获取商品信息</a-button>
</a-form-item>
</a-form>
</section>
</template>
Loading

0 comments on commit 4b8f790

Please sign in to comment.