BUG修复
This commit is contained in:
@@ -90,13 +90,25 @@ onLoad(async (options) => {
|
|||||||
if (options.id) {
|
if (options.id) {
|
||||||
const result = await getPointBookDetailAPI(options.id || 247);
|
const result = await getPointBookDetailAPI(options.id || 247);
|
||||||
record.value = result;
|
record.value = result;
|
||||||
|
const config = uni.getStorageSync("point-book-config");
|
||||||
|
const bowType = config.bowOption.find(
|
||||||
|
(item) => item.id === record.value.bowType
|
||||||
|
);
|
||||||
|
const bowtargetType = config.targetOption.find(
|
||||||
|
(item) => item.id === record.value.targetType
|
||||||
|
);
|
||||||
|
uni.setStorageSync("point-book", {
|
||||||
|
bowType,
|
||||||
|
bowtargetType,
|
||||||
|
distance: result.distance,
|
||||||
|
amountGroup: result.groups,
|
||||||
|
});
|
||||||
const arrowData =
|
const arrowData =
|
||||||
record.value.groups && record.value.groups[0]
|
record.value.groups && record.value.groups[0]
|
||||||
? record.value.groups[0]
|
? record.value.groups[0]
|
||||||
: {};
|
: {};
|
||||||
hasPoint.value = (arrowData.list || []).some((arrow) => arrow.x && arrow.y);
|
hasPoint.value = (arrowData.list || []).some((arrow) => arrow.x && arrow.y);
|
||||||
notes.value = result.remark || "";
|
notes.value = result.remark || "";
|
||||||
const config = uni.getStorageSync("point-book-config");
|
|
||||||
config.targetOption.some((item) => {
|
config.targetOption.some((item) => {
|
||||||
if (item.id === result.targetType) {
|
if (item.id === result.targetType) {
|
||||||
targetId.value = item.id;
|
targetId.value = item.id;
|
||||||
|
|||||||
Reference in New Issue
Block a user