Browse Source

bg & share

qinyan 2 years ago
parent
commit
5f74f57001
4 changed files with 44 additions and 12 deletions
  1. 11 7
      src/pages/auth/index.vue
  2. 2 2
      src/pages/auth/phoneLogin.vue
  3. 31 3
      src/pages/index/index.vue
  4. BIN
      src/static/share.png

+ 11 - 7
src/pages/auth/index.vue

@@ -1,8 +1,6 @@
 <template>
-  <view
-    class="content"
-    style="background-image: url(/static/gr_bg.png); background-size: 100% 100%"
-  >
+  <view class="content">
+    <image class="bg" src="/static/gr_bg.png"></image>
     <image class="logo" src="/static/logo.png"></image>
     <view>
       <button
@@ -68,9 +66,15 @@ export default {
   flex-direction: column;
   align-items: center;
   justify-content: center;
-  background-repeat: no-repeat;
-  background-position: center;
-  background-size: cover;
+}
+.bg {
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  display: block;
+  width: 100%;
+  height: 100%;
+  z-index: -999;
 }
 .logo {
   width: 240rpx;

+ 2 - 2
src/pages/auth/phoneLogin.vue

@@ -8,11 +8,11 @@
 export default {
   data() {
     return {
-      url: "http://192.168.110.231:8080/#/login/phone",
+      url: "https://3dqueen.cloud/show3d/dev/index.html#/login/phone",
     };
   },
   onLoad: function (options) {
-    const url = `http://192.168.110.231:8080/#/login/phone?redirect=${options.redirect}`;
+    const url = `https://3dqueen.cloud/show3d/dev/index.html#/login/phone?redirect=${options.redirect}`;
     this.url = url;
   },
   onShow: function () {},

+ 31 - 3
src/pages/index/index.vue

@@ -8,21 +8,49 @@
 export default {
   data() {
     return {
-      url: "http://192.168.110.231:8080",
+      url: "https://3dqueen.cloud/show3d/dev/index.html",
       token: "",
     };
   },
   onLoad: function (options) {
     let renderUrl = this.url;
     if (options.token) {
-      renderUrl = `http://192.168.110.231:8080/#/login?token=${options.token}&redirect=${options.redirect}`;
+      renderUrl = `https://3dqueen.cloud/show3d/dev/index.html#/login?token=${options.token}&redirect=${options.redirect}`;
     } else if (options.redirect) {
-      renderUrl = `http://192.168.110.231:8080/#${options.redirect}`;
+      renderUrl = `https://3dqueen.cloud/show3d/dev/index.html#${options.redirect}`;
     } else if (options.url) {
       renderUrl = options.url;
     }
     this.url = renderUrl;
   },
+  onShareAppMessage: function () {
+    return {
+      title: "数之鞋 · 鞋类3D展示、销售、设计平台",
+      path: "/pages/index/index",
+      imageUrl: "/static/share.png",
+      success: function () {
+        console.log("分享成功");
+      },
+      fail: function () {
+        console.log("分享失败");
+      },
+    };
+  },
+  //分享到朋友圈
+  onShareTimeline: function () {
+    return {
+      title: "数之鞋 · 鞋类3D展示、销售、设计平台",
+      path: "/pages/index/index",
+      imageUrl: "/static/share.png",
+      query: "kjbfrom=pyq",
+      success: function () {
+        console.log("分享成功");
+      },
+      fail: function () {
+        console.log("分享失败");
+      },
+    };
+  },
   onShow: function () {},
   methods: {},
 };

BIN
src/static/share.png