This commit is contained in:
魏啾
2024-11-23 13:55:01 +08:00
parent 2147f86b93
commit bfd37cddf5
18 changed files with 1237 additions and 350 deletions

View File

@@ -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);
},
}

View File

@@ -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": {

View File

@@ -48,6 +48,12 @@
</view>
<u-popup :show="canvasshow" @close="canvasshow = !canvasshow" mode="center" :round="14">
<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;">
{{formCode.text}}
</view>
@@ -90,9 +96,10 @@
<u-popup :show="showpopup" @close="showpopup = !showpopup" mode="center" :round="14">
<view class="popupbox">
<view class="popupboxtop">
开票人登记信息
<u-icon style="position: absolute;right:22rpx;top: 40rpx; " name="close" color="#999999"
@click="showpopup = false" size="20"></u-icon>
<text>开票人登记信息</text>
<view style="position: absolute;right:22rpx;top: 40rpx; ">
<u-icon name="close" color="#999999" @click="showpopup = false" size="20"></u-icon>
</view>
</view>
<view class="popupboxform">
<view class="addshowboxinput flex-colum-start" @click="selectshowlslbs = !selectshowlslbs">
@@ -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;

View File

@@ -81,6 +81,14 @@
<text>开票税额</text>
<text>{{details.tax_amount}}</text>
</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">
<text>发票状态</text>
<text>{{details.status}}</text>
@@ -92,15 +100,15 @@
<view class="detailsclassbox" v-if="details.status =='开票成功'">
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
<text>PDF版式文件</text>
<text>下载</text>
<text style="color:#3089fd;">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
<text>OFD版式文件</text>
<text>下载</text>
<text style="color: #3089fd;">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
<text>XML版式文件</text>
<text>下载</text>
<text style="color:#3089fd;">下载</text>
</view>
</view>
</view>
@@ -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

View File

@@ -43,7 +43,9 @@
<view class="detailsclass">
<view class="detailsclasstop">
<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 class="detailsclassbox">
<view class="detailsclassboxitem">
@@ -79,6 +81,14 @@
<text>开票税额</text>
<text>{{details.tax_amount}}</text>
</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">
<text>发票状态</text>
<text>{{details.status}}</text>
@@ -90,15 +100,15 @@
<view class="detailsclassbox" v-if="details.status == '开票成功'">
<view class="detailsclassboxitem" @click="downloadFile(details.pdfUrl)">
<text>PDF版式文件</text>
<text>下载</text>
<text style="color:#3089fd;">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.ofdUrl)">
<text>OFD版式文件</text>
<text>下载</text>
<text style="color:#3089fd;">下载</text>
</view>
<view class="detailsclassboxitem" @click="downloadFile(details.xmlUrl)">
<text>XML版式文件</text>
<text>下载</text>
<text style="color:#3089fd;">下载</text>
</view>
</view>
</view>
@@ -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)
}
})
}
}
});
})
}
}
}

View File

@@ -94,7 +94,7 @@
<u-icon name="weixin-fill" color="#04be02" size="28"></u-icon>
微信抬头一键导入
</view>
<view class="content_bottom" @click="saveMerchantBaseInfo">确定</view>
<view class="content_bottom" @click="requestSubscribeMessage">确定</view>
</view>
</template>
@@ -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: '请输入名称',

View File

@@ -64,7 +64,7 @@
拒绝理由:{{form.no|| '无'}}</view>
</view>
</view>
<view class="content_bottom" @click="saveMerchantBaseInfo">
<view class="content_bottom" @click="requestSubscribeMessage">
确定
</view>
</view>
@@ -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: '请输入名称',

View File

@@ -33,9 +33,18 @@
<text class="classvie_itemtow">{{ datalsit.ktime }}</text>
</view>
</view>
<view style="margin-top:80rpx;text-align: center;color:#3088fd ;" v-if="datalsit.status != 2" @click="makePhoneCall(datalsit)">
联系商家
</view>
<!-- #ifdef MP-WEIXIN -->
<!-- <view style="margin-top:80rpx;text-align: center;color:#3088fd ;" v-if="datalsit.status != 2"
@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>
</template>
@@ -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;

View File

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

View File

