Browse Source

Merge branch 'master' of gitea.intra.yunpaper.com:zhangqi/kuailelunwen_new_houtai

pull/69/head
zq 6 days ago
parent
commit
e4fc230c5d
  1. 1
      src/assets/pay/pay_0.svg
  2. 1
      src/assets/pay/pay_11.svg
  3. 1
      src/assets/pay/pay_2.svg
  4. 1
      src/assets/pay/pay_3.svg
  5. 1
      src/assets/pay/pay_4.svg
  6. 1
      src/assets/site/delete.svg
  7. 12
      src/router/index.js
  8. 4
      src/store/index.js
  9. 433
      src/views/agent/payInfoSetting.vue
  10. 2
      src/views/agent/payList.vue
  11. 276
      src/views/agent/paySetting.vue

1
src/assets/pay/pay_0.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="26" height="26" viewBox="0 0 26 26"><defs><clipPath id="master_svg0_163_65485"><rect x="0" y="0" width="26" height="26" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_163_65485)"><g><rect x="1" y="4" width="24" height="20" rx="0" fill="#FB832D" fill-opacity="1"/></g><g><path d="M21.7860125,0L4.2147825,0C1.8957325,0,0.007812797353,1.88795,0.007812797353,4.22185L0.007812797353,21.7633C0.007812797353,24.0972,1.8957325,25.9851,4.2147825,25.9851L21.7860125,25.9851C24.1050125,25.9851,25.9929125,24.0972,25.9929125,21.7633L25.9929125,4.22185C25.9929125,1.90277,24.1050125,0,21.7860125,0ZM9.7596625,17.4225C8.7785225,17.4225,7.9906525,17.2144,6.9946525,17.0212L4.2445225,18.4036L5.0323925,16.04C3.0552725,14.6575,1.8808825,12.8736,1.8808825,10.7181C1.8808825,6.97196,5.4337625,4.0137,9.7596625,4.0137C13.6396125,4.0137,17.0289125,6.37731,17.7128125,9.54373C17.4604125,9.51401,17.2072125,9.49912,16.9546125,9.49912C13.2085125,9.49912,10.2502125,12.2939,10.2502125,15.7278C10.2502125,16.3076,10.3394125,16.8576,10.4881125,17.3779C10.2502125,17.4076,10.0124125,17.4225,9.7596625,17.4225ZM21.3846125,20.1727L21.9792125,22.1349L19.8237125,20.9457C19.0358125,21.1389,18.2479125,21.3471,17.4601125,21.3471C13.7139125,21.3471,10.7557125,18.7902,10.7557125,15.6238C10.7557125,12.4723,13.7139125,9.90051,17.4600125,9.90051C20.9981125,9.90051,24.1496125,12.4723,24.1496125,15.6238C24.1347125,17.4225,22.9603125,18.9983,21.3846125,20.1727Z" fill="#FB832D" fill-opacity="1"/></g><g><path d="M5.57036,5.294376C6.58904,5.294376,7.41797,6.0477799999999995,7.41797,6.98081C7.41797,7.91384,6.58904,8.66724,5.57036,8.66724C4.5417000000000005,8.66724,3.71278,7.90885,3.71278,6.98081C3.71777,6.04279,4.5417000000000005,5.294376,5.57036,5.294376ZM7.11336,15.4279C6.624,16.9647,6.74884,16.395899999999997,4.80636,20.681800000000003L2,18.9006Q5.1409199999999995,16.0017,5.7800899999999995,14.67453Q6.4642,13.27749,5.0210799999999995,12.53406L2.863878,11.17194L4.03735,9.34581C5.66025,10.57321,5.7800899999999995,10.673,6.87367,11.79063C7.72257,12.663789999999999,7.61271,13.86126,7.11336,15.4279ZM22.4085,17.4287Q21.8592,22.6527,15.1629,20.7068L15.5274,19.209899999999998L17.080399999999997,19.5442Q19.9467,19.7288,19.6671,17.1892L19.6671,9.79985C19.687,6.9907900000000005,17.0654,6.69641,12.3516,8.40779L13.4451,8.71215C13.3553,9.03646,13.0007,9.550370000000001,12.5413,10.10919L18.8481,10.10919L18.8481,11.40645L15.3027,11.40645L15.3027,13.02303L18.8381,13.02303L18.8381,14.32029L15.3027,14.32028L15.3027,17.029600000000002C15.837,16.8549,16.3264,16.6104,16.750799999999998,16.286099999999998L16.4413,15.1086L18.1091,14.57973L19.5023,18.032400000000003L17.4499,18.9006L17.0854,17.5235C16.166600000000003,18.237000000000002,14.2641,19.2698,10.9334,19.175Q7.38301,19.2698,8.29682,15.1086L8.38671,15.0637L10.88846,15.0637C10.86849,15.5976,10.65376,16.4707,10.94838,16.944699999999997C11.19306,17.3339,11.81725,17.3988,12.2117,17.4237C12.2567,17.4287,12.3066,17.4287,12.3466,17.4287L12.3466,14.32528L8.731259999999999,14.32528L8.731259999999999,13.02802L12.3466,13.02802L12.3466,11.411439999999999L11.40779,11.411439999999999Q10.59384,12.28459,9.84981,13.01305L8.75623,12.0451C9.535219999999999,11.21186,10.30921,9.894639999999999,10.78859,9.02149C10.39909,9.18116,9.99961,9.355789999999999,9.585149999999999,9.535409999999999C9.18567,10.0593,8.72127,10.588180000000001,8.20195,11.11706Q8.22192,11.142009999999999,6.40927,10.084240000000001Q8.27685,8.46766,9.32549,5L11.92711,5.738437Q11.71738,6.25235,11.26797,7.035690000000001Q21.6645,4.047016,22.2787,8.86682Q22.9528,12.199770000000001,22.4085,17.4287Z" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

