Procházet zdrojové kódy

加上边框样式

lifanagju_citu před 6 měsíci
rodič
revize
ce7498aabe
2 změnil soubory, kde provedl 22 přidání a 1 odebrání
  1. 11 1
      pagesB/positionDetail/index.vue
  2. 11 0
      static/style/position/index.scss

+ 11 - 1
pagesB/positionDetail/index.vue

@@ -1,5 +1,6 @@
 <template>
   <layout-page>
+    <view :class="{'shareCss': shareCss}">
     <scroll-view class="scrollBox" style="position:relative;">
       <view class="box">
         <view v-if="loading" class="vertical80-center">{{ loadingText }}</view>
@@ -80,13 +81,16 @@
         </view>
       </view>
     </scroll-view>
+    </view>
     <!-- 分享 投递 -->
     <view class="bottom-sticky" v-if="!loading && jobId && info.status === '0'">
       <view class="bottom-content">
-        <button v-if="beenLogin" open-type="share" class="bottom-content-tool shareButtonCss">
+        <!-- 已登录可以分享 -->
+        <button v-if="beenLogin" open-type="share" class="bottom-content-tool shareButtonCss" @tap="handleClickShare1">
           <uni-icons type="redo-filled" size="24" color="#00897B" style="line-height: 24px;"/>
           <span style="color:#00897B;font-weight:bold;line-height: 22px;">分享</span>
         </button>
+        <!-- 未登录点击分享拉起登录 -->
         <view v-else @click="handleClickShare" class="bottom-content-tool">
           <uni-icons type="redo-filled" size="24" color="#00897B"/>
           <span style="color:#00897B;font-weight:bold;">分享</span>
@@ -267,6 +271,7 @@ onLoad(async (options) => {
 })
 
 onShow(() => {
+  shareCss.value = false
   if (!jobId) {
     return
   }
@@ -277,6 +282,7 @@ onShow(() => {
 //在点击open-type="share"按钮后会触发以下函数,可以在函数中写需要的逻辑,当然函数的返回值必须是一个对象,用于设置分享卡片的展示形式
 //发送给微信好友  
 onShareAppMessage((res) => {
+  console.log(1, 'onShareAppMessage', res)
   let path = `/pagesB/positionDetail/index?jobId=${info.value.id}`
   if (info.value.hire) {
     path += `&sharedById=${info.value.userId}`
@@ -489,6 +495,10 @@ const handleClickShare = () => {
   }
   // sharePopup.value.open()
 }
+const shareCss = ref(false)
+const handleClickShare1 = () => {
+  shareCss.value = true
+}
 // 获取设备信息
 function getSystemInfo(){
   return new Promise((resolve, reject) =>{

+ 11 - 0
static/style/position/index.scss

@@ -6,6 +6,17 @@
 .fs15 { font-size: 15px; }
 .box {
   padding: 10px 30rpx 100px;
+  background-color: #fff;
+}
+.shareCss {
+  background-color: #00897B !important;
+  .box {
+    margin: 20px 24px;
+    border-radius: 10px;
+    background-color: #fff;
+    height: 194px;
+    overflow: hidden;
+  }
 }
 
 .JobName {