Browse Source

更新UI 接口 显示逻辑

DGJ 1 year ago
parent
commit
995fda1af7

+ 5 - 1
miniprogram/app.json

@@ -1,10 +1,14 @@
 {
   "pages": [
-    "pages/index/index",
+   
+
     "pages/ar-classic/scene-classic-show/index",
     "pages/ar-classic/scene-classic-saomiao/index",
+    "pages/ar-classic/scene-classic-tujian/index",
     "pages/ar/plane-ar-v2-marker/plane-ar-v2-marker",
+    "pages/ar-classic/scene-classic-portal/index",
     "pages/ar-classic/scene-classic-showsix/index"
+    
   ],
   "usingComponents": {},
   "window": {

BIN
miniprogram/assets/image/p1-bttext.png


BIN
miniprogram/assets/image/tujian.png


BIN
miniprogram/assets/waifu.png


+ 3 - 5
miniprogram/components/xr-classic-show/index.js

@@ -160,11 +160,9 @@ Component({
     handleAnimationStop: function() {
       console.log('animation Stop');
     },
-    handleGLTFLoadedbingLong:function({detail}){
+   /* handleGLTFLoadedbingLong:function({detail}){
       const el2 = detail.value;
-      const el = detail.value.target;
-      const animator = el.getComponent(xrFrameSystem.Animator);
-      //animator.play("ui_motion_1");
+  
       
       var state = true;
 
@@ -202,7 +200,7 @@ Component({
         
        }, 5000)
 
-    },
+    },*/
     capture() {
       this.scene.share.captureToFriends({
         fileType: this.data.captureType,

+ 47 - 104
miniprogram/components/xr-classic-show/index.wxml

@@ -2,7 +2,7 @@
   
   <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
 
-    <xr-asset-load type="env-data" asset-id="env1" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/env-test.bin" />
+   <!-- <xr-asset-load type="env-data" asset-id="env1" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/env-test.bin" />
 
     <xr-asset-load type="gltf" asset-id="gltf-long" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/2low_poly_dragon_white_dh10.glb" />
     <xr-asset-load type="gltf" asset-id="gltf-yanhua" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/4.glb" />
@@ -10,116 +10,59 @@
     <xr-asset-load type="gltf" asset-id="gltf-lanjiachong" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/5.glb" />
     <xr-asset-load type="gltf" asset-id="gltf-huangfeilong" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/fourseasonsgriffons_spring.glb" />
     <xr-asset-load type="gltf" asset-id="gltf-lanniao" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/fourseasonsgriffons_winter.glb"  />
-    <xr-asset-load type="gltf" asset-id="gltf-denglong" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/8.glb" />
+    <xr-asset-load type="gltf" asset-id="gltf-denglong" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/8.glb" />-->
+    <xr-asset-load type="gltf" asset-id="gltf-luanniao" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXModel/fenghaung.glb" />
+    <xr-asset-load type="gltf" asset-id="gltf-fuzhu" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXModel/shenlu.glb" />
+    <xr-asset-load type="gltf" asset-id="gltf-qiling" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXModel/shizi.glb" />
+    <xr-asset-load type="gltf" asset-id="gltf-denglong" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXModel/DengLong.glb" />
+    <xr-asset-load type="gltf" asset-id="gltf-paopao" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXModel/PaoPao1.glb" />
+    <xr-asset-load type="gltf" asset-id="gltf-bubble" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXModel/bubble.glb" />
+    <xr-asset-load type="gltf" asset-id="gltf-birdslow" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXModel/phoenix_bird_slow4.glb" />
+    <xr-asset-load type="gltf" asset-id="gltf-qipao" src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXModel/%E6%B0%94%E6%B3%A1.glb" />
   </xr-assets>
   <xr-env node-id="World" env-data="env1"/>
+    <xr-node>
+    
+      <xr-gltf id="qipao" node-id="qipao" scale="1 1 1" position="-0.3 0 2" rotation="0 0 0"   model="gltf-qipao" anim-autoplay  />
+    </xr-node>
 
-      <xr-node  node-id="models">
-        <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="500 500 500" position="-5 0.5 5"    model="gltf-long"
-          anim-autoplay 
-          />
-      
-          <xr-gltf id="binglong" node-id="binglong" scale="25 25 25" position="0 -1.5 -40"    model="gltf-binglong"
-            bind:gltf-loaded="handleGLTFLoadedbingLong"
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="300 300 300" position="-10 0 0"    model="gltf-lanjiachong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="30 30 30" position="10 -1 -10"    model="gltf-huangfeilong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="10 10 10" position="15 -1 0"  rotation="0 180 0"   model="gltf-lanniao" 
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="1 1.5 0"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="1 1 1"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="0 3 0"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="3 3 1"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="1 2 3"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="0 1.5 3"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="3 1.4 0"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="2 1.4 0"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="2 1.5 2"    model="gltf-denglong"
-            anim-autoplay
-          />
-
-
-
-          
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="-1 1.5 0"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="-1 1.7 -1"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="0 1.6 0"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="-3 1.5 -1"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="-1 1 -3"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="0 1.5 -3"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="-3 1.5 0"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="-2 2 0"    model="gltf-denglong"
-            anim-autoplay
-          />
-          <xr-gltf id="wxball2" node-id="mesh-gltf-wxball2" scale="100 100 100" position="-2 1.5 -2"    model="gltf-denglong"
-            anim-autoplay
-          />
-
-
-          <xr-gltf id="wxball" node-id="mesh-gltf-wxball" scale="0.1 0.1 0.1" position="1 1.5 0" model="gltf-yanhua"
-        anim-autoplay
-      />
-          <xr-gltf id="wxball" node-id="mesh-gltf-wxball" scale="0.1 0.1 0.1" position="3 1.5 0" model="gltf-yanhua"
-        anim-autoplay
-      />
-          <xr-gltf id="wxball" node-id="mesh-gltf-wxball" scale="0.1 0.1 0.1" position="3 1.5 3" model="gltf-yanhua"
-        anim-autoplay
-      />
-
-      <xr-gltf id="wxball" node-id="mesh-gltf-wxball" scale="0.1 0.1 0.1" position="-1 1.5 0" model="gltf-yanhua"
-        anim-autoplay
-      />
-          <xr-gltf id="wxball" node-id="mesh-gltf-wxball" scale="0.1 0.1 0.1" position="-3 1.5 0" model="gltf-yanhua"
-        anim-autoplay
-      />
-          <xr-gltf id="wxball" node-id="mesh-gltf-wxball" scale="0.1 0.1 0.1" position="-3 1.5 -3" model="gltf-yanhua"
-        anim-autoplay
-      />
-      </xr-node>
-
-
-
-   
     <xr-camera
       id="camera" node-id="camera" position="1 1 1" clear-color="0.925 0.925 0.925 1"
       background="ar" is-ar-camera
     >
-    <view wx:if="{{uiShowModel}}">  </view>
+    
+    
+
+  
+   
+  
+   
+    <xr-gltf id="paopao" node-id="paoapo" scale="100 100 100" position="-0.3 0 2" rotation="0 0 0"   model="gltf-paopao" anim-autoplay  />
+
+
+    <view wx:if="{{uiShowModel}}">
+
+      <xr-gltf id="birdslow" node-id="birdslow" scale="0.01 0.01 0.01" position="-0.3 -0.5 5" rotation="0 90 0"   model="gltf-birdslow" anim-autoplay  />
+
+      <xr-gltf id="bubble" node-id="bubble" scale="1 1 1" position="-0.3 0 2" rotation="0 0 0"   model="gltf-bubble" anim-autoplay  />
+
+      <xr-gltf 
+    wx:if="true"
+    id="denglong" node-id="denglong" scale="0.5 0.5 0.5" position="-0.3 0 2" rotation="0 -100 0"   model="gltf-denglong" anim-autoplay  />
+
+      <xr-gltf 
+    wx:if="true"
+    id="luanniao" node-id="luanniao" scale="0.5 0.5 0.5" position="-0.3 0 2" rotation="0 -100 0"   model="gltf-luanniao" anim-autoplay  />
+      <xr-gltf 
+    wx:if="true"
+    id="qiling" node-id="qiling" scale="0.01 0.01 0.01" position="-0.3 -0.5 2" rotation="0 -180 0"   model="gltf-qiling" anim-autoplay  />
+      <xr-gltf 
+    wx:if="true"
+    id="fuzhu" node-id="fuzhu" scale="0.01 0.01 0.01" position="-0.3 -0.5 2" rotation="0 -100 0"   model="gltf-fuzhu" anim-autoplay  />
+      </view>
+
+   
+
       <xr-gltf 
     wx:if="{{binglongshow}}"
     id="binglong" node-id="binglong" scale="0.5 0.5 0.5" position="-0.3 0 2" rotation="0 170 0"   model="gltf-binglong" anim-autoplay  />

+ 12 - 1
miniprogram/pages/ar-classic/scene-classic-portal/index.js

@@ -4,6 +4,17 @@ var xmlCode = ``;
 Page({
   behaviors:[sceneReadyBehavior],
   data: {
-    xmlCode: '<div class="codeWrap">' + handleDecodedXML(xmlCode) + '</div>'
+    xmlCode: '<div class="codeWrap">' + handleDecodedXML(xmlCode) + '</div>',
+    sysheight:600,
+  },
+  onLoad() {
+    wx.getSystemInfo({//获取设备屏幕真实高度
+      success: (result) => {
+        var height = result.windowHeight;
+        this.setData({
+          sysheight:height
+        });
+      },
+    });
   }
 });

+ 1 - 3
miniprogram/pages/ar-classic/scene-classic-portal/index.json

@@ -1,7 +1,5 @@
 {
-  "usingComponents": {
-    "xr-demo-viewer": "../../../components/xr-demo-viewer/index",
-    "xr-classic-portal": "../../../components/xr-classic-portal/index"
+  "usingComponents": { 
   },
   "disableScroll": true
 }

+ 7 - 19
miniprogram/pages/ar-classic/scene-classic-portal/index.wxml

@@ -1,19 +1,7 @@
-<xr-demo-viewer
-  title="传送门效果案例"
-  intro="基于 平面识别与模版剔除 实现的基本传送门效果案例."
-  hint="进入后等待资源加载完成,然后按照弹出提示操作"
->
-  <xr-classic-portal
-    disable-scroll
-    id="main-frame"
-    width="{{renderWidth}}"
-    height="{{renderHeight}}"
-    style="width:{{width}}px;height:{{height}}px;top:{{top}}px;left:{{left}}px;display:block;"
-    bind:arTrackerState="handleARTrackerState"
-  />
-
-  <view wx:if="{{arTrackerShow}}" style="text-align: center;padding: 12px;">
-    <view>Tracker识别状态:{{arTrackerState}}</view>
-    <view>错误信息:{{arTrackerError}}</view>
-  </view>
-</xr-demo-viewer>
+<view class="tujian-container">
+  <scroll-view scroll-y="{{true}}" style="width:100%;height:{{sysheight}}px;">
+     <view class="img-size">
+         <image src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/SStujian.png" mode="widthFix" class="liucheng-img" style="width: 95%;"></image>
+     </view>
+</scroll-view>
+</view>

+ 130 - 3
miniprogram/pages/ar-classic/scene-classic-show/index.js

@@ -22,6 +22,7 @@ Page({
     isCloseluxiang:false,
 
     uiShowModelView:false,
+    UiShowModel_Bottom:false,
     uiMainView:true,
     uiShowNum:3,
     uiShowIndex:0,
@@ -40,11 +41,58 @@ Page({
       'http://img04.sogoucdn.com/app/a/100520093/ca86e620b9e623ff-d72d635343d5bade-dcf2acda7a45cb44f172db138bdf8d2d.jpg',
      ],
     listShowModelDes:[
-      {ModelName:'禺强',ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(禺强)',ModelPrice:'¥1.99'},
-      {ModelName:'AAA',ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(AAA)',ModelPrice:'¥2.99'},
-      {ModelName:'BBB',ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(BBB)',ModelPrice:'¥3.99'},
+      {ModelName:'禺强',ModelIntroduce2:'天降祥瑞,尾挂龙鳞', ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(禺强)',ModelPrice:'¥1.99',ModelUnlock:false},
+      {ModelName:'AAA',ModelIntroduce2:'天降祥瑞,尾挂龙鳞',ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(AAA)',ModelPrice:'¥2.99',ModelUnlock:false},
+      {ModelName:'BBB',ModelIntroduce2:'天降祥瑞,尾挂龙鳞',ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(BBB)',ModelPrice:'¥3.99',ModelUnlock:false},
     ],
+    current:0,
+    products:[],
+    modelImg:[
+      'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E9%B8%BE%E9%B8%9F%E9%A2%84%E8%A7%88%E5%9B%BE.png',
+      'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E5%BA%94%E9%BE%99%E9%A2%84%E8%A7%88%E5%9B%BE.png',
+      'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E5%A4%AB%E8%AF%B8%E9%A2%84%E8%A7%88%E5%9B%BE.png',
+      'https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E7%8B%BB%E7%8C%8A%E9%A2%84%E8%A7%88%E5%9B%BE.png',
+    ],
+    log:"123",
+  },
+  onLoad(){
+   
+  },
+  onShow(){
+    this.setData({log:'OnShow'});
+    var that = this;
+    wx.request({
+      url: 'https://api-fat1.ghz-tech.com/miniprogram-shanhaijing/v1/product/listInfo',
+      method:'POST',
+      header:{
+        'Content-Type':'application/json'
+      },
+      data:{
+        topic:1
+      },
+      success:(res)=>{ 
+          console.log('POST 请求成功', res.data);
+          that.setData({log:'POST 请求成功'});
+          var products2 = res.data.data.products;
+          var modelImgs = this.data.modelImg;
+          console.log(' 商品列表 ',products2[0].desc);
+          
+          for(var i =0;i<products2.length;i++){
+            products2[i]["modelImg"] = modelImgs[i];
+          }
+          that.setData({products:products2});      
+          console.log(' 商品列表 ',this.data.products[0]);
+          that.setData({UiShowModel_Bottom:true});
+
+      },  
+      fail:function(err){
+        console.error('POST 请求失败', err);
+        var errorlog = err.toString();
+        that.setData({log:errorlog});
+      }
+    });
   },
+
   handleReady: function({detail}) {
     this.setData({
       sceneWidth: detail.width,
@@ -176,8 +224,18 @@ Page({
   },
   clickCloseUIShow(e){
     this.setData({uiMainView:true});
+    this.setData({zhaohuanstate:true});
     this.setData({uiShowModelView:false});
   },
+  clickJiSuoModel(e){
+
+  },
+  changeMoel:function(event){
+    var current2 = event.detail.current;
+    this.setData({
+      current:current2
+    })
+  },
   clickShowLeft(e){
    
     var leftoldIndex = this.data.uiShowNum;
@@ -196,12 +254,81 @@ Page({
         this.setData({uiShowIndex:0});
         break;
     }
+    let current = this.data.current;
+    current = current > 0 ? current - 1 : 0;
+    this.setData({
+      current: current,
+    });
   },
   clickShowRight(e){
     var  oldIndex = this.data.uiShowIndex;
     oldIndex = oldIndex+1;    
     var nIndex = oldIndex%3;
     this.setData({uiShowIndex:nIndex});  
+
+    let current = this.data.current;
+    current = current < 2 ? current + 1 : 2; // 假设总共有3页
+    this.setData({
+      current: current,
+    });
+   
+  },clickJiSuoModel(e){
+    var that = this;
+    wx.login({
+      success: (res) => {
+        if (res.code) {
+          // 获取到用户的临时登录凭证 code,可以发送给服务器
+          console.log('用户登录成功,code:', res.code);
+          var modelId = this.data.products[this.data.current].id;
+          console.log('当前ModelId ', modelId);
+          wx.request({
+            url: 'https://api-fat1.ghz-tech.com/miniprogram-shanhaijing/v1/order/prepay',
+            method:'POST',
+            header:{
+              'Content-Type':'application/json'
+            },
+            data:{
+              shop_cart:[{
+                id:modelId,
+                count:1
+              }],
+              js_code:res.code
+            },
+            success:function(res){
+              console.log('POST 请求成功', res.data.data);
+              var paySignStr = res.data.data.pay_Sign;
+              console.log('即将调取微信支付',res.data.data.pay_Sign);
+             
+              wx.requestPayment({
+                nonceStr: res.data.data.nonce_str,
+                package: res.data.data.package,
+                paySign: res.data.data.pay_sign,
+                timeStamp: res.data.data.time_stamp,
+                signType:res.data.data.sign_type,
+                success(res){
+                  console.log( '微信支付请求成功',res );
+                  // 付款成功回调
+
+                    var products2 = that.data.products;
+                  products2[that.data.current].activate = true;
+                 that.setData({products:products2});
+                  console.log('AAAA ',that.data.products);
+
+                },
+                fail(err){
+                  console.log('微信支付请求失败',err);
+                }
+              })
+            },
+            fail:function(err){
+              console.error('POST 请求失败', err);
+            }
+          });
+        } else {
+          console.log('登录失败!' + res.errMsg);
+        }
+      },
+    });
   }
 
 });

+ 43 - 21
miniprogram/pages/ar-classic/scene-classic-show/index.wxml

@@ -62,20 +62,7 @@
   <image class="tapimg4" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/right_luxiang.png'  style="position: absolute; left: 0rpx; top:-15rpx;  height: 180rpx; width:180rpx;" ></image>
 </button>
 
-<!-- <swiper  class="swiper-container"  style="position: fixed; left: 100rpx; top: 1070rpx; width: 554rpx; height: 1000rpx; display: flex; box-sizing: border-box">
- <swiper-item wx:for="{{listShowModelDes}}"  >
-        <image class="bg_main" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/ui-bg.png' style=" left: 80rpx;  top: 100rpx;">      
-          <view style="color: rgb(26, 26, 26); position: absolute; left: 70rpx; top:50rpx; font-size:38rpx; font-weight: bold;">{{item.ModelName}}</view>
-           <view style="color: rgb(26, 26, 26); position: absolute; left: 180rpx; top:50rpx; font-size:38rpx; font-weight: bold;">{{item.ModelPrice}}</view>
-           <view style="color: rgb(26, 26, 26); position: absolute; left: 70rpx; top:120rpx; font-size:25rpx; width:395rpx;  ">{{item.ModelIntroduce}}</view>
-
-          <button class="tapbtn2" plain="true" bindtap="clickCloseUIShow"  style="position: absolute; right: 130rpx; top: 30rpx; width:60rpx; height: 60rpx" >
-              <image class="tapimg2" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/ze-cross.png'  style="position: absolute; left: 0rpx; top:0rpx;  height: 60rpx; width:60rpx;" ></image>
-           </button>
-        </image>
-  </swiper-item>
-  
-</swiper>-->
+
 <view wx:if="{{zhaohuanstate}}" class="zhaohuanView">
 
  
@@ -126,22 +113,57 @@
  
 
 <view class ="uiShowModel">
-  <button class="tapbtn2" plain="true" bindtap="clickShowLeft"  style="position: fixed; left: 20rpx; top: 700rpx; width:100rpx; height: 100rpx" >
+  <button class="tapbtn2" plain="true" bindtap="clickShowLeft"  style="position: fixed; left: 20rpx; top: 600rpx; width:100rpx; height: 100rpx" >
   <image class="tapimg2" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/if-caret-left.png'  style="position: absolute; left: 0rpx; top:-15rpx;  height: 100rpx; width:100rpx;" ></image>
 </button>
-
-<button class="tapbtn2" plain="true" bindtap="clickShowRight"  style="position: fixed; right: 20rpx; top: 700rpx; width:100rpx; height: 100rpx" >
+ <!-- <image wx:if="{{current==0}}" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E9%B8%BE%E9%B8%9F%E9%A2%84%E8%A7%88%E5%9B%BE.png' style="position: absolute; left: 80rpx; top:300rpx;  height: 600rpx; width:600rpx;">
+  </image>
+  <image wx:if="{{current==1}}" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E5%BA%94%E9%BE%99%E9%A2%84%E8%A7%88%E5%9B%BE.png' style="position: absolute; left: 80rpx; top:300rpx;  height: 600rpx; width:600rpx;">
+  </image>
+  <image wx:if="{{current==2}}" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E5%A4%AB%E8%AF%B8%E9%A2%84%E8%A7%88%E5%9B%BE.png' style="position: absolute; left: 80rpx; top:300rpx;  height: 600rpx; width:600rpx;">
+  </image>
+  <image wx:if="{{current==3}}" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/%E9%80%89%E6%8B%A9%E7%A5%9E%E5%85%BD-%E7%8B%BB%E7%8C%8A%E9%A2%84%E8%A7%88%E5%9B%BE.png' style="position: absolute; left: 80rpx; top:300rpx;  height: 600rpx; width:600rpx;">
+  </image>-->
+<button class="tapbtn2" plain="true" bindtap="clickShowRight"  style="position: fixed; right: 20rpx; top: 600rpx; width:100rpx; height: 100rpx" >
   <image class="tapimg2" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/if-caret-right.png'  style="position: absolute; left: 0rpx; top:-15rpx;  height: 100rpx; width:100rpx;" ></image>
 </button>
+<view style="position: absolute; left: 0rpx; top:300rpx;">{{log}}</view>
 </view>
 
-<view class="UiShowModel_Bottom">
-  <image class="bg_left" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/ui-bg-left.png'  style="position: absolute; left: 0rpx; top:1240rpx;  height: 450rpx; width:55rpx;" ></image>
+<view wx:if="{{ UiShowModel_Bottom }}" class="UiShowModel_Bottom">
+ <!-- <image class="bg_left" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/ui-bg-left.png'  style="position: absolute; left: 0rpx; top:1240rpx;  height: 450rpx; width:55rpx;" ></image>
   <image class="bg_left" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/ui-bg-right.png'  style="position: absolute; right: 0rpx; top:1240rpx;  height: 450rpx; width:55rpx;" ></image>
+-->
+  <swiper class="swiper-container" current="{{current}}" style="position: fixed;  top: 0rpx; width: 100%; height: 2000rpx; left: 0rpx; display: flex; box-sizing: border-box" bindchange="changeMoel">
+ <swiper-item wx:for="{{products}}"  >
+        <image class="bg_main" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/ui-bg.png' style="position: absolute; top: 1030rpx; left: 80rpx; ">      
+          <view style="color: rgb(26, 26, 26); position: absolute; left: 70rpx; top:50rpx; font-size:38rpx; font-weight: bold;">{{item.name}}</view>
+           <view style="color: rgb(5, 19, 148); position: absolute; right: 150rpx; top:50rpx; font-size:38rpx; font-weight: bold;">¥{{item.price}}</view>
+           <view style="color: rgb(26, 26, 26); position: absolute; left: 70rpx; top:125rpx; font-size:25rpx; font-weight: bold; width:395rpx;  ">{{item.attach}}</view>
+           <view style="color: rgb(26, 26, 26); position: absolute; left: 70rpx; top:170rpx; font-size:25rpx; width:395rpx;  ">{{item.desc}}</view>
+
+          <button class="tapbtn2" plain="true" bindtap="clickCloseUIShow"  style="position: absolute; right: 20rpx; top: 20rpx; width:52rpx; height: 52rpx" >
+              <image class="tapimg2" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/ze-cross.png'  style="position: absolute; left: 0rpx; top:0rpx;  height: 52rpx; width:52rpx;" ></image>
+           </button>
 
+           <button wx:if="{{!item.activate}}" class="tapbtn2" plain="true" bindtap="clickJiSuoModel"   style="position: absolute; right: 80rpx; top: 255rpx; height: 120rpx; width:360rpx; ">
+              <image class="tapimg2" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/WeiJieSuo.png'  style="position: absolute; left: 0rpx; top:0rpx;   height: 120rpx; width:325rpx;" ></image>
+           </button>
+
+           <button  wx:if="{{item.activate}}" class="tapbtn2" plain="true"  style="position: absolute; right: 80rpx; top: 255rpx; height: 120rpx; width:360rpx; ">
+              <image class="tapimg2" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/YiJieSuo.png'  style="position: absolute; left: 6rpx; top:12rpx;   height: 80rpx; width:300rpx;" ></image>
+           </button>
+         
+        </image>
+
+        <image class="modelImg" src="{{item.modelImg}}" style="position: absolute; top:300rpx; left: 80rpx; width: 600rpx; height: 600rpx; ">
+        </image>
+  </swiper-item>
+  
+</swiper>
 
  
-<image class="bg_main" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/ui-bg.png'  style=" position: absolute; right: 120rpx; top:1200rpx;  height: 430rpx; width:520rpx;" >
+<!--<image class="bg_main" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/ui-bg.png'  style=" position: absolute; right: 120rpx; top:1200rpx;  height: 430rpx; width:520rpx;" >
     <view style="color: rgb(26, 26, 26); position: absolute; left: 70rpx; top:50rpx; font-size:38rpx; font-weight: bold;">{{showModelName}}</view>
     <view style="color: rgb(26, 26, 26); position: absolute; left: 180rpx; top:50rpx; font-size:38rpx; font-weight: bold;">{{showModelPrice}}</view>
     <view style="color: rgb(26, 26, 26); position: absolute; left: 70rpx; top:120rpx; font-size:25rpx; width:395rpx;  ">{{showModelIntroduce
@@ -151,7 +173,7 @@
       <image class="tapimg2" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/ze-cross.png'  style="position: absolute; left: 0rpx; top:0rpx;  height: 60rpx; width:60rpx;" ></image>
     </button>
     
-  </image>
+  </image>--> 
  
 
 </view>

+ 4 - 0
miniprogram/pages/ar-classic/scene-classic-show/index.wxss

@@ -6,6 +6,8 @@
     width: 150rpx;
     height: 60rpx;
   }
+
+
   .zhaohuan{  
     display: flex;
     justify-content: end;
@@ -35,6 +37,8 @@
   .swiper-container {
     z-index: 999; /* 设置一个足够高的值,确保在大多数情况下都位于最上方 */
     position: relative; /* 确保 z-index 生效的前提是,元素的 position 属性不是 static */
+    width: 100vw; /* 设置 swiper 宽度为屏幕宽度 */
+    height: 100vh; /* 设置 swiper 高度为屏幕高度 */
   }
   
   /* 如果 Swiper 的子元素也需要显示在最上方,可以设置其 z-index */

+ 18 - 0
miniprogram/pages/ar-classic/scene-classic-tujian/index.js

@@ -0,0 +1,18 @@
+
+Page({
+
+  data: {
+    
+    sysheight:600,
+  },
+  onLoad() {
+    wx.getSystemInfo({//获取设备屏幕真实高度
+      success: (result) => {
+        var height = result.windowHeight;
+        this.setData({
+          sysheight:height
+        });
+      },
+    });
+  }
+});

+ 5 - 0
miniprogram/pages/ar-classic/scene-classic-tujian/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": { 
+  },
+  "disableScroll": true
+}

+ 7 - 0
miniprogram/pages/ar-classic/scene-classic-tujian/index.wxml

@@ -0,0 +1,7 @@
+<view class="tujian-container">
+  <scroll-view scroll-y="{{true}}" style="width:100%;height:{{sysheight}}px;">
+     <view class="img-size">
+         <image src="https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/SStujian.png" mode="widthFix" class="liucheng-img" style="width: 95%;"></image>
+     </view>
+</scroll-view>
+</view>

+ 7 - 0
miniprogram/pages/ar-classic/scene-classic-tujian/index.wxss

@@ -0,0 +1,7 @@
+/* pages/ar-classic/scene-classic-tujian/index.wxss */
+.tujian-container{
+  background-image: url('https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/TuJianBG.png');
+  background-size: cover; /* 设置背景图片尺寸为 cover,保持纵横比 */
+  
+  background-repeat: no-repeat; /* 防止背景图片重复显示 */
+}

+ 31 - 7
miniprogram/pages/index/index.js

@@ -36,11 +36,12 @@ Page({
       {ModelName:'AAA',ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(AAA)',ModelPrice:'¥2.99'},
       {ModelName:'BBB',ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(BBB)',ModelPrice:'¥3.99'},
     ],
+    products:[],
   },
   toupper:function(){
     console.log("触发了toupper");
    },
-  onLoad() {
+  /*onLoad() {
    // const scene = this.scene = detail.value;
     wx.getSystemInfo({//获取设备屏幕真实高度
       success: (result) => {
@@ -50,8 +51,8 @@ Page({
         });
       },
     });
-
-   /* wx.request({
+    const that = this;
+    wx.request({
       url: 'https://api-fat1.ghz-tech.com/miniprogram-shanhaijing/v1/product/listInfo',
       method:'POST',
       header:{
@@ -60,13 +61,24 @@ Page({
       data:{
         topic:1
       },
-      success:function(res){
-        console.log('POST 请求成功', res.data);
+      success:(res)=>{
+        
+          console.log('POST 请求成功', res.data);
+          var products2 = res.data.data.products;
+          console.log(' 商品列表 ',products2[0].desc);
+          const newArray = [1, 2, 3, 4, 5];
+          that.setData({products:products2});
+          
+          console.log(' 商品列表 ',this.data.products[0]);
+  
+        
+
       },
+      
       fail:function(err){
         console.error('POST 请求失败', err);
       }
-    });*/
+    });
     wx.login({
       success: (res) => {
         if (res.code) {
@@ -114,7 +126,7 @@ Page({
         }
       },
     });
-  },
+  },*/
   onShareAppMessage() {
     return {
       title: 'XR-FRAME官方示例'
@@ -156,6 +168,18 @@ Page({
       });
     }
   },
+  clickTuJian(e){
+    console.log('clickTuJianAAAAAAAAAA');
+    wx.navigateTo({
+      url: '/pages/ar-classic/scene-classic-tujian/index',
+   //   url: 'pages/ar-classic/scene-classic-portal/index',
+      success: () => {
+      },
+      fail: (err) => {
+        console.log(' 跳转失败 ',err);
+      },
+    });
+  },
   handleLastRecord: async function () {
     return;
     if (lastOpened) {

+ 6 - 2
miniprogram/pages/index/index.wxml

@@ -5,8 +5,12 @@
  <!-- <image class="text" src='/assets/image/p1-text.png'    style="position: relative; left: 126rpx; top: 421rpx"></image> -->
 
 
-<button class="tapbtn1" plain="true" bindtap="clickHandle"  style="position: relative; left: 1rpx; top: 1330rpx; width:300rpx; height: 120rpx">
-  <image class="tapimg1" src='/assets/image/p1_bgbt2.png'  style="position: relative; height: 120rpx; width: 300rpx;" ></image>
+<button class="tapbtn1" plain="true" bindtap="clickHandle"  style="position: relative; left: -170rpx; top: 1370rpx; width:260rpx; height: 100rpx">
+  <image class="tapimg1" src='/assets/image/p1_bgbt2.png'  style="position: relative; height: 100rpx; width: 260rpx;" ></image>
+</button>
+
+<button class="tapbtn2" plain="true" bindtap="clickTuJian"  style="position: relative; left: 170rpx; top: 1270rpx; width:260rpx; height: 100rpx">
+  <image class="tapimg1" src='/assets/image/tujian.png'  style="position: relative; height: 100rpx; width: 260rpx;" ></image>
 </button>
 
 

+ 7 - 1
miniprogram/pages/index/index.wxss

@@ -42,7 +42,13 @@ page {
  
 .tapbtn1[plain]{
   padding: 0;
-  border:none;   
+  
+  width: 220rpx;
+  height: 220rpx;
+}
+.tapbtn2[plain]{
+  padding: 0;
+ 
   width: 220rpx;
   height: 220rpx;
 }

+ 1 - 1
project.private.config.json

@@ -3,7 +3,7 @@
   "setting": {
     "compileHotReLoad": true,
     "useIsolateContext": true,
-    "urlCheck": false
+    "urlCheck": true
   },
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "libVersion": "3.2.0",