@@ -16,6 +16,11 @@
</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 class="Box flex-between" v-if="restype == 1 && improveinformation">
<view class="content flex-colum" @click="merchantindex" v-if="store_status == 2">
@@ -48,6 +53,14 @@
<button class="btn">打开小程序</button>
</script>
</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 class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
网页版地址:https://h5-invoice.sxczgkj.cn
@@ -77,121 +90,99 @@
onLoaduserId: '',
infos: uni.getSystemInfoSync(),
store_status: uni.cache.get('store_status'),
list: [{
imge: 'https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/item2.png',
name: '后台管理',
show: true,
text: 'houtai',
url: 'electric/index',
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退出 类型
list: [],
is_k_list: '', // 开票员列表 1 显示 2不显示
improveinformationform: {
is_tax: '',
store: {
title: ''
}
]
}
};
},
async onLoad(e) {
await this.$onLaunched;
// #ifdef MP-WEIXIN
// 判断商家还是个体
let restype = await this.api.judgeuseridentity({
open_id: uni.cache.get('open_id') //临时登录凭证
})
console.log(restype.data)
this.restype = restype.data.type
if (this.restype == 1 && !uni.getStorageSync('logintoken')) {
uni.reLaunch({
url: '/pages/login/login'
})
return false;
}
// #endif
// // #ifdef MP-WEIXIN
// // 判断商家还是个体
// let restype = await this.api.judgeuseridentity({
// open_id: uni.cache.get('open_id') //临时登录凭证
// })
// console.log(restype.data)
// this.restype = restype.data.type
// if (this.restype == 1 && !uni.getStorageSync('logintoken')) {
// uni.reLaunch({
// url: '/pages/login/login'
// })
// return false;
// }
// // #endif
try {
if (e.userId) {
uni.cache.set('Type', e.type);
uni.cache.set('userId', e.userId);
// 传参进来肯定是极速开票固然store_status=1
uni.cache.set('store_status', 1);
if (e.restype) {
this.restype = e.restype
}
} catch (e) {
//TODO handle the exception
}
// 总?
let token = await this.api.h5encryption({
store_id: uni.cache.get('userId')
})
if (token.code == 1) {
uni.cache.set('token', token.data.token);
}
let res = await this.api.storestorestatus({
store_id: uni.cache.get('userId')
})
if (res.code == 1 && uni.cache.get('store_status') == 1) {
this.improveinformationform = res.data.store
uni.cache.set('form', this.improveinformationform);
if (res.data.sz_status == 0) {
uni.reLaunch({
url: '/pages/index/information'
});
// try {
// if (e.userId) {
// uni.cache.set('Type', e.type);
// uni.cache.set('userId', e.userId);
// // 传参进来肯定是极速开票固然store_status=1
// uni.cache.set('store_status', 1);
// }
// } catch (e) {
// //TODO handle the exception
// }
if (this.restype == 1) {
if (uni.cache.get('userId')) {
// 总?
let token = await this.api.h5encryption({
store_id: uni.cache.get('userId')
})
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 {
this.improveinformation = true
uni.reLaunch({
url: '/pages/login/login'
});
}
} 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');
}
}
this.restype == 2
}
},
// 监听跳转
handleLaunch() {
@@ -304,6 +295,11 @@
success: function() {}
});
},
clickswitch() {
uni.navigateTo({
url: '/pages/login/switch'
})
},
// 跳转
async clickcontent(item) {
switch (item.type) {
@@ -335,6 +331,23 @@
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() {
uni.pro.navigateTo('index/auditbilling');
},
@@ -348,7 +361,7 @@
uni.pro.navigateTo('index/merchant');
},
information() {
uni.pro.navigateTo('index/information', this.improveinformationform);
uni.pro.navigateTo('index/information', this.improveinformationform.store);
},
notification() {
uni.pro.navigateTo('index/notification');

View File

@@ -12,7 +12,7 @@
<view class="content_boxtoptow" v-if="datalsit.status == 4">已作废</view>
</view>
<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 }}
</view>
<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_itemtow">{{ datalsit.article }}</text>
</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">
<text class="classvie_itemone">开票时间</text>
<text class="classvie_itemtow">{{ datalsit.createtime }}</text>

View File

@@ -28,7 +28,7 @@
</view>
</view>
<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}}
</view>
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">

View File

@@ -22,7 +22,7 @@
</view>
</view>
<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}}
</view>
<view class="classvie_item flex-start" v-if="datalsit.status == 2 || datalsit.status == 4">
@@ -46,12 +46,20 @@
<text class="classvie_itemone">项目名称</text>
<text class="classvie_itemtow">{{datalsit.article}}</text>
</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">
<text class="classvie_itemone">开票时间</text>
<text class="classvie_itemtow">{{datalsit.createtime}}</text>
</view>
</view>
<view class="content_boxt_tow">
<view class="content_boxt_tow" v-if="datalsit.url">
<view class="content_boxt_towtext">
微信扫一扫即可开票
</view>

View File

@@ -9,16 +9,16 @@
<input type="text" v-model="form.account" :adjust-position="false" placeholder="请输入手机号码" maxlength="-1"
data-key="mobile" />
</view>
<!-- <view class="top_box_one">
<view class="top_box_one">
<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" />
<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">
</view>
<!-- <view class="top_box_one">
<text class="top_box_one_text">验证码</text>
<input type="mobile" v-model="form.captcha" placeholder="请输入短信验证码" maxlength="6" />
<view class="repeats">
@@ -30,16 +30,24 @@
{{ second }}s重新发送
</view>
</view>
</view>
</view> -->
<view class="toLogin" @click="userlogin">登录</view>
<!-- <view class="agreement flex-start">
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
<!--<view class="agreement flex-start">
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
size="12"></u-checkbox></u-checkbox-group>
<text>阅读并同意银收客</text>
<view class="agreement-Item" @click="Privacy(1)">用户协议</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>
</template>
@@ -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;

View File

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