1.对接进件接口

huipay-master
杨杰 3 years ago
parent b67c67fa43
commit 170d05bc5b
  1. 13
      App.vue
  2. 59
      Utils/Api.js
  3. 2
      Utils/Request.js
  4. 5
      components/yunmiao-jobSelect/yunmiao-jobSelect.vue
  5. 66
      pages/index/business-category/business-category.vue
  6. 1267
      pages/index/merchant-incoming-parts/merchant-incoming-parts.vue
  7. 150
      pages/login/login.vue
  8. 1
      pages/tabBar/home/home.vue
  9. 70
      pages/tabBar/user/user.vue

@ -2,20 +2,21 @@
export default { export default {
globalData: { globalData: {
// url: 'http://192.168.3.4:9301/crest', // url: 'http://192.168.3.4:9301/crest',
// brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/', // imgUrl: 'https://192.168.3.4:9301/filesystem/',
// //
// url: 'https://hsg.dctpay.com/crest', // url: 'https://hsg.dctpay.com/crest',
// imgUrl: 'https://hsg.dctpay.com/filesystem/', // imgUrl: 'https://hsg.dctpay.com/filesystem/',
// imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
// //
url: 'https://hlt.dctpay.com/crest', url: 'https://paycs.dctpay.com/crest',
brestUrl: 'https://hsgcs.dctpay.com/brest', imgUrl: 'https://xuan-pay-private.obs.cn-southwest-2.myhuaweicloud.com',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "", userInfo: "",
openId: '', openId: '',
code: '', code: '',
token: '', token: '',
//id
businessid:'',
//
businessname:''
}, },
} }
</script> </script>

@ -1,14 +1,57 @@
import { import {
POST POST
} from './Request.js'; } from './Request.js';
let app = getApp(); let app = getApp();
let base = app.globalData.url; let base = app.globalData.url;
//H5 获取用户信息 // 登录接口
export const mpLogin = params => { export const userLogin = params => {
return POST('POST', `${base}/wechat/mpLogin`, params).then(res => res.data); return POST('POST', `${base}/login/userLogin`, params).then(res => res.data);
}
//退出登录
export const logout = params => {
return POST('POST', `${base}/login/logout`, params).then(res => res.data);
}
//银行卡识别
export const recognizeBankCard = params => {
return POST('GET', `${base}/ocr/recognizeBankCard`, params).then(res => res.data);
}
//营业执照识别
export const recognizeBusinessLicense = params => {
return POST('GET', `${base}/ocr/recognizeBusinessLicense`, params).then(res => res.data);
}
// 身份证识别【正反面】
export const recognizeIdCard = params => {
return POST('GET', `${base}/ocr/recognizeIdCard`, params).then(res => res.data);
}
// 查询行业
export const getIndustry = params => {
return POST('GET', `${base}/common/getIndustry`, params).then(res => res.data);
}
// 上传商户图片
export const uploadFile = params => {
return POST('POST', `${base}/mer/uploadFile`, params).then(res => res.data);
}
//第一步上传商户信息
export const configMerAccount = params => {
return POST('POST', `${base}/mer/configMerAccount`, params).then(res => res.data);
}
//查询商户详情
export const getMerDetail = params => {
return POST('GET', `${base}/mer/getMerDetail`, params).then(res => res.data);
} }
//查询优惠券 //第二步商户基本信息
export const getDiscountList = params => { export const configMerBasis = params => {
return POST('GET', `${base}/discount/getDiscountList`, params).then(res => res.data); return POST('POST', `${base}/mer/configMerBasis`, params).then(res => res.data);
} }
//第三步商户结算信息
export const configMerSettlement = params => {
return POST('POST', `${base}/mer/configMerSettlement`, params).then(res => res.data);
}
//第四步商户门店信心
export const configMerStore = params => {
return POST('POST', `${base}/mer/configMerStore`, params).then(res => res.data);
}

@ -34,7 +34,7 @@ function request(method, url, data) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/login' url: '/pages/login/login'
}) })
}, 800); }, 2000);
} }
}) })
} }

@ -23,7 +23,7 @@
<view class="page-view"> <view class="page-view">
<view class="class-item"> <view class="class-item">
<view class="item-container"> <view class="item-container">
<view class="thumb-box" v-for="(item1, index1) in item.children" :key="index1" <view class="thumb-box" v-for="(item1, index1) in item.childIndustry" :key="index1"
@click="selval(item1)"> @click="selval(item1)">
<view :class="[value==item1[valueName] ? 'item-active' : '']"> <view :class="[value==item1[valueName] ? 'item-active' : '']">
<text>{{item1[labelName]}}</text> <text>{{item1[labelName]}}</text>
@ -291,6 +291,7 @@
width: 100%; width: 100%;
padding: 0 20rpx; padding: 0 20rpx;
align-items: center; align-items: center;
font-size: 32rpx; font-size: 30rpx;
color: #999999;
} }
</style> </style>