1
src/assets/pay/pay_11.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

1
src/assets/pay/pay_2.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="26" height="26" viewBox="0 0 26 26"><defs><clipPath id="master_svg0_151_44063"><rect x="0" y="0" width="26" height="26" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_151_44063)"><g><rect x="1" y="4" width="24" height="20" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M6,8.22114375C6,8.83064375,6.490547,9.321193749999999,7.1000499999999995,9.321193749999999C7.70955,9.321193749999999,8.20012,8.83064375,8.20012,8.22114375C8.20012,7.61164075,7.70955,7.12109375,7.1000499999999995,7.12109375C6.490572,7.12109375,6,7.61164075,6,8.22114375ZM14.53287,13.884953750000001C14.53287,14.360643750000001,14.9194,14.74717375,15.39509,14.74717375C15.87078,14.74717375,16.2573,14.360643750000001,16.2573,13.884953750000001C16.2573,13.409263750000001,15.87078,13.02274375,15.39509,13.02274375C14.9194,13.02274375,14.53287,13.409263750000001,14.53287,13.884953750000001ZM11.58949,8.22114375C11.58949,8.83064375,12.08004,9.321193749999999,12.689540000000001,9.321193749999999C13.29904,9.321193749999999,13.78959,8.83064375,13.78959,8.22114375C13.78959,7.61164075,13.29904,7.12109375,12.689540000000001,7.12109375C12.08004,7.12109375,11.58949,7.61164075,11.58949,8.22114375Z" fill="#00C261" fill-opacity="1"/></g><g><path d="M21.7860125,0L4.2147825,0C1.8957325,0,0.007812797353,1.88795,0.007812797353,4.22185L0.007812797353,21.7633C0.007812797353,24.0972,1.8957325,25.9851,4.2147825,25.9851L21.7860125,25.9851C24.1050125,25.9851,25.9929125,24.0972,25.9929125,21.7633L25.9929125,4.22185C25.9929125,1.90277,24.1050125,0,21.7860125,0ZM9.7596625,17.4225C8.7785225,17.4225,7.9906525,17.2144,6.9946525,17.0212L4.2445225,18.4036L5.0323925,16.04C3.0552725,14.6575,1.8808825,12.8736,1.8808825,10.7181C1.8808825,6.97196,5.4337625,4.0137,9.7596625,4.0137C13.6396125,4.0137,17.0289125,6.37731,17.7128125,9.54373C17.4604125,9.51401,17.2072125,9.49912,16.9546125,9.49912C13.2085125,9.49912,10.2502125,12.2939,10.2502125,15.7278C10.2502125,16.3076,10.3394125,16.8576,10.4881125,17.3779C10.2502125,17.4076,10.0124125,17.4225,9.7596625,17.4225ZM21.3846125,20.1727L21.9792125,22.1349L19.8237125,20.9457C19.0358125,21.1389,18.2479125,21.3471,17.4601125,21.3471C13.7139125,21.3471,10.7557125,18.7902,10.7557125,15.6238C10.7557125,12.4723,13.7139125,9.90051,17.4600125,9.90051C20.9981125,9.90051,24.1496125,12.4723,24.1496125,15.6238C24.1347125,17.4225,22.9603125,18.9983,21.3846125,20.1727Z" fill="#00C261" fill-opacity="1"/></g><g><path d="M18.828125,13.883699374999999C18.828125,14.359394375,19.214646,14.745914375,19.690339,14.745914375C20.166035,14.745914375,20.552554999999998,14.359394375,20.552554999999998,13.883699374999999C20.552554999999998,13.408006375,20.166035,13.021484375,19.690339,13.021484375C19.199792,13.021484375,18.828125,13.408006375,18.828125,13.883699374999999Z" fill="#00C261" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

