12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847 |
- <template>
- <!-- -->
- <view
- :class="wrapListType ? 'index' : 'index'"
- :id="wrapListType ? indexTop : 'index'"
- >
- <!-- <input type="text" v-model="'1 1'"> -->
- <view class="share" @tap="Message()" v-if="shareBtn">
- {{ shareHideText }}
- </view>
- <view class="top">
- <view class="img" v-show="footHide" @tap="footList()">
- <image src="../../static/img/foot.png" mode=""></image>
- </view>
- <image @tap="scroll()" src="../../static/img/top.png" mode=""></image>
- </view>
- <view class="pay" v-if="orderNumArrTpye" @tap="payment(orderNumArr.id)">
- <image
- src="../../static/img/image42.d45db6230a66350a8371.png"
- mode=""
- ></image>
- <view class="payCon">
- 选购:{{ orderNumArr.no }}
- <view class="close-view" @tap.stop="orderNumArrTpye = false"> X </view>
- </view>
- </view>
- <view class="Swiper" v-show="wrapListType">
- <view class="wrap">
- <u-swiper
- :list="wrapList"
- name="img"
- @click="wrapMet"
- height="302rpx"
- ></u-swiper>
- <view
- class="cooperation"
- v-if="configAll.system_index_tr == 2 && chanId != 'lh'"
- >
- <view @click="tohezuo"> 商务合作 </view>
- </view>
- <view
- class="complaintImg"
- v-if="configAll.system_index_tr == 1 && chanId != 'lh'"
- >
- <navigator url="/pageA/complaint/complaint">
- <view class="img">
- <image src="../../static/img/complaintImg.png" mode=""></image>
- </view>
- <text>投诉</text>
- </navigator>
- </view>
- </view>
- </view>
- <view id="imgBox">
- <!-- 切换 -->
- <view class="tap" v-if="chanId != 'lh'">
- <view class="li" @tap="phoneListInit()">
- <image src="../../static/img/tapimg1.png" mode=""></image>
- <text>全国靓号</text>
- </view>
- <view class="li" @tap="loca()">
- <image src="../../static/img/tapimg2.png" mode=""></image>
- <text>本地靓号</text>
- </view>
- <view class="li" @tap="flow()">
- <image src="../../static/img/tapimg3.png" mode=""></image>
- <text v-if="configAll.system_index_m1 == 1">流量卡</text>
- <text v-if="configAll.system_index_m1 == 2">号码定制</text>
- <text v-if="configAll.system_index_m1 == 3">特价号</text>
- </view>
- <view class="li">
- <view class="buttonType">
- <button
- open-type="byteHi"
- v-if="mixin_type == 'TOUTIAO'"
- style="box-shadow: none"
- >
- <image src="../../static/img/tapimg4.png" mode=""></image>
- <text>联系客服</text>
- </button>
- <button v-else @click="buttonType" style="box-shadow: none">
- <image src="../../static/img/tapimg4.png" mode=""></image>
- <text>联系客服</text>
- </button>
- </view>
- </view>
- <view class="li" @tap="orderQuery()">
- <image src="../../static/img/tapimg5.png" mode=""></image>
- <text>订单查询</text>
- <view v-if="orderNum != ''" class="orderNum">
- {{ orderNum }}
- </view>
- </view>
- </view>
- <!-- 搜索 -->
- <view>
- <view class="search" v-if="keyword">
- <view class="searchInput">
- <view class="searchType" @tap="keywordMet()">
- 模糊
- <image src="../../static/img/searchDown.png" mode=""></image>
- </view>
- <view class="input">
- <!-- <image src="../../static/img/search.png" mode=""></image> -->
- <input
- type="number"
- @confirm="query()"
- maxlength="11"
- v-model="searchVal"
- placeholder-style="font-size:28rpx;"
- placeholder="输入您喜欢的号码"
- />
- </view>
- <view class="btn" @tap="query()"> 查询 </view>
- </view>
- <view class="check">
- <u-checkbox-group>
- <u-checkbox
- shape="circle"
- @change="search_lastChange"
- active-color="#E30029"
- v-model="searchChecked"
- >尾号</u-checkbox
- >
- </u-checkbox-group>
- </view>
- </view>
- <view class="search search2" v-if="!keyword">
- <view class="searchInput">
- <view class="searchType" @tap="keywordMet()">
- 精准
- <image src="../../static/img/searchDown.png" mode=""></image>
- </view>
- <view :class="inputsMes">
- <view class="hide">
- <text
- v-for="(item, index) in 11"
- :key="index"
- @tap="hideValue(index)"
- ></text>
- </view>
- <w-message-input
- width="42"
- :activeIndex="mesValueIndex"
- :value="mesValue"
- :disabled-keyboard="true"
- font-size="26"
- :maxlength="11"
- @change="changeMes"
- @finish="finishMes"
- ></w-message-input>
- </view>
- <!-- <view class="phone-num-input-box u-flex u-row-between">
- <input type="text" class="phone-num-input" :disabled="index==0" :class="{'u-m-l-10': index==3||index==7}" maxlength="1" v-model="listData.keyword[index]"
- v-for="(item,index) in listData.keyword" :key="index" :id="'input-'+ index" :focus="focus_index == index"
- autocomplete="off" autocapitalize="off" autocorrect="off" @keyup.delete="funDeletePhoneNum"
- @input="funInputPhoneNum" @focus="funFocusInput">
- </view> -->
- <view class="btn" @tap="query()"> 查询 </view>
- </view>
- </view>
- </view>
- <!-- 公告 -->
- <view class="notice_an" :style="noticeStyle" v-if="chanId != 'lh'">
- <view class="noticeHide"></view>
- <view class="notice_bg swiper-no-swiping">
- <image class="icon" src="../../static/img/horn.png"></image>
- <swiper
- autoplay="true"
- display-multiple-items="1"
- vertical="true"
- circular
- interval="2000"
- class="bar-swiper"
- >
- <swiper-item
- catchtouchmove="stopTouchMove"
- v-for="(item, index) in ordered_list"
- :key="index"
- class="swiper-item"
- >
- <!-- <view class="circle"></view> -->
- <view class="item_box">
- 已有{{ item.num }}人订购 {{ item.name }} 获得 {{ item.no }}
- </view>
- </swiper-item>
- </swiper>
- </view>
- </view>
- <!-- 线 -->
- <view class="line" v-if="!wrapListType">
- <text>号码查询</text>
- </view>
- <!-- 切换 -->
- <view class="popup">
- <view class="popupTap">
- <view @tap="cityShowHerf()">
- <text
- style="
- width: 120rpx;
- display: inline-block;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- "
- >{{ cityShowText }}</text
- >
- <image
- style="vertical-align: top"
- src="../../static/img/searchDown.png"
- mode=""
- ></image>
- </view>
- <view @tap="rule = true">
- <text>号码类型</text>
- <image src="../../static/img/searchDown.png" mode=""></image>
- </view>
- <view @tap="code = true">
- <text>号码筛选</text>
- <image src="../../static/img/searchDown.png" mode=""></image>
- </view>
- <view @tap="sortHide = true">
- <text>价格筛选</text>
- <image src="../../static/img/searchDown.png" mode=""></image>
- </view>
- </view>
- </view>
- </view>
- <view class="boxList" :style="wrapListType ? '' : noticeStyleTop">
- <view
- class="box"
- v-for="(item, index) in boxList"
- @tap="ListClick(item.id)"
- :key="index"
- >
- <image
- class="mask"
- v-if="item.is_activity == 1"
- src="../../static/img/image20.94e9ccc9433ca0f0401c.png"
- mode=""
- ></image>
- <view class="hui" v-if="item.status == 1">
- <image
- src="../../static/img/image21.347862609b15d945bff7.png"
- mode=""
- ></image>
- </view>
- <view class="number">
- <view v-html="item.phoneHtml"></view>
- <view class="Pretty" v-if="item.type == 1"> 靓 </view>
- </view>
- <view class="money">
- <!-- ¥{{item.amount}} -->
- ¥{{ item.is_activity == 0 ? item.amount_base : item.amount_kill }}
- <view class="empty"> ¥{{ item.amount_original }} </view>
- </view>
- <view class="source">
- {{ item.network }}
- <text @click.stop="TotalCityHide(item.TotalCity)">{{
- item.TotalCity | areaName
- }}</text>
- </view>
- </view>
- <u-loadmore margin-top="40" margin-bottom="30" :status="status" />
- </view>
- <!-- 归属地弹框 -->
- <u-popup v-model="cityShow" mode="right">
- <view class="cityAll codeClass">
- <view class="city_l">
- <scroll-view scroll-y class="scrollOne">
- <view
- :class="cityListOneType == 'all' ? 'li active' : 'li'"
- @tap="scrollOneMeh('all')"
- >全部</view
- >
- <view
- v-for="(item, index) in cityList"
- :key="index"
- :class="cityListOneType == index ? 'li active' : 'li'"
- @tap="scrollOneMeh(index)"
- >{{ item.label }}</view
- >
- </scroll-view>
- </view>
- <view class="city_r">
- <scroll-view scroll-y class="scrollTwo">
- <view
- :class="cityListTwoType == 'all' ? 'li active' : 'li'"
- @tap="scrollTwoMeh('all')"
- >全部</view
- >
- <view
- v-for="(item, index) in cityListTwo"
- :key="index"
- :class="cityListTwoType == index ? 'li active' : 'li'"
- @tap="scrollTwoMeh(index)"
- >{{ item.label }}</view
- >
- </scroll-view>
- </view>
- <view class="btn">
- <view class="again" @tap="area_tree_init()"> 重置 </view>
- <view class="confirm" @tap="phoneConfirm()"> 确定 </view>
- </view>
- </view>
- </u-popup>
- <!-- 号码类型筛选弹框 -->
- <u-popup v-model="rule" mode="right">
- <view class="cityAll codeClass">
- <view class="city_l">
- <scroll-view scroll-y class="scrollOne">
- <view
- :class="ruleListOneType == 'all' ? 'li active' : 'li'"
- @tap="ruleMameMeh('all')"
- >不限位置</view
- >
- <view
- :class="ruleListOneType == 'middle' ? 'li active' : 'li'"
- @tap="ruleMameMeh('middle')"
- >中间规律</view
- >
- <view
- :class="ruleListOneType == 'tail' ? 'li active' : 'li'"
- @tap="ruleMameMeh('tail')"
- >尾数规律</view
- >
- </scroll-view>
- </view>
- <view class="city_r">
- <scroll-view scroll-y class="scrollTwo">
- <view
- :class="ruleListTwoType == 'all' ? 'li active' : 'li'"
- @tap="ruleMeh()"
- >全部</view
- >
- <view
- v-for="(item, index) in ruleList"
- :key="index"
- :class="ruleListTwoType == index ? 'li active' : 'li'"
- @tap="ruleMeh(index, item)"
- >{{ item }}</view
- >
- </scroll-view>
- </view>
- <view class="btn">
- <view class="again" @tap="rule_tree_init()"> 重置 </view>
- <view class="confirm" @tap="ruleConfirm()"> 确定 </view>
- </view>
- </view>
- </u-popup>
- <!-- 号码筛选 -->
- <u-popup v-model="code" mode="right">
- <view class="codeClass">
- <scroll-view scroll-y="true" style="height: 100%">
- <view class="title">运营商 </view>
- <view class="network">
- <u-radio-group v-model="networkValue" @change="radioGroupChange">
- <u-radio
- :class="networkValue == '全部' ? 'radioType' : ''"
- :name="'全部'"
- >
- 全部 </u-radio
- ><u-radio
- :class="networkValue == item ? 'radioType' : ''"
- v-for="(item, index) in networkList"
- :key="index"
- :name="item"
- >
- {{ item }}
- </u-radio>
- </u-radio-group>
- </view>
- <view class="title">价格</view>
- <view class="network price">
- <u-radio-group v-model="price" @change="priceChange">
- <u-radio
- :class="price == index ? 'radioType' : ''"
- v-for="(item, index) in priceList"
- :key="index"
- :name="index"
- >
- {{ item.name }}
- </u-radio>
- </u-radio-group>
- <view class="Range">
- <text>价格范围</text>
- <input
- type="number"
- placeholder-style="font-size:24rpx;color:#D0D0D0;"
- v-model="input_price_min"
- @input="onInputMin"
- placeholder="最低价"
- />
- <text> - </text>
- <input
- type="number"
- placeholder-style="font-size:24rpx;color:#D0D0D0;"
- v-model="input_price_max"
- @input="onInputMax"
- placeholder="最高价"
- />
- </view>
- </view>
- <view class="title">排除</view>
- <view class="network price exclude">
- <!-- <u-checkbox-group @change="checkboxGroupChange"> -->
- <u-checkbox-group>
- <u-checkbox
- width="33.3%"
- @change="checkboxChange"
- v-model="item.checked"
- :class="item.checked ? 'radioType' : ''"
- v-for="(item, index) in excludeList"
- :key="index"
- :name="item.val"
- >{{ item.name }}</u-checkbox
- >
- </u-checkbox-group>
- </view>
- <view class="title">数字较多</view>
- <view class="network price">
- <u-radio-group v-model="numbers" @change="numbersChange">
- <u-radio
- :class="numbers == index ? 'radioType' : ''"
- v-for="(item, index) in numbersList"
- :key="index"
- :name="index"
- >
- {{ item.name }}
- </u-radio>
- </u-radio-group>
- </view>
- </scroll-view>
- <view class="btn">
- <view class="again" @tap="codeHide()"> 重置 </view>
- <view class="confirm" @tap="codeConfirm()"> 确定 </view>
- </view>
- </view>
- </u-popup>
- <!-- 价格筛选 -->
- <u-popup v-model="sortHide" mode="right">
- <view class="sortClass codeClass">
- <text
- v-for="(item, index) in sort"
- :key="index"
- @tap="sortCon(item.val)"
- :class="sortValue == item.val ? 'active' : ''"
- >
- {{ item.name }}
- </text>
- <view class="btn">
- <view class="again" @tap="sortHideLoad()"> 重置 </view>
- <view class="confirm" @tap="sortConfirm()"> 确定 </view>
- </view>
- </view>
- </u-popup>
- <u-keyboard
- ref="uKeyboard"
- mode="number"
- :mask="false"
- @change="valChange"
- @backspace="backspace"
- v-model="keyShow"
- ></u-keyboard>
- <!-- <u-modal v-model="login_show" title="用户信息授权" confirm-color="#d52e4c" :show-cancel-button="true" :content="login_content" @cancel="login_cancel" @confirm="userLogin" ref="uModal"></u-modal> -->
- <view class="popupBox">
- <view class="maskName" v-if="login_show"></view>
- <view class="newForm" v-if="login_show">
- <view class="alertContent">
- <view class="title">温馨提示</view>
- <view class="content">{{ login_content }}</view>
- <view
- class="u-flex u-col-center u-row-center btn"
- style="border-top: 1px solid #ececec"
- >
- <text style="border-right: 1px solid #ececec" @tap="login_cancel"
- >取消</text
- >
- <text
- style="color: #d52e4c"
- v-if="mixin_type == 'TOUTIAO'"
- @tap="userLogin"
- >确认</text
- >
- <button
- v-else
- style="
- box-shadow: none;
- background: transparent;
- box-sizing: border-box;
- width: 50%;
- border: 0px solid #f3f3f3;
- color: #d52e4c;
- "
- type="default"
- open-type="getPhoneNumber"
- @getphonenumber="decryptPhoneNumber"
- >
- 确认
- </button>
- </view>
- </view>
- </view>
- </view>
- <!-- 联系客服 -->
- <w-Load :wx="wx" v-on:childByValue="childByValue"></w-Load>
- <u-popup v-model="copeHide" border-radius="20" mode="center">
- <view class="agreement copeHide">
- <image
- src="/static/img/up.png"
- class="label2"
- @tap="copeHide = false"
- ></image>
- <view class="title"> 温馨提示 </view>
- <view class="copyText">客服电话:{{ configAll.service_mobile }}</view>
- <view class="btn" @tap="buttonTypePhone()"> 一键拨打 </view>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- import wLoad from "@/components/w-load/w-load.vue";
- import wMessageInput from "@/components/w-message-input/w-message-input.vue";
- import http from "@/https/request.js"
- import { isString } from "util"
- export default {
- data() {
- return {
- chanId: "",
- platformType: "3", //平台类型
- cityShowText: "归属地",
- invoiceShow: true,
- shareBtn: false, //按钮是否显示直播 视频
- shareHideText: "直播",
- // 列表参数
- listData: {
- city_id: "city_id", //地区id 'city_id'全部
- exclude_num: [], //排除 复选 值
- is_activity: 0, //是否是优惠号码
- keyword: "", //["1", "", "", "", "", "", "", "", "", "", ""], //搜索内容,模糊就是字符串,精准就是数组
- limit: 20,
- network: "",
- num_max: "", //数字较多,传数字
- page: 1, //
- price_max: "", //价格最高数字
- price_min: "", //价格最低数字
- rule_name: "", //规律名,AAAA什么的
- rule_position: "tail", //规律位置,middle中间,tail尾部
- search_last: 1, //0,1是否搜索尾部
- search_type: "fuzzy", //fuzzy模糊,precise精准
- sort: "", //price_asc价格从低到高,price_desc价格从高到低
- is_offer: 0, //是否为特价号
- },
- inputsMes: "inputsMes", //精准搜索类名
- copeHide: false, //客服手机号
- orderNum: 0, //订单查询数量
- orderNumArr: [], //订单查询数据
- orderNumArrTpye: false, //快捷购买显示隐藏
- wx: false, //微信公众号二维码展示
- searchChecked: true, //是否选中尾号
- keyword: true, //模糊和精确切换 true为模糊查询 false为精确查询
- focus_index: -1,
- status: "loadmore",
- boxList: [], //数量
- page: 1, //页数
- price: "", //号码筛选-价格-选中值
- code: false, //号码筛选 显示隐藏
- networkValue: "全部", // 号码筛选-网络-选中值
- searchVal: "", //模糊查询输入框内容
- numbers: 0, // 号码筛选-网络-选中值
- ordered_list: [], //播报列表
- rule: false, //号码类型弹框
- ruleList: [], //号码类型筛选列表
- ruleListOneType: "tail", //号码类型-弹框-一阶
- ruleListTwoType: "all", //号码类型-弹框-二阶
- networkList: [], //号码运营商筛选列表
- configAll: "", //基本配置
- keyShow: false, //数字键盘
- mesValue: ["1", "", "", "", "", "", "", "", "", "", ""],
- mesValueIndex: 12, // 光标选中位置
- backspaceType: false, //选中其中一个删除按钮特殊处理
- //号码筛选-价格-列表
- priceList: [
- { name: "全部" },
- { name: "300以下", min: 0, max: 300 },
- { name: "301-500", min: 301, max: 500 },
- { name: "501-1000", min: 501, max: 1000 },
- { name: "1001-3000", min: 1001, max: 3000 },
- { name: "3001-5000", min: 3001, max: 5000 },
- { name: "5001-1万", min: 5001, max: 10000 },
- { name: "1-5万", min: 10000, max: 50000 },
- { name: "5万以上", min: 50000, max: "" },
- ],
- //号码筛选-数字限制-列表
- numbersList: [
- { name: "全部", num: "all" },
- { name: "9较多", num: 9 },
- { name: "8较多", num: 8 },
- { name: "7较多", num: 7 },
- { name: "6较多", num: 6 },
- { name: "5较多", num: 5 },
- { name: "4较多", num: 4 },
- { name: "3较多", num: 3 },
- { name: "2较多", num: 2 },
- { name: "1较多", num: 2 },
- { name: "0较多", num: 2 },
- ],
- // 价格筛选弹出层
- sortHide: false,
- // 价格筛选值
- sortValue: "",
- //价格筛选
- sort: [
- { name: "默认排序", val: "" },
- { name: "价格从低到高", val: "price_asc" },
- { name: "价格从高到低", val: "price_desc" },
- ],
- input_price_min: "", //最高价
- input_price_max: "", //最低价
- excludeList: [
- { name: "全部", val: "all", checked: true },
- { name: "不带0", val: 0, checked: false },
- { name: "不带1", val: 1, checked: false },
- { name: "不带2", val: 2, checked: false },
- { name: "不带3", val: 3, checked: false },
- { name: "不带4", val: 4, checked: false },
- { name: "不带5", val: 5, checked: false },
- { name: "不带6", val: 6, checked: false },
- { name: "不带7", val: 7, checked: false },
- { name: "不带8", val: 8, checked: false },
- { name: "不带9", val: 9, checked: false },
- ],
- exclude_num: [], //排除 复选 值
- noticeImg: "", //左侧图片
- cityShow: false, //归属地弹框展示
- cityList: [], //城市总列表
- cityListOneType: "all", //选中的一级城市列表index
- cityListTwoType: "all", //选中的二级城市列表index
- cityListTwo: [], //城市二级列表内容
- searchDown: { display: "inline-block" },
- checked: true,
- indexTop: "",
- imgBoxHeigth: "",
- SwiperHeigth: "",
- wrapList: [],
- wrapListType: true, //是否冻结窗口
- noticeStyleTop: "", //列表到顶部距离
- noticeStyle: "", //公告滑动样式变动
- footHide: false, //足迹是否显示
- };
- },
- watch: {
- searchVal(val) {
- console.log(val);
- },
- },
- filters: {
- areaName(val) {
- let str = val + "";
- if (str.length > 7) {
- return str.slice(0, 7) + "...";
- } else {
- return str;
- }
- return val
- .replace("省", "")
- .replace("特别行政区", "")
- .replace("壮族自治区", "")
- .replace("回族自治区", "")
- .replace("维吾尔自治区", "")
- .replace("自治区", "");
- },
- },
- components: {
- wLoad: wLoad,
- wMessageInput: wMessageInput,
- },
- onPageScroll: function (e) {
- //nvue暂不支持滚动监听,可用bindingx代替
- let this_ = this;
- // console.log("滚动距离为:" + e.scrollTop);
- if (!this.wrapListType && e.scrollTop > 10) {
- this.noticeStyle = "transition: height linear .1s;height:0rpx;";
- this.noticeStyleTop =
- "transition: margin-top linear .1s;margin-top:406rpx;";
- } else if (!this.wrapListType && e.scrollTop < 10) {
- this.noticeStyle = "transition: height linear .1s;height:80rpx;";
- this_.noticeStyleTop =
- "transition: margin-top linear .1s;margin-top:484rpx;";
- }
- if (e.scrollTop > this.SwiperHeigth - 20) {
- this.indexTop = "index";
- }
- if (e.scrollTop < 120) {
- this.indexTop = "";
- }
- },
- onShow() {
- if (this.mixin_type != "TOUTIAO" && this.mixin_type != "H5") {
- console.log(123, ks.getLaunchOptionsSync().scene);
- let scene = ks.getLaunchOptionsSync().scene;
- if (scene == "011041" || scene == "021041" || scene == "1041") {
- // 直播间
- this.shareHideText = "直播";
- this.shareBtn = true;
- } else if (scene == "011040" || scene == "021040" || scene == "1040") {
- // 视频
- this.shareHideText = "视频";
- this.shareBtn = true;
- }
- }
- // 足迹是否显示
- if (this.mixin_type != "H5") {
- this.footHide = true;
- } else {
- this.footHide = false;
- }
- console.log(this.mixin_type);
- console.log();
- },
- onLoad(option) {
- if (option.chanId) {
- this.chanId = option.chanId;
- uni.setStorageSync("chanId", option.chanId);
- } else {
- this.chanId = "";
- uni.removeStorageSync("chanId");
- }
- if (option.system_index_m1) {
- // if(option.system_index_m1==3){
- this.listData.is_offer = 1;
- this.phoneList();
- // }
- } else {
- this.phoneList();
- }
- this.ads();
- this.area_tree();
- this.config();
- this.ordered_show();
- this.commonConfig();
- this.orderMetList();
- if (option.type) {
- if (option.type == "phoneListInit") {
- this.phoneListInit();
- } else {
- this.loca();
- }
- }
- //#ifdef H5
- this.inputsMes = "inputsMes active";
- //#endif
- },
- onReachBottom() {
- // 下拉加载
- this.status = "loading";
- this.listData.limit = 100;
- this.listData.page = ++this.listData.page;
- this.$http.list(this.listData).then((res) => {
- // console.log(res)
- if (res.data.code == 1) {
- if (
- this.listData.page < res.data.data.per_page ||
- this.listData.page == res.data.data.per_page
- ) {
- let initArr = res.data.data.data;
- initArr.forEach((item) => {
- //hits 如果有是按照号码规则显示
- console.log(item.hists);
- if (item.hits) {
- console.log("hists");
- this.$set(
- item,
- "phoneHtml",
- "<div>" + this.numberTypeHits(item.hits, item.no) + "</div>"
- );
- } else {
- this.$set(
- item,
- "phoneHtml",
- "<div>" + this.numberType(item.no) + "</div>"
- );
- }
- this.$set(item, "TotalCity", item.province + "-" + item.city);
- });
- let arr = this.boxList.concat(initArr);
- this.boxList = arr;
- }
- this.status = "nomore";
- } else {
- this.status = "nomore";
- }
- });
- },
- onPullDownRefresh() {
- this.phoneList();
- console.log("refresh");
- },
- methods: {
- tohezuo() {
- if (uni.getStorageSync("chanId")) {
- uni.navigateTo({
- url:
- "/pageA/cooperation/cooperation?chanId=" +
- uni.getStorageSync("chanId"),
- });
- } else {
- uni.navigateTo({
- url: "/pageA/cooperation/cooperation",
- });
- }
- },
- // 列表地区长度超过7 点击弹框提示
- TotalCityHide(val) {
- let str = val + "";
- if (str.length > 7) {
- uni.showToast({
- title: val,
- duration: 1000,
- icon: "none",
- });
- }
- },
- // 跳转到直播设置界面
- Message() {
- uni.navigateTo({
- url: "/pages/Message/Message?url=" + "/pages/index/index",
- });
- },
- buttonType() {
- // #ifdef H5
- this.wx = true;
- // #endif
- // #ifdef MP-KUAISHOU
- this.copeHide = true;
- // #endif
- // if(this.mixin_type!='TOUTIAO' && this.mixin_type!='H5'){
- // this.copeHide=true;
- // }else if(this.mixin_type=='H5'){
- // this.wx=true;
- // }
- // if(this.platformType==1){
- // this.copeHide=true;
- // }
- // else if(this.platformType==2){
- // if(this.mixin_type=='H5'){
- // window.location.href=this.configAll.flow_service_link
- // }else{
- // uni.navigateTo({
- // url:'/pages/webview/webview?url='+encodeURIComponent(JSON.stringify(this.configAll.flow_service_link))
- // })
- // }
- // }
- // else if(this.platformType==3){
- // this.wx=true;
- // }
- },
- buttonTypePhone() {
- if (this.mixin_type != "TOUTIAO" && this.mixin_type != "H5") {
- ks.makePhoneCall({
- phoneNumber: this.configAll.service_mobile, // 仅为示例,并非真实的电话号码
- });
- } else {
- uni.makePhoneCall({
- phoneNumber: this.configAll.service_mobile,
- });
- }
- },
- cityShowHerf() {
- console.log(this.cityShow);
- this.cityShow = true;
- },
- // 自定义输入框值
- hideValue(val) {
- console.log(val);
- if (val == 0) {
- return;
- }
- this.keyShow = true;
- this.backspaceType = true;
- this.mesValueIndex = val;
- },
- // 自定义数字键盘删除按键
- backspace() {
- // 删除value的最后一个字符
- let str = parseFloat(this.mesValueIndex);
- if (str > 1) {
- // if(str==12)
- // if(this.backspaceType){
- // this.backspaceType=false
- // this.mesValue[str]=''
- // this.mesValueIndex = str - 1
- // this.listData.keyword = this.mesValue
- // }else{
- this.mesValue[str] = "";
- this.mesValueIndex = str - 1;
- console.log("减" + this.mesValue);
- console.log("减" + this.mesValueIndex);
- this.listData.keyword = this.mesValue;
- // }
- } else if (str == 1) {
- this.mesValue[str] = "";
- this.listData.keyword = this.mesValue;
- } else {
- console.log("还剩1位");
- }
- },
- valChange(val) {
- // 将每次按键的值拼接到value变量中,注意+=写法
- console.log(val);
- if (val == ".") {
- return;
- }
- let str = parseFloat(this.mesValueIndex);
- console.log(str);
- if (str < 10) {
- // this.mesValue.push(val);
- this.$set(this.mesValue, str, val + "");
- this.mesValueIndex = str + 1;
- this.listData.keyword = this.mesValue;
- console.log(this.mesValueIndex + "加");
- } else if (str == 10) {
- this.$set(this.mesValue, str, val + "");
- this.listData.keyword = this.mesValue;
- } else {
- console.log("已经11位");
- }
- },
- // 禁止滑动
- stopTouchMove() {
- console.log(e);
- return false;
- },
- // 按照账号规则匹配
- numberTypeHits(type, no) {
- let arrStr = "";
- type.forEach((item, index) => {
- if (item) {
- arrStr += '<span class="active">' + no[index] + "</span>";
- } else {
- arrStr += no[index];
- }
- });
- return arrStr;
- },
- // 搜索选中红色
- numberType(val) {
- let str = val;
- // console.log(str)
- let html, num;
- if (!this.keyword) {
- if (
- this.listData.keyword.toString() !=
- ["1", "", "", "", "", "", "", "", "", "", ""].toString()
- ) {
- let arrStr = "";
- let strArr = str.split("");
- let list = this.listData.keyword;
- strArr.forEach((item, index) => {
- if (item == list[index] && index != 0) {
- arrStr += '<span class="active">' + item + "</span>";
- } else {
- arrStr += item;
- }
- });
- return arrStr;
- } else {
- return (
- '<span class="active">' +
- str.substr(0, 3) +
- "</span>" +
- str.substr(3, 4) +
- '<span class="active">' +
- str.substr(7, str.length) +
- "</span>"
- );
- }
- } else {
- num = this.listData.keyword;
- }
- if (
- this.listData.keyword != "" &&
- this.listData.keyword.toString() !=
- ["1", "", "", "", "", "", "", "", "", "", ""].toString()
- ) {
- return str.replace(
- new RegExp(num, "g"),
- '<span class="active">' + num + "</span>"
- );
- } else {
- return (
- '<span class="active">' +
- str.substr(0, 3) +
- "</span>" +
- str.substr(3, 4) +
- '<span class="active">' +
- str.substr(7, str.length) +
- "</span>"
- );
- }
- },
- // 跳转足迹
- footList() {
- if (uni.getStorageSync("token")) {
- // 用户登录
- uni.navigateTo({
- url: "/pages/footList/footList",
- });
- }
- },
- onInputMin(e) {
- console.log(e.detail.value);
- this.input_price_min = e.detail.value;
- this.listData.price_min = e.detail.value;
- this.inputSelectIndex();
- },
- onInputMax(e) {
- console.log(e.detail.value);
- this.input_price_max = e.detail.value;
- this.listData.price_max = e.detail.value;
- this.inputSelectIndex();
- },
- // 价格限制最低最高 对于选择下标
- inputSelectIndex() {
- this.price = "100";
- // 两个输入框为空
- if (this.input_price_min == "" && this.input_price_max == "") {
- this.price = 0;
- }
- this.priceList.forEach((item, index) => {
- if (item.max && item.max != "") {
- if (
- (parseFloat(this.input_price_min) == item.min ||
- parseFloat(this.input_price_min) > item.min) &&
- (parseFloat(this.input_price_max) == item.max ||
- parseFloat(this.input_price_max) < item.max)
- ) {
- this.price = index;
- console.log(index);
- }
- }
- });
- },
- payment(item) {
- // val有值时候 是申请退款
- uni.navigateTo({
- url: "/pages/payment/payment?id=" + item,
- });
- },
- childByValue: function (childValue) {
- this.wx = childValue;
- },
- // 系统配置
- commonConfig() {
- this.$http.commonConfig().then((res) => {
- if (res.data.code == 1) {
- this.configAll = res.data.data;
- if (this.configAll.index_no_type == "local") {
- this.loca();
- }
- if (this.mixin_type != "TOUTIAO" && this.mixin_type != "H5") {
- this.platformType = this.configAll.flow_service_ks;
- } else if (this.mixin_type == "H5") {
- this.platformType = this.configAll.flow_service_h5;
- } else {
- this.platformType = this.configAll.flow_service_dy;
- }
- }
- });
- },
- // 轮播图
- ads() {
- this.$http.ads({ pos: "index" }).then((res) => {
- if (res.data.code == 1) {
- this.wrapList = res.data.data;
- if (this.wrapList.length == 0) {
- this.wrapListType = false;
- this.noticeStyle = "height:80rpx;!important";
- this.noticeStyleTop = "margin-top: 470rpx;";
- } else {
- this.wrapListType = true;
- }
- }
- });
- },
- // 全国靓号
- phoneListInit() {
- this.initData();
- this.phoneList();
- },
- // 查询按钮
- query() {
- if (this.keyword) {
- this.listData.keyword = this.searchVal;
- } else {
- this.listData.keyword = this.listData.keyword;
- }
- this.phoneList();
- },
- // 是否是尾号
- search_lastChange(e) {
- this.listData.search_last = e.value ? 1 : 0;
- this.phoneList();
- },
- wrapMet(e) {
- console.log(e);
- if (this.wrapList[e].link != null && this.wrapList[e].link != "") {
- uni.navigateTo({
- url: this.wrapList[e].link,
- });
- } else {
- // 优惠查询
- this.keywordMet(1);
- }
- },
- // 模糊和精确搜索框切换
- keywordMet(val) {
- // val 有值是轮播图点击
- this.mesValue = ["1", "", "", "", "", "", "", "", "", "", ""];
- this.mesValueIndex = 12;
- if (val) {
- this.listData.is_activity = 1;
- this.listData.keyword = "";
- this.keyword = true;
- this.listData.search_type = "fuzzy";
- } else {
- console.log(this.keyword);
- this.keyword = !this.keyword;
- this.searchChecked = true;
- this.listData.search_last = 1;
- if (this.keyword) {
- this.listData.keyword = "";
- this.listData.search_type = "fuzzy";
- } else {
- this.listData.keyword = ["1", "", "", "", "", "", "", "", "", "", ""];
- this.listData.search_type = "precise";
- }
- }
- this.phoneList();
- },
- // 初始化列表
- phoneList() {
- this.status = "loading";
- this.listData.limit = 100;
- // 初始化页数
- this.listData.page = 1;
- this.boxList = [];
- this.$http.list(this.listData).then((res) => {
- if (res.data.code == 1) {
- console.log(123, res);
- if (
- res.data.data.has_more == true &&
- res.data.data.data.length < 20
- ) {
- this.phoneList();
- } else {
- this.listData.limit = 20;
- uni.stopPullDownRefresh();
- this.boxList = res.data.data.data;
- this.boxList.forEach((item) => {
- if (item.hits) {
- this.$set(
- item,
- "phoneHtml",
- "<div>" + this.numberTypeHits(item.hits, item.no) + "</div>"
- );
- } else {
- this.$set(
- item,
- "phoneHtml",
- "<div>" + this.numberType(item.no) + "</div>"
- );
- }
- this.$set(item, "TotalCity", item.province + "-" + item.city);
- });
- this.scroll();
- }
- this.status = "nomore";
- }
- });
- },
- // 初始化列表请求数据参数
- initData() {
- this.keyword = true;
- this.searchChecked = true;
- this.listData.search_last = 1;
- this.searchVal = "";
- this.mesValue = ["1", "", "", "", "", "", "", "", "", "", ""];
- this.cityListTwo = [];
- this.mesValueIndex = 12;
- this.cityShowText = "归属地";
- this.listData = {
- city_id: "city_id",
- exclude_num: [],
- is_activity: 0,
- keyword: "",
- limit: 20,
- network: "",
- num_max: "",
- page: 1,
- price_max: "",
- price_min: "",
- rule_name: "",
- rule_position: "tail",
- search_last: 1,
- search_type: "fuzzy",
- sort: "",
- is_offer: 0,
- };
- this.area_tree_init();
- this.rule_tree_init();
- this.codeHide();
- this.sortHideLoad();
- },
- // 本地靓号
- loca() {
- this.initData();
- let this_ = this;
- console.log(this.mixin_type + "来源");
- if (this.mixin_type != "TOUTIAO" && this.mixin_type != "H5") {
- //提前向用户发起授权请求
- ks.authorize({
- scope: "scope.userLocation",
- success() {
- uni.getLocation({
- type: "wgs84",
- success: function (res) {
- console.log(res);
- console.log("当前位置的经度:" + res.longitude);
- console.log("当前位置的纬度:" + res.latitude);
- this_.loAcquire(res.longitude, res.latitude);
- },
- });
- },
- });
- } else if (this.mixin_type == "H5") {
- this.jsonp("https://apis.map.qq.com/ws/location/v1/ip", {
- key: "O7NBZ-PTTCG-OEPQF-I6MTS-YEKCJ-OCFVO",
- output: "jsonp",
- }).then((res) => {
- console.log(res);
- console.log(res.result.ad_info);
- this_.cityId(res.result.ad_info.city);
- });
- } else {
- uni.getLocation({
- type: "wgs84",
- success: function (res) {
- console.log("当前位置的经度:" + res.longitude);
- console.log("当前位置的纬度:" + res.latitude);
- this_.loAcquire(res.longitude, res.latitude);
- },
- });
- }
- },
- // 根据经纬度查询城市
- loAcquire(longitude, latitude) {
- let this_ = this;
-
- http('https://restapi.amap.com/v3/geocode/regeo',"GET",{
- key: "08dceab59cbce678d07e89924e376f53",
- location: longitude + ',' + latitude,
- output: "JSON"
- })
- .then(res=>{
- console.log(res)
- if(res.statusCode == 200){
- if(res.data.status == 1){
- console.log({
- province:res.data.regeocode.addressComponent.province,
- city:res.data.regeocode.addressComponent.city,
- district:res.data.regeocode.addressComponent.district,
- });
- let province = res.data.regeocode.addressComponent.province;
- let city = res.data.regeocode.addressComponent.city;
- let district = res.data.regeocode.addressComponent.district;
- if(!isString(city)){
- city = province;
- }
- uni.setStorage({
- key: 'address',
- data: JSON.stringify({
- district:district,
- city:city,
- province:province,
- })
- });
- this_.cityId(city)
- }
- }
-
- })
-
- // this.myAmapFun.reverseGeocoder({
- // location: {
- // latitude: latitude,
- // longitude: longitude,
- // },
- // success: function (res) {
- // console.log("解析地址成功");
- // console.log(res);
- // console.log({
- // province: res.result.address_component.province,
- // city: res.result.address_component.city,
- // district: res.result.address_component.district,
- // });
- // uni.setStorage({
- // key: "address",
- // data: JSON.stringify({
- // district: res.result.address_component.district,
- // city: res.result.address_component.city,
- // province: res.result.address_component.province,
- // }),
- // });
- // // 根据名称筛选id
- // this_.cityId(res.result.address_component.city);
- // // 从本地缓存里面获取数据
- // // let _this = this
- // // uni.getStorage({
- // // //key值为custom
- // // key: `address`,
- // // success: function(res) {
- // // _this.active = [...res.data]; //这里也可以不使用es6的扩展运算符
- // // console.log(_this.active, '_this.active');
- // // },
- // // })
- // },
- // fail: function (res) {
- // uni.showToast({
- // title: "定位失败",
- // duration: 2000,
- // icon: "none",
- // });
- // console.log(res);
- // },
- // complete: function (res) {
- // console.log(res);
- // },
- // });
- },
- // 根据名称筛选id
- cityId(val) {
- let obj = val;
- this.cityList.forEach((val, i) => {
- val.children.forEach((item, l) => {
- if (item.label == obj) {
- console.log(item.label);
- console.log(item.value);
- this.cityShowText = item.label;
- this.listData.city_id = item.value;
- this.phoneList();
- }
- });
- });
- },
- // 号码详情
- ListClick(id) {
- // 是H5 没有足迹接口
- if (this.mixin_type == "H5") {
- uni.navigateTo({
- url:
- "/pageA/order/order?id=" +
- id +
- "&chanId=" +
- uni.getStorageSync("chanId"),
- });
- return;
- }
- this.$http.add({ id: id }).then((res) => {
- if (res.data.code == 1) {
- // #ifdef MP-KUAISHOU
- uni.showToast({
- title: "号码已添加到足迹",
- duration: 500,
- icon: "none",
- });
- // #endif
- // #ifndef MP-KUAISHOU
- uni.showToast({
- title: "该号码已添加到我的足迹",
- duration: 500,
- icon: "none",
- });
- // #endif
- setTimeout(function () {
- uni.navigateTo({
- url:
- "/pageA/order/order?id=" +
- id +
- "&chanId=" +
- uni.getStorageSync("chanId"),
- });
- }, 500);
- } else {
- uni.navigateTo({
- url:
- "/pageA/order/order?id=" +
- id +
- "&chanId=" +
- uni.getStorageSync("chanId"),
- });
- }
- });
- },
- // 排除 复选
- checkboxGroupChange(e) {
- console.log("e", e);
- if (e.indexOf("all") == 0) {
- this.listData.exclude_num = [];
- } else {
- this.listData.exclude_num = e;
- }
- },
- // 价格选中值
- numbersChange(e) {
- console.log(e);
- if (this.numbers == 0) {
- this.listData.num_max = "";
- } else {
- this.listData.num_max = this.numbersList[this.numbers].num;
- }
- },
- // 价格选中值
- priceChange(e) {
- console.log(e);
- if (this.priceList[e].name == "全部") {
- this.listData.price_max = "";
- this.listData.price_min = "";
- } else {
- this.listData.price_max = this.priceList[this.price].max;
- this.listData.price_min = this.priceList[this.price].min;
- }
- this.input_price_max = this.priceList[this.price].max;
- this.input_price_min = this.priceList[this.price].min;
- console.log(this.listData.price_max);
- console.log(this.listData.price_min);
- },
- // 网络选中值
- radioGroupChange(e) {
- console.log(this.networkValue);
- if (this.networkValue == "全部") {
- this.listData.network = "";
- } else {
- this.listData.network = this.networkValue;
- }
- },
- // 城市一级列表点击
- scrollOneMeh(val) {
- console.log(val);
- if (val == "all") {
- this.listData.city_id = "city_id";
- this.cityListOneType = "all";
- this.cityListTwoType = "all";
- this.cityShowText = "归属地";
- } else {
- this.cityListTwo = this.cityList[val].children;
- this.cityListOneType = val;
- this.listData.city_id = this.cityList[val].value + "-all";
- this.cityListTwoType = "all";
- this.cityShowText = "归属地";
- }
- },
- // 市区筛选搜索
- scrollTwoMeh(index) {
- if (index != "all") {
- // 搜索框初始化
- // this.searchVal=''
- // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
- // this.mesValueIndex=1
- // this.keyword = true;
- // this.listData.keyword=''
- this.listData.city_id = this.cityListTwo[index].value;
- this.cityShowText = this.cityListTwo[index].label;
- this.cityListTwoType = index;
- } else {
- if (this.cityListOneType != "all") {
- this.listData.city_id =
- this.cityList[this.cityListOneType].value + "-all";
- this.cityShowText = "归属地";
- this.cityListTwoType = "all";
- }
- }
- this.phoneList();
- this.cityShow = false;
- },
- //归属地筛选 重置
- area_tree_init() {
- this.listData.city_id = "city_id";
- this.cityListOneType = "all";
- this.cityListTwoType = "all";
- this.cityShowText = "归属地";
- },
- //归属地弹框 确认按钮
- phoneConfirm() {
- // 搜索框初始化
- // this.searchVal=''
- // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
- // this.mesValueIndex=1
- // this.keyword = true;
- // this.listData.keyword=''
- this.cityShow = false;
- this.phoneList();
- },
- //号码类型弹框 一阶
- ruleMameMeh(index) {
- if (index == "all") {
- this.ruleListOneType = "all";
- this.listData.rule_position = "";
- } else {
- this.ruleListOneType = index;
- this.listData.rule_position = index;
- }
- },
- // 号码类型弹框 二阶
- ruleMeh(index, val) {
- // 搜索框初始化
- // this.searchVal=''
- // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
- // this.mesValueIndex=1
- // this.keyword = true;
- // this.listData.keyword=''
- if (index == "all") {
- this.ruleListTwoType = "all";
- this.listData.rule_name = "";
- } else {
- this.ruleListTwoType = index;
- this.listData.rule_name = val;
- }
- this.phoneList();
- this.rule = false;
- },
- //号码类型 弹框 重置
- rule_tree_init() {
- this.ruleListOneType = "tail";
- this.ruleListTwoType = "all";
- this.listData.rule_name = "";
- this.listData.rule_position = "tail";
- },
- // 确定
- ruleConfirm() {
- // 搜索框初始化
- // this.searchVal=''
- // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
- // this.mesValueIndex=1
- // this.keyword = true;
- // this.listData.keyword=''
- this.rule = false;
- this.phoneList();
- },
- // 号码筛选 重置
- codeHide() {
- this.networkValue = "全部";
- this.listData.network = "";
- this.price = 0;
- this.input_price_min = 0;
- this.input_price_max = 0;
- this.listData.price_max = "";
- this.listData.price_min = "";
- this.excludeList = [
- { name: "全部", val: "all", checked: true },
- { name: "不带0", val: 0, checked: false },
- { name: "不带1", val: 1, checked: false },
- { name: "不带2", val: 2, checked: false },
- { name: "不带3", val: 3, checked: false },
- { name: "不带4", val: 4, checked: false },
- { name: "不带5", val: 5, checked: false },
- { name: "不带6", val: 6, checked: false },
- { name: "不带7", val: 7, checked: false },
- { name: "不带8", val: 8, checked: false },
- { name: "不带9", val: 9, checked: false },
- ];
- this.listData.exclude_num = [];
- this.listData.num_max = "";
- this.numbers = 0;
- },
- // 号码筛选确定
- codeConfirm() {
- // 搜索框初始化
- // this.searchVal=''
- // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
- // this.mesValueIndex=1
- // this.keyword = true;
- // this.listData.keyword=''
- this.phoneList();
- this.code = false;
- },
- // 价格重置
- sortHideLoad() {
- this.sortValue = "";
- this.listData.sort = "";
- },
- // 价格筛选
- sortConfirm() {
- // 搜索框初始化
- // this.searchVal=''
- // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
- // this.mesValueIndex=1
- // this.keyword = true;
- // this.listData.keyword=''
- this.phoneList();
- this.sortHide = false;
- },
- all() {
- console.log("全国");
- },
- checkboxChange(e) {
- console.log(e);
- setTimeout(() => {
- console.log(
- "this.excludeList",
- JSON.parse(JSON.stringify(this.excludeList))
- );
- if (e.name == "all") {
- this.excludeList = [
- { name: "全部", val: "all", checked: true },
- { name: "不带0", val: 0, checked: false },
- { name: "不带1", val: 1, checked: false },
- { name: "不带2", val: 2, checked: false },
- { name: "不带3", val: 3, checked: false },
- { name: "不带4", val: 4, checked: false },
- { name: "不带5", val: 5, checked: false },
- { name: "不带6", val: 6, checked: false },
- { name: "不带7", val: 7, checked: false },
- { name: "不带8", val: 8, checked: false },
- { name: "不带9", val: 9, checked: false },
- ];
- this.listData.exclude_num = [];
- } else {
- this.listData.exclude_num = [];
- this.excludeList[0] = { name: "全部", val: "all", checked: false };
- this.excludeList.forEach((item) => {
- if (item.checked) {
- if (item.name != "all") {
- this.listData.exclude_num.push(item.val);
- } else {
- this.listData.exclude_num = [];
- }
- }
- });
- }
- console.log("this.listData.exclude_num", this.listData.exclude_num);
- // this.checked=!this.checked
- }, 200);
- },
- // 价格筛选弹框确认
- sortCon(val) {
- this.sortValue = val;
- this.listData.sort = val;
- this.phoneList();
- this.sortHide = false;
- },
- // 区域内容
- area_tree() {
- this.$http.area_tree().then((res) => {
- if (res.data.code === 1) {
- this.cityList = res.data.data;
- }
- });
- },
- // 系统基本配置
- config() {
- this.$http.config().then((res) => {
- console.log(res);
- if (res.data.code == 1) {
- this.ruleList = res.data.data.rule;
- this.networkList = res.data.data.network;
- }
- });
- },
- // 横幅播报
- ordered_show() {
- this.$http.ordered_show().then((res) => {
- console.log(res);
- if (res.data.code == 1) {
- this.ordered_list = res.data.data.ordered_list;
- }
- });
- },
- // 特价号跳转
- flow() {
- if (this.configAll.system_index_m1 == 1) {
- if (uni.getStorageSync("chanId")) {
- uni.navigateTo({
- url: "/pages/flow/flow?chanId=" + uni.getStorageSync("chanId"),
- });
- } else {
- uni.navigateTo({
- url: "/pages/flow/flow",
- });
- }
- } else if (this.configAll.system_index_m1 == 3) {
- this.listData.is_offer = 1;
- this.phoneList();
- } else {
- uni.navigateTo({
- url: "/pageA/customized/customized",
- });
- }
- },
- // 回到顶部
- scroll() {
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 1,
- });
- },
- // 查询订单数
- orderMetList() {
- console.log("查询订单数");
- if (uni.getStorageSync("token")) {
- let this_ = this;
- this.$http.order_list().then((res) => {
- console.log(res);
- if (res.data.code == 1) {
- this_.orderNum = res.data.data.total;
- res.data.data.data.find((item, index) => {
- if (item.status == 0) {
- this_.orderNumArr = item;
- this_.orderNumArrTpye = true;
- }
- });
- }
- });
- }
- // #ifdef H5
- // H5 查询订单方式
- console.log("H5" + 121111);
- if (uni.getStorageSync("LH_H5_PHONE")) {
- let this_ = this;
- this.$http
- .order_list({ phone: uni.getStorageSync("LH_H5_PHONE") })
- // this.$http.order_list({phone:'18369588944'})
- .then((res) => {
- console.log(res);
- if (res.data.code == 1) {
- this_.orderNum = res.data.data.total;
- res.data.data.data.find((item, index) => {
- if (item.status == 0) {
- this_.orderNumArr = item;
- this_.orderNumArrTpye = true;
- }
- // if (index == 0) {
- // this_.orderNumArr=item
- // this_.orderNumArrTpye=true
- // }
- });
- }
- });
- }
- // #endif
- },
- // 是否有订单
- order_List() {
- let this_ = this;
- this.orderMetList();
- },
- // 跳转订单查询
- orderQuery() {
- if (uni.getStorageSync("chanId")) {
- uni.navigateTo({
- url:
- "/pageA/orderList/orderList?chanId=" + uni.getStorageSync("chanId"),
- });
- } else {
- uni.navigateTo({
- url: "/pageA/orderList/orderList",
- });
- }
- },
- // 复制
- copyNumHandle() {
- uni.setClipboardData({
- data: "美美号源", // data的值为你要复制的内容
- success: (res) => {},
- });
- },
- funInputPhoneNum(e) {
- console.log(e);
- var index = e.target.id.replace("input-", "");
- var value = e.detail.value;
- if (index != "10" && value != "") {
- this.focus_index = Number(index) + 1;
- }
- },
- funDeletePhoneNum(e) {
- console.log(e);
- var index = e.target.id.replace("input-", "");
- if (this.listData.keyword[index] == "" && index > 1) {
- this.focus_index = Number(index) - 1;
- }
- },
- funFocusInput(e) {
- this.keyShow = true;
- // var interval = setInterval(function(){
- // uni.hideKeyboard();//隐藏软键盘
- // console.log('刷新')
- // },20);
- // setTimeout(() => {
- // clearInterval(interval);
- // console.log('停止刷新')
- // },3000);
- var index = e.target.id.replace("input-", "");
- if (this.listData.keyword[index] != "") {
- this.listData.keyword[index] = "";
- }
- },
- },
- };
- </script>
- <style lang="scss">
- @import "./index.scss";
- </style>
|