diff --git a/common/js/api.js b/common/js/api.js index 720bf29..4eb9436 100644 --- a/common/js/api.js +++ b/common/js/api.js @@ -42,7 +42,7 @@ export default { return uni.api.post("user/subopeninvoicefixed", data); }, szzpyfailccho(data) { //开票审核失败回显 - return uni.api.post("szzpy/failccho", data,false); + return uni.api.post("szzpy/failccho", data, false); }, storeinvoicingrecordsthatneed(data) { //开票记录(固定开票) return uni.api.post("store/invoicingrecordsthatneed", data); @@ -86,7 +86,7 @@ export default { szzpyhurl(data) { return uni.api.post("szzpy/h5url", data); }, - szzpygetprovinceno(data) {//地区 + szzpygetprovinceno(data) { //地区 return uni.api.post("szzpy/getprovinceno", data); }, storebindinginvopush(data) { @@ -102,12 +102,12 @@ export default { return uni.api.post("user/getwechatjssdk", data); }, h5encryption(data) { - return uni.api.post("store/h5encryption", data); + return uni.api.post("store/h5encryption", data, false); }, hfivegetstoreinfo(data) { return uni.api.post("hfive/getstoreinfo", data, false); }, - storestoreinfo(data) {//固定开票的接口上传 + storestoreinfo(data) { //固定开票的接口上传 return uni.api.post("store/storeinfo", data); }, @@ -148,13 +148,13 @@ export default { return uni.api.post("hfive/setdefault", data); }, invoicedorderlist(data) { //订单列表 - return uni.api.post("hfive/invoicedorderlist", data,false); + return uni.api.post("hfive/invoicedorderlist", data, false); }, hfivestatuslist(data) { //订单列表 return uni.api.post("hfive/statuslist", data); }, invoicingrecordsthatneed(data) { //审核开票记录 - return uni.api.post("hfive/invoicingrecordsthatneed", data,false); + return uni.api.post("hfive/invoicingrecordsthatneed", data, false); }, newissuedbyliststatus(data) { //开票人列表(带状态) return uni.api.post("hfive/newissuedbyliststatus", data); @@ -190,6 +190,21 @@ export default { return uni.api.post("user/judgeuseridentity", data); }, getrulelist(data) { //菜单列表 - return uni.api.post("store/getrulelist", data,false); + return uni.api.post("store/getrulelist", data, false); + }, + usersetuserpwd(data) { //设置/修改密码 + return uni.api.post("user/setuserpwd", data); + }, + userswitchstore(data) { //切换商户 + return uni.api.post("user/switchstore", data); + }, + kstorelist(data) { //开票人商户列表 + return uni.api.post("user/kstorelist", data); + }, + userforgetpwd(data) { //修改密码 + return uni.api.post("user/forgetpwd", data); + }, + userminidymessage(data) { //订阅消息 + return uni.api.post("user/minidymessage", data); }, } \ No newline at end of file diff --git a/pages.json b/pages.json index 4a62256..4815054 100644 --- a/pages.json +++ b/pages.json @@ -31,6 +31,18 @@ "navigationBarTextStyle": "black", "navigationStyle": "custom" } + }, { + "path": "pages/login/switch", + "style": { + "navigationBarTitleText": "切换商户", + "navigationStyle": "custom" + } + }, { + "path": "pages/login/repairpassword", + "style": { + "navigationBarTextStyle": "white", + "navigationStyle": "custom" + } }, { "path": "pages/index/information", "style": { @@ -182,6 +194,12 @@ "style": { "navigationBarTitleText": "审核开票" } + }, { + "path": "pages/webview/index", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom" + } }, { "path": "pages/webview/webview", "style": { diff --git a/pages/electric/issuer.vue b/pages/electric/issuer.vue index ce759d7..a2a7438 100644 --- a/pages/electric/issuer.vue +++ b/pages/electric/issuer.vue @@ -48,6 +48,12 @@ + + 电子税务局 + 个人所得税 + {{formCode.text}} @@ -90,9 +96,10 @@ - 开票人登记信息 - + 开票人登记信息 + + + @@ -190,8 +197,9 @@ regionshow: false, //省份显示 // 注册定时器 初始值 second: 60, - showText: true, + showText: false, Recapture: '发送验证码', + accountqrcodetype: 1, form: { user_name: '', time: "", @@ -202,8 +210,6 @@ }, addform: {}, region: [], //省份 - - } }, async onLoad() { @@ -281,6 +287,7 @@ // 人脸前获取验证码 async accountqrcode() { let res = await this.api.accountqrcode({ + type: this.accountqrcodetype, id: this.loginid }) if (res.data.url) { @@ -609,6 +616,24 @@ border-radius: 24rpx 24rpx 24rpx 24rpx; padding: 28rpx 32rpx; + .tabs { + text { + margin-left: 10rpx; + font-size: 34rpx; + text-align: center; + margin: 16rpx; + } + + text:nth-child(1) { + margin-left: 0; + } + + .tabsselect { + color: #318afe; + font-weight: bold; + } + } + .messageboxtop { padding: 10rpx 0; font-family: Source Han Sans CN, Source Han Sans CN; diff --git a/pages/electric/orderinquiry.vue b/pages/electric/orderinquiry.vue index 3b51a42..183e0a4 100644 --- a/pages/electric/orderinquiry.vue +++ b/pages/electric/orderinquiry.vue @@ -81,6 +81,14 @@ 开票税额 {{details.tax_amount}} + + 邮箱 + {{details.email}} + + + 手机号 + {{details.mobile}} + 发票状态 {{details.status}} @@ -92,15 +100,15 @@ PDF版式文件 - 下载 + 下载 OFD版式文件 - 下载 + 下载 XML版式文件 - 下载 + 下载 @@ -218,14 +226,30 @@ }, // 下载 downloadFile(url) { + // uni.downloadFile({ + // url: url, //仅为示例,并非真实的资源 + // success: (res) => { + // if (res.statusCode === 200) { + // console.log('下载成功'); + // } + // } + // }); uni.downloadFile({ - url: url, //仅为示例,并非真实的资源 - success: (res) => { + url: url, + success: res => { + console.log(res) if (res.statusCode === 200) { - console.log('下载成功'); + // 预览pdf文件 + uni.openDocument({ + filePath: res.tempFilePath, + showMenu: true, // 右上角菜单,可以进行分享保存pdf + success: function(file) { + console.log("文件打开成功", file) + } + }) } } - }); + }) }, clickdatastatuslist(item, index) { this.datastatuslistshow = item.id diff --git a/pages/electric/toexamine.vue b/pages/electric/toexamine.vue index 8854cd1..e06c9ff 100644 --- a/pages/electric/toexamine.vue +++ b/pages/electric/toexamine.vue @@ -43,7 +43,9 @@ 详情 - + + + @@ -79,6 +81,14 @@ 开票税额 {{details.tax_amount}} + + 邮箱 + {{details.email}} + + + 手机号 + {{details.mobile}} + 发票状态 {{details.status}} @@ -90,15 +100,15 @@ PDF版式文件 - 下载 + 下载 OFD版式文件 - 下载 + 下载 XML版式文件 - 下载 + 下载 @@ -294,14 +304,30 @@ }, // 下载 downloadFile(url) { + // uni.downloadFile({ + // url: url, //仅为示例,并非真实的资源 + // success: (res) => { + // if (res.statusCode === 200) { + // console.log('下载成功'); + // } + // } + // }); uni.downloadFile({ - url: url, //仅为示例,并非真实的资源 - success: (res) => { + url: url, + success: res => { + console.log(res) if (res.statusCode === 200) { - console.log('下载成功'); + // 预览pdf文件 + uni.openDocument({ + filePath: res.tempFilePath, + showMenu: true, // 右上角菜单,可以进行分享保存pdf + success: function(file) { + console.log("文件打开成功", file) + } + }) } } - }); + }) } } } diff --git a/pages/hindex/index.vue b/pages/hindex/index.vue index 18e7c7c..fdbc68d 100644 --- a/pages/hindex/index.vue +++ b/pages/hindex/index.vue @@ -94,7 +94,7 @@ 微信抬头一键导入 - 确定 + 确定 @@ -334,7 +334,99 @@ } }); }, - async saveMerchantBaseInfo() { + requestSubscribeMessage() { + var this_ = this + var tmplIds = 'LQ4X2dgvpxC6iuZhbxv8qtqVWT9_DFEBPxu-PmggjfY' + uni.getSetting({ + withSubscriptions: true, + success(res) { + // 调起授权界面弹窗 + if (res.subscriptionsSetting.mainSwitch) { // 用户打开了订阅消息总开关 + if (res.subscriptionsSetting.itemSettings != + null) { // 用户同意总是保持是否推送消息的选择, 这里表示以后不会再拉起推送消息的授权 + let moIdState = res.subscriptionsSetting.itemSettings[tmplIds]; // 用户同意的消息模板id + if (moIdState === 'accept') { + uni.requestSubscribeMessage({ // 调起消息订阅界面 + tmplIds: [tmplIds], + success(res) { + if (res[tmplIds] == 'accept') { + this_.overlayshowclick(1) + } else if (res[tmplIds] == 'reject') { + this_.overlayshowclick(0) + } else if (res[tmplIds] == 'ban') { + this_.overlayshowclick(0) + } else if (res[tmplIds] == 'accept') { + this_.overlayshowclick(0) + } else { + this_.overlayshowclick(0) + } + }, + fail(er) { + this_.overlayshowclick(0) + console.log(er); + } + }) + + } else if (moIdState === 'reject') { + console.log("拒绝消息推送"); + this_.overlayshowclick(0) + + } else if (moIdState === 'ban') { + console.log("已被后台封禁"); + this_.overlayshowclick(0) + } + } else { + // 当用户没有点击 ’总是保持以上选择,不再询问‘ 按钮。那每次执到这都会拉起授权弹窗 + uni.showModal({ + title: '提示', + content: '请授权开通服务通知', + showCancel: true, + success: function(ress) { + if (ress.confirm) { + // console.log('用户点击确定') + uni.requestSubscribeMessage({ // 调起消息订阅界面 + tmplIds: [tmplIds], + success(res) { + if (res[tmplIds] == 'accept') { + this_.overlayshowclick(1) + } else if (res[tmplIds] == 'reject') { + this_.overlayshowclick(0) + } else if (res[tmplIds] == 'ban') { + this_.overlayshowclick(0) + } else if (res[tmplIds] == 'accept') { + this_.overlayshowclick(0) + } else { + this_.overlayshowclick(0) + } + }, + fail(er) { + this_.overlayshowclick(0) + console.log(er); + } + }) + + } else if (ress.cancel) { + this_.overlayshowclick(0) + } + } + }) + } + } else { + this_.overlayshowclick(0) + } + } + }) + }, + async overlayshowclick(e) { + try { + if (e == 1) { + await this.api.userminidymessage({ + open_id: this.form.open_id, + }) + } + } catch (e) { + //TODO handle the exception + } if (this.form.user_name == null || this.form.user_name == '') { uni.showToast({ title: '请输入名称', diff --git a/pages/hindex/indexs.vue b/pages/hindex/indexs.vue index 6fbac46..fa40319 100644 --- a/pages/hindex/indexs.vue +++ b/pages/hindex/indexs.vue @@ -64,7 +64,7 @@ 拒绝理由:{{form.no|| '无'}} - + 确定 @@ -204,7 +204,99 @@ } }); }, - async saveMerchantBaseInfo() { + requestSubscribeMessage() { + var this_ = this + var tmplIds = 'LQ4X2dgvpxC6iuZhbxv8qtqVWT9_DFEBPxu-PmggjfY' + uni.getSetting({ + withSubscriptions: true, + success(res) { + // 调起授权界面弹窗 + if (res.subscriptionsSetting.mainSwitch) { // 用户打开了订阅消息总开关 + if (res.subscriptionsSetting.itemSettings != + null) { // 用户同意总是保持是否推送消息的选择, 这里表示以后不会再拉起推送消息的授权 + let moIdState = res.subscriptionsSetting.itemSettings[tmplIds]; // 用户同意的消息模板id + if (moIdState === 'accept') { + uni.requestSubscribeMessage({ // 调起消息订阅界面 + tmplIds: [tmplIds], + success(res) { + if (res[tmplIds] == 'accept') { + this_.overlayshowclick(1) + } else if (res[tmplIds] == 'reject') { + this_.overlayshowclick(0) + } else if (res[tmplIds] == 'ban') { + this_.overlayshowclick(0) + } else if (res[tmplIds] == 'accept') { + this_.overlayshowclick(0) + } else { + this_.overlayshowclick(0) + } + }, + fail(er) { + this_.overlayshowclick(0) + console.log(er); + } + }) + + } else if (moIdState === 'reject') { + console.log("拒绝消息推送"); + this_.overlayshowclick(0) + + } else if (moIdState === 'ban') { + console.log("已被后台封禁"); + this_.overlayshowclick(0) + } + } else { + // 当用户没有点击 ’总是保持以上选择,不再询问‘ 按钮。那每次执到这都会拉起授权弹窗 + uni.showModal({ + title: '提示', + content: '请授权开通服务通知', + showCancel: true, + success: function(ress) { + if (ress.confirm) { + // console.log('用户点击确定') + uni.requestSubscribeMessage({ // 调起消息订阅界面 + tmplIds: [tmplIds], + success(res) { + if (res[tmplIds] == 'accept') { + this_.overlayshowclick(1) + } else if (res[tmplIds] == 'reject') { + this_.overlayshowclick(0) + } else if (res[tmplIds] == 'ban') { + this_.overlayshowclick(0) + } else if (res[tmplIds] == 'accept') { + this_.overlayshowclick(0) + } else { + this_.overlayshowclick(0) + } + }, + fail(er) { + this_.overlayshowclick(0) + console.log(er); + } + }) + + } else if (ress.cancel) { + this_.overlayshowclick(0) + } + } + }) + } + } else { + this_.overlayshowclick(0) + } + } + }) + }, + async overlayshowclick(e) { + try { + if (e == 1) { + await this.api.userminidymessage({ + open_id: this.form.open_id, + }) + } + } catch (e) { + //TODO handle the exception + } if (this.form.user_name == null || this.form.user_name == '') { uni.showToast({ title: '请输入名称', diff --git a/pages/hindex/invodetail.vue b/pages/hindex/invodetail.vue index 0ce2911..03fdcbb 100644 --- a/pages/hindex/invodetail.vue +++ b/pages/hindex/invodetail.vue @@ -33,9 +33,18 @@ {{ datalsit.ktime }} - - 联系商家 - + + + + + + @@ -86,9 +95,15 @@ } }, makePhoneCall(e) { - uni.makePhoneCall({ - phoneNumber: e.store_mobile //仅为示例 - }); + // uni.navigateTo({ + // url: '/pages/webview/index' + // }) + uni.openCustomerServiceChat({ + corpId: 'wwc76ab19fa6df267f', + success(res) { + console.log('成功了', res) + } + }) }, savealbum(e) { uni.pro.navigateBack(); @@ -151,6 +166,20 @@ .content { padding: 32rpx 28rpx; + .contactbutton { + margin: 40rpx 0; + padding: 0; + outline: none; + border-radius: 0; + background-color: transparent; + line-height: inherit; + color: #3088fd; + + &::after { + border: none; + } + } + .content_boxtop { padding: 22rpx 16rpx; background: #ffffff; diff --git a/pages/index/auditbilling.vue b/pages/index/auditbilling.vue index 5a60e55..19d4297 100644 --- a/pages/index/auditbilling.vue +++ b/pages/index/auditbilling.vue @@ -201,6 +201,7 @@ background: #FFFFFF; .contentboxitemtop { + flex-wrap: nowrap; padding-bottom: 18rpx; border-bottom: 1rpx solid #E3E3E3; diff --git a/pages/index/index.vue b/pages/index/index.vue index 489a685..c26314c 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -16,6 +16,11 @@ 票 + + 我是商家 + @@ -48,6 +53,14 @@ --> + + {{improveinformationform.store.title}} + 切换商户 + + - + + 登录 - + 《隐私政策》 + --> + + 忘记密码 + + + + 我是用户 @@ -76,7 +84,9 @@ if (token.code == 1) { uni.cache.set('token', token.data.token); uni.cache.set('store_status', 1); - uni.pro.navigateTo('index/index'); + uni.navigateTo({ + url: '/pages/index/index?restype=' + 1 + }) } } }, @@ -117,6 +127,19 @@ // 切换图片显示隐藏 this.showPassword = !this.showPassword; }, + quyonghu() { + uni.reLaunch({ + url: '/pages/index/index?restype=' + 2 + }); + // uni.navigateTo({ + // url: '/pages/index/index?restype=' + 2 + // }) + }, + clickpassword() { + uni.navigateTo({ + url:'/pages/login/password' + }) + }, async userlogin() { if (this.form.account == null || this.form.account == '') { uni.showToast({ @@ -125,23 +148,41 @@ }); return false; } - if (this.form.captcha == null || this.form.captcha == '') { + if (this.form.password == null || this.form.password == '') { uni.showToast({ - title: '请输入验证码', + title: '请输入密码', icon: 'none' }); return false; } + // if (this.form.captcha == null || this.form.captcha == '') { + // uni.showToast({ + // title: '请输入验证码', + // icon: 'none' + // }); + // return false; + // } let res = await this.api.userlogin({ account: this.form.account, - captcha: this.form.captcha, + password: this.form.password, open_id: uni.cache.get('open_id'), }) uni.cache.set('userId', res.data.userinfo.store_id); uni.cache.set('logintoken', res.data.userinfo.token); uni.cache.set('store_status', res.data.store_status); + uni.cache.set('userinfo', res.data.userinfo); uni.cache.set('Type', res.data.type); - uni.pro.navigateTo('index/index'); + uni.cache.set('set_pwd', res.data.set_pwd); + if (res.data.set_pwd == 1) { + uni.navigateTo({ + url: '/pages/login/repairpassword' + }) + } else { + uni.reLaunch({ + url: '/pages/index/index?restype=' + 1 + }); + } + } } } @@ -187,6 +228,7 @@ .repeat { position: absolute; + z-index: 99; bottom: 26rpx; right: 0; width: 25rpx; @@ -234,8 +276,10 @@ } .agreement { + text-align: right; + width: 570rpx; margin-top: 14rpx; - font-size: 20rpx; + font-size: 24rpx; font-family: Source Han Sans CN-Medium, Source Han Sans CN; font-weight: 500; color: #7c8e97; diff --git a/pages/login/password.vue b/pages/login/password.vue index f1ee6e2..71a55e6 100644 --- a/pages/login/password.vue +++ b/pages/login/password.vue @@ -1,210 +1,253 @@ + \ No newline at end of file diff --git a/pages/login/repairpassword.vue b/pages/login/repairpassword.vue new file mode 100644 index 0000000..c86b14c --- /dev/null +++ b/pages/login/repairpassword.vue @@ -0,0 +1,251 @@ + + + + \ No newline at end of file diff --git a/pages/login/switch.vue b/pages/login/switch.vue new file mode 100644 index 0000000..1e9c468 --- /dev/null +++ b/pages/login/switch.vue @@ -0,0 +1,167 @@ + + + + \ No newline at end of file diff --git a/pages/webview/index.vue b/pages/webview/index.vue new file mode 100644 index 0000000..785d912 --- /dev/null +++ b/pages/webview/index.vue @@ -0,0 +1,18 @@ + + + \ No newline at end of file