|
@@ -123,7 +123,7 @@ let list = ref([] as Receipt[]);
|
|
|
const openid = uni.getStorageSync("openid");
|
|
|
|
|
|
const isAddress = computed(() => {
|
|
|
- return aData.authCheck.includes("2") ? true : false;
|
|
|
+ return aData?.authCheck.includes("2") ? true : false;
|
|
|
});
|
|
|
|
|
|
const params = reactive({
|
|
@@ -142,7 +142,10 @@ const getList = () => {
|
|
|
getActivity(appid)
|
|
|
.then((res: any) => {
|
|
|
aData = res.data[0] || {};
|
|
|
- aData.authCheck = aData.authCheck.split(",");
|
|
|
+ if (aData?.authCheck) {
|
|
|
+ aData.authCheck = aData.authCheck.split(",");
|
|
|
+ }
|
|
|
+
|
|
|
list.value = aData.discounts.map((item: Receipt) => {
|
|
|
return {
|
|
|
...item,
|
|
@@ -247,7 +250,7 @@ const onValidate = async () => {
|
|
|
}
|
|
|
};
|
|
|
const handledUpload = async () => {
|
|
|
- if (!aData.authCheck.includes("2")) {
|
|
|
+ if (!aData?.authCheck || !aData.authCheck.includes("2")) {
|
|
|
showUpload.value = true;
|
|
|
|
|
|
return;
|