|
@@ -5,7 +5,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<div class="menus">
|
|
<div class="menus">
|
|
|
<div class="menu" v-for="(item,index) in miniProgramList" :key="index" @click="toDetail(item)">
|
|
<div class="menu" v-for="(item,index) in miniProgramList" :key="index" @click="toDetail(item)">
|
|
|
- <image :src="item.src" mode="aspectFit"/>
|
|
|
|
|
|
|
+ <image :src="item.pic_url" mode="aspectFill"/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</view>
|
|
</view>
|
|
@@ -18,21 +18,22 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
bannerSrc: "",
|
|
bannerSrc: "",
|
|
|
miniProgramList:[
|
|
miniProgramList:[
|
|
|
- {
|
|
|
|
|
- appId:'wxec4343871c957260',
|
|
|
|
|
- path:'pages/index/index',
|
|
|
|
|
- src:'/static/service/1.png'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- appId:'',
|
|
|
|
|
- path:'',
|
|
|
|
|
- src:'/static/service/2.png'
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // {
|
|
|
|
|
+ // appId:'wxec4343871c957260',
|
|
|
|
|
+ // path:'pages/index/index',
|
|
|
|
|
+ // src:'/static/service/1.png'
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // appId:'',
|
|
|
|
|
+ // path:'',
|
|
|
|
|
+ // src:'/static/service/2.png'
|
|
|
|
|
+ // },
|
|
|
],
|
|
],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
this.getPageImg();
|
|
this.getPageImg();
|
|
|
|
|
+ this.getPageMiniProgram();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
getPageImg() {
|
|
getPageImg() {
|
|
@@ -81,7 +82,7 @@ export default {
|
|
|
let url =
|
|
let url =
|
|
|
getApp().globalData.shareUrl +
|
|
getApp().globalData.shareUrl +
|
|
|
"api/api.php" +
|
|
"api/api.php" +
|
|
|
- "?method=common&source=main_pics&action=list×tamp=" +
|
|
|
|
|
|
|
+ "?method=common&source=service&action=list×tamp=" +
|
|
|
getApp().globalData.globalTimestamp +
|
|
getApp().globalData.globalTimestamp +
|
|
|
"&sign=" +
|
|
"&sign=" +
|
|
|
md5Sign;
|
|
md5Sign;
|
|
@@ -92,12 +93,14 @@ export default {
|
|
|
"content-type": "application/x-www-form-urlencoded",
|
|
"content-type": "application/x-www-form-urlencoded",
|
|
|
},
|
|
},
|
|
|
data: {
|
|
data: {
|
|
|
- order_by: "weight desc",
|
|
|
|
|
- s_status: 1,
|
|
|
|
|
|
|
+ s_show:1
|
|
|
},
|
|
},
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
if (res.data.code === 200) {
|
|
if (res.data.code === 200) {
|
|
|
- this.swiperBackground = getApp().globalData.shareUrl + res.data.data.list[0].pic_path;
|
|
|
|
|
|
|
+ res.data.data.list.forEach((item) => {
|
|
|
|
|
+ item.pic_url = getApp().globalData.shareUrl + item.pic_url;
|
|
|
|
|
+ });
|
|
|
|
|
+ this.miniProgramList = res.data.data.list;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
fail: () => {
|
|
fail: () => {
|
|
@@ -107,8 +110,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
toDetail(item) {
|
|
toDetail(item) {
|
|
|
uni.navigateToMiniProgram({
|
|
uni.navigateToMiniProgram({
|
|
|
- appId:item.appId,
|
|
|
|
|
- path:item.path,
|
|
|
|
|
|
|
+ appId:item.app_id,
|
|
|
|
|
+ path:item.app_path,
|
|
|
success(res) {
|
|
success(res) {
|
|
|
console.log(res,'打开成功')
|
|
console.log(res,'打开成功')
|
|
|
},
|
|
},
|