wx
This commit is contained in:
@@ -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,4 +192,19 @@ 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);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
18
pages.json
18
pages.json
@@ -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": {
|
||||||
|
|||||||
@@ -48,6 +48,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-popup :show="canvasshow" @close="canvasshow = !canvasshow" mode="center" :round="14">
|
<u-popup :show="canvasshow" @close="canvasshow = !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>
|
||||||
@@ -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,6 +287,7 @@
|
|||||||
// 人脸前获取验证码
|
// 人脸前获取验证码
|
||||||
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) {
|
||||||
@@ -609,6 +616,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;
|
||||||
|
|||||||
@@ -81,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>
|
||||||
@@ -92,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>
|
||||||
@@ -218,14 +226,30 @@
|
|||||||
},
|
},
|
||||||
// 下载
|
// 下载
|
||||||
downloadFile(url) {
|
downloadFile(url) {
|
||||||
|
// uni.downloadFile({
|
||||||
|
// url: url, //仅为示例,并非真实的资源
|
||||||
|
// success: (res) => {
|
||||||
|
// if (res.statusCode === 200) {
|
||||||
|
// console.log('下载成功');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: url, //仅为示例,并非真实的资源
|
url: url,
|
||||||
success: (res) => {
|
success: res => {
|
||||||
|
console.log(res)
|
||||||
if (res.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
console.log('下载成功');
|
// 预览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
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -294,14 +304,30 @@
|
|||||||
},
|
},
|
||||||
// 下载
|
// 下载
|
||||||
downloadFile(url) {
|
downloadFile(url) {
|
||||||
|
// uni.downloadFile({
|
||||||
|
// url: url, //仅为示例,并非真实的资源
|
||||||
|
// success: (res) => {
|
||||||
|
// if (res.statusCode === 200) {
|
||||||
|
// console.log('下载成功');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: url, //仅为示例,并非真实的资源
|
url: url,
|
||||||
success: (res) => {
|
success: res => {
|
||||||
|
console.log(res)
|
||||||
if (res.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
console.log('下载成功');
|
// 预览pdf文件
|
||||||
|
uni.openDocument({
|
||||||
|
filePath: res.tempFilePath,
|
||||||
|
showMenu: true, // 右上角菜单,可以进行分享保存pdf
|
||||||
|
success: function(file) {
|
||||||
|
console.log("文件打开成功", file)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
<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" @click="saveMerchantBaseInfo">确定</view>
|
<view class="content_bottom" @click="requestSubscribeMessage">确定</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</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 == '') {
|
if (this.form.user_name == null || this.form.user_name == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入名称',
|
title: '请输入名称',
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -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 == '') {
|
if (this.form.user_name == null || this.form.user_name == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入名称',
|
title: '请输入名称',
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,11 @@
|
|||||||
票
|
票
|
||||||
</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="merchantindex" v-if="store_status == 2">
|
<view class="content flex-colum" @click="merchantindex" v-if="store_status == 2">
|
||||||
@@ -48,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
|
||||||
@@ -77,87 +90,51 @@
|
|||||||
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) {
|
||||||
|
// 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({
|
let token = await this.api.h5encryption({
|
||||||
store_id: uni.cache.get('userId')
|
store_id: uni.cache.get('userId')
|
||||||
@@ -168,8 +145,13 @@
|
|||||||
let res = await this.api.storestorestatus({
|
let res = await this.api.storestorestatus({
|
||||||
store_id: uni.cache.get('userId')
|
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) {
|
if (res.code == 1 && uni.cache.get('store_status') == 1) {
|
||||||
this.improveinformationform = res.data.store
|
this.improveinformationform = res.data
|
||||||
uni.cache.set('form', this.improveinformationform);
|
uni.cache.set('form', this.improveinformationform);
|
||||||
if (res.data.sz_status == 0) {
|
if (res.data.sz_status == 0) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
@@ -191,6 +173,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.restype == 2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 监听跳转
|
// 监听跳转
|
||||||
@@ -304,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) {
|
||||||
@@ -335,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');
|
||||||
},
|
},
|
||||||
@@ -348,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');
|
||||||
|
|||||||
@@ -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">
|
<view class="classvie_item flex-start">
|
||||||
<text class="classvie_itemone">开票时间:</text>
|
<text class="classvie_itemone">开票时间:</text>
|
||||||
<text class="classvie_itemtow">{{ datalsit.createtime }}</text>
|
<text class="classvie_itemtow">{{ datalsit.createtime }}</text>
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
@@ -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,12 +46,20 @@
|
|||||||
<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">
|
<view class="classvie_item flex-start">
|
||||||
<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>
|
</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>
|
||||||
|
|||||||
@@ -9,16 +9,16 @@
|
|||||||
<input type="text" v-model="form.account" :adjust-position="false" placeholder="请输入手机号码" maxlength="-1"
|
<input type="text" 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,7 +30,7 @@
|
|||||||
{{ 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"
|
||||||
@@ -40,6 +40,14 @@
|
|||||||
及
|
及
|
||||||
<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;
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
<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="text" v-model="form.phone" placeholder="请输入手机号码" data-key="mobile" />
|
<input type="number" v-model="form.account" placeholder="请输入手机号码" />
|
||||||
</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" placeholder="8-16位密码" maxlength="16" :password="!showPassword" />
|
<input type="text" v-model="form.password" placeholder="请输入密码" :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>
|
||||||
@@ -17,7 +16,7 @@
|
|||||||
</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.confirmpassword" placeholder="请再次输入密码" maxlength="16" :password="!showPassword" />
|
<input type="text" v-model="form.payPassword" placeholder="请再次输入密码" :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>
|
||||||
@@ -25,20 +24,28 @@
|
|||||||
</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.checkCode" placeholder="请输入短信验证码" maxlength="6" />
|
<input type="number" v-model="form.captcha" placeholder="请输入短信验证码" maxlength="6" />
|
||||||
<view class="repeats">
|
<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-if="showText == true"
|
||||||
<view v-else style="color: #ccc; background-color: #f9f9f9; padding: 8rpx 16rpx 6rpx 16rpx; border-radius: 15rpx;">{{ second }}s重新发送</view>
|
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>
|
</view>
|
||||||
<view class="forgetPassword" @click="forgetPassword">重置密码</view>
|
<view class="forgetPassword" @click="forgetPassword">重置密码</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import navseat from '@/components/navseat.vue'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
navseat
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
radioChangeItem: false, //单选框
|
radioChangeItem: false, //单选框
|
||||||
@@ -49,10 +56,10 @@ export default {
|
|||||||
showText: true,
|
showText: true,
|
||||||
Recapture: '发送验证码',
|
Recapture: '发送验证码',
|
||||||
form: {
|
form: {
|
||||||
phone: '',
|
account: '',
|
||||||
password: '',
|
password: '',
|
||||||
confirmpassword: '',
|
payPassword: '',
|
||||||
checkCode: '',
|
captcha: '',
|
||||||
source: 'promoter'
|
source: 'promoter'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -60,22 +67,41 @@ export default {
|
|||||||
mounted() {},
|
mounted() {},
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
methods: {
|
methods: {
|
||||||
leftClick() {
|
|
||||||
uni.navigateBack();
|
|
||||||
},
|
|
||||||
async CodeRegister() {
|
async CodeRegister() {
|
||||||
//发起验证码
|
if (this.form.password == null || this.form.password == '') {
|
||||||
if (this.form.phone == null || this.form.phone == '') {
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入电话号码',
|
title: '请输入密码',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const res = await this.api.verifyPhoneIsExist({// post 手机验证码
|
if (this.form.payPassword == null || this.form.payPassword == '') {
|
||||||
phone: this.form.phone,
|
uni.showToast({
|
||||||
|
title: '请输入确认密码',
|
||||||
|
icon: 'none'
|
||||||
});
|
});
|
||||||
if (res) {
|
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'
|
||||||
|
});
|
||||||
|
if (res.code == 1) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '验证码获取成功',
|
title: '验证码获取成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -118,59 +144,72 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async forgetPassword() {
|
async forgetPassword() {
|
||||||
//注册
|
if (this.form.account.length != 11) {
|
||||||
if (this.form.phone == null || this.form.phone == '') {
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入电话号码',
|
title: '手机号必须是11位',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.form.password == null || this.form.password == "" || uni.$u.trim(this.form.password,'all') == ''){
|
if (this.form.password == null || this.form.password == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "请输入密码或密码不能输入空格",
|
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"
|
icon: "none"
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.form.confirmpassword == null || this.form.confirmpassword == '' || uni.$u.trim(this.form.confirmpassword,'all') == '') {
|
if (this.form.payPassword != this.form.password) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入确认密码或确认密码不能输入空格',
|
title: '密码和确认密码不一致',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.form.checkCode == null || this.form.checkCode == '') {
|
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({
|
uni.showToast({
|
||||||
title: '请输入验证码',
|
title: '请输入验证码',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.form.confirmpassword != this.form.password) {
|
let res = await this.api.userforgetpwd({
|
||||||
uni.showToast({
|
account: this.form.account,
|
||||||
title: '两次密码不一致',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
let res = await this.api.forgetPassword({
|
|
||||||
phone: this.form.phone,
|
|
||||||
password: this.form.password,
|
password: this.form.password,
|
||||||
checkCode: this.form.checkCode,
|
captcha: this.form.captcha
|
||||||
source: 'promoter'
|
|
||||||
});
|
});
|
||||||
if (res) {
|
if (res.code == 1) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '修改成功',
|
title: '修改成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
success: () => {
|
success: () => {
|
||||||
uni.navigateTo({
|
setTimeout(() => {
|
||||||
url: '../login/login'
|
uni.navigateBack()
|
||||||
});
|
}, 1500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -182,20 +221,25 @@ page {
|
|||||||
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 {
|
.container {
|
||||||
padding: 0 34rpx;
|
padding: 0 34rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 64rpx;
|
left: 64rpx;
|
||||||
|
|
||||||
.u-navbar--fixed {
|
.u-navbar--fixed {
|
||||||
top: 88rpx;
|
top: 88rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
padding-left: 64rpx;
|
padding-left: 64rpx;
|
||||||
padding-bottom: 144rpx;
|
padding-bottom: 144rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||||
@@ -204,7 +248,6 @@ page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.top_box_xx {
|
|
||||||
.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;
|
||||||
@@ -227,10 +271,11 @@ page {
|
|||||||
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>
|
||||||
251
pages/login/repairpassword.vue
Normal file
251
pages/login/repairpassword.vue
Normal 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
167
pages/login/switch.vue
Normal 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
18
pages/webview/index.vue
Normal 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>
|
||||||
Reference in New Issue
Block a user