@ -6,6 +6,10 @@
<script> <script>
import jobSelect from '../../../components/yunmiao-jobSelect/yunmiao-jobSelect.vue'; import jobSelect from '../../../components/yunmiao-jobSelect/yunmiao-jobSelect.vue';
import {
getIndustry
} from '../../../Utils/Api.js';
let app = getApp();
export default { export default {
components: { components: {
jobSelect jobSelect
@ -13,53 +17,29 @@
data() { data() {
return { return {
// //
listData: [{ listData: [],
"id": 1,
"name": "餐饮",
"children": [{
"id": 2,
"name": "服务员",
}, {
"id": 3,
"name": "送餐员",
}, {
"id": 4,
"name": "传菜员",
},
{
"id": 5,
"name": "厨师",
}
]
}, {
"id": 6,
"name": "家政保洁",
"children": [{
"id": 7,
"name": "保洁",
}, {
"id": 8,
"name": "保姆",
}, {
"id": 9,
"name": "月嫂",
}]
}, {
"id": 10,
"name": "美容美发",
"children": [{
"id": 11,
"name": "发型师",
}]
}],
} }
}, },
onLoad() {}, onLoad() {
this.getIndustry();
},
methods: { methods: {
confiremJob(e) { //
console.log(e); getIndustry() {
// uni.navigateBack({}) getIndustry().then(res => {
if (res.return_code == '000000') {
this.listData = res.return_data;
}
})
},
//
confiremJob(e) {
app.globalData.businessid = e.id;
app.globalData.businessname = e.name;
uni.navigateBack({})
}, },
} }
} }
</script> </script>

@ -7,18 +7,21 @@
</view> </view>
<!-- 主体表单 --> <!-- 主体表单 -->
<view class="main"> <view class="main">
<wInput v-model="phoneData" type="text" maxlength="11" placeholder="用户名/电话" :focus="isFocus"></wInput> <wInput v-model="phoneData" type="text" placeholder="用户名/电话" :focus="isFocus"></wInput>
<wInput v-model="passData" type="password" maxlength="11" placeholder="密码" isShowPass="true"></wInput> <wInput v-model="passData" type="password" placeholder="密码" isShowPass="true"></wInput>
</view> </view>
<wButton class="wbutton" text="登 录" :rotate="isRotate" @click="startLogin"></wButton> <wButton class="wbutton" text="登 录" :rotate="isRotate" @click="startLogin"></wButton>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
let _this;
import wInput from '../../components/watch-login/watch-input.vue' //input import wInput from '../../components/watch-login/watch-input.vue' //input
import wButton from '../../components/watch-login/watch-button.vue' //button import wButton from '../../components/watch-login/watch-button.vue' //button
import {
userLogin
} from '../../Utils/Api.js';
let app = getApp();
export default { export default {
data() { data() {
return { return {
@ -33,31 +36,44 @@
wButton, wButton,
}, },
mounted() { mounted() {
_this = this; this.isLogin();
//this.isLogin();
}, },
methods: { methods: {
//
isLogin() { isLogin() {
// uni.getStorage({
// try { key: 'payuser',
// const value = uni.getStorageSync('setUserData'); success: (res) => {
// if (value) { app.globalData.userInfo = res.data;
// // uni.getStorage({
// console.log("",value); key: "paytoken",
// _this.$store.dispatch("setUserData",value); // success: (res) => {
// uni.reLaunch({ app.globalData.token = res.data;
// url: '../../../pages/index', uni.reLaunch({
// }); url: '../tabBar/home/home'
// } })
// } catch (e) { }
// // error })
// }
}
});
uni.getStorage({
key: 'loginaccount',
success: (res) => {
this.phoneData = res.data
}
});
uni.getStorage({
key: 'loginpass',
success: (res) => {
this.passData = res.data
}
});
}, },
// //
startLogin(e) { startLogin(e) {
console.log(e) uni.showLoading({
uni.showLoading({ title: '登录中'
title: '登录中'
}); });
if (this.isRotate) { if (this.isRotate) {
// //
@ -79,54 +95,48 @@
}); });
return; return;
} }
_this.isRotate = true this.isRotate = true
setTimeout(function() { let params = {
_this.isRotate = false; loginName: this.phoneData,
password: this.passData
}
userLogin(params).then(res => {
uni.hideLoading(); uni.hideLoading();
uni.reLaunch({ this.isRotate = false;
url: '../tabBar/home/home' if (res.return_code == '000000' && res.return_data) {
}) app.globalData.userInfo = res.return_data
}, 3000) .object
// uni.showLoading({ .secUser;
// title: '' app.globalData.token = res.return_data.uniqueCode;
// }); uni.setStorage({
// getLogin() key: "loginaccount",
// .then(res => { data: this.phoneData
// //console.log(res) })
// // uni.setStorage({
// if(_this.phoneData==res.data.username && _this.passData==res.data.password){ key: "loginpass",
// let userdata={ data: this.passData
// "username":res.data.username, })
// "nickname":res.data.nickname, uni.setStorage({
// "accesstoken":res.data.accesstoken, key: "payuser",
// } //accesstoken data: res.return_data
// _this.$store.dispatch("setUserData",userdata); // .object
// try { .secUser
// uni.setStorageSync('setUserData', userdata); // })
// } catch (e) { uni.setStorage({
// // error key: "paytoken",
// } data: res.return_data.uniqueCode
// uni.showToast({ })
// icon: 'success', uni.reLaunch({
// position: 'bottom', url: '../tabBar/home/home'
// title: '' })
// }); } else {
// uni.reLaunch({ uni.showToast({
// url: '../../../pages/index', title: res.return_msg,
// }); icon: 'none',
// }else{ duration: 2000
// _this.passData="" })
// uni.showToast({ }
// icon: 'error', })
// position: 'bottom',
// title: 'adminadmin'
// });
// }
// uni.hideLoading();
// }).catch(err => {
// uni.hideLoading();
// })
} }
} }
} }

