diff --git a/images/1.jpg b/images/1.jpg
deleted file mode 100644
index c2e2413..0000000
Binary files a/images/1.jpg and /dev/null differ
diff --git a/images/2.jpg b/images/2.jpg
deleted file mode 100644
index 3258df8..0000000
Binary files a/images/2.jpg and /dev/null differ
diff --git a/images/招商图片.jpg b/images/招商图片.jpg
deleted file mode 100644
index 9f610a9..0000000
Binary files a/images/招商图片.jpg and /dev/null differ
diff --git a/images/立即入驻导航图片.jpg b/images/立即入驻导航图片.jpg
deleted file mode 100644
index 543d0f2..0000000
Binary files a/images/立即入驻导航图片.jpg and /dev/null differ
diff --git a/images/首页分享照片.jpg b/images/首页分享照片.jpg
deleted file mode 100644
index 4485aad..0000000
Binary files a/images/首页分享照片.jpg and /dev/null differ
diff --git a/pages/cooperation/index.js b/pages/cooperation/index.js
index d626757..fd02014 100644
--- a/pages/cooperation/index.js
+++ b/pages/cooperation/index.js
@@ -1,10 +1,14 @@
// pages/cooperation/index.js
+const API = require('../../utils/api.js');
Page({
/**
* 页面的初始数据
*/
data: {
- // 页面数据可以在这里定义
+ // 招商图片URL
+ cooperationImageUrl: '/images/招商图片.jpg',
+ // 首页分享图片URL
+ shareImageUrl: ''
},
/**
@@ -13,6 +17,52 @@ Page({
onLoad: function (options) {
// 页面加载时的初始化操作
console.log('招商合作页面加载');
+ // 加载招商图片和分享图片
+ this.loadCoverData();
+ },
+
+ /**
+ * 加载封面图片数据
+ */
+ loadCoverData: function () {
+ API.getCovers().then(res => {
+ if (res.success && res.covers) {
+ // 查找招商图片(id为5)
+ const cooperationCover = res.covers.find(cover => cover.id === 5);
+ let cooperationImageUrl = '/images/招商图片.jpg'; // 默认图片
+ if (cooperationCover) {
+ try {
+ const urls = JSON.parse(cooperationCover.coverurl);
+ if (Array.isArray(urls) && urls.length > 0) {
+ cooperationImageUrl = urls[0].replace(/[`\s]/g, '');
+ }
+ } catch (err) {
+ console.error('解析招商图片URL失败:', err);
+ }
+ }
+
+ // 查找首页分享图片(id为6)
+ const shareCover = res.covers.find(cover => cover.id === 6);
+ let shareImageUrl = '';
+ if (shareCover) {
+ try {
+ const urls = JSON.parse(shareCover.coverurl);
+ if (Array.isArray(urls) && urls.length > 0) {
+ shareImageUrl = urls[0].replace(/[`\s]/g, '');
+ }
+ } catch (err) {
+ console.error('解析分享图片URL失败:', err);
+ }
+ }
+
+ this.setData({
+ cooperationImageUrl: cooperationImageUrl,
+ shareImageUrl: shareImageUrl
+ });
+ }
+ }).catch(err => {
+ console.error('加载封面图片数据失败:', err);
+ });
},
/**
@@ -66,7 +116,7 @@ Page({
return {
title: '招商合作 - 又鸟蛋平台',
path: '/pages/cooperation/index',
- imageUrl: ''
+ imageUrl: this.data.shareImageUrl
};
},
@@ -77,7 +127,7 @@ Page({
return {
title: '招商合作 - 又鸟蛋平台',
query: '',
- imageUrl: ''
+ imageUrl: this.data.shareImageUrl
};
},
diff --git a/pages/cooperation/index.wxml b/pages/cooperation/index.wxml
index bd8549b..9b8a16a 100644
--- a/pages/cooperation/index.wxml
+++ b/pages/cooperation/index.wxml
@@ -6,7 +6,7 @@
-
+
diff --git a/pages/evaluate1/product-list.wxml b/pages/evaluate1/product-list.wxml
index e796f8d..fd570b2 100644
--- a/pages/evaluate1/product-list.wxml
+++ b/pages/evaluate1/product-list.wxml
@@ -1,7 +1,7 @@