Просмотр исходного кода

feat(福利go)对接口 首页调转

xing.li лет назад: 3
Родитель
Сommit
60407e4986
3 измененных файлов с 7 добавлено и 13 удалено
  1. 3 9
      pages/welfareMall/index/index.js
  2. 2 2
      pages/welfareMall/index/index.wxml
  3. 2 2
      utils/request.js

+ 3 - 9
pages/welfareMall/index/index.js

@@ -122,22 +122,16 @@ Page({
   goToBanner(e){
     var appId = e.currentTarget.dataset.appid;
     var path = e.currentTarget.dataset.path;
-    console.log(appId);
-    console.log(path);
+ 
     if(appId && path){
       wx.navigateToMiniProgram({
-        appId: 'wxd92a2d29f8022f40',
-        path: 'pages/index/index',
-        extraData: {
-          foo: 'bar'
-        },
-        envVersion: 'develop',
+        appId: appId,
+        path: path,
         success(res) {
           // 打开成功
         }
       })
     }
-
     if(!appId && path){
       wx.navigateTo({
         url: path,

+ 2 - 2
pages/welfareMall/index/index.wxml

@@ -4,10 +4,10 @@
 <swiper  class="swiper"
 indicator-dots="{{indicatorDots}}"
         autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
-        <block wx:for="{{bannerList}}" wx:key="unique" data-appid="{{item.appId}}" data-path="{{item.path}}" bindtap="goToBanner">
+        <block wx:for="{{bannerList}}" wx:key="unique" >
           <swiper-item >
             <view class="swiper-item swiper1">
-              <image src="{{item.figure}}" class="top_img"></image>
+              <image src="{{item.figure}}" class="top_img"  data-appid="{{item.appId}}" data-path="{{item.path}}" bindtap="goToBanner"></image>
             </view>
           </swiper-item>
         </block>

+ 2 - 2
utils/request.js

@@ -4,9 +4,9 @@ class request {
     //本地的
     // static BASE_URL = 'http://localhost:8014/'
 //   pre环境的
-//   static BASE_URL = 'https://oapi.shpr.top/'
+  static BASE_URL = 'https://oapi.shpr.top/'
 //   正式的
-  static BASE_URL = 'https://vapi.hsayi.com/'
+//   static BASE_URL = 'https://vapi.hsayi.com/'
 //   @todo需要修改正式的域名
 
   static HEAD = {