1
src/assets/pay/pay_3.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="26" height="25.99951171875" viewBox="0 0 26 25.99951171875"><g><g><rect x="2.4453125" y="3.380859375" width="23.46553611755371" height="19.711050033569336" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M16.3459,16.953C14.0665,19.6895,11.7089,21.3628,8.13524,21.3628C4.56157,21.3628,2.2049,19.1579,2.50939,16.4986C2.66211,14.7509,3.87815,11.8616,9.1241,12.3188C11.8607,12.546,13.154,13.0777,15.4343,13.8394C16.0433,12.776,16.4977,11.56,16.8775,10.344L6.84189,10.344L6.84189,9.3551L11.7834,9.3551L11.7834,7.60167L5.77762,7.60167L5.77762,6.46009L11.7834,6.46009L11.7834,3.87624Q11.8578,3.49635,12.315,3.49635L14.8244,3.49635L14.8244,6.46009L21.2091,6.46009L21.2091,7.5234L14.7471,7.5234L14.7471,9.27206L19.993,9.27206C19.5358,11.2498,18.777,13.0729,17.8655,14.5934C19.1588,15.0506,24.4029,16.6456,25.9234,17.1028L25.9234,3.80084C25.9234,1.67325,24.1757,1.67839e-7,22.1225,1.67839e-7L3.80275,0C1.67229,0,0,1.7477,0,3.80084L0,22.1989C0,24.3265,1.7477,25.9997,3.80084,25.9997L22.1989,25.9997C24.3265,25.9997,25.9997,24.252,25.9997,22.1989L25.9997,21.2845C24.7054,20.6784,18.9297,18.169,16.3459,16.953ZM3.57271,16.2686C3.34554,17.2574,3.9526,19.6151,7.75248,19.6151C10.0318,19.6151,12.315,18.1719,14.1372,15.8142C11.5524,14.5209,9.42287,13.9138,6.99079,13.9138C4.86415,13.9892,3.79988,15.2797,3.57271,16.2686Z" fill="#006AFF" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

1
src/assets/pay/pay_4.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.8 KiB

1
src/assets/site/delete.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.1 KiB

12
src/router/index.js