@ -85,7 +85,6 @@
}; };
}, },
onLoad() { onLoad() {
this.getDiscountList();
}, },
methods: { methods: {
getDiscountList() { getDiscountList() {

@ -4,18 +4,21 @@
<view class="width94 fcor333 font16 paddtop10">谷润科技</view> <view class="width94 fcor333 font16 paddtop10">谷润科技</view>
<view class="width94 fcor999 font14 paddtop10">1551243232</view> <view class="width94 fcor999 font14 paddtop10">1551243232</view>
<view class="width94 fcor999 font14 paddtop10">名称超级管理员</view> <view class="width94 fcor999 font14 paddtop10">名称超级管理员</view>
</view> </view>
<view class="width100 backcorfff mart15"> <view class="width100 backcorfff mart15">
<view class="notes"> <view class="notes">
<view class="fcor666 width90p">结算银行账户</view> <view class="fcor666 width90p">结算银行账户</view>
<image src="../../../static/img/jtg.png" mode="widthFix" class="iconw"></image> <image src="../../../static/img/jtg.png" mode="widthFix" class="iconw"></image>
</view> </view>
</view> </view>
<wButton class="mart60" text="退 出 登 录" bgColor="#089bf5" :rotate="isRotate" @click="exitLogin"></wButton> <wButton class="mart60" text="退 出 登 录" bgColor="#089bf5" :rotate="isRotate" @click="exitLogin"></wButton>
</view> </view>
</template> </template>
<script> <script>
import wButton from '../../../components/watch-login/watch-button.vue' //button import wButton from '../../../components/watch-login/watch-button.vue' //button
import {
logout
} from '../../../Utils/Api.js';
let app = getApp(); let app = getApp();
export default { export default {
components: { components: {
@ -32,13 +35,37 @@
methods: { methods: {
//退 //退
exitLogin() { exitLogin() {
this.isRotate = true uni.showModal({
setTimeout(function() { title: '退出登录',
uni.reLaunch({ content: '是否确认退出当前账号',
url: '../../login/login' success: (res) => {
}) if (res.confirm) {
this.isRotate = false; uni.showLoading({
}, 3000) title: '退出中...'
})
this.isRotate = true;
logout().then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.isRotate = false;
app.globalData.userInfo = '';
app.globalData.token = '';
uni.removeStorage({
key: "payuser"
})
uni.removeStorage({
key: "paytoken"
})
uni.reLaunch({
url: '../../login/login'
})
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} }
} }
} }
@ -46,12 +73,13 @@
<style lang="scss"> <style lang="scss">
page { page {
background-color: #f6f6f6; background-color: #f6f6f6;
} }
.notes {
width: calc(100% - 40rpx); .notes {
display: flex; width: calc(100% - 40rpx);
align-items: center; display: flex;
padding: 30rpx 0 30rpx 20rpx; align-items: center;
border-bottom: 1px solid #f6f6f6; padding: 30rpx 0 30rpx 20rpx;
border-bottom: 1px solid #f6f6f6;
} }
</style> </style>

Loading…
Cancel
Save