This commit is contained in:
3321822538@qq.com 2024-10-21 18:03:03 +08:00
parent 40f03b2215
commit 3826ce26ca
9 changed files with 204 additions and 75 deletions

View File

@ -17,22 +17,14 @@
<view class="cai"> <view class="cai">
<view class="nav"> <view class="nav">
<view :class="active == 1 ? 'active' : ''" @click="btntab(1)"> <view v-for="(item,index) in fllist" key="index" :class="active == index ? 'active' : ''" @click="btntab(index)">
猜你想问 {{item.classifyName}}
<text v-if="active == 1"></text> <text v-if="active == index"></text>
</view>
<view :class="active == 2 ? 'active' : ''" @click="btntab(2)">
费用问题
<text v-if="active == 2"></text>
</view>
<view :class="active == 3 ? 'active' : ''" @click="btntab(3)">
使用问题
<text v-if="active == 3"></text>
</view> </view>
</view> </view>
<view class="list"> <view class="list">
<view class="list_val" v-for="(item,index) in 4" :key="index" @click="btnitem"> <view class="list_val" v-for="(item,index) in wzlist" :key="index" @click="btnitem(item.articleId)">
<text>怎么使用蓝牙版浇花器</text> <image src="https://api.ccttiot.com/smartmeter/img/static/uFmOt7OXDSVaAOMeQ8eK" mode=""></image> <text>{{item.title}}</text> <image src="https://api.ccttiot.com/smartmeter/img/static/uFmOt7OXDSVaAOMeQ8eK" mode=""></image>
</view> </view>
</view> </view>
</view> </view>
@ -45,7 +37,7 @@
<view class="kfimg" v-if="flag"> <view class="kfimg" v-if="flag">
<image src="https://api.ccttiot.com/smartmeter/img/static/uc8dAVNneEshmNJjPW3w" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uc8dAVNneEshmNJjPW3w" mode=""></image>
<view class="boda"> <view class="boda">
<view class="tel">000-260-1559</view> <view class="tel">{{tel}}</view>
<view class="btntel" @click="call"> <view class="btntel" @click="call">
立即拨打 立即拨打
</view> </view>
@ -64,8 +56,12 @@
bgc: { bgc: {
backgroundColor: "#fff", backgroundColor: "#fff",
}, },
active:1, active:0,
flag:false flag:false,
fllist:[],
classifyId:'',
wzlist:[],
tel:''
} }
}, },
// //
@ -85,16 +81,23 @@
} }
}, },
onLoad() { onLoad() {
this.getfenlist()
}, },
methods:{ methods:{
// //
btntab(num){ btntab(index){
this.active = num this.active = index
this.classifyId = this.fllist[index].classifyId
this.getwzlist()
}, },
// //
btndh(){ btndh(){
this.flag = true this.flag = true
this.$u.get("/app/getServerPhone").then(res => {
if(res.code == 200){
this.tel = res.data
}
})
}, },
// //
btnyc(){ btnyc(){
@ -118,11 +121,34 @@
}) })
}, },
// //
btnitem(){ btnitem(articleId){
uni.navigateTo({ uni.navigateTo({
url:'/page_user/kefuxq' url:'/page_user/kefuxq?classifyId=' + articleId
}) })
} },
//
getfenlist(){
this.$u.get("/app/articleClassify/list").then(res => {
if(res.code == 200){
this.fllist = res.data
this.classifyId = res.data[0].classifyId
this.getwzlist()
}
})
},
//
getwzlist(){
let data = {
classifyId:this.classifyId
}
this.$u.get("/app/article/list?pageNum=1&pageSize=999").then(res => {
if(res.code == 200){
this.wzlist = res.rows
}
})
},
} }
} }
</script> </script>
@ -232,7 +258,7 @@
align-items: center; align-items: center;
font-size: 28rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
margin-bottom: 64rpx; margin-bottom: 34rpx;
image{ image{
width: 42rpx; width: 42rpx;

View File

@ -1,9 +1,11 @@
<template> <template>
<view> <view>
<u-navbar :is-back="true" title='问题详情' title-color="#000" :border-bottom="false" :background="bgc" <u-navbar :is-back="true" :title='obj.title' title-color="#000" :border-bottom="false" :background="bgc"
id="navbar"> id="navbar">
</u-navbar> </u-navbar>
111111 <view class="" v-html="obj.content">
</view>
</view> </view>
</template> </template>
@ -16,7 +18,8 @@
backgroundColor: "#fff", backgroundColor: "#fff",
}, },
active:1, active:1,
flag:false flag:false,
obj:{}
} }
}, },
// //
@ -35,8 +38,13 @@
path: '/pages/index/index' path: '/pages/index/index'
} }
}, },
onLoad() { onLoad(option) {
this.classifyId = option.classifyId
this.$u.get(`app/article/${this.classifyId}`).then(res => {
if(res.code == 200){
this.obj = res.data
}
})
}, },
methods:{ methods:{

View File

@ -42,7 +42,7 @@
<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=""></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>
@ -56,7 +56,7 @@
<view class="title"> <view class="title">
联系方式 联系方式
</view> </view>
<input type="text" placeholder="请留下手机号/邮箱/微信号,以便我们回复您"/> <input type="text" v-model="contact" placeholder="请留下手机号/邮箱/微信号,以便我们回复您"/>
</view> </view>
@ -85,7 +85,8 @@
imglist: [], imglist: [],
token: '', token: '',
contact: '', contact: '',
stause:false stause:false,
picdomain:''
} }
}, },
computed: { computed: {
@ -109,22 +110,10 @@
}, },
onLoad() { onLoad() {
// this.getQiniuToken() this.getQiniuToken()
// this.getstause() // this.getstause()
}, },
methods: { methods: {
getstause() {
this.$u.get('/app/config/wa').then((res) => {
if (res.code == 200) {
console.log(res)
this.stause = res.data
if (this.stause == true) {
}
}
})
},
hidePlaceholder() { hidePlaceholder() {
this.placeholderVisible = false; this.placeholderVisible = false;
}, },
@ -149,23 +138,30 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
} else { } else if (this.contact == '') {
uni.showToast({
title: '请输入联系方式',
icon: 'none',
duration: 2000
});
} else {
var imgString = this.imglist.join(','); var imgString = this.imglist.join(',');
let data = { let data = {
type: this.cutidx, type: this.cutidx,
content: this.textValue, issueDescription: this.textValue,
picture: imgString, uploadedImage: imgString,
contact: this.contact contactInfo: this.contact
} }
console.log(data, 'dadada'); this.$u.post("/app/feedback", data).then((res) => {
this.$u.post("/app/complaint", data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
// this.token=res.token
uni.showToast({ uni.showToast({
title: '提交成功', title: '提交成功',
icon: 'none', icon: 'success',
duration: 2000 duration: 2000
}); })
setTimeout(()=>{
uni.navigateBack()
},1500)
} }
}); });
} }
@ -189,12 +185,11 @@
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)
console.log(str.key) _this.userImgs = _this.picdomain + '/' + str.key
_this.userImgs = 'https://api.ccttiot.com/' + str.key
console.log(_this.userImgs) console.log(_this.userImgs)
_this.imglist.push(_this.userImgs) _this.imglist.push(_this.userImgs)
} }
}); })
} }
}) })
}, },
@ -203,6 +198,7 @@
this.$u.get("/common/qiniu/uploadInfo").then((res) => { this.$u.get("/common/qiniu/uploadInfo").then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.token = res.token this.token = res.token
this.picdomain = res.domain
} }
}) })
}, },
@ -220,8 +216,11 @@
font-size: 36rpx; font-size: 36rpx;
line-height: 84rpx; line-height: 84rpx;
text-align: center; text-align: center;
margin-top: 164rpx;
border-radius: 50rpx; border-radius: 50rpx;
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 80rpx;
} }
.bjimg{ .bjimg{
width: 100%; width: 100%;
@ -340,6 +339,7 @@
image { image {
width: 142rpx; width: 142rpx;
height: 142rpx; height: 142rpx;
border-radius: 10rpx;
} }
} }
} }

