|
@@ -5,8 +5,8 @@
|
|
|
<view class="floatWindow">
|
|
|
<image @click="showDesc = true" :src="imgObj.rule" mode="scaleToFill" />
|
|
|
<image
|
|
|
- @click="showWinner = true"
|
|
|
:src="imgObj.record"
|
|
|
+ @click="showWinerRecord"
|
|
|
mode="scaleToFill"
|
|
|
/>
|
|
|
</view>
|
|
@@ -15,7 +15,7 @@
|
|
|
<text>拍照示例</text>
|
|
|
<image :src="imgObj.photo" mode="scaleToFill" />
|
|
|
</view>
|
|
|
- <view @click="showRecord = true">
|
|
|
+ <view @click="showUploadRecord">
|
|
|
<text>上传记录</text>
|
|
|
<image :src="imgObj.book" mode="scaleToFill" />
|
|
|
</view>
|
|
@@ -74,7 +74,7 @@ import UploadReceptPopop from "./components/uploadReceptPopop.vue";
|
|
|
import WinRecordPopup from "./components/winRecordPopup.vue";
|
|
|
import UploadRecordPopup from "./components/uploadRecordPopup.vue";
|
|
|
import ActivityDescPopup from "./components/activityDescPopup.vue";
|
|
|
-import { getActivity } from "@/services/ams";
|
|
|
+import { getActivity, rewardList, auditSuccessList } from "@/services/ams";
|
|
|
import { receptProp } from "./utils/interface";
|
|
|
let showExample = ref<boolean>(false);
|
|
|
let showUpload = ref<boolean>(false);
|
|
@@ -89,6 +89,8 @@ const backImage = ref<string>(
|
|
|
let aData: any = reactive({ discounts: [] });
|
|
|
let list = ref([] as receptProp[]);
|
|
|
|
|
|
+const openid = uni.getStorageSync("openid");
|
|
|
+
|
|
|
const isAddress = computed(() => {
|
|
|
return aData.authCheck.includes("2") ? true : false;
|
|
|
});
|
|
@@ -104,8 +106,8 @@ const getList = () => {
|
|
|
checked: false,
|
|
|
};
|
|
|
});
|
|
|
- console.log("---------------------", aData);
|
|
|
|
|
|
+ uni.setStorageSync("activityData", JSON.stringify(aData));
|
|
|
// backImage.value = res.data[0].activityImage;
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -113,26 +115,58 @@ const getList = () => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-const handledUpload = () => {
|
|
|
- uni.getLocation({
|
|
|
- type: "gcj02",
|
|
|
- success: async (res) => {
|
|
|
- const { latitude, longitude } = res;
|
|
|
- // 调用高德API
|
|
|
- const key = "7c607ea6b491804270ddcdd72daad58c";
|
|
|
- const url = `https://restapi.amap.com/v3/geocode/regeo?key=${key}&location=${longitude},${latitude}`;
|
|
|
- const data = await uni.request({ url });
|
|
|
- console.log("用户所在位置", res);
|
|
|
- },
|
|
|
- fail: (err) => {
|
|
|
- uni.showToast({
|
|
|
- title: "获取位置失败",
|
|
|
- icon: "none",
|
|
|
- });
|
|
|
- },
|
|
|
+const rewardData = ref([]);
|
|
|
+//获取上传记录
|
|
|
+const getRewardList = () => {
|
|
|
+ console.log("openid", openid);
|
|
|
+ rewardList({ openid }).then((res: any) => {
|
|
|
+ rewardData.value = res.rows;
|
|
|
+ console.log("获奖记录", rewardData);
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+//打开上传记录
|
|
|
+const showUploadRecord = () => {
|
|
|
+ getRewardList();
|
|
|
+ showRecord.value = true;
|
|
|
+};
|
|
|
+
|
|
|
+const cinnerData = ref([]);
|
|
|
+//获取奖励记录
|
|
|
+const getWinnerList = () => {
|
|
|
+ auditSuccessList({ openid }).then((res: any) => {
|
|
|
+ cinnerData.value = res.rows;
|
|
|
+ console.log("获奖记录", rewardData);
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+//打开获奖记录
|
|
|
+const showWinerRecord = () => {
|
|
|
+ getWinnerList();
|
|
|
+ showWiner.value = true;
|
|
|
+};
|
|
|
+
|
|
|
+const handledUpload = () => {
|
|
|
+ showUpload.value = true;
|
|
|
+ // uni.getLocation({
|
|
|
+ // type: "gcj02",
|
|
|
+ // success: async (res) => {
|
|
|
+ // const { latitude, longitude } = res;
|
|
|
+ // // 调用高德API
|
|
|
+ // const key = "7c607ea6b491804270ddcdd72daad58c";
|
|
|
+ // const url = `https://restapi.amap.com/v3/geocode/regeo?key=${key}&location=${longitude},${latitude}`;
|
|
|
+ // const data = await uni.request({ url });
|
|
|
+ // console.log("用户所在位置", res);
|
|
|
+ // },
|
|
|
+ // fail: (err) => {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: "获取位置失败",
|
|
|
+ // icon: "none",
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+};
|
|
|
+
|
|
|
onShow(() => {
|
|
|
getList();
|
|
|
});
|