This commit is contained in:
3321822538@qq.com 2024-10-22 18:01:20 +08:00
parent 3826ce26ca
commit 03a1b6994b
10 changed files with 384 additions and 167 deletions

View File

@ -88,7 +88,7 @@
onLoad() { onLoad() {
let that = this let that = this
xBlufi.initXBlufi(1); xBlufi.initXBlufi(1);
xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent); xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent)
xBlufi.notifyStartDiscoverBle({ xBlufi.notifyStartDiscoverBle({
'isStart': true 'isStart': true
}) })
@ -113,7 +113,7 @@
this.flag = false this.flag = false
let that = this let that = this
xBlufi.initXBlufi(1); xBlufi.initXBlufi(1);
xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent); xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent)
xBlufi.notifyStartDiscoverBle({ xBlufi.notifyStartDiscoverBle({
'isStart': true 'isStart': true
}) })
@ -190,14 +190,14 @@
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA: case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
this.ver_data = this.parseCustomData(options.data) this.ver_data = this.parseCustomData(options.data)
console.log("1收到设备发来的自定义数据结果", this.ver_data); console.log("1收到设备发来的自定义数据结果", this.ver_data)
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP: case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP:
if (options.result) { if (options.result) {
let uniqueDevicesList = Array.from(new Set(this.devicesList)); let uniqueDevicesList = Array.from(new Set(this.devicesList))
let filteredDevices = uniqueDevicesList.filter(device => device.name.substring(0, 5) === "WATER"); let filteredDevices = uniqueDevicesList.filter(device => device.name.substring(0, 5) === "WATER")
// this.devicesList // this.devicesList
this.devicesList = filteredDevices; this.devicesList = filteredDevices
} }
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START: case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
@ -233,7 +233,7 @@
power, power,
remainingPower, remainingPower,
setMode setMode
}; }
}, },
} }
} }

View File

