Browse Source

payment

pull/59/head
rainbro 7 days ago
parent
commit
94fff5bebe
  1. 100
      src/views/agent/payList.vue

100
src/views/agent/payList.vue

@ -223,40 +223,68 @@
</div> </div>
<GuipDialog :dialogVisible="addPayDialogVisible" :title="addPayTitle" :show-close-button="false" <GuipDialog :dialogVisible="addPayDialogVisible" :title="addPayTitle" :show-close-button="false"
:show-cancel-button="showCancelButton" @confirm="handleConfirm" @cancel="handleCancel" :show-cancel-button="showCancelButton" @confirm="addPayment" @cancel="handleCancel"
@close="handleClose" @dialogVisibleChange="dialogVisibleChange"> @close="handleClose" @dialogVisibleChange="dialogVisibleChange" :confirmText="addPayconfirmText">
<!-- 自定义内容 --> <!-- 自定义内容 -->
<div> <div>
<div class="beforeNotice" v-if="addPayType==0"> <div class="taobaopay" v-if="addPayType==0">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4> <div class="beforeNotice">
<p class="mt12 flex"> <h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4>
请确保使用要添加的淘宝主账号登录并授权 <p class="mt12 flex">
</p> 请确保使用要添加的淘宝主账号登录并授权
<p class="mt10 flex"> </p>
如未购买快乐帮手服务或已过期会跳转到购买服务页面 <p class="mt10 flex">
</p> 如未购买快乐帮手服务或已过期会跳转到购买服务页面
</p>
</div>
</div> </div>
<div class="beforeNotice" v-else-if="addPayType==2">
<h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4> <div class="weixinpay" v-else-if="addPayType==2">
<p class="">1.申请公司微信支付<img src="@/assets/site/form_qua_ic.svg" alt=""> 指南 </p> <div class="beforeNotice">
<p class="mt12 flex"> <h4 class="flex"> <img src="@/assets/site/siteSemInfo_Icon.svg" alt=""> 前期准备事项</h4>
<a href="https://pay.weixin.qq.com/" <p class="mt12">1.申请公司微信支付<a href="https://zhic.yuque.com/staff-chwecz/xhk8nt/ggkqm3" target="_blank"><img src="@/assets/site/form_qua_ic.svg" alt="">常见问题</a> </p>
class="flex" target="_blank"> <p class="mt12 flex">
<img src="@/assets/site/form_linkActive.svg" alt="">前往微信商户平台</a> 2.前往<a href="https://pay.weixin.qq.com/"
</p> class="flex" target="_blank">
<p class="mt10 flex"> <img src="@/assets/site/form_linkActive.svg" alt="">微信商户平台</a>
登录微信商户平台在产品中心开通Native支付如需使用微信版开通JSAPI支付 </p>
</p> <p> 在产品中心开通Native支付如需使用微信版开通JSAPI支付</p>
</div>
<el-form>
<GuipFormItem column="column" class="mb24" label="1. 公司简称">
<span class="desc" slot="formRight">请输入公司简称便于您区分账号所属公司</span>
<GuipInput slot="formDom" ref="GuipInput" column="column"
prop="visit_day" 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"
prop="visit_day" 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密钥注意支付密钥不能设置为纯数字</span>
<GuipInput slot="formDom" ref="GuipInput" column="column"
prop="visit_day" 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"
prop="visit_day" placeholder="请输入">
</GuipInput>
</GuipFormItem>
</el-form>
</div> </div>
<p>这是一个自定义内容的弹框</p>
</div> </div>
</GuipDialog> </GuipDialog>
</div> </div>
</template> </template>
<script> <script>
import GuipButton from '@/components/GuipButton.vue'; import GuipButton from '@/components/GuipButton.vue';
// import GuipFormItem from '@/components/GuipFormItem.vue'; import GuipFormItem from '@/components/GuipFormItem.vue';
// import GuipInput from '@/components/GuipInput.vue'; import GuipInput from '@/components/GuipInput.vue';
// import GuipRadio from '@/components/GuipRadio.vue'; // import GuipRadio from '@/components/GuipRadio.vue';
// import GuipSelect from '@/components/GuipSelect.vue'; // import GuipSelect from '@/components/GuipSelect.vue';
import GuipSwitch from '@/components/GuipSwitch.vue'; import GuipSwitch from '@/components/GuipSwitch.vue';
@ -271,8 +299,8 @@ import GuipTable from '@/components/GuipTable.vue';
export default { export default {
components: { components: {
GuipButton, GuipButton,
// GuipFormItem, GuipFormItem,
// GuipInput, GuipInput,
// GuipRadio, // GuipRadio,
// GuipSelect, // GuipSelect,
// SvgIcon, // SvgIcon,
@ -296,6 +324,8 @@ export default {
showCloseButton: true, // showCloseButton: true, //
addPayTitle: '', addPayTitle: '',
addPayType: '', addPayType: '',
addPayconfirmText: '确定',
taobaoAuthUrl: '',
} }
}, },
computed: { computed: {
@ -318,7 +348,7 @@ export default {
this.tableLoading = false this.tableLoading = false
this.$nextTick(() => { this.$nextTick(() => {
this.addablePays = response.data this.addablePays = response.data
console.log(this.addablePays) this.taobaoAuthUrl = response.data[0].authurl
}) })
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
@ -391,15 +421,19 @@ export default {
this.addPayDialogVisible = true; this.addPayDialogVisible = true;
this.addPayTitle = '添加' + type_desc; this.addPayTitle = '添加' + type_desc;
this.addPayType = type; this.addPayType = type;
if (type == 0) {
this.addPayconfirmText = '去授权';
}
}, },
// //
handleConfirm() { addPayment() {
this.$message.success('点击了确认按钮'); if (this.addPayType == 0) {
this.addPayDialogVisible = false; window.open(this.taobaoAuthUrl, '_blank');
}
this.addPayDialogVisible = false;
}, },
// //
handleCancel() { handleCancel() {
this.$message.warning('点击了取消按钮');
this.addPayDialogVisible = false; this.addPayDialogVisible = false;
}, },
// //
@ -509,8 +543,8 @@ export default {
margin-right: 10px; margin-right: 10px;
img { img {
margin-left: 12px; margin-left: 5px;
margin-right: 12px; margin-right: 5px;
} }
} }
} }

Loading…
Cancel
Save