11
This commit is contained in:
parent
40f03b2215
commit
3826ce26ca
|
@ -17,22 +17,14 @@
|
|||
|
||||
<view class="cai">
|
||||
<view class="nav">
|
||||
<view :class="active == 1 ? 'active' : ''" @click="btntab(1)">
|
||||
猜你想问
|
||||
<text v-if="active == 1"></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 v-for="(item,index) in fllist" key="index" :class="active == index ? 'active' : ''" @click="btntab(index)">
|
||||
{{item.classifyName}}
|
||||
<text v-if="active == index"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="list_val" v-for="(item,index) in 4" :key="index" @click="btnitem">
|
||||
<text>怎么使用蓝牙版浇花器?</text> <image src="https://api.ccttiot.com/smartmeter/img/static/uFmOt7OXDSVaAOMeQ8eK" mode=""></image>
|
||||
<view class="list_val" v-for="(item,index) in wzlist" :key="index" @click="btnitem(item.articleId)">
|
||||
<text>{{item.title}}</text> <image src="https://api.ccttiot.com/smartmeter/img/static/uFmOt7OXDSVaAOMeQ8eK" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -45,7 +37,7 @@
|
|||
<view class="kfimg" v-if="flag">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uc8dAVNneEshmNJjPW3w" mode=""></image>
|
||||
<view class="boda">
|
||||
<view class="tel">000-260-1559</view>
|
||||
<view class="tel">{{tel}}</view>
|
||||
<view class="btntel" @click="call">
|
||||
立即拨打
|
||||
</view>
|
||||
|
@ -64,8 +56,12 @@
|
|||
bgc: {
|
||||
backgroundColor: "#fff",
|
||||
},
|
||||
active:1,
|
||||
flag:false
|
||||
active:0,
|
||||
flag:false,
|
||||
fllist:[],
|
||||
classifyId:'',
|
||||
wzlist:[],
|
||||
tel:''
|
||||
}
|
||||
},
|
||||
// 分享到好友(会话)
|
||||
|
@ -85,16 +81,23 @@
|
|||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
this.getfenlist()
|
||||
},
|
||||
methods:{
|
||||
// 点击切换高亮
|
||||
btntab(num){
|
||||
this.active = num
|
||||
btntab(index){
|
||||
this.active = index
|
||||
this.classifyId = this.fllist[index].classifyId
|
||||
this.getwzlist()
|
||||
},
|
||||
// 点击拨打电话
|
||||
btndh(){
|
||||
this.flag = true
|
||||
this.$u.get("/app/getServerPhone").then(res => {
|
||||
if(res.code == 200){
|
||||
this.tel = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击隐藏拨打电话
|
||||
btnyc(){
|
||||
|
@ -118,11 +121,34 @@
|
|||
})
|
||||
},
|
||||
// 点击详情
|
||||
btnitem(){
|
||||
btnitem(articleId){
|
||||
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>
|
||||
|
@ -232,7 +258,7 @@
|
|||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
color: #3D3D3D;
|
||||
margin-bottom: 64rpx;
|
||||
margin-bottom: 34rpx;
|
||||
|
||||
image{
|
||||
width: 42rpx;
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<template>
|
||||
<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">
|
||||
</u-navbar>
|
||||
111111
|
||||
<view class="" v-html="obj.content">
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
@ -16,7 +18,8 @@
|
|||
backgroundColor: "#fff",
|
||||
},
|
||||
active:1,
|
||||
flag:false
|
||||
flag:false,
|
||||
obj:{}
|
||||
}
|
||||
},
|
||||
// 分享到好友(会话)
|
||||
|
@ -35,8 +38,13 @@
|
|||
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:{
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<view class="icon">
|
||||
|
||||
<view class="imgbox" v-for="(item,index) in imglist " :key="index">
|
||||
<image :src="item" mode=""></image>
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="imgbox" @click="btn">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uY8CPw9YE6JxPzcHUaqf" mode=""></image>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<view class="title">
|
||||
联系方式
|
||||
</view>
|
||||
<input type="text" placeholder="请留下手机号/邮箱/微信号,以便我们回复您"/>
|
||||
<input type="text" v-model="contact" placeholder="请留下手机号/邮箱/微信号,以便我们回复您"/>
|
||||
</view>
|
||||
|
||||
|
||||
|
@ -85,7 +85,8 @@
|
|||
imglist: [],
|
||||
token: '',
|
||||
contact: '',
|
||||
stause:false
|
||||
stause:false,
|
||||
picdomain:''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -109,22 +110,10 @@
|
|||
},
|
||||
onLoad() {
|
||||
|
||||
// this.getQiniuToken()
|
||||
this.getQiniuToken()
|
||||
// this.getstause()
|
||||
},
|
||||
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() {
|
||||
this.placeholderVisible = false;
|
||||
},
|
||||
|
@ -149,23 +138,30 @@
|
|||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
} else if (this.contact == '') {
|
||||
uni.showToast({
|
||||
title: '请输入联系方式',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
var imgString = this.imglist.join(',');
|
||||
let data = {
|
||||
type: this.cutidx,
|
||||
content: this.textValue,
|
||||
picture: imgString,
|
||||
contact: this.contact
|
||||
issueDescription: this.textValue,
|
||||
uploadedImage: imgString,
|
||||
contactInfo: this.contact
|
||||
}
|
||||
console.log(data, 'dadada');
|
||||
this.$u.post("/app/complaint", data).then((res) => {
|
||||
this.$u.post("/app/feedback", data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// this.token=res.token
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'none',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},1500)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -189,12 +185,11 @@
|
|||
success: function(res) {
|
||||
console.log(res, 'resres');
|
||||
let str = JSON.parse(res.data)
|
||||
console.log(str.key)
|
||||
_this.userImgs = 'https://api.ccttiot.com/' + str.key
|
||||
_this.userImgs = _this.picdomain + '/' + str.key
|
||||
console.log(_this.userImgs)
|
||||
_this.imglist.push(_this.userImgs)
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -203,6 +198,7 @@
|
|||
this.$u.get("/common/qiniu/uploadInfo").then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.token = res.token
|
||||
this.picdomain = res.domain
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -220,8 +216,11 @@
|
|||
font-size: 36rpx;
|
||||
line-height: 84rpx;
|
||||
text-align: center;
|
||||
margin-top: 164rpx;
|
||||
border-radius: 50rpx;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 80rpx;
|
||||
}
|
||||
.bjimg{
|
||||
width: 100%;
|
||||
|
@ -340,6 +339,7 @@
|
|||
image {
|
||||
width: 142rpx;
|
||||
height: 142rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,10 +69,15 @@
|
|||
onShow() {
|
||||
this.maskpic = ''
|
||||
},
|
||||
onUnload(){
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 获取用户信息
|
||||
getinfo() {
|
||||
this.$u.get(`/app/profile`).then((res) => {
|
||||
this.$u.get(`/appVerify/profile`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.userid = res.data.userId
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
} else if(this.list.complexity == 6){
|
||||
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)
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -248,8 +248,8 @@
|
|||
methods: {
|
||||
// 雨水感应
|
||||
btnyushui(){
|
||||
let that = this
|
||||
if(that.yschecked == true){
|
||||
if(this.yschecked == true){
|
||||
let that = this
|
||||
uni.getNetworkType({
|
||||
success(res) {
|
||||
if (res.networkType !== 'none') {
|
||||
|
@ -464,13 +464,13 @@
|
|||
}
|
||||
break;
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
|
||||
console.log("1收到设备发来的自定义数据结果:", options.data);
|
||||
this.ver_data = this.parseCustomData(options.data)
|
||||
console.log("1收到设备发来的自定义数据结果:", options.data);
|
||||
break;
|
||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS_STOP:
|
||||
if (options.result) {
|
||||
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 = filteredDevices;
|
||||
}
|
||||
|
@ -481,14 +481,15 @@
|
|||
title: '蓝牙未开启',
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
});
|
||||
})
|
||||
return
|
||||
} else {
|
||||
|
||||
}
|
||||
break;
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
// 从蓝牙拿到数据进行解析
|
||||
parseCustomData(data) {
|
||||
// 将字符串按照 "@" 分割成数组
|
||||
|
@ -507,7 +508,7 @@
|
|||
power,
|
||||
remainingPower,
|
||||
setMode
|
||||
};
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
<button class="lofo" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uxWMldLMb888YHm0qOgN" mode=""></image>
|
||||
</button>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<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-group>
|
||||
<view class="zcbdl">
|
||||
<view class="zcbdl" @click="btnzhuce">
|
||||
注册并登录
|
||||
</view>
|
||||
<view class="you">
|
||||
|
@ -54,9 +54,12 @@
|
|||
<view class="wxlogo">
|
||||
—————— 其他登录方式 ——————
|
||||
</view>
|
||||
<view class="lofo">
|
||||
<!-- <view class="lofo">
|
||||
<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> -->
|
||||
|
@ -102,6 +105,76 @@
|
|||
clearInterval(this.timer);
|
||||
},
|
||||
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){
|
||||
if(num == 1){
|
||||
this.txt = 'txt'
|
||||
|
@ -133,6 +206,7 @@
|
|||
// 点击获取验证码
|
||||
btnhuoqu(){
|
||||
this.startCountdown()
|
||||
this.$u.get(`appCaptcha?phone=${this.tel}&type=2`).then(res => {})
|
||||
},
|
||||
// 点击跳转到立即登录页
|
||||
btnljdl(){
|
||||
|
@ -169,6 +243,15 @@
|
|||
height: 64rpx;
|
||||
margin: auto;
|
||||
margin-top: 30rpx;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
image{
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.wxlogo{
|
||||
font-size: 32rpx;
|
||||
|
|
11
pages/my.vue
11
pages/my.vue
|
@ -91,7 +91,7 @@
|
|||
methods: {
|
||||
// 获取用户信息
|
||||
getinfo() {
|
||||
this.$u.get(`/app/profile`).then((res) => {
|
||||
this.$u.get(`//appVerify/profile`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.userobj = res.data
|
||||
this.imageSrc = res.data.avatar
|
||||
|
@ -124,7 +124,7 @@
|
|||
let data = {
|
||||
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: '您确定要退出登录吗?',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.clearStorage().then(() => {
|
||||
// 成功清空所有本地存储
|
||||
console.log('所有本地存储数据已清空');
|
||||
}).catch((error) => {
|
||||
// 处理错误
|
||||
console.error('清空本地存储失败', error);
|
||||
})
|
||||
uni.reLaunch({
|
||||
url:'/pages/login/login'
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user