This commit is contained in:
3321822538@qq.com 2024-08-29 18:02:17 +08:00
parent 0280c4bf9b
commit b599de9d4d
25 changed files with 393 additions and 498 deletions

View File

@ -20,8 +20,8 @@ const install = (Vue, vm) => {
// }, // },
// }); // });
Vue.prototype.$u.http.setConfig({ Vue.prototype.$u.http.setConfig({
// baseUrl: 'http://192.168.2.8:3302', baseUrl: 'http://192.168.2.8:3302',
baseUrl: 'https://kang.chuangtewl.com/prod-api', // baseUrl: 'https://kang.chuangtewl.com/prod-api',
loadingText: '努力加载中~', loadingText: '努力加载中~',
loadingTime: 800, loadingTime: 800,
// 设置自定义头部content-type // 设置自定义头部content-type
@ -122,9 +122,9 @@ const install = (Vue, vm) => {
} else if (res.code == 200) { } else if (res.code == 200) {
// console.log("老用户登录",res.data) // console.log("老用户登录",res.data)
uni.switchTab({ // uni.switchTab({
url:'/pages/index/index' // url:'/pages/index/index'
}) // })
} }
}); });

View File

@ -32,9 +32,6 @@
<view class="ipt" style="width: 240rpx;"> <view class="ipt" style="width: 240rpx;">
<u-input v-model="tel" placeholder='请输入手机号' placeholder-style='font-size: 20rpx;color: red;' /> <u-input v-model="tel" placeholder='请输入手机号' placeholder-style='font-size: 20rpx;color: red;' />
</view> </view>
<!-- <view class="yzmbtn">
获取验证码
</view> -->
</view> </view>
<view v-if="btnmsk" style="width: 100%;height: 100vh;position: fixed;top: 0;left: 0;background-color: #000;opacity: .1;z-index: 999;"></view> <view v-if="btnmsk" style="width: 100%;height: 100vh;position: fixed;top: 0;left: 0;background-color: #000;opacity: .1;z-index: 999;"></view>
<view v-if="flag" class="btn" @click="band()"> <view v-if="flag" class="btn" @click="band()">

View File

