DGJ 10 hónapja
szülő
commit
4a3374d2a8

+ 1 - 1
miniprogram/app.json

@@ -1,6 +1,6 @@
 {
   "pages": [
-    "pages/index/index",
+   
     "pages/ar-classic/scene-classic-show/index",
     "pages/ar-classic/scene-classic-saomiao/index",
     "pages/ar/plane-ar-v2-marker/plane-ar-v2-marker",

+ 173 - 17
miniprogram/components/xr-classic-show/index.js

@@ -1,16 +1,93 @@
 Component({
   behaviors: [require('../common/share-behavior').default],
-  properties: {},
+  properties: {
+    captureState: {
+      type: Number,
+      value: 0,
+      observer: function (newVal, oldVal) {
+        if (newVal !== oldVal) {
+          if (newVal === 1) {
+            this.capture();
+            this.ShowModel();
+          }
+        }
+      },
+    },
+    recordState: {
+      type: Number,
+      value: 0,
+      observer: function (newVal, oldVal) {
+        if (newVal !== oldVal) {
+          if (newVal === 0) {
+            this.recordEnd();
+          } else {
+            this.recordStart();
+          }
+        }
+      }
+    },
+    captureQuality: {
+      type: Number,
+      value: 0.8,
+    },
+    captureType: {
+      type: String,
+      value: 'jpg',
+    },
+    recordFPS: {
+      type: Number,
+      value: 30,
+    },
+    recordWidth: {
+      type: Number,
+      value: undefined,
+    },
+    recordHeight: {
+      type: Number,
+      value: undefined,
+    },
+    recordBPS: {
+      type: Number,
+      value: 1000,
+    },
+    uiShowModelView:{
+      type: Boolean,
+      value: false,
+      observer: function (newVal, oldVal) {
+      
+        if (newVal !== oldVal) {
+          if(newVal){
+            //this.ShowModel(1);
+          }else{
+            this.CloseModel();
+          }
+        }     
+      },
+    },   
+    uiShowIndex:{
+      type: Number,
+      value: 0,
+      observer: function (newVal, oldVal) {
+        if (newVal !== oldVal) {
+          this.ShowModel(newVal);
+        }
+      },
+    }
+  },
   data: {
+    loaded: false,
     loadedSaoMiao:false,
     loaded: false,
     arReady: false,
     loaded2:false,
     position2:[0,0,0],
     rot:0,
-    str:"1"
-   
+    str:"1",
+    longshow : false,
+    binglongshow:false,
+    lanjiachongshow:false,
   },
+
   lifetimes: {
     async attached() {
       console.log('data', this.data);
@@ -22,6 +99,17 @@ Component({
       console.log('xr-scene', xrScene);
 
       this.binglong = {el:this.scene.getElementById('binglong')};
+
+      const scene = this.scene = detail.value;
+      const appHide = () => this.scene.share.recordPause();
+      const appShow = () => this.scene.share.recordResume();
+      wx.onAppHide(appHide);
+      wx.onAppShow(appShow);
+      wx.offAppHide(appHide);
+      wx.offAppShow(appShow);
+      
+      this.triggerEvent('sceneReady', {width: scene.width, height: scene.height});
+
     },
     handleAssetsProgress: function({detail}) {
       this.triggerEvent('assetsProgress', detail.value);
@@ -32,6 +120,7 @@ Component({
       this.setData({
         loaded: true
       });
+     
     },handleGltfLoaded2: function() {
       
     },handleGltfLoaded: function() {
@@ -74,10 +163,27 @@ Component({
     handleGLTFLoadedbingLong:function({detail}){
       const el2 = detail.value;
       const el = detail.value.target;
-      const animator = el.getComponent("animator");
+      const animator = el.getComponent(xrFrameSystem.Animator);
       //animator.play("ui_motion_1");
-      animator.play("m_13jzq_run");
+      
       var state = true;
+
+      const xrScene = this.scene;
+      const xrFrameSystem = wx.getXrFrameSystem();
+      const myModel = xrScene.getElementById('binglong');
+      this.myModelAnimator = myModel.getComponent(xrFrameSystem.Animator);
+      const clips = this.myModelAnimator._clips;
+      this.clipName = []
+       clips.forEach((v, key) => {
+        if (key.indexOf('pose') == -1) {
+          this.clipName.push(key)
+        }
+      })
+      wx.showToast({
+        title: this.clipName[0],
+      });
+      this.myModelAnimator.play.play(this.clipName[0],{ loop:5,});
+
       var interval = setInterval(function() {
         if(false)
         {
@@ -87,25 +193,75 @@ Component({
         if(state)
         {
           state = false;
-          animator.play("m_13jzq_stand");
+          this.myModelAnimator.play.play(this.clipName[1],{ loop:5,});
         }else{
           state = true;
-          animator.play("ui_motion_1");
+          this.myModelAnimator.play.play(this.clipName[2],{ loop:5,});
           el2.position =(0 -2.5 -40);
         }
         
        }, 5000)
-       var interval2 = setInterval(function() {
-        if(false)
-        {
-          clearInterval(interval2);
-        }
-        console.log(5000 +" 毫秒更新");
-        binglong.position =(0 -2.5 -40);
-        
-        
-       }, 5000)
 
+    },
+    capture() {
+      this.scene.share.captureToFriends({
+        fileType: this.data.captureType,
+        quality: this.data.captureQuality
+      });
+    },
+    recordStart() {
+      console.log('recordStart') 
+      wx.updateShareMenu({
+        withShareTicket: true,
+        success () { }
+      })
+      this.scene.share.recordStart({
+        fps: this.data.recordFPS,
+        videoBitsPerSecond: this.data.recordBPS,
+        width: this.data.recordWidth,
+        height: this.data.recordHeight
+      });
+    },
+    recordEnd() {
+      console.log('recordEnd')
+     
+      
+      //
+      const tempFilePath =  this.scene.share.recordFinishToAlbum({
+        fps: this.data.recordFPS,
+        videoBitsPerSecond: this.data.recordBPS,
+        width: this.data.recordWidth,
+        height: this.data.recordHeight
+      });
+      wx.shareVideoMessage({
+        videoPath: tempFilePath,
+      });
+    },
+    ShowModel(modelIndex){
+      
+      switch(modelIndex){
+        case 0:
+          this.setData({longshow:true});
+          this.setData({binglongshow:false});
+          this.setData({lanjiachongshow:false});
+          break;
+        case 1:
+          this.setData({longshow:false});
+          this.setData({binglongshow:true});
+          this.setData({lanjiachongshow:false});
+          break;
+        case 2:
+          this.setData({longshow:false});
+          this.setData({binglongshow:false});
+          this.setData({lanjiachongshow:true});
+          break;
+      }
+     
+    },
+    CloseModel(){
+      this.setData({longshow:false});
+      this.setData({binglongshow:false});
+      this.setData({lanjiachongshow:false});
     }
   }
 })

+ 16 - 1
miniprogram/components/xr-classic-show/index.wxml

@@ -118,8 +118,23 @@
     <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 
+    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  />
+
+    <xr-gltf 
+    wx:if="{{longshow}}"
+    id="long" node-id="long" scale="40 40 40" position="-0.3 -1 2" rotation="0 170 0"   model="gltf-long" anim-autoplay  />
+
+    <xr-gltf 
+    wx:if="{{lanjiachongshow}}"
+    id="lanjiachong" node-id="lanjiachong" scale="30 30 30" position="-0.3 -0.5 2" rotation="0 170 0"   model="gltf-lanjiachong" anim-autoplay  />
   
+   
+
+  </xr-camera>
   <xr-node node-id="lights">
     <xr-light type="ambient" color="1 1 1" intensity="0.3" />
     <xr-light type="directional" rotation="30 60 0" color="1 1 1" intensity="1" />

+ 136 - 40
miniprogram/pages/ar-classic/scene-classic-show/index.js

@@ -1,17 +1,58 @@
 var sceneReadyBehavior = require('../../behavior-scene/scene-ready');
+//var capate = require("G:/GUnityProject/WXXR/miniprogram/components/xr-classic-show/index.js");
 Page({
   behaviors:[sceneReadyBehavior],
-  data:{
+  data:{   
+    captureState: 0,
+    recordState: 0,
+    captureQuality: 0.8,
+    captureType: 'jpg',
+    recordFPS: 30,
+    recordScale: 1,
+    recordWidth: 0,
+    recordHeight: 0,
+    recordBPS: 30000,
+    sceneWidth: 0,
+    sceneHeight: 0,
+
     zhaohuanstate:true,
     paizhaostate:false,
     luxiangstate:false,
     isStartluxiang:true,
     isCloseluxiang:false,
-    
-    captureState: 0,
-    recordState: 0,
-    captureQuality: 0.8,
-    captureType: 'jpg',
+
+    uiShowModelView:false,
+    uiMainView:true,
+    uiShowNum:3,
+    uiShowIndex:0,
+ 
+
+    showModelName:'禺强',
+    showModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(禺强)',
+    showModelPrice:'¥1.99',
+
+    listShowModelNames:['禺强','AAA','BBB'],
+    listShowModelIntroduces:['北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(禺强)','北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(AAA)','北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(BBB)'],
+    listShowModelPrice:['¥1.99','¥2.99','¥3.99'],
+    imgUrls:[
+      'https://gss0.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D600%2C800/sign=8b20fba45e6034a829b7b087fb23656c/14ce36d3d539b60028f67d12eb50352ac65cb75e.jpg',
+      'https://gss0.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D600%2C800/sign=3386e39a49fbfbeddc0c3e7948c0db0e/32fa828ba61ea8d3943606a1950a304e251f587a.jpg',
+      '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'},
+    ],
+  },
+  handleReady: function({detail}) {
+    this.setData({
+      sceneWidth: detail.width,
+      sceneHeight: detail.height,
+      recordWidth: detail.width,
+      recordHeight: detail.height,
+    });
+
   },
   handleProgress: function({detail}) {
     console.log('assets progress', detail);
@@ -26,7 +67,9 @@ Page({
   handlestr: function({detail}) {
     //console.log('assets handlestr', detail);
 
-    this.setData({loadedSaoMiao: true});
+    this.setData({
+      loadedSaoMiao: true,
+    });
   },
   
   clickZhaoHuan(e){
@@ -50,17 +93,19 @@ Page({
   },
   ClickzhaohuanSS(e){
     this.setData({zhaohuanstate:false});
+    this.setData({uiMainView:false});
+    this.setData({uiShowModelView:true});
+    this.setData({uiShowNum:1});
   },
-  Clickpaizhao(e){
-    this.setData({paizhaostate:false});
+  Clickpaizhaoss(e){
+   
    // this.capture();
-    this.scene.share.captureToFriends({
+   /* this.scene.share.captureToFriends({
       fileType: 'png',
       quality: 0.8
     });
-   
     //const base64 = scene.share.captureToDataURL();
-    /*if(supported){
+    if(supported){
        // 判断当前客户端是否支持分享系统
    // const supported = scene.share.supported;
    await this.scene.share.captureToFriends({
@@ -68,45 +113,96 @@ Page({
     quality: this.data.captureQuality
   });
     }*/
- 
+    //capate.capate();
+    //this.setData({paizhaostate:false});
+    
+    if (this.data.recordState) {
+      wx.showToast({
+        title: '录屏中不允许!',
+      });
+      return;
+    }
+
+    if (this.data.captureState) {
+      wx.showToast({
+        title: '等待上次完成!',
+      });
+      return;
+    }
+
+    this.setData({captureState: 1});
+    // hack,其实应该等待异步方法完成
+    setTimeout(() => {
+      this.setData({captureState: 0});
+    }, 1000);
+    
   },
   Clickstartluxiang(e){
   
    this.setData({isStartluxiang:true});
-  this.StartRecord();
+   this.setData({recordState: 1});
   },
   Clickcloseluxiang(e){
 
     this.setData({isStartluxiang:false});
-    this.CloseRecord();
-  },
- /* async capture(){
-    await this.scene.share.captureToFriends({
-      fileType: 'png',
-      quality: 0.8
-    });
-  },*/
-  capture() {
-    this.scene.share.captureToFriends({
-      fileType: 'jpg',
-      quality: 0.8
+    this.setData({recordState: 0});
+    wx.showToast({
+      title: '视频录制完成',
     });
   },
-  async StartRecord(){
-    await this.scene.share.recordStart({
-      fps: 30,
-      width: scene.width,
-      height: scene.height,
-      videoBitsPerSecond: 20
-    });
+  changeCaptureState(e) {
+    if (this.data.recordState) {
+      wx.showToast({
+        title: '录屏中不允许!',
+      });
+      return;
+    }
+
+    if (this.data.captureState) {
+      wx.showToast({
+        title: '等待上次完成!',
+      });
+      return;
+    }
+
+    this.setData({captureState: 1});
+    // hack,其实应该等待异步方法完成
+    setTimeout(() => {
+      this.setData({captureState: 0});
+    }, 1000);
   },
-  async CloseRecord(){
-    await this.scene.share.recordFinishToAlbum({
-      fps: 30,
-      width: scene.width,
-      height: scene.height,
-      videoBitsPerSecond: 20
-    });
+  changeRecordState(e) {
+    this.setData({recordState: this.data.recordState ? 0 : 1});
   },
+  clickCloseUIShow(e){
+    this.setData({uiMainView:true});
+    this.setData({uiShowModelView:false});
+  },
+  clickShowLeft(e){
+   
+    var leftoldIndex = this.data.uiShowNum;
+    if(leftoldIndex ==0){
+      
+    }
+   
+    switch(this.data.uiShowIndex){
+      case 0:
+        this.setData({uiShowIndex:2});
+        break;
+      case 2:
+        this.setData({uiShowIndex:1});
+        break;
+      case 1:
+        this.setData({uiShowIndex:0});
+        break;
+    }
+  },
+  clickShowRight(e){
+    var  oldIndex = this.data.uiShowIndex;
+    oldIndex = oldIndex+1;    
+    var nIndex = oldIndex%3;
+    this.setData({uiShowIndex:nIndex});  
+  }
+
 });
 

+ 1 - 2
miniprogram/pages/ar-classic/scene-classic-show/index.json

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

+ 90 - 5
miniprogram/pages/ar-classic/scene-classic-show/index.wxml

@@ -11,11 +11,31 @@
         bind:assetsProgress="handleProgress"
         bind:assetsLoaded="handleLoaded"
         bind:assetsstr="handlestr"
+        bind:sceneReady="handleReady"
+        captureState="{{captureState}}"
+        recordState="{{recordState}}"
+        captureType="{{captureType}}"
+        captureQuality="{{captureQuality}}"
+        recordFPS="{{recordFPS}}"
+        recordBPS="{{recordBPS}}"
+        recordWidth="{{recordWidth}}"
+        recordHeight="{{recordHeight}}"
+        uiShowModelView="{{uiShowModelView}}"
+        uiShowIndex ="{{uiShowIndex}}"
+     
     />
-<!--<videw wx:if="{{!loaded}}"-->
 
+
+
+ 
+
+
+
+<!--<videw wx:if="{{!loaded}}"-->
   <view  wx:if="{{!loaded}}" style="position: absolute;display: flex; justify-content: center; align-items: center; left: 0;top: 0;width: 100%;height:100%;background-color: rgba(0, 0, 0,1); text-align: center;line-height: 24px;">
     <text style="color: white;font-size: 18px;">{{progressInfo}}</text>
+
+    
   </view>
 <!--  wx:if="{{loaded&&!loadedSaoMiao}}"
 
@@ -24,7 +44,12 @@
     
 <image  wx:if="{{loaded}}"  class="zhaohuan" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/zhaohuan.png'    style="position: relative; left: -164rpx; top: 704rpx; width: 554rpx; height: 211rpx; display: flex; box-sizing: border-box"></image>
 </view>-->
+
 <view wx:if="{{loaded}}" class="zhaohuan">
+
+  <view wx:if="{{uiMainView}}" >
+  
+ 
   <button class="tapbtn2" plain="true" bindtap="clickZhaoHuan"  style="position: fixed; right: 30rpx; top: 450rpx; width:180rpx; height: 160rpx" >
   <image class="tapimg2" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/rigth_zhaohuan.png'  style="position: absolute; left: 0rpx; top:-15rpx;  height: 180rpx; width:180rpx;" ></image>
 </button>
@@ -37,19 +62,41 @@
   <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}}" style="top:1200rpx; left:100rpx;" >
+        <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: fixed; right: 130rpx; top: 1230rpx; 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-item wx:for="{{imgUrls}}" style=" left: 80rpx;">
+  <image src='{{item}}' width="500" height="250" mode='widthFix' class='img' />
+ </swiper-item>
+</swiper>
 <view wx:if="{{zhaohuanstate}}" class="zhaohuanView">
-  <image  class="zhaohuan" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/zhaohuanText.png'    style="position: fixed; left: 100rpx; top: 1070rpx; width: 554rpx; height: 80rpx; display: flex; box-sizing: border-box"></image>
+
+ 
+
+  <image  class="zhaohuan" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/zhaohuanText.png'    style="position: fixed; left: 100rpx; top: 1070rpx; width: 554rpx; height: 80rpx; display: flex; box-sizing: border-box">
+  </image>
+  
 
   <button class="tapbtn5" plain="false" bindtap="ClickzhaohuanSS"  style="position: fixed; left:230rpx; top: 1190rpx; ">
     <image  class="zhaohuan" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/zhaohuanBtn.png'    style="position: fixed; left:230rpx; top: 1190rpx; width: 300rpx; height: 100rpx; display: flex; box-sizing: border-box"></image>
   </button>
+
+  
 </view>
 
 <view wx:if="{{paizhaostate}}" class="paizhaoView">
   <image  class="paizhao" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/paizhaoText.png'    style="position: fixed; left: 100rpx; top: 1070rpx; width: 554rpx; height: 80rpx; display: flex; box-sizing: border-box"></image>
 
-  <button class="tapbtn6" plain="true" bindtap="Clickpaizhao"  style="position: fixed; left:230rpx; top: 1190rpx;">
+  <button class="tapbtn6" plain="true" bindtap="Clickpaizhaoss"  style="position: fixed; left:230rpx; top: 1190rpx;">
     <image  class="paizhao" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/paizhaoBtn.png'    style="position: fixed; left:300rpx; top: 1190rpx; width: 160rpx; height: 160rpx; display: flex; box-sizing: border-box"></image>
   </button>
 </view>
@@ -72,8 +119,46 @@
  
 </view>
 </view>
-</view >
+
+</view>
+
+
+<view wx:if="{{uiShowModelView}}" class="ZhaoHuanShowModel">
+
  
 
+<view class ="uiShowModel">
+  <button class="tapbtn2" plain="true" bindtap="clickShowLeft"  style="position: fixed; left: 20rpx; top: 700rpx; 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 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>
+
+<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>
+  <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>
+
 
+ 
+<!--<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
+}}</view>
+    <button class="tapbtn2" plain="true" bindtap="clickCloseUIShow"  style="position: fixed; right: 130rpx; top: 1230rpx; 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>--> 
+ 
+
+</view>
+</view>
+
+
+</view>
 </xr-demo-viewer>

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

@@ -27,3 +27,27 @@
     width: 150rpx;
     height: 60rpx;
   }
+  .img-size {
+    width: 100%;
+    margin: auto;
+  
+  }
+  .swiper-container {
+    z-index: 999; /* 设置一个足够高的值,确保在大多数情况下都位于最上方 */
+    position: relative; /* 确保 z-index 生效的前提是,元素的 position 属性不是 static */
+  }
+  
+  /* 如果 Swiper 的子元素也需要显示在最上方,可以设置其 z-index */
+  .swiper-slide {
+    z-index: 999;
+  }
+  .liucheng-img {
+    width: 100%;
+    height: 100%;
+   
+  }
+  .item {
+    height: 100%;
+    width: 100%;   
+  }
+  

+ 87 - 14
miniprogram/pages/index/index.js

@@ -25,20 +25,95 @@ Page({
   data: {
     list,
     root: '',
-    zhaohuanstate:true,
-    paizhaostate:false,
-    luxiangstate:false,
-    isStartluxiang:true,
-    isCloseluxiang:false,
-    
-    captureState: 0,
-    recordState: 0,
-    captureQuality: 0.8,
-    captureType: 'jpg',
-    
+    imgUrls:[
+      'https://gss0.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D600%2C800/sign=8b20fba45e6034a829b7b087fb23656c/14ce36d3d539b60028f67d12eb50352ac65cb75e.jpg',
+      'https://gss0.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D600%2C800/sign=3386e39a49fbfbeddc0c3e7948c0db0e/32fa828ba61ea8d3943606a1950a304e251f587a.jpg',
+      'http://img04.sogoucdn.com/app/a/100520093/ca86e620b9e623ff-d72d635343d5bade-dcf2acda7a45cb44f172db138bdf8d2d.jpg',
+     ],
+     sysheight:600,
+     listShowModelDes:[
+      {ModelName:'禺强',ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(禺强)',ModelPrice:'¥1.99'},
+      {ModelName:'AAA',ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(AAA)',ModelPrice:'¥2.99'},
+      {ModelName:'BBB',ModelIntroduce:'北海之渚中,有神,人面鸟身,珥两青蛇,践两赤蛇,名曰禺彊(BBB)',ModelPrice:'¥3.99'},
+    ],
   },
+  toupper:function(){
+    console.log("触发了toupper");
+   },
   onLoad() {
+   // const scene = this.scene = detail.value;
+    wx.getSystemInfo({//获取设备屏幕真实高度
+      success: (result) => {
+        var height = result.windowHeight;
+        this.setData({
+          sysheight:height
+        });
+      },
+    });
 
+   /* 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:function(res){
+        console.log('POST 请求成功', res.data);
+      },
+      fail:function(err){
+        console.error('POST 请求失败', err);
+      }
+    });*/
+    wx.login({
+      success: (res) => {
+        if (res.code) {
+          // 获取到用户的临时登录凭证 code,可以发送给服务器
+          console.log('用户登录成功,code:', res.code);
+          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:1,
+                count:1
+              }],
+              js_code:res.code
+            },
+            success:function(res){
+              console.log('POST 请求成功', res.data.data);
+              var paySignStr = res.data.data.paySign;
+              console.log('即将调取微信支付',res.data.data.paySign);
+             
+              wx.requestPayment({
+                nonceStr: res.data.data.nonceStr,
+                package: res.data.data.package,
+                paySign: paySignStr,
+                timeStamp: res.data.data.timeStamp,
+                signType:res.data.data.signType,
+                success(res){
+                  console.log( '微信支付请求成功',res );
+                  // 付款成功回调
+                },
+                fail(err){
+                  console.log('微信支付请求失败',err);
+                }
+              })
+            },
+            fail:function(err){
+              console.error('POST 请求失败', err);
+            }
+          });
+        } else {
+          console.log('登录失败!' + res.errMsg);
+        }
+      },
+    });
   },
   onShareAppMessage() {
     return {
@@ -51,8 +126,6 @@ Page({
     }
   },
   clickHandle(e) {
-    
-
     wx.navigateTo({
     // url: '/pages/ar/plane-ar-v2-marker/plane-ar-v2-marker',
     url: '/pages/ar-classic/scene-classic-saomiao/index',
@@ -128,5 +201,5 @@ Page({
         lastOpened = false;
       }
     });
-  }
+  },
 });

+ 62 - 1
miniprogram/pages/index/index.wxml

@@ -4,11 +4,72 @@
 
  <!-- <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>
 
-<!--<button class="tapbtn2" plain="true" bindtap="clickZhaoHuan"  style="position: fixed; right: 30rpx; top: 650rpx; width:180rpx; height: 160rpx" >
+
+<!--<swiper style="width: 100%;height:2000rpx; ">
+  <swiper-item wx:for="{{listShowModelDes}}" style="top:1200rpx; left:100rpx;" >
+        <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: fixed; right: 130rpx; top: 1230rpx; 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>
+
+
+<swiper>
+ <swiper-item wx:for="{{imgUrls}}" style=" left: 80rpx;">
+  <image src='{{item}}' width="500" height="250" mode='widthFix' class='img' />
+ </swiper-item>
+
+</swiper>
+
+<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"></image>
+     </view>
+</scroll-view>
+<view class="ZhaoHuanShowModel">
+<view class ="uiShowModel">
+  <button class="tapbtn2" plain="true" bindtap="clickShowLeft"  style="position: fixed; left: 20rpx; top: 700rpx; 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 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>
+
+<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>
+  <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>
+
+  <view  style="position: absolute; right: 120rpx; top:1000rpx; ">111</view>
+
+  <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
+}}</view>
+    <button class="tapbtn2" plain="true" bindtap="clickCloseUIShow"  style="position: fixed; right: 130rpx; top: 1230rpx; 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>
+
+
+</view>
+</view>
+
+<button class="tapbtn2" plain="true" bindtap="clickZhaoHuan"  style="position: fixed; right: 30rpx; top: 650rpx; width:180rpx; height: 160rpx" >
   <image class="tapimg2" src='https://wx-model-1317557471.cos.ap-shanghai.myqcloud.com/WXImage/rigth_zhaohuan.png'  style="position: absolute; left: 0rpx; top:-15rpx;  height: 180rpx; width:180rpx;" ></image>
 </button>
 

+ 16 - 0
miniprogram/pages/index/index.wxss

@@ -46,4 +46,20 @@ page {
   width: 220rpx;
   height: 220rpx;
 }
+.img-size {
+  width: 100%;
+  margin: auto;
+
+}
+
+.liucheng-img {
+  width: 100%;
+  height: 100%;
+ 
+}
+.item {
+  height: 100%;
+  width: 100%;   
+}
+
   

+ 2 - 1
project.private.config.json

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