瀏覽代碼

领薪宝 JS逻辑

xinfeng 5 年之前
父節點
當前提交
2713aa53db

+ 1 - 0
assets/css/otherpage/money/index.scss

@@ -107,6 +107,7 @@
           line-height: pxtovw(18);
         }
         .word1 {
+          display: block;
           height: pxtovw(18);
           font-size: pxtovw(13);
           font-weight: 400;

+ 15 - 15
middleware/initialize.js

@@ -179,19 +179,19 @@ export default function (context) {
   context.store.commit("updateIsWeixin", context.app.$deviceType.wx || false);
   // 301
   // Server-side
-  if (process.server) {
-    console.log("server side redirect 301............");
-    const {
-      req,
-      redirect
-    } = context;
-    let reqUrl = new URL(req.url, url);
-    if (reqUrl.pathname.indexOf('/job/') !== -1 && url.indexOf('job.') === -1) {
-      redirect(301, jobUrl + reqUrl.pathname.replace('/job/', '/') + reqUrl.search)
-    }
-    if (reqUrl.pathname.indexOf('/kaifain/') !== -1 && url.indexOf('kaifain.') === -1) {
-      redirect(301, kaifainUrl + reqUrl.pathname.replace('/kaifain/', '/') + reqUrl.search)
-    }
-    // console.log("server", req.headers)
-  }
+  // if (process.server) {
+  //   console.log("server side redirect 301............");
+  //   const {
+  //     req,
+  //     redirect
+  //   } = context;
+  //   let reqUrl = new URL(req.url, url);
+  //   if (reqUrl.pathname.indexOf('/job/') !== -1 && url.indexOf('job.') === -1) {
+  //     redirect(301, jobUrl + reqUrl.pathname.replace('/job/', '/') + reqUrl.search)
+  //   }
+  //   if (reqUrl.pathname.indexOf('/kaifain/') !== -1 && url.indexOf('kaifain.') === -1) {
+  //     redirect(301, kaifainUrl + reqUrl.pathname.replace('/kaifain/', '/') + reqUrl.search)
+  //   }
+  //   // console.log("server", req.headers)
+  // }
 }

+ 13 - 11
pages/otherpage/companyComplete/index.vue

@@ -50,8 +50,8 @@
         <div class="inputArea">
           <div class="inputBox" v-for="item in inputList" :key="item.name">
             <p class="name">{{item.title}}</p>
-            <input type="text" placeholder="请输入" v-model="item.value"  v-if="item.type==='text'"/>
-            <textarea  placeholder="请输入" v-model="item.value"  v-if="item.type==='textarea'" cols="50" rows="10"/>
+            <input type="text" placeholder="请输入" v-model="item.value" v-if="item.type==='text'"/>
+            <textarea placeholder="请输入" v-model="item.value" v-if="item.type==='textarea'" cols="50" rows="10"/>
           </div>
         </div>
 
@@ -74,10 +74,10 @@
       return {
         typeList: [],
         inputList: [
-          { name: 'name', title: '公司全称', value: '', type: "text"  },
-          { name: 'short_name', title: '公司简称', value: '', type: "text"  },
+          { name: 'name', title: '公司全称', value: '', type: "text" },
+          { name: 'short_name', title: '公司简称', value: '', type: "text" },
           { name: 'website', title: '公司链接', value: '', type: "text" },
-          { name: 'description', title: '公司简介', value: '', type: "textarea"},
+          { name: 'description', title: '公司简介', value: '', type: "textarea" },
         ],
         imageUrl: '',
         dataInfo: {},
@@ -99,7 +99,7 @@
     },
     methods: {
       /** 获取展示状态 */
-      getInfo(isRefresh=false) {
+      getInfo(isRefresh = false) {
         this.$axios.post('/api/kaifawu/get_current_step').then(res => {
           if (res.data.status === 1) {
             this.dataInfo = res.data.data.com_info || {}
@@ -110,9 +110,9 @@
                 item.value = value
               }
             })
-            const {step} = this.dataInfo
+            const { step } = this.dataInfo
             if (step === 2) {
-              const {kaifainUrl} = this.$store.state.domainConfig;
+              const { kaifainUrl } = this.$store.state.domainConfig;
               location.href = kaifainUrl + "/add"
             } else if (step === 1) {
 
@@ -121,7 +121,7 @@
             this.imageUrl = this.dataInfo.logo || ''
             console.log('ist', this.inputList)
           }
-        }).finally(()=>{
+        }).finally(() => {
           this.loadingStatus && this.loadingStatus.close()
         })
       },
@@ -164,7 +164,7 @@
               // if (this.$deviceType.app) {
               //   history.back()
               // } else {
-                location.href = '/kaifain/add'
+              location.href = '/kaifain/add'
               // }
             }, 1000)
           } else {
@@ -193,7 +193,7 @@
           .then(res => {
             console.log(res)
             this.imageUrl = res.filename
-          }).catch((e)=>{
+          }).catch((e) => {
             this.$message.error("上传失败:" + e.message)
           })
           .finally(() => {
@@ -213,6 +213,7 @@
 
 <style lang="scss">
   @import '../../../assets/css/scssCommon.scss';
+
   .el-upload {
     width: 80px;
     height: 80px;
@@ -234,6 +235,7 @@
       }
     }
   }
+
   .companyCompleteMobile {
     .el-upload {
       width: pxtovw(80);

+ 8 - 6
pages/otherpage/companyVerifyInput/index.vue

@@ -39,7 +39,7 @@
               </div>
             </el-upload>
             <p class="tipps">
-             (图片大小最大2M)
+              (图片大小最大2M)
             </p>
           </div>
         </div>
@@ -109,7 +109,7 @@
     },
     methods: {
       /** 获取展示状态 */
-      getInfo(isRefresh=false) {
+      getInfo(isRefresh = false) {
         this.$axios.get('/api/remote/get_company_verify_info_for_apply').then(res => {
           if (res.data.status === 1) {
             this.dataInfo = res.data.data
@@ -120,7 +120,7 @@
                 item.value = value
               }
             })
-            const {need_pay, verify_status} = res.data.data
+            const { need_pay, verify_status } = res.data.data
             if (res.data.data && (Number(need_pay) !== 1 || verify_status) && isRefresh) {
               this.$message.success("您已提交企业认证,请耐心等待审核结果!")
               clearInterval(this.interval)
@@ -183,7 +183,7 @@
                 console.log('跳转到移动端支付...', url)
                 location.href = appUrl
               }
-              setTimeout(()=>{
+              setTimeout(() => {
                 this.loadingStatus = this.$loading({ fullscreen: true, text: '正在查询支付状态...' });
                 this.getPayStatus()
               }, 1500)
@@ -223,7 +223,7 @@
           .then(res => {
             console.log(res)
             this.imageUrl = res.filename
-          }).catch((e)=>{
+          }).catch((e) => {
             this.$message.error("上传失败:" + e.message)
           })
           .finally(() => {
@@ -235,7 +235,7 @@
       },
       async getPayStatus() {
         let maxTime = 30
-        this.interval = setInterval(()=>{
+        this.interval = setInterval(() => {
           this.getInfo(true)
           maxTime--
           if (maxTime < 0) {
@@ -256,6 +256,7 @@
 
 <style lang="scss">
   @import '../../../assets/css/scssCommon.scss';
+
   .el-upload {
     width: 184px;
     height: 136px;
@@ -277,6 +278,7 @@
       }
     }
   }
+
   .companyVerifyInputMobile {
     .el-upload {
       width: pxtovw(184);

+ 1 - 2
pages/otherpage/index.vue

@@ -3,8 +3,7 @@
 </template>
 
 <script>
-export default {
-}
+  export default {}
 </script>
 
 <style>

+ 28 - 27
pages/otherpage/kaifain/createInWeb.vue

@@ -55,11 +55,12 @@
 
 <style lang="scss" scoped>
   @import "../../../assets/css/scssCommon";
+
   .createInWeb {
     width: 100vw;
     height: 100vh;
     overflow: hidden;
-    background:rgba(244,245,249,1);
+    background: rgba(244, 245, 249, 1);
     display: flex;
     justify-content: center;
     align-items: center;
@@ -76,19 +77,19 @@
     }
     .tips {
       margin-top: pxtovw(22);
-      height:pxtovw(22);
-      font-size:pxtovw(16);
-      font-weight:600;
-      color:rgba(34,34,34,1);
-      line-height:pxtovw(22);
+      height: pxtovw(22);
+      font-size: pxtovw(16);
+      font-weight: 600;
+      color: rgba(34, 34, 34, 1);
+      line-height: pxtovw(22);
     }
     .urls {
       margin-top: pxtovw(6);
-      min-height:pxtovw(20);
-      font-size:pxtovw(14);
-      font-weight:400;
-      color:rgba(146,154,164,1);
-      line-height:pxtovw(20);
+      min-height: pxtovw(20);
+      font-size: pxtovw(14);
+      font-weight: 400;
+      color: rgba(146, 154, 164, 1);
+      line-height: pxtovw(20);
       text-align: center;
       word-break: break-all;
       white-space: pre-wrap;
@@ -97,29 +98,29 @@
     }
     .copyWord {
       margin-top: pxtovw(6);
-      height:pxtovw(21);
-      font-size:pxtovw(15);
-      font-weight:400;
-      color:rgba(48,142,255,1);
-      line-height:pxtovw(21);
+      height: pxtovw(21);
+      font-size: pxtovw(15);
+      font-weight: 400;
+      color: rgba(48, 142, 255, 1);
+      line-height: pxtovw(21);
     }
     .btn {
       margin-top: pxtovw(29);
-      width:pxtovw(149);
-      height:pxtovw(42);
-      background:rgba(48,142,255,1);
-      box-shadow:0px pxtovw(2) pxtovw(6) 0px rgba(48,142,255,0.3);
-      border-radius:pxtovw(2);
+      width: pxtovw(149);
+      height: pxtovw(42);
+      background: rgba(48, 142, 255, 1);
+      box-shadow: 0px pxtovw(2) pxtovw(6) 0px rgba(48, 142, 255, 0.3);
+      border-radius: pxtovw(2);
       display: flex;
       justify-content: center;
       align-items: center;
       p {
-        height:pxtovw(20);
-        font-size:pxtovw(14);
-        font-family:PingFangSC-Medium,PingFang SC;
-        font-weight:500;
-        color:rgba(255,255,255,1);
-        line-height:pxtovw(20);
+        height: pxtovw(20);
+        font-size: pxtovw(14);
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
+        color: rgba(255, 255, 255, 1);
+        line-height: pxtovw(20);
       }
     }
   }

+ 10 - 7
pages/otherpage/kaifain/myKaifain.vue

@@ -44,7 +44,8 @@
             <div class="bottomArea">
               <div class="companyInfo">
                 <div class="companyImg">
-                  <img :src="item.companyInfo.logo" onerror="this.src='https://stacdn.proginn.com/image/uCenter/company_logo.png'"
+                  <img :src="item.companyInfo.logo"
+                    onerror="this.src='https://stacdn.proginn.com/image/uCenter/company_logo.png'"
                     alt="">
                 </div>
                 <div class="companyName">{{item.companyInfo.name}}</div>
@@ -55,7 +56,7 @@
             </div>
 
             <div class="detailInfo" v-if="Number(item.status) === 2">
-              <div class="baseInfoNoSelected" v-if="showDetailIndex !== index" >
+              <div class="baseInfoNoSelected" v-if="showDetailIndex !== index">
                 <div class="leftBase">
                   <div class="collectArea">
                     <p class="nums">{{item.data.base.collectCount || 0}}</p>
@@ -88,7 +89,8 @@
                         <p class="nums">{{item.data.base.collectCount || 0}}</p>
                         <p class="ww">收藏量</p>
                       </div>
-                      <div class="dataCell"@click.stop="jumpTo('/otherpage/kaifain/myKaifainData/viewed?providerId='+item.id)">
+                      <div class="dataCell"
+                        @click.stop="jumpTo('/otherpage/kaifain/myKaifainData/viewed?providerId='+item.id)">
                         <p class="nums">{{item.data.base.pv || 0}}</p>
                         <p class="ww">浏览量(PV)</p>
                       </div>
@@ -100,7 +102,8 @@
                       <div class="vipTips" :class="calcUserVip">企业会员专享权益</div>
                     </div>
                     <div class="dataDetail">
-                      <div class="dataCell" @click.stop="jumpTo('/otherpage/kaifain/myKaifainData/asked?providerId='+item.id)">
+                      <div class="dataCell"
+                        @click.stop="jumpTo('/otherpage/kaifain/myKaifainData/asked?providerId='+item.id)">
                         <p class="nums link">{{item.data.senior.contact || 0}}</p>
                         <p class="ww">咨询次数</p>
                       </div>
@@ -276,8 +279,8 @@
         location.href = url
       },
       jumpToDetail(item) {
-        const {id, hash_id} = item
-        const {kaifainUrl} = this.$store.state.domainConfig;
+        const { id, hash_id } = item
+        const { kaifainUrl } = this.$store.state.domainConfig;
         location.href = kaifainUrl + '/s/' + hash_id
       },
       showDetail(index) {
@@ -293,7 +296,7 @@
       openToast() {
         this.$dialog.confirm({
             title: '开通会员',
-            message:'开通企业会员,即可查看更多解决方案高级数据。',
+            message: '开通企业会员,即可查看更多解决方案高级数据。',
             showCancelButton: true,
             confirmButtonText: '立即开通',
             cancelButtonText: '不了谢谢',

+ 12 - 11
pages/otherpage/kaifain/myKaifainData/_type.vue

@@ -36,7 +36,7 @@
             <div class="userInfo">
               <div class="name">客户: {{item.userInfo.nickname}}</div>
               <div class="line"></div>
-              <div class="phoneNote">电话: </div>
+              <div class="phoneNote">电话:</div>
               <div class="phone" v-if="Number(item.platformContact)">{{item.mobile}}</div>
               <div class="getPhone" v-else @click.stop="toastPhoneFn(item)">获取电话</div>
             </div>
@@ -55,15 +55,15 @@
     ASKED: 'asked', //咨询客户页
   }
   const Title = {
-    [Type.VIEWED]: "浏览用户列表",
-    [Type.COLLECTED]: "收藏用户列表",
-    [Type.ASKED]: "咨询用户列表",
+    [ Type.VIEWED ]: "浏览用户列表",
+    [ Type.COLLECTED ]: "收藏用户列表",
+    [ Type.ASKED ]: "咨询用户列表",
     "Detault": "程序员客栈",
   }
   const URLS = {
-    [Type.VIEWED]: "/api/kaifawu/getViewUsers",
-    [Type.COLLECTED]: "/api/kaifawu/getCollectUsers",
-    [Type.ASKED]: "/api/kaifawu/getContactList",
+    [ Type.VIEWED ]: "/api/kaifawu/getViewUsers",
+    [ Type.COLLECTED ]: "/api/kaifawu/getCollectUsers",
+    [ Type.ASKED ]: "/api/kaifawu/getContactList",
   }
   /** 咨询的客户--解决方案 **/
   export default {
@@ -71,7 +71,7 @@
     showCommonFooter: false,
     components: {},
     head() {
-      let title = Title[this.type]
+      let title = Title[ this.type ]
       let obj = {
         title: title,
         meta: [
@@ -123,7 +123,7 @@
     methods: {
       getList() {
         const { page, selectedTypeIndex } = this
-        let url = URLS[this.type]
+        let url = URLS[ this.type ]
         if (this.isLoading) {
           return
         }
@@ -183,10 +183,10 @@
       jumpTo(item) {
         //1企业  2个人
         let userInfo = item.user || item.userInfo || {}
-        const {homePageType, uid} = userInfo
+        const { homePageType, uid } = userInfo
         if (Number(homePageType) === 1) {
           location.href = '/company/' + uid
-        } else if (Number(homePageType) === 0){
+        } else if (Number(homePageType) === 0) {
           location.href = '/wo/' + uid
         }
       },
@@ -216,5 +216,6 @@
   .delete-button {
     height: 100%;
   }
+
   @import "@/assets/css/otherpage/kaifain/myKaifainData";
 </style>

+ 2 - 2
pages/otherpage/kaifain/viewHistory.vue

@@ -166,8 +166,8 @@
         this.getList()
       },
       jumpToKaifain(item) {
-        const {provider: {id, hash_id} = {}} = item
-        const {kaifainUrl} = this.$store.state.domainConfig;
+        const { provider: { id, hash_id } = {} } = item
+        const { kaifainUrl } = this.$store.state.domainConfig;
         location.href = kaifainUrl + `/kaifain/s/${hash_id}`
       }
     }

+ 26 - 9
pages/otherpage/money/index.vue

@@ -12,11 +12,11 @@
       <div class="moneyInfo">
         <div class="normal">
           <div class="label">薪资账户余额</div>
-          <div class="nums">¥1974.00元</div>
+          <div class="nums">¥{{bankInfo.incomeTaxBalance || 0 }}元</div>
         </div>
         <div class="normal freeze">
-          <div class="label">薪资账户余额</div>
-          <div class="nums">¥1974.00元</div>
+          <div class="label">冻结账户余额</div>
+          <div class="nums">¥{{bankInfo.frozenBalance || 0 }}元</div>
         </div>
       </div>
 
@@ -26,15 +26,14 @@
         <div class="agreeInfo" @click="onAgreeProto">
           <div class="choose" :class="{ok: agreeProto}"></div>
           <div class="word">确认并同意</div>
-          <div class="word1">《结薪宝服务协议》</div>
+          <a href="/otherpage/proto/lingxin" class="word1" @click.stop="()=>{}">《领薪宝服务协议》</a>
         </div>
-        <div class="agreeBtn">
+        <div class="agreeBtn" @click="onWithdrawBtn">
           <p>提现</p>
         </div>
       </div>
     </div>
 
-
     <div class="connect">
       商务合作请联系: <span>0571-28120931</span>
     </div>
@@ -53,7 +52,7 @@
     components: { IBottom },
     head() {
       let obj = {
-        title: "薪宝",
+        title: "薪宝",
       }
       return obj
     },
@@ -64,15 +63,33 @@
     },
     data() {
       return {
-        agreeProto: false
+        agreeProto: false,
+        bankInfo: {}
       }
     },
     created() {
-
+      this.getAccountBankInfo()
     },
     methods: {
+      onWithdrawBtn() {
+        if (!this.agreeProto) {
+          this._toast('请先同意协议')
+          return false
+        }
+        location.href = '/otherpage/money/withdraw'
+      },
       onAgreeProto() {
         this.agreeProto = !this.agreeProto
+      },
+      getAccountBankInfo() {
+        this.$axios.post('/api/account/getBalance').then(res => {
+          if (Number(res.data.status) === 1) {
+            let data = res.data.data
+            this.bankInfo = data
+          }
+        }).catch(e => {
+          console.log(e)
+        })
       }
     }
   }

+ 28 - 27
pages/otherpage/money/introduce.vue

@@ -1,11 +1,11 @@
 <template>
   <div class="introduce">
     <div class="topContent">
-      <div class="title">薪宝</div>
+      <div class="title">薪宝</div>
       <div class="desc">平台级财税结算SaaS方案提供商</div>
     </div>
     <div class="bodyIntro">
-      <div class="desc">薪宝是由杭州势行网络科技有限公司,开发的一款解决项目开发立项-费用托管-过程管理-薪资结算问题的全套服务应用,主要提供以下服务:</div>
+      <div class="desc">薪宝是由杭州势行网络科技有限公司,开发的一款解决项目开发立项-费用托管-过程管理-薪资结算问题的全套服务应用,主要提供以下服务:</div>
       <div class="step step1">
         <div class="iconStep icon1"></div>
         <div class="stepDesc">灵活用工平台,自由工作者代缴税服务</div>
@@ -14,7 +14,7 @@
         <div class="iconStep icon2"></div>
         <div class="stepDesc">项目开发,线上交易担保、代码托管、纠纷仲裁服、阶段性验收服务</div>
       </div>
-      <div class="useBtn">
+      <div class="useBtn" @click="jumpToUse">
         <p>立即使用</p>
       </div>
     </div>
@@ -29,33 +29,34 @@
 
 <script>
   import IBottom from '../../../components/otherpage/money/bottom'
-export default {
-  name: "MoneyIntroduce",
-  showCommonFooter: false,
-  components: {IBottom},
-  head() {
-    let obj = {
-      title: "结薪宝",
-    }
-    return obj
-  },
-  async asyncData({ app }) {
-    return {
-      mobile: app.$deviceType.isMobile()
-    }
-  },
-  data() {
-    return {
 
-    }
-  },
-  created() {
-
-  },
-  methods: {
+  export default {
+    name: "MoneyIntroduce",
+    showCommonFooter: false,
+    components: { IBottom },
+    head() {
+      let obj = {
+        title: "领薪宝",
+      }
+      return obj
+    },
+    async asyncData({ app }) {
+      return {
+        mobile: app.$deviceType.isMobile()
+      }
+    },
+    data() {
+      return {}
+    },
+    created() {
 
+    },
+    methods: {
+      jumpToUse() {
+        location.href = '/otherpage/money/'
+      }
+    }
   }
-}
 </script>
 
 <style lang="scss" scoped>

+ 69 - 54
pages/otherpage/money/uploadInvoice.vue

@@ -28,7 +28,7 @@
       </div>
     </div>
 
-    <div class="button">
+    <div class="button" @click="onSubmit">
       <p>提交审核</p>
     </div>
 
@@ -36,64 +36,79 @@
 </template>
 
 <script>
-export default {
-  name: "uploadInvoice",
-  showCommonFooter: false,
-  head() {
-    let obj = {
-      title: "结薪宝",
-    }
-    return obj
-  },
-  async asyncData({ app }) {
-    return {
-      mobile: app.$deviceType.isMobile()
-    }
-  },
-  data() {
-    return {
-      invoiceImg: '',
-      uploading: false
-    }
-  },
-  created() {
-
-  },
-  methods: {
-    /** 图片文件上传 **/
-    handleFileChange(file) {
-      const isJPG = file.type === 'image/jpeg';
-      const isPNG = file.type === 'image/png';
-      const isLt2M = file.size / 1024 / 1024 < 2;
-      if (!isJPG && !isPNG) {
-        this.$message.error('上传头像图片只能是 JPG/PNG 格式!');
-        return
+  export default {
+    name: "uploadInvoice",
+    showCommonFooter: false,
+    head() {
+      let obj = {
+        title: "领薪宝",
       }
-      if (!isLt2M) {
-        this.$message.error('上传头像图片大小不能超过 2MB!');
-        return
+      return obj
+    },
+    async asyncData({ app }) {
+      return {
+        mobile: app.$deviceType.isMobile()
+      }
+    },
+    data() {
+      return {
+        invoiceImg: '',
+        uploading: false
       }
-      const formData = new FormData();
-      formData.append("file", file);
-      formData.append("original_filename", file.name);
-      this.uploading = true;
-      this.$axios
-        .$post(`/upload_image`, formData, {
-          headers: { "Content-Type": "multipart/form-data" }
-        })
-        .then(res => {
-          this.invoiceImg = res.filename
-        })
-        .finally(() => {
-          this.uploading = false;
-        });
     },
-    /** 删除问及爱你 **/
-    handleDeleteFile() {
-      this.invoiceImg = ""
+    created() {
+      const {coins=1} = this.$route.query || {}
+      this.coins = Number(coins) || 0
     },
+    methods: {
+      /** 图片文件上传 **/
+      handleFileChange(file) {
+        const isJPG = file.type === 'image/jpeg';
+        const isPNG = file.type === 'image/png';
+        const isLt2M = file.size / 1024 / 1024 < 2;
+        if (!isJPG && !isPNG) {
+          this.$message.error('上传头像图片只能是 JPG/PNG 格式!');
+          return
+        }
+        if (!isLt2M) {
+          this.$message.error('上传头像图片大小不能超过 2MB!');
+          return
+        }
+        const formData = new FormData();
+        formData.append("file", file);
+        formData.append("original_filename", file.name);
+        this.uploading = true;
+        this.$axios
+          .$post(`/upload_image`, formData, {
+            headers: { "Content-Type": "multipart/form-data" }
+          })
+          .then(res => {
+            this.invoiceImg = res.filename
+          })
+          .finally(() => {
+            this.uploading = false;
+          });
+      },
+      /** 删除问及爱你 **/
+      handleDeleteFile() {
+        this.invoiceImg = ""
+      },
+      onSubmit() {
+        if (!this.invoiceImg) {
+          this._toast('请上传发票', 'error')
+          return
+        }
+        this.$axios.post('/api/recruit/addInvoiceWithdrawalApply', {
+          auth_code: '',
+          coins: this.coins,
+          invoice_url: this.invoiceImg
+        }).then(res=>{
+          this.invoiceImg = ""
+          this._toast('上传成功')
+        })
+      }
+    }
   }
-}
 </script>
 
 <style lang="scss" scoped>

+ 51 - 27
pages/otherpage/money/withdraw.vue

@@ -13,14 +13,14 @@
       <div class="amountArea">
         <div class="left">
           <div class="pre">¥</div>
-          <input class="nums" value="175.00" type="text"/>
+          <input class="nums" v-model="vCoins" type="text"/>
         </div>
         <div class="rightClose"></div>
       </div>
       <div class="line"></div>
       <div class="amountBottom">
-        <div class="leftMoney">余额 <span>¥175.00</span></div>
-        <div class="rightBtn">全部提现</div>
+        <div class="leftMoney">余额 <span>¥{{bankInfo.incomeTaxBalance || 0}}</span></div>
+        <div class="rightBtn" @click="onSetAllMoney">全部提现</div>
       </div>
     </div>
 
@@ -51,7 +51,7 @@
 
     <div class="intro">
       <div class="stitle">提现说明</div>
-      <div class="sdesc">1.自行提供发票,只支持上传电子发票 </div>
+      <div class="sdesc">1.自行提供发票,只支持上传电子发票</div>
       <div class="sdesc">2.请确认银行卡账号和实名认证信息保持一致,如需修改银 行卡账号,请前往 <a href="">设置银行卡信息</a></div>
       <div class="sdesc">3.提现成功后,会在3-5个工作日内到账,节假日可能会稍有 延时,请耐心等待,如长时间未到账( 超过5个工作日),可联系 <a href="">在线客服</a></div>
     </div>
@@ -59,32 +59,56 @@
 </template>
 
 <script>
-export default {
-  name: "Withdraw",
-  showCommonFooter: false,
-  head() {
-    let obj = {
-      title: "结薪宝",
-    }
-    return obj
-  },
-  async asyncData({ app }) {
-    return {
-      mobile: app.$deviceType.isMobile()
-    }
-  },
-  data() {
-    return {
+  export default {
+    name: "Withdraw",
+    showCommonFooter: false,
+    head() {
+      let obj = {
+        title: "领薪宝",
+      }
+      return obj
+    },
+    async asyncData({ app }) {
+      return {
+        mobile: app.$deviceType.isMobile()
+      }
+    },
+    data() {
+      return {
+        bankInfo: {},
+        vCoins: 0
+      }
+    },
+    created() {
+      this.getAccountBankInfo()
+      this.getWithdrawType()
+    },
+    methods: {
+      getWithdrawType() {
+        this.$axios.post('/api/admin/kaifabao/getBuckleConfigList').then(res => {
 
+        }).catch(e => {
+          console.log(e)
+        })
+      },
+      getAccountBankInfo() {
+        this.$axios.post('/api/account/getBalance').then(res => {
+          if (Number(res.data.status) === 1) {
+            let data = res.data.data
+            this.bankInfo = data
+          }
+        }).catch(e => {
+          console.log(e)
+        })
+      },
+      onSetAllMoney() {
+        this.vCoins = this.bankInfo.incomeTaxBalance
+      },
+      onJumpToUpload() {
+        location.href = '/otherpage/money/uploadInvoice.vue?coins=' + this.vCoins || 0
+      }
     }
-  },
-  created() {
-
-  },
-  methods: {
-
   }
-}
 </script>
 
 <style lang="scss" scoped>

文件差異過大導致無法顯示
+ 195 - 0
pages/otherpage/proto/lingxin.vue


+ 14 - 14
pages/otherpage/report/_uid.vue

@@ -84,7 +84,7 @@
     async created() {
 
     },
-    async  mounted() {
+    async mounted() {
       await this.needLogin()
       this.getTypeList()
       this.getBeReportUserInfo()
@@ -92,19 +92,19 @@
     methods: {
       /** 获取类型 */
       getTypeList() {
-        this.$axios.get('/api/report/get_report_type').then(res=>{
+        this.$axios.get('/api/report/get_report_type').then(res => {
           console.log(res, res.data)
           if (res.data.status === 1) {
             //处理将 data数组转换一下
-            let typeListData = [...(res && res.data && res.data.data || []) ]
+            let typeListData = [ ...(res && res.data && res.data.data || []) ]
             let list = []
-            for (let  i = 0; i < typeListData.length; i++) {
+            for (let i = 0; i < typeListData.length; i++) {
               list.push({
-                name: typeListData[i],
-                selected: i===0 ? true : false
+                name: typeListData[ i ],
+                selected: i === 0 ? true : false
               })
             }
-            this.typeList = [...list]
+            this.typeList = [ ...list ]
           }
         })
       },
@@ -115,11 +115,11 @@
           return
         }
         this.beReportUserId = uid
-        this.$axios.get(`/api/user/getUserInfo?id=${uid}`).then(res=>{
+        this.$axios.get(`/api/user/getUserInfo?id=${uid}`).then(res => {
           let data = res.data
           if (data.status === 1) {
             this.beReportUser = data.data.info
-          } else if (data.status){
+          } else if (data.status) {
             console.log('res.status', data.status)
             this.$message.closeAll()
             this.$message.error(data.status.message || errMsg.getUserWrong)
@@ -132,7 +132,7 @@
 
       /** 提交 **/
       submitForm() {
-        const {typeList, detail, beReportUserId, beReportUser={}} = this
+        const { typeList, detail, beReportUserId, beReportUser = {} } = this
         if (!this.beReportUser.nickname) {
           this.$message.warning(errMsg.noneUser)
           return
@@ -160,19 +160,19 @@
           reported_uid: beReportUserId,
           type: typeData,
           detail,
-          from:'web端主页'
+          from: 'web端主页'
         }
-        this.$axios.post('/api/report/create', p).then(res=>{
+        this.$axios.post('/api/report/create', p).then(res => {
           let data = res.data
           if (data.status === 1) {
             this.$message.success('提交成功,客栈将在7日内联系处理')
-            setTimeout(()=>{
+            setTimeout(() => {
               history.back()
             }, 1000)
           } else {
             this.$message.error('提交失败')
           }
-        }).catch(e=> {
+        }).catch(e => {
           console.log(e)
           this.$message.error('提交失败')
         })

+ 27 - 26
pages/otherpage/user/addConnect.vue

@@ -7,7 +7,7 @@
           type="text"
           v-model="item.value"
           :placeholder="item.placeholder"
-          v-if="item.type === 'text'" />
+          v-if="item.type === 'text'"/>
         <el-select v-model="item.value" :placeholder="item.placeholder" v-else-if="item.type==='select'">
           <el-option
             v-for="option in item.options"
@@ -33,31 +33,31 @@
   import MintUI from 'mint-ui';
   import "mint-ui/lib/style.css";
 
-  const mix =  {
+  const mix = {
     data() {
       return {
         // 详情id
         detailID: this.$route.params.detail,
       }
     },
-    methods: {
-
-    }
+    methods: {}
   }
   //联系方式展示 0 不展示 1 电话 2网址 3 微信
   export default {
     name: 'UserAddConnect',
-    mixins: [mix],
+    mixins: [ mix ],
     data() {
       return {
         userData: [
-          { title: '联系电话', type:"text", name: 'contact', value: '', placeholder: "请输入您的联系电话(选填)" },
-          { title: '微信号',  type:"text",name: 'wechat', value: '', placeholder: "请输入您的微信号(选填)"  },
-          { title: '企业官网',  type:"text", name: 'website', value: '', placeholder: "请输入您的企业官网链接,需以http://开头(选填)"},
+          { title: '联系电话', type: "text", name: 'contact', value: '', placeholder: "请输入您的联系电话(选填)" },
+          { title: '微信号', type: "text", name: 'wechat', value: '', placeholder: "请输入您的微信号(选填)" },
+          { title: '企业官网', type: "text", name: 'website', value: '', placeholder: "请输入您的企业官网链接,需以http://开头(选填)" },
           {
-            title: '展示信息设置',  type:"select", name: 'contactDisplay', value: '', placeholder:  "选择您需要展示的联系方式",
-            options: [{label: "不展示", value: 0},{label: "联系电话", value: 1},{label: "微信号", value: 3},{label: "企业官网",
-              value: 2},]
+            title: '展示信息设置', type: "select", name: 'contactDisplay', value: '', placeholder: "选择您需要展示的联系方式",
+            options: [ { label: "不展示", value: 0 }, { label: "联系电话", value: 1 }, { label: "微信号", value: 3 }, {
+              label: "企业官网",
+              value: 2
+            }, ]
           },
         ],
         loading: true,
@@ -75,11 +75,11 @@
         this.loading = true
         this.$axios.post('/api/company_info/get_home_page_info', {}).then(res => {
           if (res.data.status === 1) {
-            const { contactDisplay, website, wechat, contact} = res.data.data && res.data.data.base
-            this.userData[0].value = contact || ""
-            this.userData[1].value = wechat || ""
-            this.userData[2].value = website || ""
-            this.userData[3].value = Number(contactDisplay) || 0
+            const { contactDisplay, website, wechat, contact } = res.data.data && res.data.data.base
+            this.userData[ 0 ].value = contact || ""
+            this.userData[ 1 ].value = wechat || ""
+            this.userData[ 2 ].value = website || ""
+            this.userData[ 3 ].value = Number(contactDisplay) || 0
           } else {
             this.$message.error('查询失败:' + res.info)
           }
@@ -112,9 +112,9 @@
 
       checkSubmit() {
         let p = {}
-        this.userData.forEach(v=>{
-          const {name, value} = v
-          p[name] = value
+        this.userData.forEach(v => {
+          const { name, value } = v
+          p[ name ] = value
         })
         this.$axios.post('/api/companyInfo/updateContactInfo', p).then(res => {
           if (res.data.status === 1) {
@@ -133,7 +133,8 @@
 </script>
 <style lang="scss">
   @import "../../../assets/css/scssCommon";
-  .el-select  {
+
+  .el-select {
     width: 100%;
     .el-input__inner {
       margin-top: pxtovw(2);
@@ -141,17 +142,17 @@
       height: pxtovw(44);
       background: rgba(255, 255, 255, 1);
       border-radius: pxtovw(3);
-      border:pxtovw(1) solid rgba(146,154,164,0.2);
+      border: pxtovw(1) solid rgba(146, 154, 164, 0.2);
       padding: pxtovw(15) pxtovw(10);
     }
   }
 
   input::placeholder {
     color: #AFB9C4;
-    height:pxtovw(14);
-    font-size:pxtovw(14);
-    font-weight:400;
-    line-height:pxtovw(14);
+    height: pxtovw(14);
+    font-size: pxtovw(14);
+    font-weight: 400;
+    line-height: pxtovw(14);
   }
 </style>
 

+ 4 - 4
pages/otherpage/user/card.vue

@@ -84,7 +84,7 @@
   import MintUI from 'mint-ui';
   import "mint-ui/lib/style.css";
 
-  const mix =  {
+  const mix = {
     data() {
       return {
         // 详情id
@@ -105,7 +105,7 @@
 
   export default {
     name: 'UserCard',
-    mixins: [mix],
+    mixins: [ mix ],
     data() {
       return {
         userList: [],
@@ -211,7 +211,7 @@
       },
       deleteItem(item) {
         console.log(item)
-        const { nameCardId=0, nickname} = item
+        const { nameCardId = 0, nickname } = item
         MessageBox.confirm(`将从您的名片夹中移除 ${nickname} 的名片`).then(action => {
           let loading = this.$loading({
             title: "删除中..."
@@ -229,7 +229,7 @@
           }).catch((e) => {
             loading && loading.close()
           })
-        }).catch(e=>{
+        }).catch(e => {
 
         });
       },

+ 2 - 2
pages/otherpage/user/collection/index.vue

@@ -22,7 +22,7 @@
         <div class="list" v-if="dataList.length">
           <div class="cell" v-for="(item, index) in dataList" :key="item.id" @click="jumpToDetail(item)">
             <div class="left">
-              <img :src="item.cover_url || linkImg" alt=""  @error="defaultImg">
+              <img :src="item.cover_url || linkImg" alt="" @error="defaultImg">
             </div>
             <div class="right">
               <div class="ctitle">{{item.title}}</div>
@@ -82,7 +82,7 @@
           class="cell"
           v-for="(item, index) in dataList" :key="'dataList' + index"
         >
-          <div class="cellContent"  @click="jumpToDetail(item)">
+          <div class="cellContent" @click="jumpToDetail(item)">
             <div class="left">
               <img :src="item.cover_url || linkImg" alt="" @error="defaultImg">
             </div>

+ 1 - 1
pages/otherpage/user/scanLogin.vue

@@ -40,7 +40,7 @@
           if (Number(res.status) === 1) {
             this.$toast('登录成功')
             setTimeout(() => {
-             this.appBackHandler()
+              this.appBackHandler()
             }, 500)
           }
         })

+ 2 - 2
pages/otherpage/userSetting/show.vue

@@ -64,7 +64,7 @@
             this.typeList.forEach(item => {
               item.status = Number(data[ item.key ])
             })
-            this.typeList = [...this.typeList]
+            this.typeList = [ ...this.typeList ]
           }
         })
       },
@@ -74,7 +74,7 @@
         const { typeList } = this
         let p = {}
         typeList.forEach(item => {
-          p[item.key] = Number(item.status)
+          p[ item.key ] = Number(item.status)
         })
         this.$axios.post('/api/user_info_show/setting', p).then(res => {
           let data = res.data