10 Commits
wwz ... wwz_wx

Author SHA1 Message Date
wwz
2fb7c3683e 开票失败 2025-04-12 16:12:09 +08:00
wwz
d7eabb34d9 更改 返回验证码错误 2025-02-26 15:46:05 +08:00
wwz
38e0f9d222 1 2025-01-03 18:43:07 +08:00
魏啾
eddd7b949e 扫码进来按钮 2024-12-27 14:48:26 +08:00
wwz
71a8f48e70 增加详情中的创建时间 2024-12-25 17:12:54 +08:00
wwz
6e174be3b2 扫码或复制链接至浏览器下载 2024-12-24 17:41:28 +08:00
wwz
82d4aa5f6c 1 2024-12-13 14:30:13 +08:00
魏啾
4d1d6f0425 输入手机号数字 2024-11-25 13:54:51 +08:00
魏啾
2cbc3fa65f 更改手机号只可以输入数字 2024-11-25 13:54:09 +08:00
魏啾
bfd37cddf5 wx 2024-11-23 13:55:01 +08:00
27 changed files with 1625 additions and 428 deletions

View File

@@ -102,7 +102,7 @@ export default {
return uni.api.post("user/getwechatjssdk", data); return uni.api.post("user/getwechatjssdk", data);
}, },
h5encryption(data) { h5encryption(data) {
return uni.api.post("store/h5encryption", data); return uni.api.post("store/h5encryption", data, false);
}, },
hfivegetstoreinfo(data) { hfivegetstoreinfo(data) {
return uni.api.post("hfive/getstoreinfo", data, false); return uni.api.post("hfive/getstoreinfo", data, false);
@@ -192,6 +192,27 @@ export default {
getrulelist(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);
},
monthssearch(data) { //根据月份查询
return uni.api.post("hfive/monthssearch", data);
},
researhqrcode(data) { //查询人脸认证结果
return uni.api.post("hfive/researhqrcode", data);
},
checkqrcodestatus(data) { //检查二维码状态 checkqrcodestatus(data) { //检查二维码状态
return uni.api.post("user/checkqrcodestatus", data); return uni.api.post("user/checkqrcodestatus", data);
}, },

View File

@@ -80,7 +80,7 @@
// // #endif // // #endif
shownav: { shownav: {
type: Boolean, type: Boolean,
default: false default: true
}, },
title: { title: {
type: String, type: String,

View File

@@ -5,9 +5,9 @@ const proxyApi = "/api/"
// #ifdef H5 // #ifdef H5
// const baseUrl = debug ? proxyApi : "https://invoice.sxczgkj.cn/api" // const baseUrl = debug ? proxyApi : "https://invoice.sxczgkj.cn/api"
const baseUrl = 'https://invoice.sxczgkj.cn/api/' //正式 // const baseUrl = 'https://invoice.sxczgkj.cn/api/' //正式
// const baseUrl = 'http://192.168.1.6:8888/api/'//本地 // const baseUrl = 'http://192.168.1.6:8888/api/'//本地
// const baseUrl = 'https://test.invoice.sxczgkj.cn/api/'//测试 const baseUrl = 'https://test.invoice.sxczgkj.cn/api/'//测试
// import VConsole from "./vConsole.js" // import VConsole from "./vConsole.js"
if (debug) { if (debug) {
// new VConsole() // new VConsole()

View File

@@ -9,7 +9,7 @@ uni.pro.interceptor('request', {
return options return options
}, },
success(res) { success(res) {
if (res.data.code == 1) { if (res.code >= 400) {
return res.data return res.data
} else { } else {
return res.data return res.data
@@ -71,10 +71,25 @@ async function request(options) {
// #endif // #endif
if (res.code != 1) { if (res.code != 1) {
if (options.toast) { if (options.toast) {
uni.showToast({ try {
title: res.message || res.msg, if (res.msg.length > 10 || res.message.length > 10) {
icon: "none", uni.showModal({
}) title: '提示', //标题
content: res.message || res.msg,
showCancel: false //不显示取消按钮
})
} else {
uni.showToast({
title: res.message || res.msg,
icon: "none",
})
}
} catch (error) {
uni.showToast({
title: res.message || res.msg,
icon: "none",
})
}
setTimeout(res => { setTimeout(res => {
uni.hideLoading() uni.hideLoading()
}, 1000) }, 1000)

View File

@@ -31,6 +31,18 @@
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, {
"path": "pages/login/switch",
"style": {
"navigationBarTitleText": "切换商户",
"navigationStyle": "custom"
}
}, {
"path": "pages/login/repairpassword",
"style": {
"navigationBarTextStyle": "white",
"navigationStyle": "custom"
}
}, { }, {
"path": "pages/index/information", "path": "pages/index/information",
"style": { "style": {
@@ -182,6 +194,12 @@
"style": { "style": {
"navigationBarTitleText": "审核开票" "navigationBarTitleText": "审核开票"
} }
}, {
"path": "pages/webview/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}, { }, {
"path": "pages/webview/webview", "path": "pages/webview/webview",
"style": { "style": {

View File

@@ -101,8 +101,10 @@
<view class="addshowboxinput_inp flex-between"> <view class="addshowboxinput_inp flex-between">
<view class="listinput_leftrelative"> <view class="listinput_leftrelative">
<text class="leftrelativetext">{{addform.lslbsname}}</text> <text class="leftrelativetext">{{addform.lslbsname}}</text>
<u-icon style="padding-right: 16rpx;" :name="selectshowlslbs?'arrow-up':'arrow-down'" <view style="padding-right: 16rpx;">
color="#999999" size="14"></u-icon> <u-icon :name="selectshowlslbs?'arrow-up':'arrow-down'"
color="#999999" size="14"></u-icon>
</view>
<view class="listinput_leftabsolute" v-if="selectshowlslbs"> <view class="listinput_leftabsolute" v-if="selectshowlslbs">
<view v-for="(item,index) in lslbslist.lslbs" :key="index" <view v-for="(item,index) in lslbslist.lslbs" :key="index"
:class="addform.lslbs == item.id?'class':''" @click="taxexempttype(item,index)"> :class="addform.lslbs == item.id?'class':''" @click="taxexempttype(item,index)">
@@ -118,9 +120,11 @@
<view class="addshowboxinput_inp flex-between"> <view class="addshowboxinput_inp flex-between">
<view class="listinput_leftrelative"> <view class="listinput_leftrelative">
<text class="leftrelativetext">{{addform.tax_ratename}}</text> <text class="leftrelativetext">{{addform.tax_ratename}}</text>
<u-icon style="padding-right: 16rpx;" <view style="padding-right: 16rpx;">
:name="taxrateselectionshow?'arrow-up':'arrow-down'" color="#999999" <u-icon style="padding-right: 16rpx;"
size="14"></u-icon> :name="taxrateselectionshow?'arrow-up':'arrow-down'" color="#999999"
size="14"></u-icon>
</view>
<view class="listinput_leftabsolute" v-if="taxrateselectionshow"> <view class="listinput_leftabsolute" v-if="taxrateselectionshow">
<view v-for="(item,index) in lslbslist.taxrateselection" :key="index" <view v-for="(item,index) in lslbslist.taxrateselection" :key="index"
:class="addform.tax_rate == item.id?'class':''" :class="addform.tax_rate == item.id?'class':''"
@@ -136,8 +140,11 @@
<view class="addshowboxinput_inp flex-between"> <view class="addshowboxinput_inp flex-between">
<view class="listinput_leftrelative"> <view class="listinput_leftrelative">
<text class="leftrelativetext">{{addform.zzstsgl}}</text> <text class="leftrelativetext">{{addform.zzstsgl}}</text>
<u-icon style="padding-right: 16rpx;" :name="zzstsglshow?'arrow-up':'arrow-down'" <view style="padding-right: 16rpx;">
color="#999999" size="14"></u-icon> <u-icon :name="zzstsglshow?'arrow-up':'arrow-down'"
color="#999999" size="14"></u-icon>
</view>
<view class="listinput_leftabsolute" v-if="zzstsglshow"> <view class="listinput_leftabsolute" v-if="zzstsglshow">
<view v-for="(item,index) in lslbslist.zzstsgl" :key="index" <view v-for="(item,index) in lslbslist.zzstsgl" :key="index"
:class="addform.zzstsgl == item.id?'class':''" @click="zzstsgltype(item,index)"> :class="addform.zzstsgl == item.id?'class':''" @click="zzstsgltype(item,index)">

View File

@@ -7,7 +7,7 @@
</view> </view>
<view class="contenttopbox flex-center"> <view class="contenttopbox flex-center">
<text @click="form.type = '-1',form.page = '1',form.user_name = '',invoicingrecordsthatneed()" <text @click="form.type = '-1',form.page = '1',form.user_name = '',invoicingrecordsthatneed()"
:class="form.type == '-1'?'classtext':''">处理</text> :class="form.type == '-1'?'classtext':''">审核</text>
<text @click="form.type = '1',form.page = '1',form.user_name = '',invoicingrecordsthatneed()" <text @click="form.type = '1',form.page = '1',form.user_name = '',invoicingrecordsthatneed()"
:class="form.type == '1'?'classtext':''">已处理</text> :class="form.type == '1'?'classtext':''">已处理</text>
@@ -38,7 +38,7 @@
<text>开票凭证</text> <text>开票凭证</text>
<image :src="item.img" mode="aspectFill"></image> <image :src="item.img" mode="aspectFill"></image>
</view> </view>
<view v-if="item.status == '-1'" class="contentboxitembutton flex-center"> <view v-if="item.status == '待审核'" class="contentboxitembutton flex-center">
<view class="buttonone" @click="storereviewandinvoicing(item,1)"> <view class="buttonone" @click="storereviewandinvoicing(item,1)">
通过 通过
</view> </view>

View File

@@ -81,7 +81,7 @@
</view> </view>
<view class="listinput flex-between"> <view class="listinput flex-between">
<view class="listinput_left"> <view class="listinput_left">
<input type="text" v-model="form.xflxdh" placeholder="请输电话" /> <input type="number" v-model="form.xflxdh" placeholder="请输电话" />
</view> </view>
</view> </view>
<view class="listinput flex-between"> <view class="listinput flex-between">
@@ -103,7 +103,7 @@
</view> </view>
<!-- <view class="listinput flex-between"> <!-- <view class="listinput flex-between">
<view class="listinput_left"> <view class="listinput_left">
<input type="number" v-model="form.mobile" placeholder="请输入手机号" /> <input type="text" v-model="form.mobile" placeholder="请输入手机号" />
</view> </view>
</view> --> </view> -->
<view class="listinput flex-between"> <view class="listinput flex-between">

View File

@@ -24,7 +24,7 @@
</view> </view>
<view class="contentlistitem flex-between"> <view class="contentlistitem flex-between">
<text class="contentlistitemone">地址</text> <text class="contentlistitemone">地址</text>
<text class="contentlistitemtow">{{blueticket.store.businessAddress}}</text> <text class="contentlistitemtow">{{monthssearchlist.title}}</text>
</view> </view>
</view> </view>
<view class="contentlist"> <view class="contentlist">
@@ -64,6 +64,45 @@
<text class="contentlistitemtow">{{blueticket.xj.zsxed}}</text> <text class="contentlistitemtow">{{blueticket.xj.zsxed}}</text>
</view> </view>
</view> </view>
<view class="contentlist" style=" margin-bottom: 80prx;">
<view class="contentlisttitle flex-between">
<view>
开票统计
</view>
<view class="flex-start" @click="showpickeshow = true">
<text style="font-size: 30rpx;">{{date}}</text>
<view style="margin-left: 14rpx;">
<u-icon name="arrow-right" color="#909399" size="18"></u-icon>
</view>
</view>
</view>
<view class="contentlistitem flex-between" style="margin-top: 32rpx;">
<text class="contentlistitemone">类型</text>
<text class="contentlistitemtow">{{monthssearchlist.invo_type}}</text>
</view>
<view class="contentlistitem flex-between">
<text class="contentlistitemone">已开金额</text>
<text class="contentlistitemtow">{{monthssearchlist.d_price}}</text>
</view>
<view class="contentlistitem flex-between">
<text class="contentlistitemone">已开税额</text>
<text class="contentlistitemtow">{{monthssearchlist.tax_amount}}</text>
</view>
<view class="contentlistitem flex-between">
<text class="contentlistitemone">价税合计</text>
<text class="contentlistitemtow">{{monthssearchlist.price}}</text>
</view>
<view class="contentlistitem flex-between">
<text class="contentlistitemone">开票成功()</text>
<text class="contentlistitemtow">{{monthssearchlist.ok_number}}</text>
</view>
<view class="contentlistitem flex-between">
<text class="contentlistitemone">开票总数()</text>
<text class="contentlistitemtow">{{monthssearchlist.number}}</text>
</view>
</view>
<u-datetime-picker :show="showpickeshow" v-model="datetimemodel" @confirm='confirmdate' mode="year-month"
@cancel='showpickeshow =false'></u-datetime-picker>
<!-- <view class="contentbotton"> <!-- <view class="contentbotton">
<view class="contentbottontitle flex-between"> <view class="contentbottontitle flex-between">
<text class="contentbottontitleone">最近开票申请</text> <text class="contentbottontitleone">最近开票申请</text>
@@ -74,25 +113,41 @@
</template> </template>
<script> <script>
import dayjs from 'dayjs'
export default { export default {
data() { data() {
return { return {
swiperlist: [ swiperlist: [
'https://shuzu-download.oss-cn-shanghai.aliyuncs.com/advertise/2024-05-08-10-52-th-663ae8fc73220.png' 'https://shuzu-download.oss-cn-shanghai.aliyuncs.com/advertise/2024-05-08-10-52-th-663ae8fc73220.png'
], ],
datetimemodel:Number(new Date()),
showpickeshow: false,
enterprise: {}, //企业 enterprise: {}, //企业
blueticket: { blueticket: {
xj: '', xj: '',
store: '' store: ''
} //蓝票 }, //蓝票
date: dayjs().format("YYYY-MM"),
monthssearchlist: {}
} }
}, },
async onLoad(e) { async onLoad(e) {
let data = await this.api.hfivestoreqy() let data = await this.api.hfivestoreqy()
this.blueticket = data.data this.blueticket = data.data
this.monthssearch()
}, },
methods: { methods: {
confirmdate(e) {
this.date = dayjs(e.value).format("YYYY-MM")
this.monthssearch()
},
async monthssearch() {
let res = await this.api.monthssearch({
m: this.date
})
this.monthssearchlist = res.data[0]
this.showpickeshow = false
},
clicknavigateTo(item, index) { clicknavigateTo(item, index) {
switch (index) { switch (index) {
case 0: case 0:

View File

@@ -3,8 +3,8 @@
<view class="contentitem" v-for="(item,index) in form.list" :key="index"> <view class="contentitem" v-for="(item,index) in form.list" :key="index">
<view class="contentitemtop flex-between"> <view class="contentitemtop flex-between">
<text>{{item.name}}</text> <text>{{item.name}}</text>
<text v-if="item.dlzh_status == 0">无需登录</text> <text v-if="item.dlzh_status == 0" style="color: green;">无需登录</text>
<text v-if="item.dlzh_status == 1">需要登录</text> <text v-if="item.dlzh_status == 1" style="color: red;">需要登录</text>
<text v-if="item.dlzh_status == 9">未知</text> <text v-if="item.dlzh_status == 9">未知</text>
</view> </view>
<text v-if="item.is_default == 1" <text v-if="item.is_default == 1"
@@ -46,8 +46,14 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<u-popup :show="canvasshow" @close="canvasshow = !canvasshow" mode="center" :round="14"> <u-popup :show="canvasshow" mode="center" :round="14">
<view class="messagebox"> <view class="messagebox">
<view class="flex-center tabs">
<text :class="accountqrcodetype == 1?'tabsselect':''"
@click="accountqrcodetype=1,accountqrcode()">电子税务局</text>
<text :class="accountqrcodetype == 2?'tabsselect':''"
@click="accountqrcodetype=2,accountqrcode()">个人所得税</text>
</view>
<view style="text-align: center; margin: 16rpx;"> <view style="text-align: center; margin: 16rpx;">
{{formCode.text}} {{formCode.text}}
</view> </view>
@@ -57,7 +63,7 @@
</view> </view>
<view v-if="textshow == '人脸'" <view v-if="textshow == '人脸'"
style="padding:10rpx 0; text-align: center; margin: 32rpx auto 0rpx auto; background: #1989fa; width: 200rpx;color: #fff; border-radius: 30rpx;" style="padding:10rpx 0; text-align: center; margin: 32rpx auto 0rpx auto; background: #1989fa; width: 200rpx;color: #fff; border-radius: 30rpx;"
@click="reset"> @click="clicktextshow(loginid,textshow)">
已认证 已认证
</view> </view>
</view> </view>
@@ -90,9 +96,10 @@
<u-popup :show="showpopup" @close="showpopup = !showpopup" mode="center" :round="14"> <u-popup :show="showpopup" @close="showpopup = !showpopup" mode="center" :round="14">
<view class="popupbox"> <view class="popupbox">
<view class="popupboxtop"> <view class="popupboxtop">
开票人登记信息 <text>开票人登记信息</text>
<u-icon style="position: absolute;right:22rpx;top: 40rpx; " name="close" color="#999999" <view style="position: absolute;right:22rpx;top: 40rpx; ">
@click="showpopup = false" size="20"></u-icon> <u-icon name="close" color="#999999" @click="showpopup = false" size="20"></u-icon>
</view>
</view> </view>
<view class="popupboxform"> <view class="popupboxform">
<view class="addshowboxinput flex-colum-start" @click="selectshowlslbs = !selectshowlslbs"> <view class="addshowboxinput flex-colum-start" @click="selectshowlslbs = !selectshowlslbs">
@@ -190,8 +197,9 @@
regionshow: false, //省份显示 regionshow: false, //省份显示
// 注册定时器 初始值 // 注册定时器 初始值
second: 60, second: 60,
showText: true, showText: false,
Recapture: '发送验证码', Recapture: '发送验证码',
accountqrcodetype: 1,
form: { form: {
user_name: '', user_name: '',
time: "", time: "",
@@ -202,8 +210,6 @@
}, },
addform: {}, addform: {},
region: [], //省份 region: [], //省份
} }
}, },
async onLoad() { async onLoad() {
@@ -281,9 +287,11 @@
// 人脸前获取验证码 // 人脸前获取验证码
async accountqrcode() { async accountqrcode() {
let res = await this.api.accountqrcode({ let res = await this.api.accountqrcode({
type: this.accountqrcodetype,
id: this.loginid id: this.loginid
}) })
if (res.data.url) { if (res.data.url) {
this.messageshow = false
this.formCode.url = res.data.url this.formCode.url = res.data.url
this.formCode.text = res.data.text this.formCode.text = res.data.text
this.canvasshow = true this.canvasshow = true
@@ -347,12 +355,12 @@
icon: 'none' icon: 'none'
}); });
this.messageshow = false this.messageshow = false
this.reset() //重置
break; break;
case '人脸': case '人脸':
await this.accountqrcode() await this.accountqrcode()
break; break;
} }
this.reset() //重置
} }
}, },
//开票员类型列表 //开票员类型列表
@@ -428,7 +436,7 @@
}, },
// 修改后的下一步 // 修改后的下一步
async szzpyaddinvoicersendsms() { async szzpyaddinvoicersendsms() {
this.codelang = this.addform.code this.addform.code = this.codelang
let res = await this.api.szzpyaddinvoicersendsms(this.addform) let res = await this.api.szzpyaddinvoicersendsms(this.addform)
if (res.code == 1) { if (res.code == 1) {
this.showpopup = false this.showpopup = false
@@ -495,14 +503,18 @@
}, },
// 重置 // 重置
reset() { reset() {
this.form = { // this.form = {
user_name: '', // user_name: '',
time: "", // time: "",
page: 1, // page: 1,
type: '-1', // type: '-1',
status: 'loadmore', // status: 'loadmore',
list: [] // }
} this.form.user_name = ''
this.form.time = ''
this.form.page = 1
this.form.type = '-1'
this.form.status = 'loadmore'
this.textshow = '' this.textshow = ''
this.loginid = '' this.loginid = ''
this.codelang = '' this.codelang = ''
@@ -511,6 +523,22 @@
this.canvasshow = false this.canvasshow = false
this.newissuedbyliststatus() this.newissuedbyliststatus()
}, },
//查询人脸认证结果 其他没有
async clicktextshow(loginid, textshow) {
if (textshow == '人脸') {
let res = await this.api.researhqrcode({
id: this.loginid
})
this.canvasshow = false
uni.showToast({
title: res.message || res.msg,
icon: "none",
})
setTimeout(()=>{
this.reset()
},1000)
}
},
// 列表 // 列表
async newissuedbyliststatus() { async newissuedbyliststatus() {
this.form.status = 'loading'; this.form.status = 'loading';
@@ -609,6 +637,24 @@
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
padding: 28rpx 32rpx; 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 { .messageboxtop {
padding: 10rpx 0; padding: 10rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;

View File

@@ -81,10 +81,22 @@
<text>开票税额</text> <text>开票税额</text>
<text>{{details.tax_amount}}</text> <text>{{details.tax_amount}}</text>
</view> </view>
<view class="detailsclassboxitem" v-if="details.email">
<text>邮箱</text>
<text>{{details.email}}</text>
</view>
<view class="detailsclassboxitem" v-if="details.mobile">
<text>手机号</text>
<text>{{details.mobile}}</text>
</view>
<view class="detailsclassboxitem"> <view class="detailsclassboxitem">
<text>发票状态</text> <text>发票状态</text>
<text>{{details.status}}</text> <text>{{details.status}}</text>
</view> </view>
<view class="detailsclassboxitem" v-if="details.status == '开票失败'">
<text>失败原因</text>
<text style="color:red;padding:0 20rpx;">{{details.status_note}}</text>
</view>
</view> </view>
<view class="detailsclassboxtext" v-if="details.status =='开票成功'"> <view class="detailsclassboxtext" v-if="details.status =='开票成功'">
发票信息 发票信息
@@ -92,15 +104,15 @@
<view class="detailsclassbox" v-if="details.status =='开票成功'"> <view class="detailsclassbox" v-if="details.status =='开票成功'">
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)"> <view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
<text>PDF版式文件</text> <text>PDF版式文件</text>
<text>下载</text> <text style="color:#3089fd;">下载</text>
</view> </view>
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)"> <view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
<text>OFD版式文件</text> <text>OFD版式文件</text>
<text>下载</text> <text style="color: #3089fd;">下载</text>
</view> </view>
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)"> <view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
<text>XML版式文件</text> <text>XML版式文件</text>
<text>下载</text> <text style="color:#3089fd;">下载</text>
</view> </view>
</view> </view>
</view> </view>
@@ -151,17 +163,36 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<u-popup :show="qrcodeshow" @close="qrcodeshow = !qrcodeshow" :round="10" mode="center">
<view class="qrcodeclass">
<view class="content_boxt_towtext">
扫码或复制链接至浏览器下载
</view>
<view class="content_boxt_towrelative" style="242px;height: 242px;">
<canvas id="qrcode" style="242px;height: 242px;" ref="qrcode" canvas-id="qrcode"></canvas>
<image class="content_boxt_towabsolute"
src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/icons.png" mode=""></image>
</view>
<view class="content_boxt_towtexts" @click="setClipboardData">
复制
</view>
</view>
</u-popup>
<u-datetime-picker :show="showpicker" mode="date" @cancel="showpicker = !showpicker" <u-datetime-picker :show="showpicker" mode="date" @cancel="showpicker = !showpicker"
@confirm="confirmpicker"></u-datetime-picker> @confirm="confirmpicker"></u-datetime-picker>
</view> </view>
</template> </template>
<script> <script>
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
export default { export default {
data() { data() {
return { return {
uqrCodeurl: '',
size: 242,
detailsshow: false, //详情 detailsshow: false, //详情
popupshow: false, popupshow: false,
qrcodeshow: false,
showpicker: false, //选择时间 showpicker: false, //选择时间
showpickerbox: false, //是否显示这个盒子 showpickerbox: false, //是否显示这个盒子
clickshowpicker: '', clickshowpicker: '',
@@ -216,16 +247,61 @@
this.detailsshow = true this.detailsshow = true
} }
}, },
// 复制
setClipboardData() {
uni.setClipboardData({
data: this.uqrCodeurl,
success: () => {
uni.showToast({
title: '复制成功'
})
this.qrcodeshow = false
}
})
},
// 下载 // 下载
downloadFile(url) { downloadFile(url) {
uni.downloadFile({ uni.showLoading({
url: url, //仅为示例,并非真实的资源 title: '加载中',
success: (res) => { mask: true
if (res.statusCode === 200) { })
console.log('下载成功'); try {
} this.uqrCodeurl = url
} // 获取uQRCode实例
}); var qr = new uQRCode();
// 设置二维码内容
qr.data = url;
// 设置二维码大小必须与canvas设置的宽高一致
qr.size = this.size;
// 调用制作二维码方法
qr.make();
// 获取canvas上下文
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件this必须传入
// 设置uQRCode实例的canvas上下文
qr.canvasContext = canvasContext;
// 调用绘制方法将二维码图案绘制到canvas上
qr.drawCanvas();
this.qrcodeshow = true
} catch (error) {
//TODO handle the exceptio
}
uni.hideLoading()
// uni.downloadFile({
// url: url,
// success: res => {
// console.log(res)
// if (res.statusCode === 200) {
// // 预览pdf文件
// uni.openDocument({
// filePath: res.tempFilePath,
// showMenu: true, // 右上角菜单可以进行分享保存pdf
// success: function(file) {
// console.log("文件打开成功", file)
// }
// })
// }
// }
// })
}, },
clickdatastatuslist(item, index) { clickdatastatuslist(item, index) {
this.datastatuslistshow = item.id this.datastatuslistshow = item.id
@@ -326,8 +402,7 @@
} else { } else {
this.form.list = [...this.form.list, ...res.data] this.form.list = [...this.form.list, ...res.data]
} }
if (res.data.length < 10) this.form.status = 'nomore'; this.form.status = res.data.length < 10 ? 'nomore' : 'loadmore'
else this.form.status = 'loadmore';
}, 500) }, 500)
} }
} }
@@ -405,6 +480,62 @@
} }
} }
.qrcodeclass {
padding: 0 28rpx;
width: 100%;
padding: 0 28rpx;
width: 100%;
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
padding-bottom: 50rpx;
.content_boxt_towtext {
padding-top: 32rpx;
text-align: center;
width: 100%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333;
}
.content_boxt_towtexts {
margin: 50rpx auto 0 auto;
width: 558rpx;
height: 84rpx;
background: #288EFB;
border-radius: 50rpx 50rpx 50rpx 50rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #FFFFFF;
line-height: 84rpx;
text-align: center;
font-style: normal;
}
.content_boxt_towrelative {
position: relative;
width: 242px;
height: 242px;
margin: 32rpx auto;
.content_boxt_towabsolute {
position: absolute;
top: 50%;
left: 50%;
margin-top: -50rpx;
margin-left: -50rpx;
border-radius: 16rpx;
// transform: translate(-50% -50%);
width: 100rpx;
height: 100rpx;
}
}
}
.popupshow { .popupshow {
padding: 0 28rpx; padding: 0 28rpx;

View File

@@ -43,7 +43,9 @@
<view class="detailsclass"> <view class="detailsclass">
<view class="detailsclasstop"> <view class="detailsclasstop">
<text> 详情</text> <text> 详情</text>
<u-icon class="icon" name="close" @click="detailsshow = false" color="#999999" size="20"></u-icon> <view class="icon">
<u-icon name="close" @click="detailsshow = false" color="#999999" size="20"></u-icon>
</view>
</view> </view>
<view class="detailsclassbox"> <view class="detailsclassbox">
<view class="detailsclassboxitem"> <view class="detailsclassboxitem">
@@ -79,6 +81,14 @@
<text>开票税额</text> <text>开票税额</text>
<text>{{details.tax_amount}}</text> <text>{{details.tax_amount}}</text>
</view> </view>
<view class="detailsclassboxitem" v-if="details.email">
<text>邮箱</text>
<text>{{details.email}}</text>
</view>
<view class="detailsclassboxitem" v-if="details.mobile">
<text>手机号</text>
<text>{{details.mobile}}</text>
</view>
<view class="detailsclassboxitem"> <view class="detailsclassboxitem">
<text>发票状态</text> <text>发票状态</text>
<text>{{details.status}}</text> <text>{{details.status}}</text>
@@ -90,15 +100,15 @@
<view class="detailsclassbox" v-if="details.status == '开票成功'"> <view class="detailsclassbox" v-if="details.status == '开票成功'">
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)"> <view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
<text>PDF版式文件</text> <text>PDF版式文件</text>
<text>下载</text> <text style="color:#3089fd;">下载</text>
</view> </view>
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)"> <view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
<text>OFD版式文件</text> <text>OFD版式文件</text>
<text>下载</text> <text style="color:#3089fd;">下载</text>
</view> </view>
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)"> <view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
<text>XML版式文件</text> <text>XML版式文件</text>
<text>下载</text> <text style="color:#3089fd;">下载</text>
</view> </view>
</view> </view>
</view> </view>
@@ -137,15 +147,34 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<u-popup :show="qrcodeshow" @close="qrcodeshow = !qrcodeshow" :round="10" mode="center">
<view class="qrcodeclass">
<view class="content_boxt_towtext">
扫码或复制链接至浏览器下载
</view>
<view class="content_boxt_towrelative" style="242px;height: 242px;">
<canvas id="qrcode" style="242px;height: 242px;" ref="qrcode" canvas-id="qrcode"></canvas>
<image class="content_boxt_towabsolute"
src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/icons.png" mode=""></image>
</view>
<view class="content_boxt_towtexts" @click="setClipboardData">
复制
</view>
</view>
</u-popup>
<u-datetime-picker :show="showpicker" mode="date" @cancel="showpicker = !showpicker" <u-datetime-picker :show="showpicker" mode="date" @cancel="showpicker = !showpicker"
@confirm="confirmpicker"></u-datetime-picker> @confirm="confirmpicker"></u-datetime-picker>
</view> </view>
</template> </template>
<script> <script>
import uQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js'; // npm install uqrcodejs
export default { export default {
data() { data() {
return { return {
uqrCodeurl: '',
size: 242,
qrcodeshow: false,
detailsshow: false, //详情 detailsshow: false, //详情
popupshow: false, popupshow: false,
showpicker: false, //选择时间 showpicker: false, //选择时间
@@ -292,16 +321,61 @@
}, 500) }, 500)
} }
}, },
// 复制
setClipboardData() {
uni.setClipboardData({
data: this.uqrCodeurl,
success: () => {
uni.showToast({
title: '复制成功'
})
this.qrcodeshow = false
}
})
},
// 下载 // 下载
downloadFile(url) { downloadFile(url) {
uni.downloadFile({ uni.showLoading({
url: url, //仅为示例,并非真实的资源 title: '加载中',
success: (res) => { mask: true
if (res.statusCode === 200) { })
console.log('下载成功'); try {
} this.uqrCodeurl = url
} // 获取uQRCode实例
}); var qr = new uQRCode();
// 设置二维码内容
qr.data = url;
// 设置二维码大小必须与canvas设置的宽高一致
qr.size = this.size;
// 调用制作二维码方法
qr.make();
// 获取canvas上下文
var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件this必须传入
// 设置uQRCode实例的canvas上下文
qr.canvasContext = canvasContext;
// 调用绘制方法将二维码图案绘制到canvas上
qr.drawCanvas();
this.qrcodeshow = true
} catch (error) {
//TODO handle the exceptio
}
uni.hideLoading()
// uni.downloadFile({
// url: url,
// success: res => {
// console.log(res)
// if (res.statusCode === 200) {
// // 预览pdf文件
// uni.openDocument({
// filePath: res.tempFilePath,
// showMenu: true, // 右上角菜单可以进行分享保存pdf
// success: function(file) {
// console.log("文件打开成功", file)
// }
// })
// }
// }
// })
} }
} }
} }
@@ -443,6 +517,62 @@
} }
} }
.qrcodeclass {
padding: 0 28rpx;
width: 100%;
padding: 0 28rpx;
width: 100%;
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
padding-bottom: 50rpx;
.content_boxt_towtext {
padding-top: 32rpx;
text-align: center;
width: 100%;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333;
}
.content_boxt_towtexts {
margin: 50rpx auto 0 auto;
width: 558rpx;
height: 84rpx;
background: #288EFB;
border-radius: 50rpx 50rpx 50rpx 50rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 36rpx;
color: #FFFFFF;
line-height: 84rpx;
text-align: center;
font-style: normal;
}
.content_boxt_towrelative {
position: relative;
width: 242px;
height: 242px;
margin: 32rpx auto;
.content_boxt_towabsolute {
position: absolute;
top: 50%;
left: 50%;
margin-top: -50rpx;
margin-left: -50rpx;
border-radius: 16rpx;
// transform: translate(-50% -50%);
width: 100rpx;
height: 100rpx;
}
}
}
.popupshow { .popupshow {
padding: 0 28rpx; padding: 0 28rpx;

View File

@@ -94,8 +94,8 @@
<u-icon name="weixin-fill" color="#04be02" size="28"></u-icon> <u-icon name="weixin-fill" color="#04be02" size="28"></u-icon>
微信抬头一键导入 微信抬头一键导入
</view> </view>
<view class="content_bottom" :style="disabled?'':'background:rgb(219 214 214);color: #666666;'" <view class="content_bottom" @click="requestSubscribeMessage"
@click="saveMerchantBaseInfo">确定</view> :style="disabled?'':'background:rgb(219 214 214);color: #666666;'">确定</view>
</view> </view>
</template> </template>
@@ -111,7 +111,6 @@
data() { data() {
return { return {
showtext: 0, showtext: 0,
disabled: false,
subCategoryList: [], subCategoryList: [],
form: { form: {
user_type: 2, user_type: 2,
@@ -129,7 +128,8 @@
id: '' id: ''
}, },
showElse: false, showElse: false,
showtitle: false showtitle: false,
disabled: false
}; };
}, },
async onLoad(e) { async onLoad(e) {
@@ -153,7 +153,6 @@
} else { } else {
this.form.id = e.id this.form.id = e.id
} }
// 获取开票抬头 // 获取开票抬头
// 这是H5 // 这是H5
// #ifdef H5 // #ifdef H5
@@ -165,6 +164,7 @@
this.showtitle = true this.showtitle = true
this.form.open_id = uni.cache.get('open_id') this.form.open_id = uni.cache.get('open_id')
// #endif // #endif
// 这是状态
let RES = await this.api.checkqrcodestatus({ let RES = await this.api.checkqrcodestatus({
id: this.form.id id: this.form.id
}) })
@@ -344,10 +344,102 @@
} }
}); });
}, },
async saveMerchantBaseInfo() { requestSubscribeMessage() {
if (!this.disabled) { if (!this.disabled) {
return false; return false;
} }
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 == '') { if (this.form.user_name == null || this.form.user_name == '') {
uni.showToast({ uni.showToast({
title: '请输入名称', title: '请输入名称',

View File

@@ -64,7 +64,7 @@
拒绝理由:{{form.no|| '无'}}</view> 拒绝理由:{{form.no|| '无'}}</view>
</view> </view>
</view> </view>
<view class="content_bottom" @click="saveMerchantBaseInfo"> <view class="content_bottom" @click="requestSubscribeMessage">
确定 确定
</view> </view>
</view> </view>
@@ -82,6 +82,7 @@
return { return {
showtext: 0, showtext: 0,
subCategoryList: [], subCategoryList: [],
open_id: '',
form: { form: {
id: '', id: '',
user_type: 2, user_type: 2,
@@ -107,6 +108,7 @@
try { try {
if (e.q) { if (e.q) {
const q = decodeURIComponent(e.q) // 获取到二维码原始链接内容 const q = decodeURIComponent(e.q) // 获取到二维码原始链接内容
// this.form.id = e.id
let queryParams = {}; let queryParams = {};
let queryString = q.split('?')[1]; let queryString = q.split('?')[1];
if (queryString) { if (queryString) {
@@ -125,16 +127,19 @@
// 获取开票抬头 // 获取开票抬头
// 这是H5 // 这是H5
// #ifdef H5 // #ifdef H5
if (e.body) { this.getInvoiceList()
this.form.body = e.id ? e.id : e.body this.form.body = e.id ? e.id : e.body
this.form.open_id = e.open_id this.form.open_id = e.open_id
}
// #endif // #endif
// 这是微信 // 这是微信
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
this.showtitle = true this.showtitle = true
this.form.open_id = uni.cache.get('open_id') this.form.open_id = uni.cache.get('open_id')
// #endif // #endif
try { try {
let res = await this.api.szzpyfailccho({ let res = await this.api.szzpyfailccho({
id: this.form.body, id: this.form.body,
@@ -199,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 == '') { if (this.form.user_name == null || this.form.user_name == '') {
uni.showToast({ uni.showToast({
title: '请输入名称', title: '请输入名称',
@@ -237,6 +334,7 @@
}); });
return false; return false;
} }
// http://localhost:8080/pages/hindex/index?id=12&open_id=102132
let res = await this.api.usersubopeninvoicefixed(this.form) let res = await this.api.usersubopeninvoicefixed(this.form)
if (res.code == 1) { if (res.code == 1) {
uni.showToast({ uni.showToast({
@@ -268,6 +366,7 @@
this.form.mobile = '' this.form.mobile = ''
}, },
async getOrder() { //搜索值 async getOrder() { //搜索值
console.log(this.form.open_id)
let res = await this.api.enterprisestore({ let res = await this.api.enterprisestore({
like: this.form.user_name, like: this.form.user_name,
open_id: this.form.open_id, open_id: this.form.open_id,

View File

@@ -33,9 +33,18 @@
<text class="classvie_itemtow">{{ datalsit.ktime }}</text> <text class="classvie_itemtow">{{ datalsit.ktime }}</text>
</view> </view>
</view> </view>
<view style="margin-top:80rpx;text-align: center;color:#3088fd ;" v-if="datalsit.status != 2" @click="makePhoneCall(datalsit)"> <!-- #ifdef MP-WEIXIN -->
联系商家 <!-- <view style="margin-top:80rpx;text-align: center;color:#3088fd ;" v-if="datalsit.status != 2"
</view> @click="makePhoneCall(datalsit)">
联系客服
</view> -->
<!-- #endif -->
<button open-type="contact" class="contactbutton">联系客服</button>
<!-- <view style="margin-top:80rpx;text-align: center;color:#3088fd ;" v-if="datalsit.status != 2"
@click="makePhoneCall(datalsit)">
联系客服
</view> -->
<!-- <button open-type='contact'>联系客服</button> -->
</view> </view>
</template> </template>
@@ -86,9 +95,15 @@
} }
}, },
makePhoneCall(e) { makePhoneCall(e) {
uni.makePhoneCall({ // uni.navigateTo({
phoneNumber: e.store_mobile //仅为示例 // url: '/pages/webview/index'
}); // })
uni.openCustomerServiceChat({
corpId: 'wwc76ab19fa6df267f',
success(res) {
console.log('成功了', res)
}
})
}, },
savealbum(e) { savealbum(e) {
uni.pro.navigateBack(); uni.pro.navigateBack();
@@ -151,6 +166,20 @@
.content { .content {
padding: 32rpx 28rpx; 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 { .content_boxtop {
padding: 22rpx 16rpx; padding: 22rpx 16rpx;
background: #ffffff; background: #ffffff;

View File

@@ -201,6 +201,7 @@
background: #FFFFFF; background: #FFFFFF;
.contentboxitemtop { .contentboxitemtop {
flex-wrap: nowrap;
padding-bottom: 18rpx; padding-bottom: 18rpx;
border-bottom: 1rpx solid #E3E3E3; border-bottom: 1rpx solid #E3E3E3;

View File

@@ -2,7 +2,7 @@
<view class="content"> <view class="content">
<!-- 占位符导航栏 --> <!-- 占位符导航栏 -->
<navseat :opacity='false' :title='"首页"' :titleshow='true' :iconshow='false' :heightshow='true' <navseat :opacity='false' :title='"首页"' :titleshow='true' :iconshow='false' :heightshow='true'
:namecolor='"#fff"' iconcolor='#fff' ></navseat> :namecolor='"#fff"' iconcolor='#fff'></navseat>
<view class="topswiper" v-if="restype == 2"> <view class="topswiper" v-if="restype == 2">
<u-swiper :list="swiperlist" height="166"></u-swiper> <u-swiper :list="swiperlist" height="166"></u-swiper>
<view class="onetopswiper"> <view class="onetopswiper">
@@ -16,35 +16,29 @@
</view> </view>
</view> </view>
<view
style="margin-top:80rpx;text-align: center;color:#3088fd;position: fixed; bottom:40rpx;left: 50%;transform: translate(-50%,-50%);"
@click="qushangjia()">
我是商家
</view>
</view> </view>
<view class="Box flex-between" v-if="restype == 1 && improveinformation"> <view class="Box flex-between" v-if="restype == 1 && improveinformation">
<view class="content flex-colum" @click="indexInvoicing" v-if="improveinformation"> <view class="content flex-colum" @click="merchantindex" v-if="store_status == 2">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item3.png" mode="aspectFill"></image> <image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item3.png" mode="aspectFill">
</image>
<text>固定开票</text>
</view>
<view class="content flex-colum" @click="indexInvoicing" v-if="store_status == 1">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item3.png" mode="aspectFill">
</image>
<text>极速开票</text> <text>极速开票</text>
</view> </view>
<view class="content flex-colum" @click="webview" v-if="improveinformation">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item2.png" mode="aspectFill"></image> <view class="content flex-colum" v-for="(item,index) in list" @click="clickcontent(item)" :key="index"
<text>后台管理</text> v-if="item.show">
</view> <image :src="item.imge" mode="aspectFill">
<view class="content flex-colum" @click="indexorder" v-if="improveinformation"> </image>
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item1.png" mode="aspectFill"></image> <text>{{item.name}}</text>
<text>开票记录</text>
</view>
<view class="content flex-colum" @click="notification" v-if="improveinformation">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item6.png" mode="aspectFill"></image>
<text>绑定通知</text>
</view>
<view class="content flex-colum" @click="drawer" v-if="improveinformation">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item5.png" mode="aspectFill"></image>
<text>开票员列表</text>
</view>
<view class="content flex-colum" @click="billingcode" v-if="improveinformation">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item7.png" mode="aspectFill"></image>
<text>开票码</text>
</view>
<view class="content flex-colum" @click="auditbilling" v-if="improveinformation">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item8.png" mode="aspectFill"></image>
<text>审核开票</text>
</view> </view>
<!-- <view class="content flex-colum" @click="jumpToMiniProgram" v-if="improveinformation"> <!-- <view class="content flex-colum" @click="jumpToMiniProgram" v-if="improveinformation">
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item8.png" mode="aspectFill"></image> <image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item8.png" mode="aspectFill"></image>
@@ -59,6 +53,14 @@
<button class="btn">打开小程序</button> <button class="btn">打开小程序</button>
</script> </script>
</wx-open-launch-weapp> --> </wx-open-launch-weapp> -->
<view class="flex-colum"
style=" width: 100%;margin-top:80rpx;text-align: center;position: fixed; font-size:24rpx; bottom:40rpx;left: 50%;transform: translate(-50%,-50%);padding: 0 40rpx;">
<text>{{improveinformationform.store.title}}</text>
<text v-if="improveinformationform.is_tax == 1"
style="margin-top:20rpx;text-align: center;color:#3088fd;margin-left: 10rpx;"
@click="clickswitch()">切换商户</text>
</view>
</view> </view>
<!-- <view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'"> <!-- <view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
网页版地址:https://h5-invoice.sxczgkj.cn 网页版地址:https://h5-invoice.sxczgkj.cn
@@ -88,121 +90,99 @@
onLoaduserId: '', onLoaduserId: '',
infos: uni.getSystemInfoSync(), infos: uni.getSystemInfoSync(),
store_status: uni.cache.get('store_status'), store_status: uni.cache.get('store_status'),
list: [{ list: [],
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item2.png', is_k_list: '', // 开票员列表 1 显示 2不显示
name: '后台管理', improveinformationform: {
show: true, is_tax: '',
text: 'houtai', store: {
url: 'electric/index', title: ''
type: 2 //1是内链 2是外链 类型
},
{
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item1.png',
name: '开票记录',
show: true,
text: 'jilu',
url: 'electric/index',
type: 1 //1是内链 2是外链 类型
}, {
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item6.png',
name: '绑定通知',
show: true,
text: 'tongzhi',
url: 'electric/index',
type: 1 //1是内链 2是外链 类型
}, {
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item5.png',
name: '开票员列表',
show: true,
text: 'kaipiaoyuan',
url: 'electric/index',
type: 1 //1是内链 2是外链 类型
}, {
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item7.png',
name: '开票码',
show: true,
text: 'kaipiaoma',
url: 'electric/index',
type: 1 //1是内链 2是外链 类型
}, {
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item8.png',
name: '审核开票',
show: true,
text: 'shenhe',
url: 'electric/index',
type: 1 //1是内链 2是外链 类型
}, {
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item10.png',
name: '退出登录',
show: true,
text: 'tuchu',
url: 'electric/index',
type: 3 //1是内链 2是外链 3退出 类型
} }
] }
}; };
}, },
async onLoad(e) { async onLoad(e) {
await this.$onLaunched; await this.$onLaunched;
// #ifdef MP-WEIXIN // // #ifdef MP-WEIXIN
// 判断商家还是个体 // // 判断商家还是个体
let restype = await this.api.judgeuseridentity({ // let restype = await this.api.judgeuseridentity({
open_id: uni.cache.get('open_id') //临时登录凭证 // open_id: uni.cache.get('open_id') //临时登录凭证
}) // })
console.log(restype.data) // console.log(restype.data)
this.restype = restype.data.type // this.restype = restype.data.type
if (this.restype == 1 && !uni.getStorageSync('logintoken')) { // if (this.restype == 1 && !uni.getStorageSync('logintoken')) {
uni.reLaunch({ // uni.reLaunch({
url: '/pages/login/login' // url: '/pages/login/login'
}) // })
return false; // return false;
} // }
// #endif // // #endif
try { try {
if (e.userId) { if (e.restype) {
uni.cache.set('Type', e.type); this.restype = e.restype
uni.cache.set('userId', e.userId);
// 传参进来肯定是极速开票固然store_status=1
uni.cache.set('store_status', 1);
} }
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
} }
// try {
// 总? // if (e.userId) {
let token = await this.api.h5encryption({ // uni.cache.set('Type', e.type);
store_id: uni.cache.get('userId') // uni.cache.set('userId', e.userId);
}) // // 传参进来肯定是极速开票固然store_status=1
if (token.code == 1) { // uni.cache.set('store_status', 1);
uni.cache.set('token', token.data.token); // }
} // } catch (e) {
let res = await this.api.storestorestatus({ // //TODO handle the exception
store_id: uni.cache.get('userId') // }
}) if (this.restype == 1) {
if (res.code == 1 && uni.cache.get('store_status') == 1) { if (uni.cache.get('userId')) {
this.improveinformationform = res.data.store // 总?
uni.cache.set('form', this.improveinformationform); let token = await this.api.h5encryption({
if (res.data.sz_status == 0) { store_id: uni.cache.get('userId')
uni.reLaunch({ })
url: '/pages/index/information' if (token.code == 1) {
}); uni.cache.set('token', token.data.token);
}
let res = await this.api.storestorestatus({
store_id: uni.cache.get('userId')
})
// try {
// this.is_k_list = res.data.is_k_list
// } catch (e) {
// //TODO handle the exception
// }
if (res.code == 1 && uni.cache.get('store_status') == 1) {
this.improveinformationform = res.data
uni.cache.set('form', this.improveinformationform);
if (res.data.sz_status == 0) {
uni.reLaunch({
url: '/pages/index/information'
});
} else {
this.improveinformation = true
}
} else {
// 这是固定开票的判断
if (res.data.status == 4) { //如果极速开票和固定开票共存的情况下 直接跳转到极速开票的上传信息
this.improveinformation = true
return false
} else {
if (res.data.status == -1 || res.data.status == 2 || res.data.status == 0) {
uni.pro.navigateTo('merchant/information', res.data.store);
} else {
uni.pro.navigateTo('merchant/index');
}
}
}
} else { } else {
this.improveinformation = true uni.reLaunch({
url: '/pages/login/login'
});
} }
} else { } else {
// 这是固定开票的判断 this.restype == 2
if (res.data.status == 4) { //如果极速开票和固定开票共存的情况下 直接跳转到极速开票的上传信息
this.improveinformation = true
return false
} else {
if (res.data.status == -1 || res.data.status == 2 || res.data.status == 0) {
uni.pro.navigateTo('merchant/information', res.data.store);
} else {
uni.pro.navigateTo('merchant/index');
}
}
} }
}, },
// 监听跳转 // 监听跳转
handleLaunch() { handleLaunch() {
@@ -216,7 +196,6 @@
try { try {
let res = await this.api.getrulelist() let res = await this.api.getrulelist()
this.list = res.data this.list = res.data
console.log(res)
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
} }
@@ -316,6 +295,11 @@
success: function() {} success: function() {}
}); });
}, },
clickswitch() {
uni.navigateTo({
url: '/pages/login/switch'
})
},
// 跳转 // 跳转
async clickcontent(item) { async clickcontent(item) {
switch (item.type) { switch (item.type) {
@@ -347,6 +331,23 @@
break; break;
} }
}, },
qushangjia() {
uni.showModal({
title: '提示',
content: '确定去商家开票系统吗?',
success: (res) => {
if (res.confirm) {
uni.removeStorageSync('logintoken');
uni.removeStorageSync('token');
uni.reLaunch({
url: '/pages/login/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
},
auditbilling() { auditbilling() {
uni.pro.navigateTo('index/auditbilling'); uni.pro.navigateTo('index/auditbilling');
}, },
@@ -360,7 +361,7 @@
uni.pro.navigateTo('index/merchant'); uni.pro.navigateTo('index/merchant');
}, },
information() { information() {
uni.pro.navigateTo('index/information', this.improveinformationform); uni.pro.navigateTo('index/information', this.improveinformationform.store);
}, },
notification() { notification() {
uni.pro.navigateTo('index/notification'); uni.pro.navigateTo('index/notification');

View File

@@ -14,7 +14,7 @@
</view> </view>
<view class="Box_box flex-between"> <view class="Box_box flex-between">
<view>法人手机号</view> <view>法人手机号</view>
<view class="Box_box_input"><input type="number" :disabled='disabled' v-model="form.phone" <view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.phone"
placeholder="请填写法人手机号" data-key="mobile" /></view> placeholder="请填写法人手机号" data-key="mobile" /></view>
</view> </view>
<view class="Box_box flex-between"> <view class="Box_box flex-between">
@@ -51,7 +51,7 @@
</view> </view>
<view class="Box_box flex-between"> <view class="Box_box flex-between">
<view>开票员手机号码</view> <view>开票员手机号码</view>
<view class="Box_box_input"><input type="number" :disabled='disabled' v-model="form.taxphone" <view class="Box_box_input"><input type="text" :disabled='disabled' v-model="form.taxphone"
placeholder="请填写开票员手机号码" data-key="mobile" /></view> placeholder="请填写开票员手机号码" data-key="mobile" /></view>
</view> </view>
<view class="Box_box flex-between"> <view class="Box_box flex-between">

View File

@@ -12,7 +12,7 @@
<view class="content_boxtoptow" v-if="datalsit.status == 4">已作废</view> <view class="content_boxtoptow" v-if="datalsit.status == 4">已作废</view>
</view> </view>
<view class="content_boxt_one"> <view class="content_boxt_one">
<view class="content_boxt_oneone" v-if="datalsit.status == 2"> <view class="content_boxt_oneone" v-if="datalsit.string2">
{{ datalsit.string2 }} {{ datalsit.string2 }}
</view> </view>
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4"> <view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
@@ -36,6 +36,14 @@
<text class="classvie_itemone">项目名称</text> <text class="classvie_itemone">项目名称</text>
<text class="classvie_itemtow">{{ datalsit.article }}</text> <text class="classvie_itemtow">{{ datalsit.article }}</text>
</view> </view>
<view class="classvie_item flex-start" v-if="datalsit.email">
<text class="classvie_itemone">邮箱</text>
<text class="classvie_itemtow">{{ datalsit.email }}</text>
</view>
<view class="classvie_item flex-start" v-if="datalsit.mobile">
<text class="classvie_itemone">手机号</text>
<text class="classvie_itemtow">{{ datalsit.mobile }}</text>
</view>
<view class="classvie_item flex-start" v-if="datalsit.createtime"> <view class="classvie_item flex-start" v-if="datalsit.createtime">
<text class="classvie_itemone">创建时间</text> <text class="classvie_itemone">创建时间</text>
<text class="classvie_itemtow">{{ datalsit.createtime }}</text> <text class="classvie_itemtow">{{ datalsit.createtime }}</text>

View File

@@ -28,7 +28,7 @@
</view> </view>
</view> </view>
<view class="content_boxt_one"> <view class="content_boxt_one">
<view class="content_boxt_oneone" v-if="datalsit.status == 2"> <view class="content_boxt_oneone" v-if="datalsit.status == 2 && datalsit.string2">
{{datalsit.string2}} {{datalsit.string2}}
</view> </view>
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4"> <view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">

View File

@@ -22,7 +22,7 @@
</view> </view>
</view> </view>
<view class="content_boxt_one"> <view class="content_boxt_one">
<view class="content_boxt_oneone" v-if="datalsit.status == 2"> <view class="content_boxt_oneone" v-if="datalsit.string2">
{{datalsit.string2}} {{datalsit.string2}}
</view> </view>
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4"> <view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
@@ -46,6 +46,14 @@
<text class="classvie_itemone">项目名称</text> <text class="classvie_itemone">项目名称</text>
<text class="classvie_itemtow">{{datalsit.article}}</text> <text class="classvie_itemtow">{{datalsit.article}}</text>
</view> </view>
<view class="classvie_item flex-start" v-if="datalsit.email">
<text class="classvie_itemone">邮箱</text>
<text class="classvie_itemtow">{{ datalsit.email }}</text>
</view>
<view class="classvie_item flex-start" v-if="datalsit.mobile">
<text class="classvie_itemone">手机号</text>
<text class="classvie_itemtow">{{ datalsit.mobile }}</text>
</view>
<view class="classvie_item flex-start" v-if="datalsit.createtime"> <view class="classvie_item flex-start" v-if="datalsit.createtime">
<text class="classvie_itemone">创建时间</text> <text class="classvie_itemone">创建时间</text>
<text class="classvie_itemtow">{{ datalsit.createtime }}</text> <text class="classvie_itemtow">{{ datalsit.createtime }}</text>
@@ -55,7 +63,7 @@
<text class="classvie_itemtow">{{ datalsit.kprq }}</text> <text class="classvie_itemtow">{{ datalsit.kprq }}</text>
</view> </view>
</view> </view>
<view class="content_boxt_tow"> <view class="content_boxt_tow" v-if="datalsit.url">
<view class="content_boxt_towtext"> <view class="content_boxt_towtext">
微信扫一扫即可开票 微信扫一扫即可开票
</view> </view>

View File

@@ -9,16 +9,16 @@
<input type="number" v-model="form.account" :adjust-position="false" placeholder="请输入手机号码" maxlength="-1" <input type="number" v-model="form.account" :adjust-position="false" placeholder="请输入手机号码" maxlength="-1"
data-key="mobile" /> data-key="mobile" />
</view> </view>
<!-- <view class="top_box_one"> <view class="top_box_one">
<text class="top_box_one_text">密码</text> <text class="top_box_one_text">密码</text>
<input type="mobile" v-model="form.password" :adjust-position="false" placeholder="8-16位密码" <input type="mobile" v-model="form.password" :adjust-position="false" placeholder="请输入密码"
maxlength="16" :password="!showPassword" /> maxlength="16" :password="!showPassword" />
<view class="repeat" @click="display"> <view class="repeat" @click="display">
<u-icon name="eye" v-if="showPassword"></u-icon> <u-icon name="eye" v-if="showPassword"></u-icon>
<u-icon v-else name="eye-off"></u-icon> <u-icon v-else name="eye-off"></u-icon>
</view> </view>
</view> --> </view>
<view class="top_box_one"> <!-- <view class="top_box_one">
<text class="top_box_one_text">验证码</text> <text class="top_box_one_text">验证码</text>
<input type="mobile" v-model="form.captcha" placeholder="请输入短信验证码" maxlength="6" /> <input type="mobile" v-model="form.captcha" placeholder="请输入短信验证码" maxlength="6" />
<view class="repeats"> <view class="repeats">
@@ -30,16 +30,24 @@
{{ second }}s重新发送 {{ second }}s重新发送
</view> </view>
</view> </view>
</view> </view> -->
<view class="toLogin" @click="userlogin">登录</view> <view class="toLogin" @click="userlogin">登录</view>
<!-- <view class="agreement flex-start"> <!--<view class="agreement flex-start">
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange" <u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
size="12"></u-checkbox></u-checkbox-group> size="12"></u-checkbox></u-checkbox-group>
<text>阅读并同意银收客</text> <text>阅读并同意银收客</text>
<view class="agreement-Item" @click="Privacy(1)">用户协议</view> <view class="agreement-Item" @click="Privacy(1)">用户协议</view>
<view class="agreement-Item" @click="Privacy(2)">隐私政策</view> <view class="agreement-Item" @click="Privacy(2)">隐私政策</view>
</view> --> </view>-->
<view class="agreement" @click="clickpassword">
忘记密码
</view>
</view>
<view
style="margin-top:80rpx;text-align: center;color:#3088fd;position: fixed; bottom:40rpx;left: 50%;transform: translate(-50%,-50%);"
@click="quyonghu">
我是用户
</view> </view>
</view> </view>
</template> </template>
@@ -76,7 +84,9 @@
if (token.code == 1) { if (token.code == 1) {
uni.cache.set('token', token.data.token); uni.cache.set('token', token.data.token);
uni.cache.set('store_status', 1); 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; 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() { async userlogin() {
if (this.form.account == null || this.form.account == '') { if (this.form.account == null || this.form.account == '') {
uni.showToast({ uni.showToast({
@@ -125,23 +148,41 @@
}); });
return false; return false;
} }
if (this.form.captcha == null || this.form.captcha == '') { if (this.form.password == null || this.form.password == '') {
uni.showToast({ uni.showToast({
title: '请输入验证码', title: '请输入码',
icon: 'none' icon: 'none'
}); });
return false; return false;
} }
// if (this.form.captcha == null || this.form.captcha == '') {
// uni.showToast({
// title: '请输入验证码',
// icon: 'none'
// });
// return false;
// }
let res = await this.api.userlogin({ let res = await this.api.userlogin({
account: this.form.account, account: this.form.account,
captcha: this.form.captcha, password: this.form.password,
open_id: uni.cache.get('open_id'), open_id: uni.cache.get('open_id'),
}) })
uni.cache.set('userId', res.data.userinfo.store_id); uni.cache.set('userId', res.data.userinfo.store_id);
uni.cache.set('logintoken', res.data.userinfo.token); uni.cache.set('logintoken', res.data.userinfo.token);
uni.cache.set('store_status', res.data.store_status); uni.cache.set('store_status', res.data.store_status);
uni.cache.set('userinfo', res.data.userinfo);
uni.cache.set('Type', res.data.type); 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 { .repeat {
position: absolute; position: absolute;
z-index: 99;
bottom: 26rpx; bottom: 26rpx;
right: 0; right: 0;
width: 25rpx; width: 25rpx;
@@ -234,8 +276,10 @@
} }
.agreement { .agreement {
text-align: right;
width: 570rpx;
margin-top: 14rpx; margin-top: 14rpx;
font-size: 20rpx; font-size: 24rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN; font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500; font-weight: 500;
color: #7c8e97; color: #7c8e97;

View File

@@ -1,210 +1,253 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar class="top" title="忘记密码" @rightClick="leftClick" :autoBack="true" leftIconColor="#fff" :titleStyle="{color:'#FFF',}" bgColor="transparent"></u-navbar> <navseat :opacity='false' title="忘记密码" :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
<view class="top_box_xx"> <view class="top_box">
<view class="top_box"> <view class="top_box_one">
<view class="top_box_one"> <text class="top_box_one_text">手机号码</text>
<text class="top_box_one_text">手机号码</text> <input type="number" v-model="form.account" placeholder="请输入手机号码" />
<input type="number" v-model="form.phone" placeholder="请输入手机号码" data-key="mobile" />
</view>
<view class="top_box_one">
<text class="top_box_one_text">密码</text>
<input type="mobile" v-model="form.password" placeholder="8-16位密码" maxlength="16" :password="!showPassword" />
<view class="repeat" @click="display">
<u-icon name="eye" v-if="showPassword"></u-icon>
<u-icon v-else name="eye-off"></u-icon>
</view>
</view>
<view class="top_box_one">
<text class="top_box_one_text">确认密码</text>
<input type="mobile" v-model="form.confirmpassword" placeholder="请再次输入密码" maxlength="16" :password="!showPassword" />
<view class="repeat" @click="display">
<u-icon name="eye" v-if="showPassword"></u-icon>
<u-icon v-else name="eye-off"></u-icon>
</view>
</view>
<view class="top_box_one">
<text class="top_box_one_text">验证码</text>
<input type="mobile" v-model="form.checkCode" placeholder="请输入短信验证码" maxlength="6" />
<view class="repeats">
<view v-if="showText == true" style="padding: 8rpx 16rpx 6rpx 16rpx;background: #288EFB; border-radius: 15rpx;" @click="CodeRegister">{{ Recapture }}</view>
<view v-else style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 16rpx 6rpx 16rpx; border-radius: 15rpx;">{{ second }}s重新发送</view>
</view>
</view>
<view class="forgetPassword" @click="forgetPassword">重置密码</view>
</view> </view>
<view class="top_box_one">
<text class="top_box_one_text">密码</text>
<input type="text" v-model="form.password" placeholder="请输入密码" :password="!showPassword" />
<view class="repeat" @click="display">
<u-icon name="eye" v-if="showPassword"></u-icon>
<u-icon v-else name="eye-off"></u-icon>
</view>
</view>
<view class="top_box_one">
<text class="top_box_one_text">确认密码</text>
<input type="text" v-model="form.payPassword" placeholder="请再次输入密码" :password="!showPassword" />
<view class="repeat" @click="display">
<u-icon name="eye" v-if="showPassword"></u-icon>
<u-icon v-else name="eye-off"></u-icon>
</view>
</view>
<view class="top_box_one">
<text class="top_box_one_text">验证码</text>
<input type="number" v-model="form.captcha" placeholder="请输入短信验证码" maxlength="6" />
<view class="repeats">
<view v-if="showText == true"
style="padding: 8rpx 16rpx 6rpx 16rpx;background: #288EFB; border-radius: 15rpx;"
@click="CodeRegister">{{ Recapture }}</view>
<view v-else
style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 16rpx 6rpx 16rpx; border-radius: 15rpx;">
{{ second }}s重新发送
</view>
</view>
</view>
<view class="forgetPassword" @click="forgetPassword">重置密码</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { import navseat from '@/components/navseat.vue'
data() { export default {
return { components: {
radioChangeItem: false, //单选框 navseat
h: null,
showPassword: false,
// 注册定时器 初始值
second: 60,
showText: true,
Recapture: '发送验证码',
form: {
phone: '',
password: '',
confirmpassword: '',
checkCode: '',
source: 'promoter'
}
};
},
mounted() {},
onLoad() {},
methods: {
leftClick() {
uni.navigateBack();
}, },
async CodeRegister() { data() {
//发起验证码 return {
if (this.form.phone == null || this.form.phone == '') { radioChangeItem: false, //单选框
uni.showToast({ h: null,
title: '请输入电话号码', showPassword: false,
icon: 'none' // 注册定时器 初始值
second: 60,
showText: true,
Recapture: '发送验证码',
form: {
account: '',
password: '',
payPassword: '',
captcha: '',
source: 'promoter'
}
};
},
mounted() {},
onLoad() {},
methods: {
async CodeRegister() {
if (this.form.password == null || this.form.password == '') {
uni.showToast({
title: '请输入密码',
icon: 'none'
});
return false;
}
if (this.form.payPassword == null || this.form.payPassword == '') {
uni.showToast({
title: '请输入确认密码',
icon: 'none'
});
return false;
}
if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
uni.showToast({
title: "请输入密码长度为6-24",
icon: "none"
})
return false;
}
if (this.form.payPassword != this.form.password) {
uni.showToast({
title: '密码和确认密码不一致',
icon: 'none'
});
return false;
}
//发起验证码
const res = await this.api.smssend({
mobile: this.form.account,
event: 'forgetpwd'
}); });
return false; if (res.code == 1) {
} uni.showToast({
const res = await this.api.verifyPhoneIsExist({// post 手机验证码 title: '验证码获取成功',
phone: this.form.phone, icon: 'none'
}); });
if (res) { // 定时器
uni.showToast({ this.showText = false;
title: '验证码获取成功', this.Recapture = '重新获取';
icon: 'none' var interval = setInterval(() => {
}); let times = --this.second;
// 定时器 this.second = times < 10 ? '0' + times : times; //小于10秒补 0
this.showText = false; }, 1000);
this.Recapture = '重新获取'; setTimeout(() => {
var interval = setInterval(() => { clearInterval(interval);
let times = --this.second; this.second = 60;
this.second = times < 10 ? '0' + times : times; //小于10秒补 0 this.showText = true;
}, 1000); }, 60000);
setTimeout(() => { }
clearInterval(interval); },
this.second = 60; radioChange(n) {
this.showText = true; //是否同意
}, 60000); console.log(n);
} this.radioChangeItem = n;
}, },
radioChange(n) { display() {
//是否同意 // 切换图片显示隐藏
console.log(n); this.showPassword = !this.showPassword;
this.radioChangeItem = n; },
}, Privacy(e) {
display() { if (e == 1) {
// 切换图片显示隐藏 //用户协议
this.showPassword = !this.showPassword; uni.navigateTo({
}, url: '../login/Privacy'
Privacy(e) { });
if (e == 1) { } else {
//用户协议 uni.navigateTo({
uni.navigateTo({ //隐私政策
url: '../login/Privacy' url: '../login/Privacy'
}); });
} else { }
uni.navigateTo({ },
//隐私政策
url: '../login/Privacy'
});
}
},
async forgetPassword() { async forgetPassword() {
//注册 if (this.form.account.length != 11) {
if (this.form.phone == null || this.form.phone == '') { uni.showToast({
uni.showToast({ title: '手机号必须是11位',
title: '请输入电话号码', icon: 'none'
icon: 'none' });
}); return false;
return false; }
} if (this.form.password == null || this.form.password == '') {
if (this.form.password == null || this.form.password == "" || uni.$u.trim(this.form.password,'all') == ''){ uni.showToast({
uni.showToast({ title: '请输入密码',
title: "请输入密码或密码不能输入空格", icon: 'none'
icon: "none" });
}) return false;
return false; }
} if (this.form.payPassword == null || this.form.payPassword == '') {
if (this.form.confirmpassword == null || this.form.confirmpassword == '' || uni.$u.trim(this.form.confirmpassword,'all') == '') { uni.showToast({
uni.showToast({ title: '请输入确认密码',
title: '请输入确认密码或确认密码不能输入空格', icon: 'none'
icon: 'none' });
}); return false;
return false; }
} if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
if (this.form.checkCode == null || this.form.checkCode == '') { uni.showToast({
uni.showToast({ title: "请输入密码长度为6-24",
title: '请输入验证码', icon: "none"
icon: 'none' })
}); return false;
return false; }
} if (this.form.payPassword != this.form.password) {
if (this.form.confirmpassword != this.form.password) { uni.showToast({
uni.showToast({ title: '密码和确认密码不一致',
title: '两次密码不一致', icon: 'none'
icon: 'none' });
}); return false;
return false; }
} if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
let res = await this.api.forgetPassword({ uni.showToast({
phone: this.form.phone, title: "请输入密码长度为6-24",
password: this.form.password, icon: "none"
checkCode: this.form.checkCode, })
source: 'promoter' return false;
}); }
if (res) { if (this.form.captcha == null || this.form.captcha == '') {
uni.showToast({ uni.showToast({
title: '修改成功', title: '请输入验证码',
icon: 'none', icon: 'none'
success: () => { });
uni.navigateTo({ return false;
url: '../login/login' }
}); let res = await this.api.userforgetpwd({
} account: this.form.account,
password: this.form.password,
captcha: this.form.captcha
}); });
if (res.code == 1) {
uni.showToast({
title: '修改成功',
icon: 'none',
success: () => {
setTimeout(() => {
uni.navigateBack()
}, 1500);
}
});
}
} }
} }
} };
};
</script> </script>
<style lang="scss"> <style lang="scss">
page { page {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: linear-gradient(104deg, #4679ff 0%, #2868e8 47%, #2a94fc 100%); background: linear-gradient(104deg, #4679ff 0%, #2868e8 47%, #2a94fc 100%);
}
.container {
padding: 0 34rpx;
position: relative;
.top{
position: absolute;
left: 64rpx;
.u-navbar--fixed{
top: 88rpx;
}
}
.box {
padding-left: 64rpx;
padding-bottom: 144rpx;
box-sizing: border-box;
text {
font-size: 40rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #ffffff;
}
} }
.top_box_xx { .container {
padding: 0 34rpx;
position: relative;
.top {
position: absolute;
left: 64rpx;
.u-navbar--fixed {
top: 88rpx;
}
}
.box {
padding-left: 64rpx;
padding-bottom: 144rpx;
box-sizing: border-box;
text {
font-size: 40rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #ffffff;
}
}
.top_box::after { .top_box::after {
content: ''; content: '';
position: absolute; position: absolute;
@@ -216,6 +259,7 @@ page {
background: #9ec9fb; background: #9ec9fb;
border-radius: 0 0 40rpx 40rpx; border-radius: 0 0 40rpx 40rpx;
} }
.top_box::before { .top_box::before {
content: ''; content: '';
position: absolute; position: absolute;
@@ -225,12 +269,13 @@ page {
bottom: 0rpx; bottom: 0rpx;
z-index: 2; z-index: 2;
background: #fff; background: #fff;
border-radius: 0 0 40rpx 40rpx; border-radius: 0 0 40rpx 40rpx;
} }
.top_box { .top_box {
position: relative; position: relative;
z-index: 99; z-index: 99;
top: 200rpx; top: 120rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 0 64rpx; padding: 0 64rpx;
width: 100%; width: 100%;
@@ -240,28 +285,35 @@ page {
background: #ffffff; background: #ffffff;
border-radius: 40rpx; border-radius: 40rpx;
padding-bottom: 108rpx; padding-bottom: 108rpx;
.top_box_one { .top_box_one {
position: relative; position: relative;
width: 100%; width: 100%;
margin-top: 64rpx; margin-top: 64rpx;
border-bottom: 6rpx solid #e5e5e5; border-bottom: 6rpx solid #e5e5e5;
.top_box_one_text { .top_box_one_text {
font-size: 36rpx; font-size: 36rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN; font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
} }
input { input {
padding: 18rpx 0 20rpx 0; padding: 18rpx 0 20rpx 0;
} }
.repeat { .repeat {
position: absolute; position: absolute;
z-index: 99;
bottom: 26rpx; bottom: 26rpx;
right: 0; right: 0;
width: 25rpx; width: 25rpx;
height: 17rpx; height: 17rpx;
} }
.repeats { .repeats {
z-index: 99;
position: absolute; position: absolute;
bottom: 26rpx; bottom: 26rpx;
right: 0; right: 0;
@@ -271,8 +323,10 @@ page {
border-radius: 12rpx; border-radius: 12rpx;
} }
} }
.top_box_tow { .top_box_tow {
width: 100%; width: 100%;
text { text {
margin-top: 34rpx; margin-top: 34rpx;
font-size: 24rpx; font-size: 24rpx;
@@ -280,6 +334,7 @@ page {
color: #666666; color: #666666;
} }
} }
.forgetPassword { .forgetPassword {
width: 75%; width: 75%;
margin-top: 120rpx; margin-top: 120rpx;
@@ -291,17 +346,18 @@ page {
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
} }
.agreement { .agreement {
margin-top: 14rpx; margin-top: 14rpx;
font-size: 20rpx; font-size: 20rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN; font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500; font-weight: 500;
color: #7c8e97; color: #7c8e97;
.agreement-Item { .agreement-Item {
color: #4ca1fc; color: #4ca1fc;
} }
} }
} }
} }
}
</style> </style>

View File

@@ -0,0 +1,251 @@
<template>
<view class="Box">
<navseat :opacity='false' :title="titles" :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
<view class="box_item flex-between">
<text class="top_box_one_text">手机号</text>
<input type="number" v-model="form.account" placeholder="请输入手机号" maxlength="11" disabled="disabled" />
</view>
<view class="box_item flex-between">
<text class="top_box_one_text">密码</text>
<input type="text" v-model="form.password" placeholder="请输入密码" :password="!passwords" />
</view>
<view class="box_item flex-between">
<text class="top_box_one_text">确认密码</text>
<input type="text" v-model="form.payPassword" placeholder="确认密码" :password="!payPasswords" />
</view>
<view class="box_item flex-between" style="position:relative;">
<text class="top_box_one_text">验证码</text>
<input type="number" v-model="form.captcha" placeholder="请输入验证码" style="padding-right: 140rpx;" />
<view class="top_box_one_texts">
<view v-if="showText == true" class="yzm" @click="CodeRegister">{{ Recapture }}</view>
<view v-else style="color: #ccc; background-color: #f9f9f9; border-radius:16px; padding: 10rpx;">
{{ second }}s重新发送
</view>
</view>
</view>
<view class="flex-colum">
<view class="Box_bottom" @click="userInfosavePayPassword">确定</view>
</view>
</view>
</template>
<script>
import navseat from '@/components/navseat.vue'
export default {
components: {
navseat
},
data() {
return {
form: {
account: uni.cache.get('userinfo').mobile,
password: '',
payPassword: '',
captcha: ''
},
titles: uni.cache.get('set_pwd') == 0 ? '修改密码' : '设置密码',
passwords: false,
payPasswords: false,
// 注册定时器 初始值
second: 60,
showText: true,
Recapture: '发送验证码'
};
},
onLoad() {},
methods: {
async CodeRegister() {
if (this.form.password == null || this.form.password == '') {
uni.showToast({
title: '请输入密码',
icon: 'none'
});
return false;
}
if (this.form.payPassword == null || this.form.payPassword == '') {
uni.showToast({
title: '请输入确认密码',
icon: 'none'
});
return false;
}
if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
uni.showToast({
title: "请输入密码长度为6-24",
icon: "none"
})
return false;
}
if (this.form.payPassword != this.form.password) {
uni.showToast({
title: '密码和确认密码不一致',
icon: 'none'
});
return false;
}
//发起验证码
const res = await this.api.smssend({
mobile: this.form.account,
event: 'resetpwd'
});
if (res.code == 1) {
uni.showToast({
title: '验证码获取成功',
icon: 'none'
});
// 定时器
this.showText = false;
this.Recapture = '重新获取';
var interval = setInterval(() => {
let times = --this.second;
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
}, 1000);
setTimeout(() => {
clearInterval(interval);
this.second = 60;
this.showText = true;
}, 60000);
}
},
async userInfosavePayPassword() {
if (this.form.account.length != 11) {
uni.showToast({
title: '手机号必须是11位',
icon: 'none'
});
return false;
}
if (this.form.password == null || this.form.password == '') {
uni.showToast({
title: '请输入密码',
icon: 'none'
});
return false;
}
if (this.form.payPassword == null || this.form.payPassword == '') {
uni.showToast({
title: '请输入确认密码',
icon: 'none'
});
return false;
}
if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
uni.showToast({
title: "请输入密码长度为6-24",
icon: "none"
})
return false;
}
if (this.form.payPassword != this.form.password) {
uni.showToast({
title: '密码和确认密码不一致',
icon: 'none'
});
return false;
}
if (!uni.$u.test.rangeLength(this.form.password, [6, 24])) {
uni.showToast({
title: "请输入密码长度为6-24",
icon: "none"
})
return false;
}
if (this.form.captcha == null || this.form.captcha == '') {
uni.showToast({
title: '请输入验证码',
icon: 'none'
});
return false;
}
let res = await this.api.usersetuserpwd({
account: this.form.account,
password: this.form.password,
captcha: this.form.captcha
})
if (res.code == 1) {
uni.showToast({
title: this.titles + '成功',
icon: 'none'
});
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/index?restype=' + 1
});
}, 1500);
}
}
}
};
</script>
<style lang="scss">
page {
background: #fff;
}
.Box {
padding: 0 28rpx;
.box_one {
margin-top: 26rpx;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #999999;
}
.box_item {
padding: 36rpx 0 0 0;
.top_box_one_text {
font-size: 28rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #333333;
}
input {
width: 75%;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #999999;
}
.repeat {
position: absolute;
bottom: 26rpx;
right: 0;
width: 25rpx;
height: 17rpx;
}
.top_box_one_texts {
position: absolute;
right: 0;
font-size: 28rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #5082fd;
}
}
.flex-colum {
width: 100%;
margin-top: 156rpx;
.Box_bottom {
width: 558rpx;
height: 72rpx;
background: #5082fd;
border-radius: 50rpx;
font-size: 36rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #ffffff;
line-height: 72rpx;
text-align: center;
}
}
}
</style>

167
pages/login/switch.vue Normal file
View File

@@ -0,0 +1,167 @@
<template>
<view class="index flex-colum">
<navseat :opacity='false' title=" " :titleshow='true' :namecolor='"#fff"' iconcolor='#fff'></navseat>
<view class="index_text">
点击切换商户账号
</view>
<view class="index_box">
<view class="index_item flex-between" v-for="(item,index) in list" :key="index" @click="clickes(item)">
<view class="index_itemone flex-start">
<!-- <image class="index_itemoneimage" :src="item.avatar" mode=""></image> -->
<view class="flex-colum-start">
<view class="index_itemone_one">
{{item.title}}
</view>
<!-- <view class="index_itemone_tow">
{{item.class}}
</view> -->
</view>
</view>
<view class="index_itemonetext" v-if="item.is_online == 1">
当前使用
</view>
</view>
</view>
</view>
</template>
<script>
import navseat from '@/components/navseat.vue'
export default {
components: {
navseat
},
data() {
return {
screenheight: '',
list: [],
storeid: uni.cache.get('user').store_id
}
},
onLoad() {
this.useraccountlist()
uni.getSystemInfo({
success: (e) => {
let screenHeight = 0
console.log(e)
screenHeight = e.windowHeight
this.screenheight = {
'height': screenHeight + 'px'
}
}
})
},
methods: {
async useraccountlist() {
let res = await this.api.kstorelist()
if (res.code = 1) {
this.list = res.data
}
},
// 切换商户
async postuserswitchstore() {
},
async clickes(e) {
if (e.is_online == 1) {
return false;
}
uni.showModal({
title: '提示',
content: '确定切换商家吗?',
success: async (res) => {
if (res.confirm) {
let res = await this.api.userswitchstore({
id: e.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.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
});
}
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
}
}
</script>
<style lang="scss">
page {
background: #EDEDED;
}
.index {
height: 100%;
.index_text {
font-size: 52rpx;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #333333;
margin-top: 100rpx;
}
.index_box {
padding: 0 48rpx 60rpx 48rpx;
width: 100%;
.index_item {
align-items: flex-start;
margin-top: 32rpx;
width: 100%;
padding: 32rpx 28rpx;
background: #FFFFFF;
border-radius: 20rpx;
.index_itemone {
.index_itemoneimage {
width: 114rpx;
height: 114rpx;
}
.flex-colum-start {
// margin-left: 32rpx;
.index_itemone_one {
width: 400rpx;
font-size: 30rpx;
font-family: SourceHanSansCN-Bold, SourceHanSansCN;
font-weight: 400;
color: #333333;
}
.index_itemone_tow {
margin-top: 10rpx;
font-size: 32rpx;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #999999;
}
}
}
.index_itemonetext {
font-size: 28rpx;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #2F87FD;
}
}
}
}
</style>

18
pages/webview/index.vue Normal file
View File

@@ -0,0 +1,18 @@
<template>
<!-- <web-view :src="url"></web-view> -->
<web-view src="https://work.weixin.qq.com/kfid/kfc4219d976242c5106"></web-view>
</template>
<script>
export default {
data() {
return {
url: '', //PDF路径
};
},
async onLoad(options) {
}
};
</script>

View File

@@ -3,4 +3,4 @@
document.write( document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + (coverSupport ? ', viewport-fit=cover' : '') +
'" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.773df081.js></script><script src=/static/js/index.519ef1d2.js></script></body></html> '" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.02fb05d3.js></script><script src=/static/js/index.a34fe316.js></script></body></html>