@ -40,14 +40,12 @@
上传图片 上传图片
</view> </view>
<view class="icon"> <view class="icon">
<view class="imgbox" v-for="(item,index) in imglist " :key="index"> <view class="imgbox" v-for="(item,index) in imglist " :key="index">
<image :src="item" mode="aspectFill"></image> <image :src="item" mode="aspectFill"></image>
</view> </view>
<view class="imgbox" @click="btn"> <view class="imgbox" @click="btn">
<image src="https://api.ccttiot.com/smartmeter/img/static/uY8CPw9YE6JxPzcHUaqf" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uY8CPw9YE6JxPzcHUaqf" mode=""></image>
</view> </view>
</view> </view>
<text>上传问题图片可以让问题快速解决哦!</text> <text>上传问题图片可以让问题快速解决哦!</text>
</view> </view>
@ -59,15 +57,6 @@
<input type="text" v-model="contact" placeholder="请留下手机号/邮箱/微信号,以便我们回复您"/> <input type="text" v-model="contact" placeholder="请留下手机号/邮箱/微信号,以便我们回复您"/>
</view> </view>
<view class="lxfs" v-if="stause">
<view class="title">
联系方式
</view>
<input type="text" v-model="contact" placeholder="请留下手机号/邮箱/微信号,以便我们回复您" />
</view>
<view class="btn" @click="sub()">提交</view> <view class="btn" @click="sub()">提交</view>
</view> </view>
</template> </template>
@ -85,7 +74,6 @@
imglist: [], imglist: [],
token: '', token: '',
contact: '', contact: '',
stause:false,
picdomain:'' picdomain:''
} }
}, },
@ -109,21 +97,19 @@
} }
}, },
onLoad() { onLoad() {
this.getQiniuToken() this.getQiniuToken()
// this.getstause()
}, },
methods: { methods: {
hidePlaceholder() { hidePlaceholder() {
this.placeholderVisible = false; this.placeholderVisible = false
}, },
showPlaceholder() { showPlaceholder() {
if (!this.textValue) { if (!this.textValue) {
this.placeholderVisible = true; this.placeholderVisible = true
} }
}, },
updateWordCount() { updateWordCount() {
this.currentCount = this.textValue.trim().replace(/\s+/g, '').length; this.currentCount = this.textValue.trim().replace(/\s+/g, '').length
}, },
sub() { sub() {
if (this.cutidx == -1) { if (this.cutidx == -1) {
@ -131,21 +117,21 @@
title: '请选择反馈类型', title: '请选择反馈类型',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); })
} else if (this.textValue == '') { } else if (this.textValue == '') {
uni.showToast({ uni.showToast({
title: '请输入问题描述', title: '请输入问题描述',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); })
} else if (this.contact == '') { } else if (this.contact == '') {
uni.showToast({ uni.showToast({
title: '请输入联系方式', title: '请输入联系方式',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); })
} else { } else {
var imgString = this.imglist.join(','); var imgString = this.imglist.join(',')
let data = { let data = {
type: this.cutidx, type: this.cutidx,
issueDescription: this.textValue, issueDescription: this.textValue,
@ -163,7 +149,7 @@
uni.navigateBack() uni.navigateBack()
},1500) },1500)
} }
}); })
} }
}, },
btn() { btn() {
@ -183,7 +169,7 @@
key: 'smartmeter/img/' + math key: 'smartmeter/img/' + math
}, },
success: function(res) { success: function(res) {
console.log(res, 'resres'); console.log(res, 'resres')
let str = JSON.parse(res.data) let str = JSON.parse(res.data)
_this.userImgs = _this.picdomain + '/' + str.key _this.userImgs = _this.picdomain + '/' + str.key
console.log(_this.userImgs) console.log(_this.userImgs)

View File

@ -92,12 +92,12 @@
// //
photo() { photo() {
let that = this let that = this
const cameraContext = uni.createCameraContext(); const cameraContext = uni.createCameraContext()
cameraContext.takePhoto({ cameraContext.takePhoto({
quality: 'high', quality: 'high',
success: (res) => { success: (res) => {
console.log(res); console.log(res)
const tempFilePath = res.tempImagePath; const tempFilePath = res.tempImagePath
that.maskpic = res.tempImagePath that.maskpic = res.tempImagePath
that.tempFilePathpic = res.tempImagePath that.tempFilePathpic = res.tempImagePath
uni.showLoading({ uni.showLoading({

View File

@ -121,14 +121,14 @@
}, },
parseData(text) { parseData(text) {
// //
const items = text.split('\n'); const items = text.split('\n')
// //
items.forEach((item, index) => { items.forEach((item, index) => {
// //
const trimmedItem = item.trim(); const trimmedItem = item.trim()
// //
if (trimmedItem) { if (trimmedItem) {
this.formattedList.push(`${trimmedItem}`); this.formattedList.push(`${trimmedItem}`)
} }
}) })
}, },

View File

@ -3,7 +3,9 @@
<u-navbar :is-back="true" :title='tit' title-color="#000" :border-bottom="false" :background="bgc" <u-navbar :is-back="true" :title='tit' title-color="#000" :border-bottom="false" :background="bgc"
id="navbar"> id="navbar">
</u-navbar> </u-navbar>
<view class="" v-html="cont">
</view>
</view> </view>
</template> </template>
@ -15,7 +17,9 @@
bgc: { bgc: {
backgroundColor: "#fff", backgroundColor: "#fff",
}, },
tit:'' tit:'',
id:'',
cont:''
} }
}, },
// //
@ -36,9 +40,17 @@
}, },
onLoad(option) { onLoad(option) {
this.tit = option.tit this.tit = option.tit
this.id = option.id
this.getxq()
}, },
methods:{ methods:{
getxq() {
this.$u.get(`/app/article/${this.id}`).then((res) => {
if (res.code == 200) {
this.cont = res.data.content
}
})
},
} }
} }
</script> </script>

View File

@ -76,18 +76,22 @@
</view> </view>
</view> </view>
</view> </view>
<button @click="kq">开启</button><button @click="gb">关闭</button>
<!-- 开关选择 --> <!-- 开关选择 -->
<view class="switchbox"> <view class="switchbox">
<view class="switch_he"> <view class="switch_he">
<image src="https://api.ccttiot.com/smartmeter/img/static/u7NwkNOoQYYsvHVMkDlu" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/u7NwkNOoQYYsvHVMkDlu" mode=""></image>
<view class="yushui"> <view class="yushui">
雨水感应 <u-switch v-model="yschecked" @change="btnyushui" active-color="#7FAD76" size="40"></u-switch> 雨水感应
<u-switch v-if="yschecked" v-model="one" @change="btnyushui" inactive-color="#eee" active-color="#eee" size="40"></u-switch>
<u-switch v-else v-model="ones" @change="btnyushuis" active-color="#7FAD76" inactive-color="#7FAD76" size="40"></u-switch>
</view> </view>
</view> </view>
<view class="switch_he"> <view class="switch_he">
<image src="https://api.ccttiot.com/smartmeter/img/static/u7kd92ocUgDN052nhp4R" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/u7kd92ocUgDN052nhp4R" mode=""></image>
<view class="yushui"> <view class="yushui">
儿童锁 <u-switch v-model="etchecked" active-color="#7FAD76" size="40"></u-switch> 儿童锁 <u-switch v-if="etchecked" v-model="two" @change="btnertong" inactive-color="#eee" active-color="#eee" size="40"></u-switch>
<u-switch v-else v-model="twos" @change="btnertongs" active-color="#7FAD76" inactive-color="#7FAD76" size="40"></u-switch>
</view> </view>
</view> </view>
</view> </view>
@ -175,8 +179,12 @@
}, },
data() { data() {
return { return {
yschecked: true, one:false,
etchecked: true, ones:true,
two:false,
twos:true,
yschecked: '',
etchecked: '',
kgflag: false, kgflag: false,
activeshu: 0, activeshu: 0,
xuanzeflag: false, xuanzeflag: false,
@ -221,8 +229,8 @@
}, },
onLoad() { onLoad() {
let that = this let that = this
xBlufi.initXBlufi(1); xBlufi.initXBlufi(1)
xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent); xBlufi.listenDeviceMsgEvent(true, that.funListenDeviceMsgEvent)
xBlufi.notifyStartDiscoverBle({ xBlufi.notifyStartDiscoverBle({
'isStart': true 'isStart': true
}) })
@ -246,9 +254,52 @@
}, },
methods: { methods: {
kq(){
uni.getNetworkType({
success(res) {
if (res.networkType !== 'none') {
uni.getConnectedBluetoothDevices({
success(res) {
setTimeout(()=> {
xBlufi.notifySendCustomData({
customData:'11open'
})
},1500)
},
fail(err) {
console.error('获取已连接蓝牙设备信息失败:',err)
}
})
} else {
console.log('手机未连接网络')
}
}
})
},
gb(){
uni.getNetworkType({
success(res) {
if (res.networkType !== 'none') {
uni.getConnectedBluetoothDevices({
success(res) {
setTimeout(()=> {
xBlufi.notifySendCustomData({
customData:'11close'
})
},1500)
},
fail(err) {
console.error('获取已连接蓝牙设备信息失败:',err)
}
})
} else {
console.log('手机未连接网络')
}
}
})
},
// //
btnyushui(){ btnyushui(){
if(this.yschecked == true){
let that = this let that = this
uni.getNetworkType({ uni.getNetworkType({
success(res) { success(res) {
@ -256,10 +307,10 @@
uni.getConnectedBluetoothDevices({ uni.getConnectedBluetoothDevices({
success(res) { success(res) {
setTimeout(()=> { setTimeout(()=> {
xBlufi.notifySendCustomData({
customData:'qlose'
})
that.yschecked = false that.yschecked = false
xBlufi.notifySendCustomData({
customData:'11yudi'
})
},1500) },1500)
}, },
fail(err) { fail(err) {
@ -271,8 +322,8 @@
} }
} }
}) })
}else{ },
console.log(11); btnyushuis(){
let that = this let that = this
uni.getNetworkType({ uni.getNetworkType({
success(res) { success(res) {
@ -280,10 +331,10 @@
uni.getConnectedBluetoothDevices({ uni.getConnectedBluetoothDevices({
success(res) { success(res) {
setTimeout(()=> { setTimeout(()=> {
xBlufi.notifySendCustomData({
customData:'qpen'
})
that.yschecked = true that.yschecked = true
xBlufi.notifySendCustomData({
customData:'11unyudi'
})
},1500) },1500)
}, },
fail(err) { fail(err) {
@ -295,7 +346,55 @@
} }
} }
}) })
},
//
btnertong(){
let that = this
uni.getNetworkType({
success(res) {
if (res.networkType !== 'none') {
uni.getConnectedBluetoothDevices({
success(res) {
setTimeout(()=> {
that.etchecked = false
xBlufi.notifySendCustomData({
customData:'11lock'
})
},1500)
},
fail(err) {
console.error('获取已连接蓝牙设备信息失败:',err)
} }
})
} else {
console.log('手机未连接网络')
}
}
})
},
btnertongs(){
let that = this
uni.getNetworkType({
success(res) {
if (res.networkType !== 'none') {
uni.getConnectedBluetoothDevices({
success(res) {
setTimeout(()=> {
that.etchecked = true
xBlufi.notifySendCustomData({
customData:'11unlock'
})
},1500)
},
fail(err) {
console.error('获取已连接蓝牙设备信息失败:',err)
}
})
} else {
console.log('手机未连接网络')
}
}
})
}, },
// //
@ -434,22 +533,40 @@
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS: case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
if (options.result) { if (options.result) {
let devicesarr = options.data let devicesarr = options.data
console.log(devicesarr,'111'); console.log(devicesarr,'111')
devicesarr.forEach(device => { devicesarr.forEach(device => {
const mac = device.name.substring(4); const mac = device.name.substring(4)
if (device.name.slice(5, 17) == this.mac) { if (device.name.slice(5, 17) == this.mac) {
this.deviceId = device.deviceId this.deviceId = device.deviceId
this.name = device.name this.name = device.name
// console.log(device.name,this.mac,'222'); // console.log(device.name,this.mac,'222');
this.devicesList.push(device); this.devicesList.push(device)
let uniqueDevicesList = Array.from(new Set(this.devicesList)); let uniqueDevicesList = Array.from(new Set(this.devicesList))
this.devicesList = uniqueDevicesList; this.devicesList = uniqueDevicesList;
} }
}) })
} }
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_CONNECTED: case xBlufi.XBLUFI_TYPE.TYPE_CONNECTED:
console.log("连接回调:" + JSON.stringify(options)); console.log("连接回调:" + JSON.stringify(options))
uni.getNetworkType({
success(res) {
if (res.networkType !== 'none') {
uni.getConnectedBluetoothDevices({
success(res) {
setTimeout(()=> {
xBlufi.notifySendCustomData({
customData: "11unlock"
})
},1500)
},
fail(err) {
console.error('获取已连接蓝牙设备信息失败:',err)
}
})
}
}
})
uni.setStorageSync('device_key', 'true') uni.setStorageSync('device_key', 'true')
if (options.result) { if (options.result) {
{ {
@ -464,15 +581,15 @@
} }
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA: case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
console.log("1收到设备发来的自定义数据结果", options.data); console.log("1收到设备发来的自定义数据结果", options.data)
this.ver_data = this.parseCustomData(options.data) this.ver_data = this.parseCustomData(options.data)
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP: case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP:
if (options.result) { if (options.result) {
let uniqueDevicesList = Array.from(new Set(this.devicesList)); let uniqueDevicesList = Array.from(new Set(this.devicesList))
let filteredDevices = uniqueDevicesList.filter(device => device.name.substring(0, 5) === "WATER") let filteredDevices = uniqueDevicesList.filter(device => device.name.substring(0, 5) === "WATER")
// this.devicesList // this.devicesList
this.devicesList = filteredDevices; this.devicesList = filteredDevices
} }
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START: case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_START:
@ -483,8 +600,6 @@
duration: 3000 duration: 3000
}) })
return return
} else {
} }
break break
} }

View File

@ -29,7 +29,7 @@
<view class="wjmm" @click="btnwjmm"> <view class="wjmm" @click="btnwjmm">
忘记密码 忘记密码
</view> </view>
<view class="zcbdl"> <view class="zcbdl" @click="btndl">
登录 登录
</view> </view>
<view class="you"> <view class="you">
@ -79,6 +79,29 @@
}, },
methods:{ methods:{
//
btndl(){
let data = {
phone:this.tel,
// phoneCode:this.yzm,
// uuid:this.uuid,
password:this.password
}
this.$u.post(`/appCodeLogin`,data).then((res) => {
if (res.code == 200) {
wx.setStorageSync('token', res.token)
uni.switchTab({
url:'/pages/index/index'
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
},
// //
getPhoneNumber(e) { getPhoneNumber(e) {
this.jsCode = e.detail.code this.jsCode = e.detail.code
@ -107,7 +130,7 @@
wxLoginAsync().then(async (data) => { wxLoginAsync().then(async (data) => {
this.$u.post(`/wxlogin?mobileCode=${this.jsCode}&jsCode=${this.mobileCode}`, data).then((res) => { this.$u.post(`/wxlogin?mobileCode=${this.jsCode}&jsCode=${this.mobileCode}`, data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
wx.setStorageSync('token', res.token); wx.setStorageSync('token', res.token)
uni.switchTab({ uni.switchTab({
url:'/pages/index/index' url:'/pages/index/index'
}) })

View File

@ -49,7 +49,7 @@
</view> </view>
</view> </view>
<view class="quer" @click="btnqr"> <view class="quer" @click="btnwj">
确定 确定
</view> </view>
@ -70,7 +70,8 @@
tel:'', tel:'',
yzm:'', yzm:'',
countdown: 60, countdown: 60,
timer: null timer: null,
uuid:''
} }
}, },
// //
@ -94,9 +95,69 @@
}, },
onUnload() { onUnload() {
// //
clearInterval(this.timer); clearInterval(this.timer)
}, },
methods:{ methods:{
//
btnwj(){
if(this.tel == ''){
uni.showToast({
title: '手机号不能为空',
icon: 'none',
duration: 2000
})
}else if(this.yzm == ''){
uni.showToast({
title: '验证码不能为空',
icon: 'none',
duration: 2000
})
}else if(this.password == ''){
uni.showToast({
title: '新密码不能为空',
icon: 'none',
duration: 2000
})
}else if(this.passwords == ''){
uni.showToast({
title: '确认新密码不能为空',
icon: 'none',
duration: 2000
})
}else if(this.password != this.passwords){
uni.showToast({
title: '两次密码不一致',
icon: 'none',
duration: 2000
})
}else{
let data = {
phone:this.tel,
phoneCode:this.yzm,
uuid:this.uuid,
password:this.password
}
this.$u.put(`/forgetAppPwd?phone=${this.tel}&phoneCode=${this.yzm}&newPassword=${this.password}&uuid=${this.uuid}`,data).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
})
setTimeout(()=>{
uni.navigateBack()
},1500)
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
}
},
btn(num){ btn(num){
if(num == 1){ if(num == 1){
this.txt = 'txt' this.txt = 'txt'
@ -121,25 +182,24 @@
if (this.countdown > 0) { if (this.countdown > 0) {
this.countdown-- this.countdown--
} else { } else {
clearInterval(this.timer); // clearInterval(this.timer) //
this.countdown = 60 this.countdown = 60
} }
}, 1000); // }, 1000) //
}, },
// //
stopCountdown() { stopCountdown() {
clearInterval(this.timer); clearInterval(this.timer)
this.countdown = 0; // 0 this.countdown = 0 // 0
}, },
// //
btnhuoqu(){ btnhuoqu(){
this.startCountdown() this.startCountdown()
this.$u.get(`appCaptcha?phone=${this.tel}&type=2`).then(res => {
this.uuid = res.uuid
})
}, },
//
btnqr(){
console.log(1);
}
} }
} }
</script> </script>

View File

@ -43,7 +43,7 @@
</view> </view>
<u-checkbox-group> <u-checkbox-group>
<u-checkbox v-model="checked" shape="circle" active-color="#90B389"><text class="xieyi">我已阅读并同意 <text @click="btnyh(1)">用户协议</text> 和 <text @click="btnyh(2)">隐私政策</text></text></u-checkbox> <u-checkbox v-model="checked" shape="circle" active-color="#90B389"><text class="xieyi">我已阅读并同意 <text @click.stop="btnyh(1)">用户协议</text> 和 <text @click.stop="btnyh(2)">隐私政策</text></text></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
<view class="zcbdl" @click="btnzhuce"> <view class="zcbdl" @click="btnzhuce">
注册并登录 注册并登录
@ -78,7 +78,8 @@
tel:'', tel:'',
yzm:'', yzm:'',
countdown: 60, countdown: 60,
timer: null timer: null,
uuid:''
} }
}, },
// //
@ -102,7 +103,7 @@
}, },
onUnload() { onUnload() {
// //
clearInterval(this.timer); clearInterval(this.timer)
}, },
methods:{ methods:{
// //
@ -132,7 +133,26 @@
duration: 2000 duration: 2000
}) })
}else{ }else{
let data = {
phone:this.tel,
phoneCode:this.yzm,
uuid:this.uuid,
password:this.password
}
this.$u.post(`/appCodeLogin`,data).then((res) => {
if (res.code == 200) {
wx.setStorageSync('token', res.token)
uni.switchTab({
url:'/pages/index/index'
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
} }
}, },
@ -164,7 +184,7 @@
wxLoginAsync().then(async (data) => { wxLoginAsync().then(async (data) => {
this.$u.post(`/wxlogin?mobileCode=${this.jsCode}&jsCode=${this.mobileCode}`, data).then((res) => { this.$u.post(`/wxlogin?mobileCode=${this.jsCode}&jsCode=${this.mobileCode}`, data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
wx.setStorageSync('token', res.token); wx.setStorageSync('token', res.token)
uni.switchTab({ uni.switchTab({
url:'/pages/index/index' url:'/pages/index/index'
}) })
@ -192,21 +212,23 @@
if (this.countdown > 0) { if (this.countdown > 0) {
this.countdown-- this.countdown--
} else { } else {
clearInterval(this.timer); // clearInterval(this.timer) //
this.countdown = 60 this.countdown = 60
} }
}, 1000); // }, 1000); //
}, },
// //
stopCountdown() { stopCountdown() {
clearInterval(this.timer); clearInterval(this.timer)
this.countdown = 0; // 0 this.countdown = 0 // 0
}, },
// //
btnhuoqu(){ btnhuoqu(){
this.startCountdown() this.startCountdown()
this.$u.get(`appCaptcha?phone=${this.tel}&type=2`).then(res => {}) this.$u.get(`appCaptcha?phone=${this.tel}&type=2`).then(res => {
this.uuid = res.uuid
})
}, },
// //
btnljdl(){ btnljdl(){
@ -218,11 +240,11 @@
btnyh(num){ btnyh(num){
if(num == 1){ if(num == 1){
uni.navigateTo({ uni.navigateTo({
url:'/page_user/yinsixq?tit=' + '用户协议' url:'/page_user/yinsixq?tit=' + '用户协议' + '&id=' + 1
}) })
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url:'/page_user/yinsixq?tit=' + '隐私政策' url:'/page_user/yinsixq?tit=' + '隐私政策' + '&id=' + 2
}) })
} }
} }

View File

@ -65,7 +65,6 @@
imageSrc:'', imageSrc:'',
token:'', token:'',
picdomain:'' picdomain:''
} }
}, },
// //
@ -91,7 +90,7 @@
methods: { methods: {
// //
getinfo() { getinfo() {
this.$u.get(`//appVerify/profile`).then((res) => { this.$u.get(`/appVerify/profile`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.userobj = res.data this.userobj = res.data
this.imageSrc = res.data.avatar this.imageSrc = res.data.avatar
@ -148,15 +147,15 @@
btnxq(num){ btnxq(num){
if(num == 1){ if(num == 1){
uni.navigateTo({ uni.navigateTo({
url:'/page_user/yinsixq?tit=' + '隐私政策' url:'/page_user/yinsixq?tit=' + '隐私政策' + '&id=' + 2
}) })
}else if(num == 2){ }else if(num == 2){
uni.navigateTo({ uni.navigateTo({
url:'/page_user/yinsixq?tit=' + '用户协议' url:'/page_user/yinsixq?tit=' + '用户协议' + '&id=' + 1
}) })
}else if(num == 3){ }else if(num == 3){
uni.navigateTo({ uni.navigateTo({
url:'/page_user/yinsixq?tit=' + '关于我们' url:'/page_user/yinsixq?tit=' + '关于我们' + '&id=' + 3
}) })
}else if(num == 4){ }else if(num == 4){
uni.showModal({ uni.showModal({
@ -166,10 +165,10 @@
if (res.confirm) { if (res.confirm) {
uni.clearStorage().then(() => { uni.clearStorage().then(() => {
// //
console.log('所有本地存储数据已清空'); console.log('所有本地存储数据已清空')
}).catch((error) => { }).catch((error) => {
// //
console.error('清空本地存储失败', error); console.error('清空本地存储失败', error)
}) })
uni.reLaunch({ uni.reLaunch({
url:'/pages/login/login' url:'/pages/login/login'