View File

@ -69,10 +69,15 @@
onShow() { onShow() {
this.maskpic = '' this.maskpic = ''
}, },
onUnload(){
uni.switchTab({
url:'/pages/index/index'
})
},
methods: { methods: {
// //
getinfo() { getinfo() {
this.$u.get(`/app/profile`).then((res) => { this.$u.get(`/appVerify/profile`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.userid = res.data.userId this.userid = res.data.userId
} }

View File

@ -107,7 +107,7 @@
} else if(this.list.complexity == 6){ } else if(this.list.complexity == 6){
this.text = '非常困难' this.text = '非常困难'
} }
if(res.data.maintenanceFocus != null || re.data.maintenanceFocus.length > 0){ if(res.data.maintenanceFocus != null || res.data.maintenanceFocus.length > 0){
this.parseData(res.data.maintenanceFocus) this.parseData(res.data.maintenanceFocus)
} }
} else { } else {

View File

@ -248,8 +248,8 @@
methods: { methods: {
// //
btnyushui(){ btnyushui(){
let that = this if(this.yschecked == true){
if(that.yschecked == true){ let that = this
uni.getNetworkType({ uni.getNetworkType({
success(res) { success(res) {
if (res.networkType !== 'none') { if (res.networkType !== 'none') {
@ -464,13 +464,13 @@
} }
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA: case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
console.log("1收到设备发来的自定义数据结果", options.data);
this.ver_data = this.parseCustomData(options.data) this.ver_data = this.parseCustomData(options.data)
console.log("1收到设备发来的自定义数据结果", 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;
} }
@ -481,14 +481,15 @@
title: '蓝牙未开启', title: '蓝牙未开启',
icon: 'none', icon: 'none',
duration: 3000 duration: 3000
}); })
return return
} else { } else {
} }
break; break
} }
}, },
// //
parseCustomData(data) { parseCustomData(data) {
// "@" // "@"
@ -507,7 +508,7 @@
power, power,
remainingPower, remainingPower,
setMode setMode
}; }
}, },
} }
} }