@ -34,9 +34,11 @@
<view :class="activeindex == 3 ? 'active' : ''" @click="btntab(3)">提现</view> <view :class="activeindex == 3 ? 'active' : ''" @click="btntab(3)">提现</view>
</view> </view>
<scroll-view class="list" scroll-y="true" @scrolltolower="onScrollToLower" style="height: 900rpx;"> <scroll-view class="list" scroll-y="true" @scrolltolower="onScrollToLower" style="height: 900rpx;">
<view class="list_item" v-for="(item,index) in wateringList" :key="index" @click="btntxdeta(item.bstId)"> <view class="list_item" v-for="(item,index) in wateringList" :key="index" @click="btntxdeta(item.bstId,item.bstType)">
<view class="top"> <view class="top">
<view>订单收入</view> <view v-if="item.bstType == 1">充值订单</view>
<view v-if="item.bstType == 2">订单退款</view>
<view v-if="item.bstType == 3">提现申请</view>
<view style="color: #8883F0;">{{item.amount}}</view> <view style="color: #8883F0;">{{item.amount}}</view>
</view> </view>
<view class="yiy"> <view class="yiy">
@ -130,10 +132,16 @@
// //
btntxdeta(id) { btntxdeta(id,type) {
if(type == 1 || type == 2){
uni.navigateTo({
url:'/page_user/orderdetail?billId=' + id
})
}else{
uni.navigateTo({ uni.navigateTo({
url: '/page_user/caiwudetail?id=' + id url: '/page_user/caiwudetail?id=' + id
}) })
}
}, },
// //
btntx() { btntx() {

View File

@ -7,11 +7,11 @@
{{obj.name == undefined ? '--' : obj.name}} {{obj.name == undefined ? '--' : obj.name}}
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">业务员</view> <view class="one">渠道商</view>
<view class="two">{{obj.bizManCount == undefined ? '--' : obj.bizManCount}}</view> <view class="two">{{obj.bizManCount == undefined ? '--' : obj.bizManCount}}</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">投资人</view> <view class="one">创业者</view>
<view class="two">{{obj.investorCount == undefined ? '--' : obj.investorCount}}</view> <view class="two">{{obj.investorCount == undefined ? '--' : obj.investorCount}}</view>
</view> </view>
</view> </view>

View File

@ -13,9 +13,9 @@
</view> </view>
<view class="one" style="margin-top: 30rpx;" v-if="flag"> <view class="one" style="margin-top: 30rpx;" v-if="flag">
<view class="name" style="margin-right: 80rpx;">投资人</view> <view class="name" style="margin-right: 80rpx;">创业者</view>
<view class="name_inp" @click="shows=true"> <view class="name_inp" @click="shows=true">
<input type="text" placeholder="请选择投资人" v-model="touzi" disabled="true"/> <input type="text" placeholder="请选择创业者" v-model="touzi" disabled="true"/>
<image src="https://api.ccttiot.com/smartmeter/img/static/uqHhYENBVzNQmTp5pmrR" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uqHhYENBVzNQmTp5pmrR" mode=""></image>
</view> </view>
</view> </view>
@ -32,7 +32,7 @@
</view> </view>
<u-select v-model="show" :list="list" @confirm="confirm"></u-select> <u-select v-model="show" :list="list" @confirm="confirm"></u-select>
<!-- 投资人 --> <!-- 创业者 -->
<u-select v-model="shows" :list="lists" @confirm="confirms"></u-select> <u-select v-model="shows" :list="lists" @confirm="confirms"></u-select>
<view class="qtg" @click="btntgm" v-if="btnflag"> <view class="qtg" @click="btntgm" v-if="btnflag">
@ -58,14 +58,14 @@
btnflag:true, btnflag:true,
list:[{ list:[{
value: '1', value: '1',
label: '代理' label: '合作伙伴'
}, },
{ {
value: '2', value: '2',
label: '投资人' label: '创业者'
},{ },{
value: '3', value: '3',
label: '业务员' label: '渠道商'
}, },
{ {
value: '4', value: '4',
@ -101,7 +101,7 @@
} }
}, },
methods: { methods: {
// //
gettzr(){ gettzr(){
this.$u.get(`/agent/user/investorList`).then(res => { this.$u.get(`/agent/user/investorList`).then(res => {
if(res.code == 200){ if(res.code == 200){
@ -140,7 +140,7 @@
}, },
// id // id
confirms(e){ confirms(e){
this.investorId = e[0].value this.investorId = e[0].value
this.touzi = e[0].label this.touzi = e[0].label
@ -154,13 +154,13 @@
if(this.name == '经营场所'){ if(this.name == '经营场所'){
this.flag = true this.flag = true
this.userType = 5 this.userType = 5
}else if(this.name == '代理'){ }else if(this.name == '合作伙伴'){
this.flag = false this.flag = false
this.userType = 2 this.userType = 2
}else if(this.name == '业务员'){ }else if(this.name == '渠道商'){
this.flag = false this.flag = false
this.userType = 3 this.userType = 3
}else if(this.name == '投资人'){ }else if(this.name == '创业者'){
this.flag = false this.flag = false
this.userType = 4 this.userType = 4
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="pages"> <view class="pages">
<u-navbar title="代理列表" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' <u-navbar title="合作伙伴列表" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff'
title-size='36' height='44'></u-navbar> title-size='36' height='44'></u-navbar>
<view class="serch"> <view class="serch">
<view class="inp"> <view class="inp">
@ -22,7 +22,7 @@
</view> </view>
<view class="devixexq"> <view class="devixexq">
<view class="xiaoav"> <view class="xiaoav">
<view class="">投资人</view> <view class="">创业者</view>
<view class="aa">{{item.investorCount == undefined ? '--' : item.investorCount}}</view> <view class="aa">{{item.investorCount == undefined ? '--' : item.investorCount}}</view>
</view> </view>
<view class="xiaoav"> <view class="xiaoav">
@ -97,7 +97,7 @@
} }
}, },
methods: { methods: {
// //
getlist(){ getlist(){
this.$u.get(`/agent/user/agentList?pageNum=${this.pagenum}&pageSize=${this.pagesize}&keyword=${this.keyword}`).then(res => { this.$u.get(`/agent/user/agentList?pageNum=${this.pagenum}&pageSize=${this.pagesize}&keyword=${this.keyword}`).then(res => {
if(res.code == 200){ if(res.code == 200){

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="pages"> <view class="pages">
<u-navbar title="代理详情" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' <u-navbar title="合作伙伴详情" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff'
title-size='36' height='44'></u-navbar> title-size='36' height='44'></u-navbar>
<view class="xqtop"> <view class="xqtop">
<view class="tit"> <view class="tit">
@ -8,14 +8,14 @@
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">推广人</view> <view class="one">推广人</view>
<view class="two">{{obj.referenceName == undefined ? '--' : obj.referenceName}}(<text v-if="obj.referenceType == 2">代理</text><text v-if="obj.referenceType == 3">业务员</text><text v-if="obj.referenceType == 4">投资人</text><text v-if="obj.referenceType == 5">经营场所</text>)</view> <view class="two">{{obj.referenceName == undefined ? '--' : obj.referenceName}}(<text v-if="obj.referenceType == 2">合作伙伴</text><text v-if="obj.referenceType == 3">渠道商</text><text v-if="obj.referenceType == 4">创业者</text><text v-if="obj.referenceType == 5">经营场所</text>)</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">推广代理</view> <view class="one">推广合作伙伴</view>
<view class="two">{{obj.agentCount == undefined ? '--' : obj.agentCount}}</view> <view class="two">{{obj.agentCount == undefined ? '--' : obj.agentCount}}</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">推广业务员</view> <view class="one">推广渠道商</view>
<view class="two">{{obj.bizManCount == undefined ? '--' : obj.bizManCount}}</view> <view class="two">{{obj.bizManCount == undefined ? '--' : obj.bizManCount}}</view>
</view> </view>
</view> </view>
@ -37,11 +37,11 @@
<view class="two">{{obj.createTime == undefined ? '--' : obj.createTime}}</view> <view class="two">{{obj.createTime == undefined ? '--' : obj.createTime}}</view>
</view> </view>
<!-- <view class="xiao"> <!-- <view class="xiao">
<view class="one">业务员</view> <view class="one">渠道商</view>
<view class="two"></view> <view class="two"></view>
</view> --> </view> -->
<view class="xiao"> <view class="xiao">
<view class="one">投资人</view> <view class="one">创业者</view>
<view class="two">{{obj.investorCount == undefined ? '--' : obj.investorCount}}</view> <view class="two">{{obj.investorCount == undefined ? '--' : obj.investorCount}}</view>
</view> </view>
<view class="xiao"> <view class="xiao">

View File

@ -22,15 +22,15 @@
<view style="color: red;" v-if="obj.status == 3">不可用</view> <view style="color: red;" v-if="obj.status == 3">不可用</view>
</view> </view>
<view class="xiaoav"> <view class="xiaoav">
<view class="">所属代理</view> <view class="">所属合作伙伴</view>
<view class="">{{obj.agentName == undefined ? '--' : obj.agentName}}</view> <view class="">{{obj.agentName == undefined ? '--' : obj.agentName}}</view>
</view> </view>
<view class="xiaoav"> <view class="xiaoav">
<view class="">所属业务员</view> <view class="">所属渠道商</view>
<view class="">{{obj.bizManName == undefined ? '--' : obj.bizManName}}</view> <view class="">{{obj.bizManName == undefined ? '--' : obj.bizManName}}</view>
</view> </view>
<view class="xiaoav"> <view class="xiaoav">
<view class="">所属投资人</view> <view class="">所属创业者</view>
<view class="">{{obj.userName == undefined ? '--' : obj.userName}}</view> <view class="">{{obj.userName == undefined ? '--' : obj.userName}}</view>
</view> </view>
</view> </view>
@ -102,15 +102,13 @@
<!-- 收益明细 --> <!-- 收益明细 -->
<view class="sjmsg"> <view class="sjmsg">
<view class="tit"> <view class="tit">
比例明细 收益明细
</view> </view>
<view class="jy" v-for="(item,index) in obj.bonusList" :key="index"> <view class="jy" v-for="(item,index) in obj.bonusList" :key="index">
<view class="one">{{item.arrivalName}}<text v-if="item.arrivalType == 1">平台</text><text v-if="item.arrivalType == 2">公司</text><text v-if="item.arrivalType == 3">代理商</text><text v-if="item.arrivalType == 4">业务员</text><text v-if="item.arrivalType == 5">投资人</text><text v-if="item.arrivalType == 6">经营场所</text>{{item.point}}%</view> <view class="one">{{item.arrivalName == undefined ? '--' : item.arrivalName}}<text v-if="item.arrivalType == 1">平台</text><text v-if="item.arrivalType == 2">公司</text><text v-if="item.arrivalType == 3">合作伙伴商</text><text v-if="item.arrivalType == 4">渠道商</text><text v-if="item.arrivalType == 5">创业者</text><text v-if="item.arrivalType == 6">经营场所</text>{{item.point}}%</view>
<!-- <view class="two">456.00</view> --> <view class="two">{{item.amount== undefined ? '--' : otem.amount}}</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
@ -215,7 +213,6 @@
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07); box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
border-radius: 20rpx 20rpx 20rpx 20rpx; border-radius: 20rpx 20rpx 20rpx 20rpx;
.devixexq { .devixexq {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

View File

@ -57,16 +57,16 @@
<view style="color: red;" v-if="item.status == 3">不可用</view> <view style="color: red;" v-if="item.status == 3">不可用</view>
</view> </view>
<view class="xiaoav"> <view class="xiaoav">
<view class="">所属代理</view> <view class="">所属合作伙伴</view>
<view class="">{{item.agentName == undefined ? '--' : item.agentName}}</view> <view class="">{{item.agentName == undefined ? '--' : item.agentName}}</view>
</view> </view>
<view class="xiaoav"> <view class="xiaoav">
<view class="">所属业务员</view> <view class="">所属渠道商</view>
<view class="">{{item.bizManName == undefined ? '--' : item.bizManName}}</view> <view class="">{{item.bizManName == undefined ? '--' : item.bizManName}}</view>
<!-- <view class="wbd" v-else @click.stop="btnbd">未绑定</view> --> <!-- <view class="wbd" v-else @click.stop="btnbd">未绑定</view> -->
</view> </view>
<view class="xiaoav"> <view class="xiaoav">
<view class="">所属投资人</view> <view class="">所属创业者</view>
<view class="" v-if="item.userName">{{item.userName == undefined ? '--' : item.userName}}</view> <view class="" v-if="item.userName">{{item.userName == undefined ? '--' : item.userName}}</view>
<view class="wbd" v-else @click.stop="btntz(item.deviceId)">未绑定</view> <view class="wbd" v-else @click.stop="btntz(item.deviceId)">未绑定</view>
</view> </view>
@ -86,7 +86,7 @@
-已经到底了- -已经到底了-
</view> </view>
</scroll-view> </scroll-view>
<!-- 业务员 --> <!-- 渠道商 -->
<!-- <u-select v-model="show" :list="list" @confirm="confirm"></u-select> --> <!-- <u-select v-model="show" :list="list" @confirm="confirm"></u-select> -->
<!-- 经营场所 --> <!-- 经营场所 -->
<u-select v-model="shows" :list="lists" @confirm="confirms"></u-select> <u-select v-model="shows" :list="lists" @confirm="confirms"></u-select>
@ -214,16 +214,16 @@
} }
}) })
}, },
// //
// btnbd() { // btnbd() {
// this.show = true // this.show = true
// }, // },
// //
btntz(deviceId) { btntz(deviceId) {
this.showtz = true this.showtz = true
this.deviceId = deviceId this.deviceId = deviceId
}, },
// //
confirmtz(e) { confirmtz(e) {
let userId = e[0].value let userId = e[0].value
let data = { let data = {
@ -315,7 +315,7 @@
} }
}) })
}, },
// //
gettzr() { gettzr() {
this.$u.get(`/agent/user/allInvestorList`).then(res => { this.$u.get(`/agent/user/allInvestorList`).then(res => {
if (res.code == 200) { if (res.code == 200) {
@ -328,7 +328,7 @@
} }
}) })
}, },
// //
gettzr() { gettzr() {
this.$u.get(`/biz/user/allInvestorList`).then(res => { this.$u.get(`/biz/user/allInvestorList`).then(res => {
if (res.code == 200) { if (res.code == 200) {

View File

@ -8,11 +8,6 @@
<view class="tit"> 场所名称</view> <view class="tit"> 场所名称</view>
<view class="but"> <input type="text" placeholder="请输入场所名称" v-model="shopname" /> </view> <view class="but"> <input type="text" placeholder="请输入场所名称" v-model="shopname" /> </view>
</view> </view>
<!-- <view class="listvals" @click="btnlx">
<view class="tit"> 场所类型</view>
<view class="but"> <input disabled="false" type="text" :placeholder="selectortext" /> <u-icon
name="arrow-down" style="position: absolute;top: 30%;right: 14rpx;"></u-icon> </view>
</view> -->
<view class="listval"> <view class="listval">
<view class="tit"> 营业时间</view> <view class="tit"> 营业时间</view>
<view class="but" <view class="but"

View File

@ -8,11 +8,6 @@
<view class="tit"> 场所名称</view> <view class="tit"> 场所名称</view>
<view class="but"> <input type="text" placeholder="请输入场所名称" v-model="shopname" /> </view> <view class="but"> <input type="text" placeholder="请输入场所名称" v-model="shopname" /> </view>
</view> </view>
<!-- <view class="listvals" @click="btnlx">
<view class="tit"> 场所类型</view>
<view class="but"> <input disabled="false" type="text" :placeholder="selectortext" /> <u-icon
name="arrow-down" style="position: absolute;top: 30%;right: 14rpx;"></u-icon> </view>
</view> -->
<view class="listval"> <view class="listval">
<view class="tit"> 营业时间</view> <view class="tit"> 营业时间</view>
<view class="but" <view class="but"
@ -39,8 +34,6 @@
<view class="jinwei"> <view class="jinwei">
<view class="tit"> 详细地址</view> <view class="tit"> 详细地址</view>
<view class="but"> <view class="but">
<!-- <input type="text" v-model="latitude" disabled="true" style="color: #666;" />
<input type="text" v-model="longitude" disabled="true" style="color: #666;" /> -->
<input type="text" placeholder="请输入详细地址" v-model="xqdz" /> <input type="text" placeholder="请输入详细地址" v-model="xqdz" />
<u-icon name="map-fill" style="position: absolute;top: 20rpx;right: 22rpx;z-index: 99;" <u-icon name="map-fill" style="position: absolute;top: 20rpx;right: 22rpx;z-index: 99;"
size="32" @click="btnjwd"></u-icon> size="32" @click="btnjwd"></u-icon>
@ -50,10 +43,6 @@
<view class="tit"> 是否展示场所</view> <view class="tit"> 是否展示场所</view>
<u-switch v-model="checked" active-color="#8883F0"></u-switch> <u-switch v-model="checked" active-color="#8883F0"></u-switch>
</view> </view>
<!-- <view class="listval">
<view class="tit"> 详细地址</view>
<view class="but"> <input type="text" placeholder="请输入详细地址" v-model="xqdz" /> </view>
</view> -->
<view class="icon"> <view class="icon">
<view class="list_box"> <view class="list_box">
<view class="lt"> <view class="lt">
@ -65,7 +54,6 @@
</view> </view>
</view> </view>
<view class="imgbox"> <view class="imgbox">
<!-- <image :src="imglist" mode="" style="width: 142rpx;height: 142rpx;border-radius: 20rpx;"></image> -->
<button <button
style="border: 0;outline: none;width: 143rpx;padding-left: 0rpx;height: 143rpx;border-radius: 16rpx;" style="border: 0;outline: none;width: 143rpx;padding-left: 0rpx;height: 143rpx;border-radius: 16rpx;"
@click="getImage"> @click="getImage">

View File

@ -13,18 +13,6 @@
<view class="sm" @click="scanQRCode"> <view class="sm" @click="scanQRCode">
<image src="https://api.ccttiot.com/smartmeter/img/static/uutVpWMLXLQNqv52U8to" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uutVpWMLXLQNqv52U8to" mode=""></image>
</view> </view>
<!-- <view class="" :class="cutidx==1?'active':''" @click="cutidx=1">
功能异常
<image style="width: 31rpx;height: 19rpx; position: absolute; right: 0;bottom: 0;display: none;" src="https://api.ccttiot.com/smartmeter/img/static/uvHUjXUhUwA0OvSA0O9K" mode=""></image>
</view>
<view class="" :class="cutidx==2?'active':''" @click="cutidx=2">
意见与建议
<image style="width: 31rpx;height: 19rpx; position: absolute; right: 0;bottom: 0;display: none;" src="https://api.ccttiot.com/smartmeter/img/static/uvHUjXUhUwA0OvSA0O9K" mode=""></image>
</view>
<view class="" :class="cutidx==3?'active':''" @click="cutidx=3">
其他
<image style="width: 31rpx;height: 19rpx; position: absolute; right: 0;bottom: 0;display: none;" src="https://api.ccttiot.com/smartmeter/img/static/uvHUjXUhUwA0OvSA0O9K" mode=""></image>
</view> -->
</view> </view>
</view> </view>
@ -49,21 +37,12 @@
<image style="border-radius: 10rpx;" :src="item" mode="aspectFit"></image> <image style="border-radius: 10rpx;" :src="item" mode="aspectFit"></image>
</view> </view>
<view class="imgbox" style="width: 17%;" @click="getImage"> <view class="imgbox" style="width: 17%;" @click="getImage">
<!-- <button style="border: 0;outline: none;width: 143rpx;padding-left: 0rpx;height: 143rpx;border-radius: 16rpx;" > -->
<image src="https://api.ccttiot.com/smartmeter/img/static/uY8CPw9YE6JxPzcHUaqf" mode="aspectFit"></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uY8CPw9YE6JxPzcHUaqf" mode="aspectFit"></image>
<!-- </button> -->
</view> </view>
</view> </view>
<text>上传问题图片可以让问题快速解决哦!</text> <text>上传问题图片可以让问题快速解决哦!</text>
</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 class="" style="position: fixed;top: 0;left: 0;width: 100%;height: 100vh;z-index: -1;"> <view class="" style="position: fixed;top: 0;left: 0;width: 100%;height: 100vh;z-index: -1;">
<image style="width: 100%;height: 100vh;" src="https://api.ccttiot.com/smartmeter/img/static/u5AWkMT3khOhGPKrUPMH" mode=""></image> <image style="width: 100%;height: 100vh;" src="https://api.ccttiot.com/smartmeter/img/static/u5AWkMT3khOhGPKrUPMH" mode=""></image>

View File

@ -5,11 +5,25 @@
<view class="my"> <view class="my">
<view class="mylt"> <view class="mylt">
<view class="">
<view class="myname"> <view class="myname">
{{infoobj.nickName == undefined ?'--' : infoobj.nickName}} {{infoobj.nickName == undefined ?'--' : infoobj.nickName}}
</view> </view>
<view class="mytel"> <view class="mytel">
{{infoobj.phonenumber == undefined ? '--' :infoobj.phonenumber}} {{infoobj.phonenumber == undefined ? '--' :infoobj.phonenumber}}
</view>
</view>
<view class="" v-if="infoobj.type == 2">
当前角色合作伙伴
</view>
<view class="" v-if="infoobj.type == 3">
当前角色渠道商
</view>
<view class="" v-if="infoobj.type == 4">
当前角色创业者
</view>
<view class="" v-if="infoobj.type == 5">
当前角色经营场所
</view> </view>
</view> </view>
<view class="myrt" @click="btnshiming"> <view class="myrt" @click="btnshiming">
@ -468,7 +482,7 @@
.my{ .my{
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 20rpx; // margin-top: 20rpx;
.mylt{ .mylt{
margin-right: 34rpx; margin-right: 34rpx;
.myname{ .myname{

View File

@ -40,9 +40,6 @@
<view class="bh"> <view class="bh">
设备编号{{detailobj.deviceNo == undefined ? '--' : detailobj.deviceNo}} 设备编号{{detailobj.deviceNo == undefined ? '--' : detailobj.deviceNo}}
</view> </view>
<!-- <view class="wc">
已完成
</view> -->
</view> </view>
<view class="item_xx"> <view class="item_xx">
<view class=""> <view class="">
@ -188,8 +185,7 @@
} }
}) })
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消')
//
} }
} }
}) })
@ -207,10 +203,9 @@
let expireTimeParts = expireTimeStr.split(" ") let expireTimeParts = expireTimeStr.split(" ")
let expireDateParts = expireTimeParts[0].split("-") let expireDateParts = expireTimeParts[0].split("-")
let expireTimePartsTime = expireTimeParts[1].split(":") let expireTimePartsTime = expireTimeParts[1].split(":")
let expireDate = new Date(expireDateParts[0], expireDateParts[1] - 1, expireDateParts[ let expireDate = new Date(expireDateParts[0], expireDateParts[1] - 1, expireDateParts[2], expireTimePartsTime[0], expireTimePartsTime[1], expireTimePartsTime[2])
2], expireTimePartsTime[0], expireTimePartsTime[1], expireTimePartsTime[2])
let now = new Date() let now = new Date()
let differenceInMs = expireDate - now; let differenceInMs = expireDate - now
if (differenceInMs <= 0) { if (differenceInMs <= 0) {
this.timeday = 0 this.timeday = 0
} else { } else {

View File

@ -60,23 +60,23 @@
<view>使用中</view> <view>使用中</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view>直属代理</view> <view>直属合作伙伴</view>
<view>{{obj.agentName == undefined ? '--' : obj.agentName}}{{obj.agentMobile == undefined ? '--' : obj.agentMobile}}</view> <view>{{obj.agentName == undefined ? '--' : obj.agentName}}{{obj.agentMobile == undefined ? '--' : obj.agentMobile}}</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view>直属业务员</view> <view>直属渠道商</view>
<view>{{obj.bizName == undefined ? '--' : obj.bizName}}{{obj.bizMobile == undefined ? '--' : obj.bizMobile}}</view> <view>{{obj.bizName == undefined ? '--' : obj.bizName}}{{obj.bizMobile == undefined ? '--' : obj.bizMobile}}</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view>投资人</view> <view>创业者</view>
<view>{{obj.investorName == undefined ? '--' : obj.investorName}}{{obj.investorMobile == undefined ? '--' : obj.investorMobile}}</view> <view>{{obj.investorName == undefined ? '--' : obj.investorName}}{{obj.investorMobile == undefined ? '--' : obj.investorMobile}}</view>
</view> </view>
<view class="symx"> <view class="symx">
比例明细 收益明细
</view> </view>
<view class="xiao" v-for="(item,index) in obj.bonusList" :key="index"> <view class="xiao" v-for="(item,index) in obj.bonusList" :key="index">
<view class="one">{{item.arrivalName}}<text v-if="item.arrivalType == 1">平台</text><text v-if="item.arrivalType == 2">公司</text><text v-if="item.arrivalType == 3">代理商</text><text v-if="item.arrivalType == 4">业务员</text><text v-if="item.arrivalType == 5">投资人</text><text v-if="item.arrivalType == 6">经营场所</text>{{item.point}}%</view> <view class="one">{{item.arrivalName == undefined ? '--' : item.arrivalName}}<text v-if="item.arrivalType == 1">平台</text><text v-if="item.arrivalType == 2">公司</text><text v-if="item.arrivalType == 3">合作伙伴商</text><text v-if="item.arrivalType == 4">渠道商</text><text v-if="item.arrivalType == 5">创业者</text><text v-if="item.arrivalType == 6">经营场所</text>{{item.point}}%</view>
<!-- <view class="two">456.00</view> --> <view class="two">{{item.amount == undefined ? '--' : item.amount}}</view>
</view> </view>
</view> </view>
<view class="sb" v-if="userflag" @click="btntz" style="width:680rpx;height: 100rpx;display: flex;justify-content: space-between;background: #FFFFFF; <view class="sb" v-if="userflag" @click="btntz" style="width:680rpx;height: 100rpx;display: flex;justify-content: space-between;background: #FFFFFF;
@ -145,7 +145,7 @@
}, },
methods: { methods: {
getxq(){ getxq(){
this.$u.get(`/app/bill/${this.billId}`).then(res => { this.$u.get(`/app/bill/arrival/${this.billId}`).then(res => {
if(res.code == 200){ if(res.code == 200){
this.obj = res.data this.obj = res.data
if(res.data.status == 2){ if(res.data.status == 2){

View File

@ -50,7 +50,7 @@
<view>{{item.suitTime}}小时</view> <view>{{item.suitTime}}小时</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view>代理信息</view> <view>合作伙伴信息</view>
<view>{{item.agentName}}{{item.agentMobile}}</view> <view>{{item.agentName}}{{item.agentMobile}}</view>
</view> </view>
<view class="bot"> <view class="bot">
@ -101,7 +101,7 @@
}, },
onLoad() { onLoad() {
let today = new Date() let today = new Date()
this.firsTime = this.formatDate(today) this.firsTime = this.formatDates(today)
this.lasTime = this.formatDate(today) this.lasTime = this.formatDate(today)
this.getlist() this.getlist()
}, },
@ -186,6 +186,12 @@
let day = String(date.getDate()).padStart(2, '0') let day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day}` return `${year}-${month}-${day}`
}, },
formatDates(date) {
let year = date.getFullYear()
let month = String(date.getMonth()).padStart(2, '0')
let day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
},
// //
getlist(){ getlist(){

View File

@ -10,7 +10,7 @@
<view class="tuixx"> <view class="tuixx">
<view class="">角色{{txt}}</view> <view class="">角色{{txt}}</view>
<view class="">推广人{{obj.userName == undefined ? '' : obj.userName}}</view> <view class="">推广人{{obj.userName == undefined ? '' : obj.userName}}</view>
<view class="" v-if="obj.investorName">投资人{{obj.investorName == undefined ? '' : obj.investorName}}</view> <view class="" v-if="obj.investorName">创业者{{obj.investorName == undefined ? '' : obj.investorName}}</view>
<view class="">可支配分成比例{{obj.point == undefined ? '' : obj.point}}%</view> <view class="">可支配分成比例{{obj.point == undefined ? '' : obj.point}}%</view>
</view> </view>
</view> </view>
@ -110,11 +110,11 @@
if(res.data.userType == 5){ if(res.data.userType == 5){
this.txt = '经营场所' this.txt = '经营场所'
}else if(res.data.userType == 4){ }else if(res.data.userType == 4){
this.txt = '投资人' this.txt = '创业者'
}else if(res.data.userType == 3){ }else if(res.data.userType == 3){
this.txt = '业务员' this.txt = '渠道商'
}else if(res.data.userType == 2){ }else if(res.data.userType == 2){
this.txt = '代理' this.txt = '合作伙伴'
} }
} }
}) })

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="pages"> <view class="pages">
<u-navbar title="投资人列表" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' <u-navbar title="创业者列表" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff'
title-size='36' height='44'></u-navbar> title-size='36' height='44'></u-navbar>
<view class="serch"> <view class="serch">
<view class="inp"> <view class="inp">
@ -92,7 +92,7 @@
} }
}, },
methods: { methods: {
// //
getlist(){ getlist(){
this.$u.get(`/agent/user/investorList?pageNum=${this.pagenum}&pageSize=${this.pagesize}&type=${this.type}&keyword=${this.keyword}`).then(res => { this.$u.get(`/agent/user/investorList?pageNum=${this.pagenum}&pageSize=${this.pagesize}&type=${this.type}&keyword=${this.keyword}`).then(res => {
if(res.code == 200){ if(res.code == 200){

View File

@ -1,17 +1,17 @@
<template> <template>
<view class="pages"> <view class="pages">
<u-navbar title="投资人详情" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' <u-navbar title="创业者详情" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff'
title-size='36' height='44'></u-navbar> title-size='36' height='44'></u-navbar>
<view class="xqtop"> <view class="xqtop">
<view class="tit"> <view class="tit">
{{obj.userName == undefined ? '--' : obj.userName}} {{obj.userName == undefined ? '--' : obj.userName}}
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">直属代理</view> <view class="one">直属合作伙伴</view>
<view class="two">{{obj.agentName == undefined ? '--' : obj.agentName}}</view> <view class="two">{{obj.agentName == undefined ? '--' : obj.agentName}}</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">业务员</view> <view class="one">渠道商</view>
<view class="two">{{obj.referenceName == undefined ? '--' : obj.referenceName}}</view> <view class="two">{{obj.referenceName == undefined ? '--' : obj.referenceName}}</view>
</view> </view>
</view> </view>

View File

@ -4,16 +4,16 @@
title-size='36' height='44'></u-navbar> title-size='36' height='44'></u-navbar>
<view class="list"> <view class="list">
<view class="img" @click="btnpage(1)" v-if="type == 2"> <view class="img" @click="btnpage(1)" v-if="type == 2">
<image src="https://api.ccttiot.com/smartmeter/img/static/uCydgSYqPWjpHs9HHyr2" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uizHnwqSgXv8sqsnW4yJ" mode=""></image>
</view> </view>
<view class="img" @click="btnpage(2)" v-if="type != 5"> <view class="img" @click="btnpage(2)" v-if="type != 5">
<image src="https://api.ccttiot.com/smartmeter/img/static/uaootT8AC9VqqRv8ibzi" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/ullaHV7ekElj4lAXWuGQ" mode=""></image>
</view> </view>
<view class="img" @click="btnpage(3)" v-if="type != 5"> <view class="img" @click="btnpage(3)" v-if="type != 5">
<image src="https://api.ccttiot.com/smartmeter/img/static/u8MWPMjzXbdaNcpho4on" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uIpmf4ICgCCBf9oyT4sg" mode=""></image>
</view> </view>
<view class="img" @click="btnpage(4)" v-if="type == 5"> <view class="img" @click="btnpage(4)" v-if="type == 5">
<image src="https://api.ccttiot.com/smartmeter/img/static/uSe9hNevxNmnqSPX8OHQ" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uaaS0g2CDVCGHhsbEo7T" mode=""></image>
</view> </view>
</view> </view>
<view class="qtg" @click="btnpage(5)"> <view class="qtg" @click="btnpage(5)">

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="pages"> <view class="pages">
<u-navbar title="业务员列表" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' <u-navbar title="渠道商列表" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff'
title-size='36' height='44'></u-navbar> title-size='36' height='44'></u-navbar>
<view class="serch"> <view class="serch">
<view class="inp"> <view class="inp">
@ -22,7 +22,7 @@
</view> </view>
<view class="devixexq"> <view class="devixexq">
<view class="xiaoav"> <view class="xiaoav">
<view class="">投资人</view> <view class="">创业者</view>
<view class="aa">{{item.investorCount == undefined ? '--' : item.investorCount}}</view> <view class="aa">{{item.investorCount == undefined ? '--' : item.investorCount}}</view>
</view> </view>
<view class="xiaoav"> <view class="xiaoav">
@ -103,7 +103,7 @@
} }
}, },
methods: { methods: {
// //
getlist(){ getlist(){
this.$u.get(`/agent/user/bizList?pageNum=${this.pagenum}&pageSize=${this.pagesize}&keyword=${this.keyword}`).then(res => { this.$u.get(`/agent/user/bizList?pageNum=${this.pagenum}&pageSize=${this.pagesize}&keyword=${this.keyword}`).then(res => {
if(res.code == 200){ if(res.code == 200){

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="pages"> <view class="pages">
<u-navbar title="业务员详情" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' <u-navbar title="渠道商详情" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff'
title-size='36' height='44'></u-navbar> title-size='36' height='44'></u-navbar>
<view class="xqtop"> <view class="xqtop">
<view class="tit"> <view class="tit">
@ -8,14 +8,14 @@
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">推广人</view> <view class="one">推广人</view>
<view class="two">{{obj.referenceName == undefined ? '--' : obj.referenceName}}(<text v-if="obj.referenceType == 2">代理</text><text v-if="obj.referenceType == 3">业务员</text><text v-if="obj.referenceType == 4">投资人</text><text v-if="obj.referenceType == 5">经营场所</text>)</view> <view class="two">{{obj.referenceName == undefined ? '--' : obj.referenceName}}(<text v-if="obj.referenceType == 2">合作伙伴</text><text v-if="obj.referenceType == 3">渠道商</text><text v-if="obj.referenceType == 4">创业者</text><text v-if="obj.referenceType == 5">经营场所</text>)</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">直属代理</view> <view class="one">直属合作伙伴</view>
<view class="two">{{obj.agentName == undefined ? '--' : obj.agentName}}</view> <view class="two">{{obj.agentName == undefined ? '--' : obj.agentName}}</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">推广业务员</view> <view class="one">推广渠道商</view>
<view class="two">{{obj.bizManCount == undefined ? '--' : obj.bizManCount}}</view> <view class="two">{{obj.bizManCount == undefined ? '--' : obj.bizManCount}}</view>
</view> </view>
</view> </view>
@ -37,7 +37,7 @@
<view class="two">{{obj.createTime == undefined ? '--' : obj.createTime}}</view> <view class="two">{{obj.createTime == undefined ? '--' : obj.createTime}}</view>
</view> </view>
<view class="xiao"> <view class="xiao">
<view class="one">投资人</view> <view class="one">创业者</view>
<view class="two">{{obj.investorCount == undefined ? '--' : obj.investorCount}}</view> <view class="two">{{obj.investorCount == undefined ? '--' : obj.investorCount}}</view>
</view> </view>
<view class="xiao"> <view class="xiao">

View File

@ -7,7 +7,9 @@
<view class="ditu"> <view class="ditu">
<view class="dtxs"> <view class="dtxs">
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" <map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" @tap="onMapTap"/> :show-location="true" :markers="covers" :scale="mapScale" @regionchange="regionchange" />
<image class="picimg" v-if="iconflag"
src="https://api.ccttiot.com/smartmeter/img/static/uApyHD7rov66zGOzwUX1" mode=""></image>
</view> </view>
<!-- 正在进行中的订单 --> <!-- 正在进行中的订单 -->
<view class="ongoing_order" v-if="sylist.length > 0"> <view class="ongoing_order" v-if="sylist.length > 0">
@ -17,17 +19,12 @@
</image> </image>
<text>您有正在使用中的设备...</text> <text>您有正在使用中的设备...</text>
</view> </view>
<!-- <image @click="btnorder" v-if="!listflag"
src="https://api.ccttiot.com/smartmeter/img/static/ublEB3HEjyfZbnKS2Ai9" mode=""></image> -->
<u-icon @click="btnorder" v-if="!listflag" name="arrow-down" color="#000" size="28"></u-icon> <u-icon @click="btnorder" v-if="!listflag" name="arrow-down" color="#000" size="28"></u-icon>
<!-- <image @click="btnorders" v-if="listflag" style="transform: rotate(180deg);margin-top: 20rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/ublEB3HEjyfZbnKS2Ai9" mode=""></image> -->
<u-icon @click="btnorders" v-if="listflag" name="arrow-up" color="#000" size="28"></u-icon> <u-icon @click="btnorders" v-if="listflag" name="arrow-up" color="#000" size="28"></u-icon>
</view> </view>
<view class="order_list" v-for="(item,index) in sylist" :key="index" v-if="listflag" <view class="order_list" v-for="(item,index) in sylist" :key="index" v-if="listflag"
@click="btnitem(item.billId)"> @click="btnitem(item.billId)">
<text>{{item.deviceName}}</text> <text>{{item.deviceName}}</text>
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uZoBXJ0MLrGUSBFk5lGp" mode=""></image> -->
<u-icon name="arrow-right" color="#000" size="28"></u-icon> <u-icon name="arrow-right" color="#000" size="28"></u-icon>
</view> </view>
</view> </view>
@ -91,9 +88,9 @@
<view class="bd"> <view class="bd">
<view class="xiao"> <view class="xiao">
<view class="">推广用户角色:</view> <view class="">推广用户角色:</view>
<view class="" v-if="tgobj.userType == 2">代理</view> <view class="" v-if="tgobj.userType == 2">合作伙伴</view>
<view class="" v-if="tgobj.userType == 3">业务员</view> <view class="" v-if="tgobj.userType == 3">渠道商</view>
<view class="" v-if="tgobj.userType == 4">投资人</view> <view class="" v-if="tgobj.userType == 4">创业者</view>
<view class="" v-if="tgobj.userType == 5">场所负责人</view> <view class="" v-if="tgobj.userType == 5">场所负责人</view>
</view> </view>
<view class="xiao" v-if="tgobj.userType == 5"> <view class="xiao" v-if="tgobj.userType == 5">
@ -141,7 +138,7 @@
longitude: '', // longitude: '', //
covers: [], // covers: [], //
jinweidu: '', jinweidu: '',
userType: '', userType: 1,
isMch: false, isMch: false,
imgad: [], imgad: [],
listmap: [], listmap: [],
@ -171,7 +168,9 @@
storeId: '', storeId: '',
dianpulist: [], dianpulist: [],
shows: false, shows: false,
xztxt: '点击选择' xztxt: '点击选择',
clickPosition: null, //
iconflag: false
}; };
}, },
onLoad(option) { onLoad(option) {
@ -233,7 +232,6 @@
this.networkInterval = null this.networkInterval = null
} }
}, },
methods: { methods: {
// //
getdianpu() { getdianpu() {
@ -265,6 +263,8 @@
this.shows = true this.shows = true
} }
}, },
// 广 // 广
tocz() { tocz() {
// //
@ -386,8 +386,7 @@
function getQueryParam(url, paramName) { function getQueryParam(url, paramName) {
let regex = new RegExp(`[?&]${paramName}=([^&]*)`) let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
let results = regex.exec(url); let results = regex.exec(url);
return results ? decodeURIComponent(results[1].replace(/\+/g, return results ? decodeURIComponent(results[1].replace(/\+/g,' ')) : null
' ')) : null
} }
let sceneValue = res.result let sceneValue = res.result
let decodedValue = decodeURIComponent(sceneValue) let decodedValue = decodeURIComponent(sceneValue)
@ -402,7 +401,8 @@
} }
that.$u.get(`/app/device/isBind?deviceNo=${id}`).then(res => { that.$u.get(`/app/device/isBind?deviceNo=${id}`).then(res => {
if (res.data == 2) { if (res.data == 2) {
that.$u.get(`/app/device/${id}/withSuitList`).then((res) => { that.$u.get(`/app/device/${id}/withSuitList`).then(
(res) => {
if (res.code == 200) { if (res.code == 200) {
uni.navigateTo({ uni.navigateTo({
url: '/page_user/fuwu?id=' + id url: '/page_user/fuwu?id=' + id
@ -517,14 +517,16 @@
onControltap(control) { onControltap(control) {
this.setMapScale() this.setMapScale()
}, },
// //
onMapTap(e){ regionchange(e) {
this.jinweidu = e.detail.longitude + ',' + e.detail.latitude this.iconflag = true
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then( if (e.type == 'end') {
res => { this.jinweidu = e.detail.centerLocation.longitude + ',' + e.detail.centerLocation.latitude
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.covers = []
this.listmap = res.data this.listmap = res.data
res.data.forEach(item => { this.listmap.forEach(item => {
// if (item.deviceCount !== null && item.deviceCount > 0) { // if (item.deviceCount !== null && item.deviceCount > 0) {
const shopCover = { const shopCover = {
id: parseFloat(item.storeId), id: parseFloat(item.storeId),
@ -536,32 +538,7 @@
// iconPath:item.picture // iconPath:item.picture
label: { label: {
content: item.name, content: item.name,
anchorX: (() => { anchorX: this.calculateAnchorX(item.name),
if (item.name.length <= 2) {
return -12
} else if (item.name.length <=
3) {
return -20
} else if (item.name.length <=
4) {
return -25
} else if (item.name.length <=
5) {
return -30
} else if (item.name.length <=
6) {
return -35
} else if (item.name.length <=
8) {
return -40
} else if (item.name.length <=
10) {
return -45
} else {
return -item.name.length *
6
}
})(),
fontWeight: 700, fontWeight: 700,
color: '#8883F0', color: '#8883F0',
borderColor: '#fff', borderColor: '#fff',
@ -570,10 +547,17 @@
} }
} }
this.covers.push(shopCover) this.covers.push(shopCover)
// console.log(this.covers);
// } // }
}) })
} }
}) })
setTimeout(()=>{
this.iconflag = false
},500)
} else {
// this.iconflag = false
}
}, },
// //
async setMapScale(e, val) { async setMapScale(e, val) {
@ -622,32 +606,7 @@
// iconPath:item.picture // iconPath:item.picture
label: { label: {
content: item.name, content: item.name,
anchorX: (() => { anchorX: this.calculateAnchorX(item.name),
if (item.name.length <= 2) {
return -12
} else if (item.name.length <=
3) {
return -20
} else if (item.name.length <=
4) {
return -25
} else if (item.name.length <=
5) {
return -30
} else if (item.name.length <=
6) {
return -35
} else if (item.name.length <=
8) {
return -40
} else if (item.name.length <=
10) {
return -45
} else {
return -item.name.length *
6
}
})(),
fontWeight: 700, fontWeight: 700,
color: '#8883F0', color: '#8883F0',
borderColor: '#fff', borderColor: '#fff',
@ -743,7 +702,7 @@
uni.setStorageSync('userType', res.data) uni.setStorageSync('userType', res.data)
this.userType = res.data.type this.userType = res.data.type
this.deviceCount = res.data.deviceCount this.deviceCount = res.data.deviceCount
} else { } else if(res.code == 401){
this.jmlogin() this.jmlogin()
} }
}) })
@ -786,12 +745,6 @@
} }
}) })
}, },
// tocz() {
// uni.navigateTo({
// url: '/page_fenbao/chongzhi?dingobj=' + JSON.stringify(this.dingobj)
// })
// },
}, },
mounted() { mounted() {
this.getMyLocation() // this.getMyLocation() //
@ -1254,6 +1207,16 @@
margin: auto; margin: auto;
// border-radius: 30rpx; // border-radius: 30rpx;
overflow: hidden; overflow: hidden;
position: relative;
.picimg {
width: 80rpx;
height: 100rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 50%;
}
} }
.tubiao { .tubiao {

View File

@ -4,7 +4,9 @@
title-size='44' height='44'></u-navbar> title-size='44' height='44'></u-navbar>
<view class="dtxs"> <view class="dtxs">
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" <map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" @tap="onMapTap"/> :show-location="true" :markers="covers" :scale="mapScale" @regionchange="regionchange"/>
<image class="picimg" v-if="iconflag"
src="https://api.ccttiot.com/smartmeter/img/static/uApyHD7rov66zGOzwUX1" mode=""></image>
</view> </view>
<view class="listbox" v-if="falga"> <view class="listbox" v-if="falga">
<!-- <view class="moshi"> <!-- <view class="moshi">
@ -85,6 +87,7 @@
mapContext: null, mapContext: null,
mapScaleInterval: null, mapScaleInterval: null,
listmap: [], listmap: [],
iconflag: false
} }
}, },
onLoad(option) { onLoad(option) {
@ -96,14 +99,15 @@
this.getxq() this.getxq()
}, },
onReady() { onReady() {
this.mapContext = uni.createMapContext('map', this);
this.mapScaleInterval = setInterval(this.updateMarkers, 1000); this.mapContext = uni.createMapContext('map', this)
this.mapScaleInterval = setInterval(this.updateMarkers, 1000)
}, },
beforeDestroy() { beforeDestroy() {
// //
if (this.mapScaleInterval) { if (this.mapScaleInterval) {
clearInterval(this.mapScaleInterval); clearInterval(this.mapScaleInterval)
this.mapScaleInterval = null; this.mapScaleInterval = null
} }
}, },
// //
@ -128,19 +132,19 @@
success: (res) => { success: (res) => {
this.covers = []; // this.covers = []; //
if (res.scale <= 14) { if (res.scale <= 14) {
this.addMarkersWithoutLabels(); this.addMarkersWithoutLabels()
} else { } else {
this.addMarkersWithLabels(); this.addMarkersWithLabels()
} }
}, },
fail: (error) => { fail: (error) => {
console.error('获取地图缩放级别失败:', error); console.error('获取地图缩放级别失败:', error)
}, },
}) })
}, },
addMarkersWithoutLabels() { addMarkersWithoutLabels() {
this.listmap.forEach((item) => { this.listmap.forEach((item) => {
if (item.deviceCount !== null && item.deviceCount > 0){ // if (item.deviceCount !== null && item.deviceCount > 0){
const shopCover = { const shopCover = {
id: parseFloat(item.storeId), id: parseFloat(item.storeId),
latitude: item.lat, latitude: item.lat,
@ -152,13 +156,13 @@
borderRadius:5, borderRadius:5,
bgColor: '#fff' bgColor: '#fff'
}; };
this.covers.push(shopCover); this.covers.push(shopCover)
} // }
}); });
}, },
addMarkersWithLabels() { addMarkersWithLabels() {
this.listmap.forEach((item) => { this.listmap.forEach((item) => {
if (item.deviceCount !== null && item.deviceCount > 0){ // if (item.deviceCount !== null && item.deviceCount > 0){
const shopCover = { const shopCover = {
id: parseFloat(item.storeId), id: parseFloat(item.storeId),
latitude: item.lat, latitude: item.lat,
@ -177,25 +181,25 @@
bgColor: '#fff' bgColor: '#fff'
} }
} }
this.covers.push(shopCover); this.covers.push(shopCover)
} // }
}); });
}, },
calculateAnchorX(name) { calculateAnchorX(name) {
let chineseLength = 0; let chineseLength = 0
let englishLength = 0; let englishLength = 0
for (let i = 0; i < name.length; i++) { for (let i = 0; i < name.length; i++) {
const charCode = name.charCodeAt(i); const charCode = name.charCodeAt(i)
// //
if (charCode >= 0x4e00 && charCode <= 0x9fa5) { if (charCode >= 0x4e00 && charCode <= 0x9fa5) {
chineseLength++; chineseLength++;
} else if (/[a-zA-Z]/.test(name[i])) { // } else if (/[a-zA-Z]/.test(name[i])) { //
englishLength = englishLength + 0.3; // 0.3 englishLength = englishLength + 0.3 // 0.3
} }
} }
const totalLength = chineseLength + englishLength * 2; // const totalLength = chineseLength + englishLength * 2; //
return -totalLength * 6.5; // anchorX -6.5 return -totalLength * 6.5 // anchorX -6.5
}, },
scanQRCode() { scanQRCode() {
@ -204,12 +208,12 @@
scanType: ['qrCode'], scanType: ['qrCode'],
success: res => { success: res => {
function getQueryParam(url, paramName) { function getQueryParam(url, paramName) {
let regex = new RegExp(`[?&]${paramName}=([^&]*)`); let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
let results = regex.exec(url); let results = regex.exec(url);
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null; return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
} }
let sceneValue = res.result let sceneValue = res.result
let decodedValue = decodeURIComponent(sceneValue); let decodedValue = decodeURIComponent(sceneValue)
let id = getQueryParam(decodedValue, 's') let id = getQueryParam(decodedValue, 's')
this.$u.get(`/app/device/${id}/withSuitList`).then((res) => { this.$u.get(`/app/device/${id}/withSuitList`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -220,7 +224,7 @@
}) })
}, },
fail: err => { fail: err => {
console.error('扫描失败:', err); console.error('扫描失败:', err)
uni.showToast({ uni.showToast({
title: '扫描失败', title: '扫描失败',
icon: 'none' icon: 'none'
@ -242,6 +246,7 @@
} }
}) })
}, },
getshanghu() { getshanghu() {
this.$u.get("/app/user/userInfo").then((res) => { this.$u.get("/app/user/userInfo").then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -277,21 +282,21 @@
success: (res) => { success: (res) => {
const timer = setTimeout(() => { const timer = setTimeout(() => {
this.mapScale = 15 this.mapScale = 15
clearTimeout(timer); clearTimeout(timer)
}, 500); }, 500)
}, },
}) })
}, },
onMapTap(e){ regionchange(e){
this.jinweidu = e.detail.longitude + ',' + e.detail.latitude if (e.type == 'end') {
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then( this.jinweidu = e.detail.centerLocation.longitude + ',' + e.detail.centerLocation.latitude
res => { this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.covers = []
this.listmap = res.data this.listmap = res.data
// res.rowslatitudelongitude
res.data.forEach(item => { res.data.forEach(item => {
if (item.deviceCount !== null && item.deviceCount > 0) { // if (item.deviceCount !== null && item.deviceCount > 0) {
const shopCover = { const shopCover = {
id: parseFloat(item.storeId), id: parseFloat(item.storeId),
latitude: item.lat, latitude: item.lat,
@ -299,41 +304,28 @@
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
// iconPath:item.picture
label: { label: {
content: item.name, content: item.name,
anchorX: (() => { anchorX: this.calculateAnchorX(item.name),
if (item.name.length <= 2) {
return -12
} else if (item.name.length <= 3) {
return -20
} else if (item.name.length <= 4) {
return -25
} else if (item.name.length <= 5) {
return -30
} else if (item.name.length <= 6) {
return -35
} else if (item.name.length <= 8) {
return -40
} else if (item.name.length <= 10) {
return -45
} else {
return -item.name.length * 5
}
})(),
fontWeight: 700, fontWeight: 700,
color: '#8883F0', color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white', borderColor: '#fff',
borderColor:'#fff', borderRadius: 5,
borderRadius:5,
bgColor: '#fff' bgColor: '#fff'
} }
};
this.covers.push(shopCover);
} }
this.covers.push(shopCover)
}); // }
})
}
})
setTimeout(()=>{
this.iconflag = false
},500)
} else {
this.iconflag = true
} }
});
}, },
getMyLocation() { getMyLocation() {
@ -351,7 +343,7 @@
this.listmap = res.data this.listmap = res.data
// res.rowslatitudelongitude // res.rowslatitudelongitude
res.data.forEach(item => { res.data.forEach(item => {
if (item.deviceCount !== null && item.deviceCount > 0) { // if (item.deviceCount !== null && item.deviceCount > 0) {
const shopCover = { const shopCover = {
id: parseFloat(item.storeId), id: parseFloat(item.storeId),
latitude: item.lat, latitude: item.lat,
@ -361,25 +353,7 @@
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
label: { label: {
content: item.name, content: item.name,
anchorX: (() => { anchorX:this.calculateAnchorX(item.name),
if (item.name.length <= 2) {
return -12
} else if (item.name.length <= 3) {
return -20
} else if (item.name.length <= 4) {
return -25
} else if (item.name.length <= 5) {
return -30
} else if (item.name.length <= 6) {
return -35
} else if (item.name.length <= 8) {
return -40
} else if (item.name.length <= 10) {
return -45
} else {
return -item.name.length * 5
}
})(),
fontWeight: 700, fontWeight: 700,
color: '#8883F0', color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white', textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
@ -389,14 +363,14 @@
} }
}; };
this.covers.push(shopCover); this.covers.push(shopCover);
} // }
}); })
} }
}); })
}, },
fail: (err) => { fail: (err) => {
console.error('获取位置失败:', err); console.error('获取位置失败:', err)
} }
}); });
}, },
@ -431,7 +405,7 @@
} }
}, },
mounted() { mounted() {
this.getMyLocation(); this.getMyLocation()
} }
} }
</script> </script>
@ -612,6 +586,14 @@
top: 0; top: 0;
left: 0; left: 0;
z-index: -1; z-index: -1;
.picimg {
width: 80rpx;
height: 100rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 50%;
}
} }
.listbox { .listbox {

View File

@ -4,13 +4,16 @@
title-size='44' height='44'></u-navbar> title-size='44' height='44'></u-navbar>
<view class="dtxs"> <view class="dtxs">
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" <map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" @tap="onMapTap"/> :show-location="true" :markers="covers" :scale="mapScale" @regionchange="regionchange" />
<image class="picimg" v-if="iconflag"
src="https://api.ccttiot.com/smartmeter/img/static/uApyHD7rov66zGOzwUX1" mode=""></image>
</view> </view>
<view class="listbox"> <view class="listbox">
<view class="moshi"> <view class="moshi">
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uThUUsa3Zs1tMF9Bpdl9" mode="" <!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uThUUsa3Zs1tMF9Bpdl9" mode=""
@click="btndt(1)" class="img"></image> --> @click="btndt(1)" class="img"></image> -->
<image @click="onControltap" style="width: 76rpx;height: 76rpx;position: absolute;right: 50rpx;top:25rpx" <image @click="onControltap"
style="width: 76rpx;height: 76rpx;position: absolute;right: 50rpx;top:25rpx"
src="https://api.ccttiot.com/smartmeter/img/static/uOS9p7Sy1K9WpVQgD3b9" mode=""></image> src="https://api.ccttiot.com/smartmeter/img/static/uOS9p7Sy1K9WpVQgD3b9" mode=""></image>
</view> </view>
<view class="list" v-for="(item,index) in gxlist" :key="index"> <view class="list" v-for="(item,index) in gxlist" :key="index">
@ -30,13 +33,14 @@
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<image src="https://api.ccttiot.com/smartmeter/img/static/uraUDWkEx5OvJB29kMnS" mode="" <image src="https://api.ccttiot.com/smartmeter/img/static/uraUDWkEx5OvJB29kMnS" mode="" @click="mapFun(item)"></image>
@click="mapFun(item)"></image>
<text>{{String(item.distance).split('.')[0]}}m</text> <text>{{String(item.distance).split('.')[0]}}m</text>
</view> </view>
</view> </view>
<view class="" v-if="gxlist.length == 0" style="width: 100%;height: 200rpx;margin: auto;margin-top: 230rpx;text-align: center;"> <view class="" v-if="gxlist.length == 0"
<image style="width: 200rpx;height: 200rpx;" src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image> style="width: 100%;height: 200rpx;margin: auto;margin-top: 230rpx;text-align: center;">
<image style="width: 200rpx;height: 200rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">该区域暂无店铺...</view> <view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">该区域暂无店铺...</view>
</view> </view>
</view> </view>
@ -55,12 +59,13 @@
isMch: false, isMch: false,
gxlist: [], gxlist: [],
bgc: { bgc: {
background:'linear-gradient(to right, #FFEFEF 20%, #D9F6FF 100%)' background: 'linear-gradient(to right, #FFEFEF 20%, #D9F6FF 100%)'
}, },
mapScale: 15, mapScale: 15,
mapContext: null, mapContext: null,
mapScaleInterval: null, mapScaleInterval: null,
listmap: [], listmap: [],
iconflag: false
} }
}, },
onLoad() { onLoad() {
@ -74,7 +79,7 @@
this.mapScaleInterval = setInterval(this.updateMarkers, 1000) this.mapScaleInterval = setInterval(this.updateMarkers, 1000)
}, },
// //
onShareAppMessage: function () { onShareAppMessage: function() {
return { return {
title: '创亿康', title: '创亿康',
path: '/pages/index/index' path: '/pages/index/index'
@ -82,7 +87,7 @@
}, },
// //
onShareTimeline: function () { onShareTimeline: function() {
return { return {
title: '创亿康', title: '创亿康',
query: '', query: '',
@ -98,22 +103,21 @@
}, },
methods: { methods: {
// //
onMapTap(e){ regionchange(e) {
this.gxlist = [] if (e.type == 'end') {
this.jinweidu = e.detail.longitude + ',' + e.detail.latitude // this.gxlist = []
// this.jinweidu = e.detail.centerLocation.longitude + ',' + e.detail.centerLocation.latitude
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then( this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
response => { res => {
if (response.code == 200) { if (res.code == 200) {
this.listmap = response.data this.gxlist = res.data
let gxlist = response.data this.covers = []
gxlist.forEach(item => { this.listmap = res.data
// if (item.deviceCount !== null && item.deviceCount > 0) { res.data.forEach(item => {
//
const distance = this.getDistance(this.latitude, this.longitude, item.lat, item.lng) const distance = this.getDistance(this.latitude, this.longitude, item.lat, item.lng)
// //
item.distance = distance item.distance = distance
// // if (item.deviceCount !== null && item.deviceCount > 0) {
const shopCover = { const shopCover = {
id: parseFloat(item.storeId), id: parseFloat(item.storeId),
latitude: item.lat, latitude: item.lat,
@ -121,49 +125,29 @@
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
distance: distance, // distance:distance,
// iconPath:item.picture
label: { label: {
content: item.name, content: item.name,
anchorX: (() => { anchorX: this.calculateAnchorX(item.name),
if (item.name.length <= 2) {
return -12
} else if (item.name.length <=
3) {
return -20
} else if (item.name.length <=
4) {
return -25
} else if (item.name.length <=
5) {
return -30
} else if (item.name.length <=
6) {
return -35
} else if (item.name.length <=
8) {
return -40
} else if (item.name.length <=
10) {
return -45
} else {
return -item.name.length *
5
}
})(),
fontWeight: 700, fontWeight: 700,
color: '#8883F0', color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white', borderColor: '#fff',
borderRadius:5, borderRadius: 5,
bgColor: '#fff' bgColor: '#fff'
} }
} }
this.covers.push(shopCover) this.covers.push(shopCover)
this.gxlist.push(item)
// } // }
}) })
} }
}) })
setTimeout(() => {
this.iconflag = false
}, 500)
} else {
this.iconflag = true
}
}, },
updateMarkers() { updateMarkers() {
this.mapContext.getScale({ this.mapContext.getScale({
@ -191,7 +175,7 @@
width: 25, width: 25,
height: 30, height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY', iconPath: 'https://api.ccttiot.com/smartmeter/img/static/u0yXGqCqoDjuK4QPJHZY',
borderRadius:5, borderRadius: 5,
bgColor: '#fff' bgColor: '#fff'
} }
this.covers.push(shopCover) this.covers.push(shopCover)
@ -215,7 +199,7 @@
fontWeight: 700, fontWeight: 700,
color: '#8883F0', color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white', textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
borderRadius:5, borderRadius: 5,
bgColor: '#fff' bgColor: '#fff'
} }
} }
@ -301,7 +285,8 @@
gxlist.forEach(item => { gxlist.forEach(item => {
// if (item.deviceCount !== null && item.deviceCount > 0) { // if (item.deviceCount !== null && item.deviceCount > 0) {
// //
const distance = this.getDistance(this.latitude, this.longitude, item.lat, item.lng) const distance = this.getDistance(this.latitude, this
.longitude, item.lat, item.lng)
// //
item.distance = distance item.distance = distance
// //
@ -315,36 +300,11 @@
distance: distance, // distance: distance, //
label: { label: {
content: item.name, content: item.name,
anchorX: (() => { anchorX:this.calculateAnchorX(item.name),
if (item.name.length <= 2) {
return -12
} else if (item.name.length <=
3) {
return -20
} else if (item.name.length <=
4) {
return -25
} else if (item.name.length <=
5) {
return -30
} else if (item.name.length <=
6) {
return -35
} else if (item.name.length <=
8) {
return -40
} else if (item.name.length <=
10) {
return -45
} else {
return -item.name.length *
5
}
})(),
fontWeight: 700, fontWeight: 700,
color: '#8883F0', color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white', textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
borderRadius:5, borderRadius: 5,
bgColor: '#fff' bgColor: '#fff'
} }
} }
@ -370,7 +330,8 @@
const phi2 = lat2 * Math.PI / 180 const phi2 = lat2 * Math.PI / 180
const deltaPhi = (lat2 - lat1) * Math.PI / 180 const deltaPhi = (lat2 - lat1) * Math.PI / 180
const deltaLambda = (lon2 - lon1) * Math.PI / 180 const deltaLambda = (lon2 - lon1) * Math.PI / 180
const a = Math.sin(deltaPhi / 2) * Math.sin(deltaPhi / 2) + Math.cos(phi1) * Math.cos(phi2) * Math.sin(deltaLambda / 2) * Math.sin(deltaLambda / 2) const a = Math.sin(deltaPhi / 2) * Math.sin(deltaPhi / 2) + Math.cos(phi1) * Math.cos(phi2) * Math.sin(
deltaLambda / 2) * Math.sin(deltaLambda / 2)
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)) const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))
const distance = R * c const distance = R * c
return distance return distance
@ -436,6 +397,7 @@
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
.dtxs { .dtxs {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
@ -443,6 +405,14 @@
top: 0; top: 0;
left: 0; left: 0;
z-index: -1; z-index: -1;
.picimg {
width: 80rpx;
height: 100rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 50%;
}
} }
.listbox { .listbox {
@ -456,6 +426,7 @@
height: 40vh; height: 40vh;
overflow-y: scroll; overflow-y: scroll;
padding-bottom: 400rpx; padding-bottom: 400rpx;
.moshi { .moshi {
position: absolute; position: absolute;
bottom: 48vh; bottom: 48vh;