panhui il y a 2 ans
Parent
commit
cfe310574b

+ 1 - 1
.env.development

@@ -1,4 +1,4 @@
-VUE_APP_BASE_URL=https://www.raex.vip/
+VUE_APP_BASE_URL=https://test.raex.vip/
 NODE_ENV=development
 VUE_APP_PUBLIC_PATH=/
 ASSETS_PATH=raex

+ 15 - 1
src/components/product/SaleInfo.vue

@@ -15,7 +15,16 @@
             <div class="text2">{{ total }}份</div>
         </div>
     </div>
-    <van-action-sheet teleport="#app" ref="action" v-model:show="show" :title="`当前寄售(${total}份)`">
+    <van-action-sheet
+        class="saleSheet"
+        teleport="#app"
+        ref="action"
+        v-model:show="show"
+        :title="`当前寄售(${total}份)`"
+    >
+        <template #description>
+            <div>仅展示可购买的</div>
+        </template>
         <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="getData">
             <div @click="goDetail(item)" class="product-info" v-for="(item, index) in list" :key="index">
                 <div class="top">
@@ -253,6 +262,11 @@ export default {
     width: 100vw;
     height: 100vh;
 }
+/deep/.van-action-sheet {
+    .van-action-sheet__header {
+        border-bottom-width: 0;
+    }
+}
 
 .product-info {
     background: #f5f7fa;

+ 8 - 1
src/components/rice/Share.vue

@@ -15,7 +15,7 @@
                 </div>
             </div>
 
-            <van-button type="primary" round @click="show = false">去微信粘贴</van-button>
+            <van-button type="primary" round @click="openWeixin()">去微信粘贴</van-button>
 
             <img @click="show = false" src="@assets/rice_share_close.png" alt="" class="close" />
         </div>
@@ -76,6 +76,13 @@ function share() {
     gobal.$copyText(shareText.value);
 }
 
+const inWeixin = /micromessenger/i.test(navigator.userAgent);
+function openWeixin() {
+    if (inWeixin) {
+        window.location.href = 'weixin://';
+    }
+}
+
 const showHelp = ref(false);
 const shareUser = ref({});
 const shareTips = ref('');

+ 12 - 0
src/styles/app.less

@@ -307,6 +307,18 @@ input:-webkit-autofill {
         padding: 0 16px;
     }
 }
+.saleSheet {
+    .van-action-sheet__header {
+        border-bottom-width: 0px;
+    }
+    .van-action-sheet__description {
+        text-align: left;
+        padding: 0px 16px 0;
+        &::after {
+            content: none;
+        }
+    }
+}
 .padding-safe-top {
     padding-top: var(--safe-top);
 }

+ 4 - 0
src/views/chat/Detail.vue

@@ -60,6 +60,7 @@
                         clearable
                         placeholder="请输入..."
                         enterkeyhint
+                        id="chatField"
                         @focus="onFocus"
                     />
                 </van-form>
@@ -390,6 +391,9 @@ onUnmounted(() => {
 
 const fieldRef = ref(null);
 function onFocus(e) {
+    console.log(document.getElementById('chatField'));
+    console.log(window.innerHeight);
+    document.getElementById('chatField').scrollIntoViewIfNeeded(false);
     // fieldRef.value.scrollIntoViewIfNeeded(false);
 }
 

+ 12 - 5
src/views/product/NewsDetail.vue

@@ -46,6 +46,7 @@
 import banner from '../../mixins/banner';
 import resolveUrl from 'resolve-url';
 let inApp = /#cordova#/i.test(navigator.userAgent);
+let inWeixin = /micromessenger/i.test(navigator.userAgent);
 export default {
     data() {
         return {
@@ -113,11 +114,17 @@ export default {
         share() {
             this.$copyText(this.shareText).then(
                 e => {
-                    this.$dialog.alert({
-                        title: '链接已复制',
-                        message: this.shareText,
-                        confirmButtonText: '去微信粘贴给好友'
-                    });
+                    this.$dialog
+                        .alert({
+                            title: '链接已复制',
+                            message: this.shareText,
+                            confirmButtonText: '去微信粘贴给好友'
+                        })
+                        .then(() => {
+                            if (inWeixin) {
+                                window.location.href = 'weixin://';
+                            }
+                        });
                     console.log(e);
                 },
                 e => {