@ -156,6 +156,18 @@ const routes = [{
} }
}, },
{ {
path: '/agent/payInfoSetting',
name: '收款方式设置',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/payInfoSetting.vue'),
meta: {
title: '收款方式设置',
breadcrumbParent: '收款方式' // 手动指定父级
// 如果想隐藏中间层级
// breadcrumbParent: '首页', // 跳过医生信息
// hideInBreadcrumb: true // 可选:隐藏当前项
}
},
{
path: '/agent/paySetting', path: '/agent/paySetting',
name: '收款方式设置', name: '收款方式设置',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/paySetting.vue'), component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/paySetting.vue'),

4
src/store/index.js

@ -318,7 +318,7 @@ export default new Vuex.Store({
paySettingData:[ paySettingData:[
{ {
name: '支付授权', name: '支付授权',
path: '/agent/payList', path: '/agent/payInfoSetting',
img:'site/pay.svg', img:'site/pay.svg',
imgActive: require('@/assets/site/sitebase_active.svg'), imgActive: require('@/assets/site/sitebase_active.svg'),
list: [] list: []
@ -345,7 +345,7 @@ export default new Vuex.Store({
}, },
{ {
name: '支付设置', name: '支付设置',
path: '/agent/sitePersonalization', path: '/agent/paySetting',
img: 'site/setting.svg', img: 'site/setting.svg',
imgActive: require('@/assets/site/sitebase_active.svg'), imgActive: require('@/assets/site/sitebase_active.svg'),
list: [ list: [

433
src/views/agent/payInfoSetting.vue

@ -0,0 +1,433 @@
<template>
<div class="main-content12">
<!-- page content -->
<div class="site-setting-wrap min-flex-right">
<div class="siteMessage flex-common">
<h3>支付授权</h3>
<el-form v-if="payType==payTypeTaoBao">
<div class="flex-wrap">
<div class="flex-left" style="max-width:100%">
<div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4>
<p class="mt12 flex">
请确保使用要添加的淘宝主账号登录并授权
</p>
<p class="mt10 flex">
如未购买快乐帮手服务或已过期会跳转到购买服务页面
</p>
</div>
</div>
</div>
</el-form>
<el-form v-else-if="payType==payTypeWeixin">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" class="mb24" label="1. 公司简称">
<span class="desc" slot="formRight">请输入公司简称便于您区分账号所属公司</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.short_name" prop="company_short_name" placeholder="6字以内">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="2. 支付商户号(mch_id)">
<span class="desc" slot="formRight"><a href='https://pay.weixin.qq.com/' target='_blank'>微信支付平台</a>账户中心商户信息微信支付商户号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.mch_id" prop="mch_id" placeholder="请输入商户号">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="3. 微信支付秘钥">
<span class="desc" slot="formRight"><a href='https://pay.weixin.qq.com/' target='_blank'>微信支付平台</a>账号中心账户设置API安全APIv2密钥<p class="mt10">注意支付密钥不能设置为纯数字</p></span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.apiv2" prop="payinfo.apiv2" placeholder="请输入微信支付秘钥">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="4. 公众号APPID">
<span class="desc" slot="formRight"><a href='https://mp.weixin.qq.com/' target='_blank'>公众平台</a>设置与开发基本配置公众号开发信息开发者IDAPPID</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.appid" prop="payinfo.appid" placeholder="请输入公众号APPID">
</GuipInput>
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<div class="preview">
<div class="preview-title">
<p>预览支付二维码</p>
</div>
<div class="preview-content">
</div>
</div>
</div>
</div>
</el-form>
<el-form v-else-if="payType==payTypeAlipay">
<div class="flex-wrap">
<div class="flex-left">
<div v-if="payinfo.is_pay_public==0">
<GuipFormItem column="column" class="mb24" label="1. 公司简称">
<span class="desc" slot="formRight">请输入公司简称便于您区分账号所属公司</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.short_name" placeholder="6字以内"></GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="2. 公司支付宝账号">
<span class="desc" slot="formRight">仅支持已签约 当面付 功能的公司支付宝</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.account" placeholder="请输入公司支付宝账号"></GuipInput>
</GuipFormItem>
</div>
<div v-if="payinfo.is_pay_public==1">
<div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 须知</h4>
<p class="mt12">使用平台支付宝支付平台收取5%的服务费</p>
<p class="mt12 flex">使用平台支付宝支付真实姓名必须和支付宝账号实名认证姓名统一</p>
</div>
<GuipFormItem column="column" class="mb24" label="1. 收款人姓名">
<span class="desc" slot="formRight">请输入支付宝绑定的银行卡的持卡人姓名</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.receive_payment_name" placeholder="6字以内"></GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="2. 收款支付宝账号">
<span class="desc" slot="formRight">请输入有效账号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.receive_payment_account" placeholder="请输入有效收款支付宝账号"></GuipInput>
</GuipFormItem>
</div>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<div class="preview">
<div class="preview-title">
<p>预览支付二维码</p>
</div>
<div class="preview-content">
</div>
</div>
</div>
</div>
</el-form>
<el-form v-else-if="payType==payTypePdd">
<div class="flex-wrap">
<div class="flex-left" style="max-width:100%">
<div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4>
<p class="mt12 flex">主账号登录并授权<a :href="payinfo.authurl" class="flex" target="_blank"><img src="@/assets/site/form_linkActive.svg" alt="">去授权</a></p>
<p class="mt12 flex gray">如未购买快乐帮手服务或已过期会跳转到购买服务页面</p>
<p class="mt5 flex gray">授权成功后点击下方同步授权</p>
</div>
<GuipFormItem column="column" class="mb24" label="账号名称">
<!-- <span class="desc" slot="formRight">账号名称</span> -->
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.account" placeholder="请输入账号名称"></GuipInput>
</GuipFormItem>
</div>
</div>
</el-form>
<el-form v-else-if="payType==payTypeJingdong">
<div class="flex-wrap">
<div class="flex-left" style="max-width:100%">
<div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4>
<p class="mt12 flex">请确保使用要添加的京东主账号登录并授权</p>
<p class="mt10 flex">如未购买快乐论文检测服务服务或已过期会跳转到购买服务页面</p>
</div>
<GuipFormItem column="column" class="mb24" label="账号名称">
<!-- <span class="desc" slot="formRight">账号名称</span> -->
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.account" placeholder="请输入账号名称"></GuipInput>
</GuipFormItem>
</div>
</div>
</el-form>
</div>
</div>
<div class="register-btns">
<GuipButton type="system" :btnstyle="{ width: '144px', height: '46px' }" @click="cancle">取消</GuipButton>
<GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="addPayment">{{ confirmText }}</GuipButton>
</div>
</div>
</template>
<script>
// import GuipInput from '@/components/GuipInput.vue';
import store from '@/store';
import { mapState } from 'vuex';
import GuipFormItem from '@/components/GuipFormItem.vue';
import GuipInput from '@/components/GuipInput.vue';
// import GuipTextarea from '@/components/GuipTextarea.vue';
// import GuipRadio from '@/components/GuipRadio.vue';
// import CustomDropdown from '@/components/CustomDropdown.vue';
import GuipButton from '@/components/GuipButton.vue';
// import GroupFormBtns from '@/components/GroupFormBtns.vue';
// import {setHighActive} from '@/utils/common';
//
const PAY_TYPE_TAOBAO = 0; //
const PAY_TYPE_WEIXIN = 2; //
const PAY_TYPE_ALIPAY = 3; //
const PAY_TYPE_JINGDONG = 4; //
const PAY_TYPE_PDD = 11; //
export default {
//
name: '',
props: [''],
components: {
// GuipRadio,
GuipFormItem,
GuipInput,
// GuipTextarea,
// CustomDropdown,
GuipButton,
// GroupFormBtns
},
data() {
return {
// AUTH
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
payinfo: [],
payType: -1,
//
payTypeTaoBao: PAY_TYPE_TAOBAO,
payTypeWeixin: PAY_TYPE_WEIXIN,
payTypeAlipay: PAY_TYPE_ALIPAY,
payTypeJingdong: PAY_TYPE_JINGDONG,
payTypePdd: PAY_TYPE_PDD,
confirmText: '保存',
}
},
computed: {
...mapState(['pageTitle']) // VuexshowSidebar
},
created() {
store.commit('SET_CUSTOMIZE', true);
store.commit('SET_SLIDER_MENU', 'paySettingData');
},
mounted() {
store.commit('SET_PAGETITLE', '支付授权');
this.getPayment();
},
methods: {
getPayment() {
this.$http('POST', '/agentnew/ajax_get_payinfo', {
payid: this.$route.query.payid,
},{
headers:{
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
this.payinfo = response.data
this.payType = response.data.type
if (this.payType == PAY_TYPE_TAOBAO || this.payType == PAY_TYPE_JINGDONG) {
this.confirmText = '去授权';
} else if (this.payType == PAY_TYPE_PDD) {
this.confirmText = '同步授权';
}
})
}).catch(error => {
console.error(error, 'error')
})
},
//
addPayment() {
if (this.payType == PAY_TYPE_TAOBAO) {
window.open(this.payinfo.authurl, '_blank');
} else if (this.payType == PAY_TYPE_WEIXIN) {
this.$http('POST', '/agentnew/ajax_add_weixinpay', {
payid: this.$route.query.payid,
company_short_name: this.payinfo.short_name,
mch_id: this.payinfo.mch_id,
apiv2: this.payinfo.apiv2,
appid: this.payinfo.appid
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} else if (this.payType == PAY_TYPE_ALIPAY) {
this.$http('POST', '/agentnew/ajax_add_alipay', {
payid: this.$route.query.payid,
company_short_name: this.payinfo.short_name,
alipay_account: this.payinfo.account,
is_pay_public: this.payinfo.is_pay_public,
receive_payment_account: this.payinfo.receive_payment_account,
receive_payment_name: this.payinfo.receive_payment_name
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
if (this.payinfo.is_pay_public == 1) {
this.$Message.success(response.info);
} else {
window.open(response.data.authurl, '_blank');
}
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} else if (this.payType == PAY_TYPE_PDD) {
this.$http('POST', '/agentnew/ajax_add_pddpay', {
shop_name: this.payinfo.account,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} else if (this.payType == PAY_TYPE_JINGDONG) {
window.open(this.payinfo.authurl, '_blank');
}
},
handleClick(tab, event) {
console.log(tab, event);
},
cancle() {
this.getPayment();
}
}
}
</script>
<style lang="scss" scoped>
a {
text-decoration: none;
color: #006AFF;
}
.register-btns {
// height: 78px;
/* 自动布局 */
// width: 344px;
display: flex;
flex-direction: row;
justify-content: center;
background: #FFFFFF;
padding: 16px 0px;
/* 蓝色阴影_常规 */
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12);
button:nth-child(1) {
margin-right: 56px;
}
}
.preview {
background: #FAFAFA;
border-radius: 4px;
width: 100%;
height: 100%;
text-align: left;
}
.preview-title {
padding-top: 24px;
padding-left: 20px;
}
.preview-title p {
font-size: 14px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
color: #1E2226;
}
.preview-content {
margin-top: 20px;
margin-left: 20px;
background: #FFFFFF;
width: 100%;
height: 200px;
}
.beforeNotice {
h4 {
margin: 0;
gap: 8px;
}
margin-bottom: 18px;
text-align: left;
box-sizing: border-box;
padding: 20px 14px;
border-radius: 4px;
/* middle/middle_blue_1 */
background: #F2F7FF;
/* middle/middle_blue_3 */
border: 1px solid #BFDAFF;
div {
margin-top: 2px;
padding-left: 23px;
p {
color: #8A9099;
}
}
p {
color: #1E2226;
i {
font-style: normal;
}
&:last-child {
display: flex;
align-items: stretch;
b {
font-weight: normal;
color: #8A9099;
display: inline-flex;
img {
margin-left: 4px;
}
}
}
}
a {
text-decoration: none;
color: #006AFF;
margin-right: 10px;
img {
margin-left: 5px;
margin-right: 5px;
}
}
}
.siteMessage {
border-radius: 4px;
transition: all .5s;
border: 1px solid transparent;
}
.site-setting-wrap {
width: 100%;
}
</style>

2
src/views/agent/payList.vue

@ -734,7 +734,7 @@ export default {
console.log(tab, event); console.log(tab, event);
}, },
paySetting(row) { paySetting(row) {
window.open('/agent/paySetting?payid='+row.payid, '_blank'); window.open('/agent/payInfoSetting?payid='+row.payid, '_blank');
} }
}, },

276
src/views/agent/paySetting.vue

@ -2,154 +2,63 @@
<div class="main-content12"> <div class="main-content12">
<!-- page content --> <!-- page content -->
<div class="site-setting-wrap min-flex-right"> <div class="site-setting-wrap min-flex-right">
<div class="siteMessage flex-common"> <div class="siteMessage flex-common" id="siteMessage1" v-if="payinfo.type == payTypeWeixin">
<h3>支付授权</h3> <h3>支付客服</h3>
<el-form v-if="payType==payTypeTaoBao"> <el-form>
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left" style="max-width:100%"> <div class="flex-left" style="max-width:100%">
<div class="beforeNotice"> <div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4> <h4 class="flex">
<p class="mt12 flex"> <span>支付即服务免开发版</span>
请确保使用要添加的淘宝主账号登录并授权 <p class="flex">
<a :href="payinfo.weixin_pay_kefu_setting_url" class="flex" target="_blank"><img src="@/assets/site/form_linkActive.svg" alt="">前往微信商户平台</a>
</p> </p>
<p class="mt10 flex"> </h4>
如未购买快乐帮手服务或已过期会跳转到购买服务页面
</p>
</div>
</div>
</div>
</el-form>
<el-form v-else-if="payType==payTypeWeixin">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" class="mb24" label="1. 公司简称">
<span class="desc" slot="formRight">请输入公司简称便于您区分账号所属公司</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.short_name" prop="company_short_name" placeholder="6字以内">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="2. 支付商户号(mch_id)">
<span class="desc" slot="formRight"><a href='https://pay.weixin.qq.com/' target='_blank'>微信支付平台</a>账户中心商户信息微信支付商户号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.mch_id" prop="mch_id" placeholder="请输入商户号">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="3. 微信支付秘钥">
<span class="desc" slot="formRight"><a href='https://pay.weixin.qq.com/' target='_blank'>微信支付平台</a>账号中心账户设置API安全APIv2密钥<p class="mt10">注意支付密钥不能设置为纯数字</p></span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.apiv2" prop="payinfo.apiv2" placeholder="请输入微信支付秘钥">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="4. 公众号APPID">
<span class="desc" slot="formRight"><a href='https://mp.weixin.qq.com/' target='_blank'>公众平台</a>设置与开发基本配置公众号开发信息开发者IDAPPID</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.appid" prop="payinfo.appid" placeholder="请输入公众号APPID">
</GuipInput>
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<div class="preview">
<div class="preview-title">
<p>预览支付二维码</p>
</div>
<div class="preview-content">
</div> <p class="mt12 flex gray">用户在支付完成后可通过相关微信支付凭证下方入口找到商家的服务人员名片添加服务人员为好友</p>
</div> </div>
</div> </div>
</div> </div>
</el-form> </el-form>
<el-form v-else-if="payType==payTypeAlipay"> </div>
<div class="siteMessage flex-common mt-18" id="siteMessage2">
<h3>启停收款方式</h3>
<el-form>
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<div v-if="payinfo.is_pay_public==0">
<GuipFormItem column="column" class="mb24" label="1. 公司简称">
<span class="desc" slot="formRight">请输入公司简称便于您区分账号所属公司</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.short_name" placeholder="6字以内"></GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="2. 公司支付宝账号">
<span class="desc" slot="formRight">仅支持已签约 当面付 功能的公司支付宝</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.account" placeholder="请输入公司支付宝账号"></GuipInput>
</GuipFormItem>
</div>
<div v-if="payinfo.is_pay_public==1">
<div class="beforeNotice"> <div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 须知</h4> <div class="flex justify-content-space-between">
<p class="mt12">使用平台支付宝支付平台收取5%的服务费</p> <h3 class="flex gap8"><img :src="paySvg" alt="">{{ payinfo.type_desc}}</h3>
<p class="mt12 flex">使用平台支付宝支付真实姓名必须和支付宝账号实名认证姓名统一</p> <!-- :active-value="1" :inactive-value="0"关闭 加冒号表示数字格式 -->
</div> <!-- active-value="1" inactive-value="0"关闭 不加冒号表示字符串 -->
<GuipFormItem column="column" class="mb24" label="1. 收款人姓名"> <!-- 传入的modelvalue 为数字 0 或者 1 -->
<span class="desc" slot="formRight">请输入支付宝绑定的银行卡的持卡人姓名</span> <GuipSwitch :modelValue="payStatus" :active-value="1" :inactive-value="0" @change="updatePayStatus(payinfo)" activeText="开启" inactiveText="关闭"></GuipSwitch>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.receive_payment_name" placeholder="6字以内"></GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="2. 收款支付宝账号">
<span class="desc" slot="formRight">请输入有效账号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.receive_payment_account" placeholder="请输入有效收款支付宝账号"></GuipInput>
</GuipFormItem>
</div>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<div class="preview">
<div class="preview-title">
<p>预览支付二维码</p>
</div>
<div class="preview-content">
</div> </div>
<p class="ml-23 flex gray">{{ payinfo.account }}</p>
</div> </div>
</div> </div>
</div> </div>
</el-form> </el-form>
<el-form v-else-if="payType==payTypePdd">
<div class="flex-wrap">
<div class="flex-left" style="max-width:100%">
<div class="beforeNotice">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4>
<p class="mt12 flex">主账号登录并授权<a :href="payinfo.authurl" class="flex" target="_blank"><img src="@/assets/site/form_linkActive.svg" alt="">去授权</a></p>
<p class="mt12 flex gray">如未购买快乐帮手服务或已过期会跳转到购买服务页面</p>
<p class="mt5 flex gray">授权成功后点击下方同步授权</p>
</div>
<GuipFormItem column="column" class="mb24" label="账号名称">
<!-- <span class="desc" slot="formRight">账号名称</span> -->
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.account" placeholder="请输入账号名称"></GuipInput>
</GuipFormItem>
</div>
</div> </div>
</el-form> <div class="siteMessage flex-common mt-18" id="siteMessage3">
<el-form v-else-if="payType==payTypeJingdong"> <h3 style="margin-bottom: 24px;">移除收款方式</h3>
<el-form>
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left" style="max-width:100%"> <hover-button button-text="确认移除" @click="deletePay" :default-icon="require('@/assets/site/delete.svg')" default-text-color="#626573"
<div class="beforeNotice"> hover-text-color="#006AFF" width="110px" height="32px"
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4> :customStyle="{ fontSize: '12px', background: '#fff', borderRadius: '2px', borderColor: '#DFE2E6' }" />
<p class="mt12 flex">请确保使用要添加的京东主账号登录并授权</p>
<p class="mt10 flex">如未购买快乐论文检测服务服务或已过期会跳转到购买服务页面</p>
</div>
<GuipFormItem column="column" class="mb24" label="账号名称">
<!-- <span class="desc" slot="formRight">账号名称</span> -->
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="payinfo.account" placeholder="请输入账号名称"></GuipInput>
</GuipFormItem>
</div>
</div> </div>
</el-form> </el-form>
</div> </div>
</div> </div>
<div class="register-btns">
<GuipButton type="system" :btnstyle="{ width: '144px', height: '46px' }" @click="cancle">取消</GuipButton>
<GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="addPayment">{{ confirmText }}</GuipButton>
</div>
</div> </div>
</template> </template>
<script> <script>
// import GuipInput from '@/components/GuipInput.vue';
import store from '@/store'; import store from '@/store';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import GuipFormItem from '@/components/GuipFormItem.vue'; import GuipSwitch from '@/components/GuipSwitch.vue';
import GuipInput from '@/components/GuipInput.vue'; import HoverButton from '@/components/HoverButton.vue'
// import GuipTextarea from '@/components/GuipTextarea.vue';
// import GuipRadio from '@/components/GuipRadio.vue';
// import CustomDropdown from '@/components/CustomDropdown.vue';
import GuipButton from '@/components/GuipButton.vue';
// import GroupFormBtns from '@/components/GroupFormBtns.vue';
// import {setHighActive} from '@/utils/common';
// //
const PAY_TYPE_TAOBAO = 0; // const PAY_TYPE_TAOBAO = 0; //
@ -163,13 +72,8 @@ export default {
name: '', name: '',
props: [''], props: [''],
components: { components: {
// GuipRadio, GuipSwitch,
GuipFormItem, HoverButton,
GuipInput,
// GuipTextarea,
// CustomDropdown,
GuipButton,
// GroupFormBtns
}, },
data() { data() {
@ -178,6 +82,8 @@ export default {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU', token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
payinfo: [], payinfo: [],
payType: -1, payType: -1,
payStatus: -1,
paySvg: '',
// //
payTypeTaoBao: PAY_TYPE_TAOBAO, payTypeTaoBao: PAY_TYPE_TAOBAO,
payTypeWeixin: PAY_TYPE_WEIXIN, payTypeWeixin: PAY_TYPE_WEIXIN,
@ -211,6 +117,8 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.payinfo = response.data this.payinfo = response.data
this.payType = response.data.type this.payType = response.data.type
this.payStatus = Number(response.data.status)
this.paySvg = require('@/assets/pay/pay_'+this.payType+'.svg')
if (this.payType == PAY_TYPE_TAOBAO || this.payType == PAY_TYPE_JINGDONG) { if (this.payType == PAY_TYPE_TAOBAO || this.payType == PAY_TYPE_JINGDONG) {
this.confirmText = '去授权'; this.confirmText = '去授权';
} else if (this.payType == PAY_TYPE_PDD) { } else if (this.payType == PAY_TYPE_PDD) {
@ -221,18 +129,10 @@ export default {
console.error(error, 'error') console.error(error, 'error')
}) })
}, },
// updatePayStatus(row) {
addPayment() { this.$http('POST', '/agentnew/ajax_update_pay_status', {
if (this.payType == PAY_TYPE_TAOBAO) {
window.open(this.payinfo.authurl, '_blank');
} else if (this.payType == PAY_TYPE_WEIXIN) {
this.$http('POST', '/agentnew/ajax_add_weixinpay', {
payid: this.$route.query.payid, payid: this.$route.query.payid,
company_short_name: this.payinfo.short_name, status: row.status==1 ? 0 : 1,
mch_id: this.payinfo.mch_id,
apiv2: this.payinfo.apiv2,
appid: this.payinfo.appid
}, { }, {
headers: { headers: {
'Auth': this.token 'Auth': this.token
@ -241,6 +141,8 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (response.status) { if (response.status) {
this.$Message.success(response.info); this.$Message.success(response.info);
this.closePayTipDialogVisible = false;
this.getPayment()
} else { } else {
this.$Message.error(response.info); this.$Message.error(response.info);
} }
@ -248,15 +150,10 @@ export default {
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
}) })
},
} else if (this.payType == PAY_TYPE_ALIPAY) { deletePay() {
this.$http('POST', '/agentnew/ajax_add_alipay', { this.$http('POST', '/agentnew/ajax_del_pay', {
payid: this.$route.query.payid, payid: this.$route.query.payid,
company_short_name: this.payinfo.short_name,
alipay_account: this.payinfo.account,
is_pay_public: this.payinfo.is_pay_public,
receive_payment_account: this.payinfo.receive_payment_account,
receive_payment_name: this.payinfo.receive_payment_name
}, { }, {
headers: { headers: {
'Auth': this.token 'Auth': this.token
@ -264,12 +161,8 @@ export default {
}).then(response => { }).then(response => {
this.$nextTick(() => { this.$nextTick(() => {
if (response.status) { if (response.status) {
if (this.payinfo.is_pay_public == 1) {
this.$Message.success(response.info); this.$Message.success(response.info);
} else { location.href = '/agent/payList';
window.open(response.data.authurl, '_blank');
}
} else { } else {
this.$Message.error(response.info); this.$Message.error(response.info);
} }
@ -277,30 +170,6 @@ export default {
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
}) })
} else if (this.payType == PAY_TYPE_PDD) {
this.$http('POST', '/agentnew/ajax_add_pddpay', {
shop_name: this.payinfo.account,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
} else if (this.payType == PAY_TYPE_JINGDONG) {
window.open(this.payinfo.authurl, '_blank');
}
},
handleClick(tab, event) {
console.log(tab, event);
}, },
cancle() { cancle() {
this.getPayment(); this.getPayment();
@ -313,48 +182,20 @@ a {
text-decoration: none; text-decoration: none;
color: #006AFF; color: #006AFF;
} }
.register-btns {
// height: 78px;
/* 自动布局 */
// width: 344px;
display: flex;
flex-direction: row;
justify-content: center;
background: #FFFFFF;
padding: 16px 0px;
/* 蓝色阴影_常规 */
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12);
button:nth-child(1) { .gray {
margin-right: 56px; color: #626573 !important;
}
}
.preview {
background: #FAFAFA;
border-radius: 4px;
width: 100%;
height: 100%;
text-align: left;
} }
.preview-title { .mt-18 {
padding-top: 24px; margin-top: 18px;
padding-left: 20px;
} }
.preview-title p { .ml-23 {
font-size: 14px; margin-left: 23px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
color: #1E2226;
} }
.preview-content { .justify-content-space-between {
margin-top: 20px; justify-content: space-between;
margin-left: 20px;
background: #FFFFFF;
width: 100%;
height: 200px;
} }
.beforeNotice { .beforeNotice {
@ -362,6 +203,7 @@ a {
h4 { h4 {
margin: 0; margin: 0;
gap: 8px; gap: 8px;
justify-content: space-between;
} }
margin-bottom: 18px; margin-bottom: 18px;
@ -369,10 +211,8 @@ a {
box-sizing: border-box; box-sizing: border-box;
padding: 20px 14px; padding: 20px 14px;
border-radius: 4px; border-radius: 4px;
/* middle/middle_blue_1 */ /* middle/middle_grey_0 */
background: #F2F7FF; background: #FAFAFA;
/* middle/middle_blue_3 */
border: 1px solid #BFDAFF;
div { div {
margin-top: 2px; margin-top: 2px;
@ -426,6 +266,14 @@ a {
border: 1px solid transparent; border: 1px solid transparent;
} }
.siteMessage h3 {
font-size: 14px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
color: #1E2226;
}
.site-setting-wrap { .site-setting-wrap {
width: 100%; width: 100%;
} }

Loading…
Cancel
Save