View File

@ -42,7 +42,6 @@
<button class="lofo" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"> <button class="lofo" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<image src="https://api.ccttiot.com/smartmeter/img/static/uxWMldLMb888YHm0qOgN" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uxWMldLMb888YHm0qOgN" mode=""></image>
</button> </button>
</view> </view>
</template> </template>

View File

@ -45,7 +45,7 @@
<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="btnyh(1)">用户协议</text> 和 <text @click="btnyh(2)">隐私政策</text></text></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
<view class="zcbdl"> <view class="zcbdl" @click="btnzhuce">
注册并登录 注册并登录
</view> </view>
<view class="you"> <view class="you">
@ -54,9 +54,12 @@
<view class="wxlogo"> <view class="wxlogo">
其他登录方式 其他登录方式
</view> </view>
<view class="lofo"> <!-- <view class="lofo">
<image src="https://api.ccttiot.com/smartmeter/img/static/uxWMldLMb888YHm0qOgN" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uxWMldLMb888YHm0qOgN" mode=""></image>
</view> </view> -->
<button class="lofo" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<image src="https://api.ccttiot.com/smartmeter/img/static/uxWMldLMb888YHm0qOgN" mode=""></image>
</button>
<!-- <button class="button" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" style="margin-left: -10rpx;"> <!-- <button class="button" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" style="margin-left: -10rpx;">
授权登录 授权登录
</button> --> </button> -->
@ -102,6 +105,76 @@
clearInterval(this.timer); clearInterval(this.timer);
}, },
methods:{ methods:{
//
btnzhuce(){
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.checked == false){
uni.showToast({
title: '请同意用户协议和政策',
icon: 'none',
duration: 2000
})
}else{
}
},
//
getPhoneNumber(e) {
this.jsCode = e.detail.code
let that = this;
const wxLoginAsync = () => {
return new Promise((resolve, reject) => {
wx.login({
success(res) {
if (res.code) {
that.mobileCode = res.code
let data = {
jsCode: e.detail.code,
mobileCode: res.code,
}
resolve(data);
} else {
reject(res.errMsg)
}
},
fail(err) {
reject(err)
}
})
})
}
wxLoginAsync().then(async (data) => {
this.$u.post(`/wxlogin?mobileCode=${this.jsCode}&jsCode=${this.mobileCode}`, data).then((res) => {
if (res.code == 200) {
wx.setStorageSync('token', res.token);
uni.switchTab({
url:'/pages/index/index'
})
}
})
}).catch((err) => {
console.error(err)
})
},
btn(num){ btn(num){
if(num == 1){ if(num == 1){
this.txt = 'txt' this.txt = 'txt'
@ -133,6 +206,7 @@
// //
btnhuoqu(){ btnhuoqu(){
this.startCountdown() this.startCountdown()
this.$u.get(`appCaptcha?phone=${this.tel}&type=2`).then(res => {})
}, },
// //
btnljdl(){ btnljdl(){
@ -169,6 +243,15 @@
height: 64rpx; height: 64rpx;
margin: auto; margin: auto;
margin-top: 30rpx; margin-top: 30rpx;
border-radius: 50%;
position: relative;
image{
width: 64rpx;
height: 64rpx;
position: absolute;
top: 0;
left: 0;
}
} }
.wxlogo{ .wxlogo{
font-size: 32rpx; font-size: 32rpx;

View File

@ -91,7 +91,7 @@
methods: { methods: {
// //
getinfo() { getinfo() {
this.$u.get(`/app/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
@ -124,7 +124,7 @@
let data = { let data = {
img:that.imageSrc img:that.imageSrc
} }
that.$u.get(`/appVerify/avatar?img=${that.imageSrc}`,data).then(res => { that.$u.get(`/appVerify/avatar`,data).then(res => {
}) })
} }
@ -164,6 +164,13 @@
content: '您确定要退出登录吗?', content: '您确定要退出登录吗?',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
uni.clearStorage().then(() => {
//
console.log('所有本地存储数据已清空');
}).catch((error) => {
//
console.error('清空本地存储失败', error);
})
uni.reLaunch({ uni.reLaunch({
url:'/pages/login/login' url:'/pages/login/login'
}) })