index.vue 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847
  1. <template>
  2. <!-- -->
  3. <view
  4. :class="wrapListType ? 'index' : 'index'"
  5. :id="wrapListType ? indexTop : 'index'"
  6. >
  7. <!-- <input type="text" v-model="'1 1'"> -->
  8. <view class="share" @tap="Message()" v-if="shareBtn">
  9. {{ shareHideText }}
  10. </view>
  11. <view class="top">
  12. <view class="img" v-show="footHide" @tap="footList()">
  13. <image src="../../static/img/foot.png" mode=""></image>
  14. </view>
  15. <image @tap="scroll()" src="../../static/img/top.png" mode=""></image>
  16. </view>
  17. <view class="pay" v-if="orderNumArrTpye" @tap="payment(orderNumArr.id)">
  18. <image
  19. src="../../static/img/image42.d45db6230a66350a8371.png"
  20. mode=""
  21. ></image>
  22. <view class="payCon">
  23. 选购:{{ orderNumArr.no }}
  24. <view class="close-view" @tap.stop="orderNumArrTpye = false"> X </view>
  25. </view>
  26. </view>
  27. <view class="Swiper" v-show="wrapListType">
  28. <view class="wrap">
  29. <u-swiper
  30. :list="wrapList"
  31. name="img"
  32. @click="wrapMet"
  33. height="302rpx"
  34. ></u-swiper>
  35. <view
  36. class="cooperation"
  37. v-if="configAll.system_index_tr == 2 && chanId != 'lh'"
  38. >
  39. <view @click="tohezuo"> 商务合作 </view>
  40. </view>
  41. <view
  42. class="complaintImg"
  43. v-if="configAll.system_index_tr == 1 && chanId != 'lh'"
  44. >
  45. <navigator url="/pageA/complaint/complaint">
  46. <view class="img">
  47. <image src="../../static/img/complaintImg.png" mode=""></image>
  48. </view>
  49. <text>投诉</text>
  50. </navigator>
  51. </view>
  52. </view>
  53. </view>
  54. <view id="imgBox">
  55. <!-- 切换 -->
  56. <view class="tap" v-if="chanId != 'lh'">
  57. <view class="li" @tap="phoneListInit()">
  58. <image src="../../static/img/tapimg1.png" mode=""></image>
  59. <text>全国靓号</text>
  60. </view>
  61. <view class="li" @tap="loca()">
  62. <image src="../../static/img/tapimg2.png" mode=""></image>
  63. <text>本地靓号</text>
  64. </view>
  65. <view class="li" @tap="flow()">
  66. <image src="../../static/img/tapimg3.png" mode=""></image>
  67. <text v-if="configAll.system_index_m1 == 1">流量卡</text>
  68. <text v-if="configAll.system_index_m1 == 2">号码定制</text>
  69. <text v-if="configAll.system_index_m1 == 3">特价号</text>
  70. </view>
  71. <view class="li">
  72. <view class="buttonType">
  73. <button
  74. open-type="byteHi"
  75. v-if="mixin_type == 'TOUTIAO'"
  76. style="box-shadow: none"
  77. >
  78. <image src="../../static/img/tapimg4.png" mode=""></image>
  79. <text>联系客服</text>
  80. </button>
  81. <button v-else @click="buttonType" style="box-shadow: none">
  82. <image src="../../static/img/tapimg4.png" mode=""></image>
  83. <text>联系客服</text>
  84. </button>
  85. </view>
  86. </view>
  87. <view class="li" @tap="orderQuery()">
  88. <image src="../../static/img/tapimg5.png" mode=""></image>
  89. <text>订单查询</text>
  90. <view v-if="orderNum != ''" class="orderNum">
  91. {{ orderNum }}
  92. </view>
  93. </view>
  94. </view>
  95. <!-- 搜索 -->
  96. <view>
  97. <view class="search" v-if="keyword">
  98. <view class="searchInput">
  99. <view class="searchType" @tap="keywordMet()">
  100. 模糊
  101. <image src="../../static/img/searchDown.png" mode=""></image>
  102. </view>
  103. <view class="input">
  104. <!-- <image src="../../static/img/search.png" mode=""></image> -->
  105. <input
  106. type="number"
  107. @confirm="query()"
  108. maxlength="11"
  109. v-model="searchVal"
  110. placeholder-style="font-size:28rpx;"
  111. placeholder="输入您喜欢的号码"
  112. />
  113. </view>
  114. <view class="btn" @tap="query()"> 查询 </view>
  115. </view>
  116. <view class="check">
  117. <u-checkbox-group>
  118. <u-checkbox
  119. shape="circle"
  120. @change="search_lastChange"
  121. active-color="#E30029"
  122. v-model="searchChecked"
  123. >尾号</u-checkbox
  124. >
  125. </u-checkbox-group>
  126. </view>
  127. </view>
  128. <view class="search search2" v-if="!keyword">
  129. <view class="searchInput">
  130. <view class="searchType" @tap="keywordMet()">
  131. 精准
  132. <image src="../../static/img/searchDown.png" mode=""></image>
  133. </view>
  134. <view :class="inputsMes">
  135. <view class="hide">
  136. <text
  137. v-for="(item, index) in 11"
  138. :key="index"
  139. @tap="hideValue(index)"
  140. ></text>
  141. </view>
  142. <w-message-input
  143. width="42"
  144. :activeIndex="mesValueIndex"
  145. :value="mesValue"
  146. :disabled-keyboard="true"
  147. font-size="26"
  148. :maxlength="11"
  149. @change="changeMes"
  150. @finish="finishMes"
  151. ></w-message-input>
  152. </view>
  153. <!-- <view class="phone-num-input-box u-flex u-row-between">
  154. <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]"
  155. v-for="(item,index) in listData.keyword" :key="index" :id="'input-'+ index" :focus="focus_index == index"
  156. autocomplete="off" autocapitalize="off" autocorrect="off" @keyup.delete="funDeletePhoneNum"
  157. @input="funInputPhoneNum" @focus="funFocusInput">
  158. </view> -->
  159. <view class="btn" @tap="query()"> 查询 </view>
  160. </view>
  161. </view>
  162. </view>
  163. <!-- 公告 -->
  164. <view class="notice_an" :style="noticeStyle" v-if="chanId != 'lh'">
  165. <view class="noticeHide"></view>
  166. <view class="notice_bg swiper-no-swiping">
  167. <image class="icon" src="../../static/img/horn.png"></image>
  168. <swiper
  169. autoplay="true"
  170. display-multiple-items="1"
  171. vertical="true"
  172. circular
  173. interval="2000"
  174. class="bar-swiper"
  175. >
  176. <swiper-item
  177. catchtouchmove="stopTouchMove"
  178. v-for="(item, index) in ordered_list"
  179. :key="index"
  180. class="swiper-item"
  181. >
  182. <!-- <view class="circle"></view> -->
  183. <view class="item_box">
  184. 已有{{ item.num }}人订购 {{ item.name }} 获得 {{ item.no }}
  185. </view>
  186. </swiper-item>
  187. </swiper>
  188. </view>
  189. </view>
  190. <!-- 线 -->
  191. <view class="line" v-if="!wrapListType">
  192. <text>号码查询</text>
  193. </view>
  194. <!-- 切换 -->
  195. <view class="popup">
  196. <view class="popupTap">
  197. <view @tap="cityShowHerf()">
  198. <text
  199. style="
  200. width: 120rpx;
  201. display: inline-block;
  202. white-space: nowrap;
  203. overflow: hidden;
  204. text-overflow: ellipsis;
  205. "
  206. >{{ cityShowText }}</text
  207. >
  208. <image
  209. style="vertical-align: top"
  210. src="../../static/img/searchDown.png"
  211. mode=""
  212. ></image>
  213. </view>
  214. <view @tap="rule = true">
  215. <text>号码类型</text>
  216. <image src="../../static/img/searchDown.png" mode=""></image>
  217. </view>
  218. <view @tap="code = true">
  219. <text>号码筛选</text>
  220. <image src="../../static/img/searchDown.png" mode=""></image>
  221. </view>
  222. <view @tap="sortHide = true">
  223. <text>价格筛选</text>
  224. <image src="../../static/img/searchDown.png" mode=""></image>
  225. </view>
  226. </view>
  227. </view>
  228. </view>
  229. <view class="boxList" :style="wrapListType ? '' : noticeStyleTop">
  230. <view
  231. class="box"
  232. v-for="(item, index) in boxList"
  233. @tap="ListClick(item.id)"
  234. :key="index"
  235. >
  236. <image
  237. class="mask"
  238. v-if="item.is_activity == 1"
  239. src="../../static/img/image20.94e9ccc9433ca0f0401c.png"
  240. mode=""
  241. ></image>
  242. <view class="hui" v-if="item.status == 1">
  243. <image
  244. src="../../static/img/image21.347862609b15d945bff7.png"
  245. mode=""
  246. ></image>
  247. </view>
  248. <view class="number">
  249. <view v-html="item.phoneHtml"></view>
  250. <view class="Pretty" v-if="item.type == 1"> 靓 </view>
  251. </view>
  252. <view class="money">
  253. <!-- ¥{{item.amount}} -->
  254. ¥{{ item.is_activity == 0 ? item.amount_base : item.amount_kill }}
  255. <view class="empty"> ¥{{ item.amount_original }} </view>
  256. </view>
  257. <view class="source">
  258. {{ item.network }}
  259. <text @click.stop="TotalCityHide(item.TotalCity)">{{
  260. item.TotalCity | areaName
  261. }}</text>
  262. </view>
  263. </view>
  264. <u-loadmore margin-top="40" margin-bottom="30" :status="status" />
  265. </view>
  266. <!-- 归属地弹框 -->
  267. <u-popup v-model="cityShow" mode="right">
  268. <view class="cityAll codeClass">
  269. <view class="city_l">
  270. <scroll-view scroll-y class="scrollOne">
  271. <view
  272. :class="cityListOneType == 'all' ? 'li active' : 'li'"
  273. @tap="scrollOneMeh('all')"
  274. >全部</view
  275. >
  276. <view
  277. v-for="(item, index) in cityList"
  278. :key="index"
  279. :class="cityListOneType == index ? 'li active' : 'li'"
  280. @tap="scrollOneMeh(index)"
  281. >{{ item.label }}</view
  282. >
  283. </scroll-view>
  284. </view>
  285. <view class="city_r">
  286. <scroll-view scroll-y class="scrollTwo">
  287. <view
  288. :class="cityListTwoType == 'all' ? 'li active' : 'li'"
  289. @tap="scrollTwoMeh('all')"
  290. >全部</view
  291. >
  292. <view
  293. v-for="(item, index) in cityListTwo"
  294. :key="index"
  295. :class="cityListTwoType == index ? 'li active' : 'li'"
  296. @tap="scrollTwoMeh(index)"
  297. >{{ item.label }}</view
  298. >
  299. </scroll-view>
  300. </view>
  301. <view class="btn">
  302. <view class="again" @tap="area_tree_init()"> 重置 </view>
  303. <view class="confirm" @tap="phoneConfirm()"> 确定 </view>
  304. </view>
  305. </view>
  306. </u-popup>
  307. <!-- 号码类型筛选弹框 -->
  308. <u-popup v-model="rule" mode="right">
  309. <view class="cityAll codeClass">
  310. <view class="city_l">
  311. <scroll-view scroll-y class="scrollOne">
  312. <view
  313. :class="ruleListOneType == 'all' ? 'li active' : 'li'"
  314. @tap="ruleMameMeh('all')"
  315. >不限位置</view
  316. >
  317. <view
  318. :class="ruleListOneType == 'middle' ? 'li active' : 'li'"
  319. @tap="ruleMameMeh('middle')"
  320. >中间规律</view
  321. >
  322. <view
  323. :class="ruleListOneType == 'tail' ? 'li active' : 'li'"
  324. @tap="ruleMameMeh('tail')"
  325. >尾数规律</view
  326. >
  327. </scroll-view>
  328. </view>
  329. <view class="city_r">
  330. <scroll-view scroll-y class="scrollTwo">
  331. <view
  332. :class="ruleListTwoType == 'all' ? 'li active' : 'li'"
  333. @tap="ruleMeh()"
  334. >全部</view
  335. >
  336. <view
  337. v-for="(item, index) in ruleList"
  338. :key="index"
  339. :class="ruleListTwoType == index ? 'li active' : 'li'"
  340. @tap="ruleMeh(index, item)"
  341. >{{ item }}</view
  342. >
  343. </scroll-view>
  344. </view>
  345. <view class="btn">
  346. <view class="again" @tap="rule_tree_init()"> 重置 </view>
  347. <view class="confirm" @tap="ruleConfirm()"> 确定 </view>
  348. </view>
  349. </view>
  350. </u-popup>
  351. <!-- 号码筛选 -->
  352. <u-popup v-model="code" mode="right">
  353. <view class="codeClass">
  354. <scroll-view scroll-y="true" style="height: 100%">
  355. <view class="title">运营商 </view>
  356. <view class="network">
  357. <u-radio-group v-model="networkValue" @change="radioGroupChange">
  358. <u-radio
  359. :class="networkValue == '全部' ? 'radioType' : ''"
  360. :name="'全部'"
  361. >
  362. 全部 </u-radio
  363. ><u-radio
  364. :class="networkValue == item ? 'radioType' : ''"
  365. v-for="(item, index) in networkList"
  366. :key="index"
  367. :name="item"
  368. >
  369. {{ item }}
  370. </u-radio>
  371. </u-radio-group>
  372. </view>
  373. <view class="title">价格</view>
  374. <view class="network price">
  375. <u-radio-group v-model="price" @change="priceChange">
  376. <u-radio
  377. :class="price == index ? 'radioType' : ''"
  378. v-for="(item, index) in priceList"
  379. :key="index"
  380. :name="index"
  381. >
  382. {{ item.name }}
  383. </u-radio>
  384. </u-radio-group>
  385. <view class="Range">
  386. <text>价格范围</text>
  387. <input
  388. type="number"
  389. placeholder-style="font-size:24rpx;color:#D0D0D0;"
  390. v-model="input_price_min"
  391. @input="onInputMin"
  392. placeholder="最低价"
  393. />
  394. <text> - </text>
  395. <input
  396. type="number"
  397. placeholder-style="font-size:24rpx;color:#D0D0D0;"
  398. v-model="input_price_max"
  399. @input="onInputMax"
  400. placeholder="最高价"
  401. />
  402. </view>
  403. </view>
  404. <view class="title">排除</view>
  405. <view class="network price exclude">
  406. <!-- <u-checkbox-group @change="checkboxGroupChange"> -->
  407. <u-checkbox-group>
  408. <u-checkbox
  409. width="33.3%"
  410. @change="checkboxChange"
  411. v-model="item.checked"
  412. :class="item.checked ? 'radioType' : ''"
  413. v-for="(item, index) in excludeList"
  414. :key="index"
  415. :name="item.val"
  416. >{{ item.name }}</u-checkbox
  417. >
  418. </u-checkbox-group>
  419. </view>
  420. <view class="title">数字较多</view>
  421. <view class="network price">
  422. <u-radio-group v-model="numbers" @change="numbersChange">
  423. <u-radio
  424. :class="numbers == index ? 'radioType' : ''"
  425. v-for="(item, index) in numbersList"
  426. :key="index"
  427. :name="index"
  428. >
  429. {{ item.name }}
  430. </u-radio>
  431. </u-radio-group>
  432. </view>
  433. </scroll-view>
  434. <view class="btn">
  435. <view class="again" @tap="codeHide()"> 重置 </view>
  436. <view class="confirm" @tap="codeConfirm()"> 确定 </view>
  437. </view>
  438. </view>
  439. </u-popup>
  440. <!-- 价格筛选 -->
  441. <u-popup v-model="sortHide" mode="right">
  442. <view class="sortClass codeClass">
  443. <text
  444. v-for="(item, index) in sort"
  445. :key="index"
  446. @tap="sortCon(item.val)"
  447. :class="sortValue == item.val ? 'active' : ''"
  448. >
  449. {{ item.name }}
  450. </text>
  451. <view class="btn">
  452. <view class="again" @tap="sortHideLoad()"> 重置 </view>
  453. <view class="confirm" @tap="sortConfirm()"> 确定 </view>
  454. </view>
  455. </view>
  456. </u-popup>
  457. <u-keyboard
  458. ref="uKeyboard"
  459. mode="number"
  460. :mask="false"
  461. @change="valChange"
  462. @backspace="backspace"
  463. v-model="keyShow"
  464. ></u-keyboard>
  465. <!-- <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> -->
  466. <view class="popupBox">
  467. <view class="maskName" v-if="login_show"></view>
  468. <view class="newForm" v-if="login_show">
  469. <view class="alertContent">
  470. <view class="title">温馨提示</view>
  471. <view class="content">{{ login_content }}</view>
  472. <view
  473. class="u-flex u-col-center u-row-center btn"
  474. style="border-top: 1px solid #ececec"
  475. >
  476. <text style="border-right: 1px solid #ececec" @tap="login_cancel"
  477. >取消</text
  478. >
  479. <text
  480. style="color: #d52e4c"
  481. v-if="mixin_type == 'TOUTIAO'"
  482. @tap="userLogin"
  483. >确认</text
  484. >
  485. <button
  486. v-else
  487. style="
  488. box-shadow: none;
  489. background: transparent;
  490. box-sizing: border-box;
  491. width: 50%;
  492. border: 0px solid #f3f3f3;
  493. color: #d52e4c;
  494. "
  495. type="default"
  496. open-type="getPhoneNumber"
  497. @getphonenumber="decryptPhoneNumber"
  498. >
  499. 确认
  500. </button>
  501. </view>
  502. </view>
  503. </view>
  504. </view>
  505. <!-- 联系客服 -->
  506. <w-Load :wx="wx" v-on:childByValue="childByValue"></w-Load>
  507. <u-popup v-model="copeHide" border-radius="20" mode="center">
  508. <view class="agreement copeHide">
  509. <image
  510. src="/static/img/up.png"
  511. class="label2"
  512. @tap="copeHide = false"
  513. ></image>
  514. <view class="title"> 温馨提示 </view>
  515. <view class="copyText">客服电话:{{ configAll.service_mobile }}</view>
  516. <view class="btn" @tap="buttonTypePhone()"> 一键拨打 </view>
  517. </view>
  518. </u-popup>
  519. </view>
  520. </template>
  521. <script>
  522. import wLoad from "@/components/w-load/w-load.vue";
  523. import wMessageInput from "@/components/w-message-input/w-message-input.vue";
  524. import http from "@/https/request.js"
  525. import { isString } from "util"
  526. export default {
  527. data() {
  528. return {
  529. chanId: "",
  530. platformType: "3", //平台类型
  531. cityShowText: "归属地",
  532. invoiceShow: true,
  533. shareBtn: false, //按钮是否显示直播 视频
  534. shareHideText: "直播",
  535. // 列表参数
  536. listData: {
  537. city_id: "city_id", //地区id 'city_id'全部
  538. exclude_num: [], //排除 复选 值
  539. is_activity: 0, //是否是优惠号码
  540. keyword: "", //["1", "", "", "", "", "", "", "", "", "", ""], //搜索内容,模糊就是字符串,精准就是数组
  541. limit: 20,
  542. network: "",
  543. num_max: "", //数字较多,传数字
  544. page: 1, //
  545. price_max: "", //价格最高数字
  546. price_min: "", //价格最低数字
  547. rule_name: "", //规律名,AAAA什么的
  548. rule_position: "tail", //规律位置,middle中间,tail尾部
  549. search_last: 1, //0,1是否搜索尾部
  550. search_type: "fuzzy", //fuzzy模糊,precise精准
  551. sort: "", //price_asc价格从低到高,price_desc价格从高到低
  552. is_offer: 0, //是否为特价号
  553. },
  554. inputsMes: "inputsMes", //精准搜索类名
  555. copeHide: false, //客服手机号
  556. orderNum: 0, //订单查询数量
  557. orderNumArr: [], //订单查询数据
  558. orderNumArrTpye: false, //快捷购买显示隐藏
  559. wx: false, //微信公众号二维码展示
  560. searchChecked: true, //是否选中尾号
  561. keyword: true, //模糊和精确切换 true为模糊查询 false为精确查询
  562. focus_index: -1,
  563. status: "loadmore",
  564. boxList: [], //数量
  565. page: 1, //页数
  566. price: "", //号码筛选-价格-选中值
  567. code: false, //号码筛选 显示隐藏
  568. networkValue: "全部", // 号码筛选-网络-选中值
  569. searchVal: "", //模糊查询输入框内容
  570. numbers: 0, // 号码筛选-网络-选中值
  571. ordered_list: [], //播报列表
  572. rule: false, //号码类型弹框
  573. ruleList: [], //号码类型筛选列表
  574. ruleListOneType: "tail", //号码类型-弹框-一阶
  575. ruleListTwoType: "all", //号码类型-弹框-二阶
  576. networkList: [], //号码运营商筛选列表
  577. configAll: "", //基本配置
  578. keyShow: false, //数字键盘
  579. mesValue: ["1", "", "", "", "", "", "", "", "", "", ""],
  580. mesValueIndex: 12, // 光标选中位置
  581. backspaceType: false, //选中其中一个删除按钮特殊处理
  582. //号码筛选-价格-列表
  583. priceList: [
  584. { name: "全部" },
  585. { name: "300以下", min: 0, max: 300 },
  586. { name: "301-500", min: 301, max: 500 },
  587. { name: "501-1000", min: 501, max: 1000 },
  588. { name: "1001-3000", min: 1001, max: 3000 },
  589. { name: "3001-5000", min: 3001, max: 5000 },
  590. { name: "5001-1万", min: 5001, max: 10000 },
  591. { name: "1-5万", min: 10000, max: 50000 },
  592. { name: "5万以上", min: 50000, max: "" },
  593. ],
  594. //号码筛选-数字限制-列表
  595. numbersList: [
  596. { name: "全部", num: "all" },
  597. { name: "9较多", num: 9 },
  598. { name: "8较多", num: 8 },
  599. { name: "7较多", num: 7 },
  600. { name: "6较多", num: 6 },
  601. { name: "5较多", num: 5 },
  602. { name: "4较多", num: 4 },
  603. { name: "3较多", num: 3 },
  604. { name: "2较多", num: 2 },
  605. { name: "1较多", num: 2 },
  606. { name: "0较多", num: 2 },
  607. ],
  608. // 价格筛选弹出层
  609. sortHide: false,
  610. // 价格筛选值
  611. sortValue: "",
  612. //价格筛选
  613. sort: [
  614. { name: "默认排序", val: "" },
  615. { name: "价格从低到高", val: "price_asc" },
  616. { name: "价格从高到低", val: "price_desc" },
  617. ],
  618. input_price_min: "", //最高价
  619. input_price_max: "", //最低价
  620. excludeList: [
  621. { name: "全部", val: "all", checked: true },
  622. { name: "不带0", val: 0, checked: false },
  623. { name: "不带1", val: 1, checked: false },
  624. { name: "不带2", val: 2, checked: false },
  625. { name: "不带3", val: 3, checked: false },
  626. { name: "不带4", val: 4, checked: false },
  627. { name: "不带5", val: 5, checked: false },
  628. { name: "不带6", val: 6, checked: false },
  629. { name: "不带7", val: 7, checked: false },
  630. { name: "不带8", val: 8, checked: false },
  631. { name: "不带9", val: 9, checked: false },
  632. ],
  633. exclude_num: [], //排除 复选 值
  634. noticeImg: "", //左侧图片
  635. cityShow: false, //归属地弹框展示
  636. cityList: [], //城市总列表
  637. cityListOneType: "all", //选中的一级城市列表index
  638. cityListTwoType: "all", //选中的二级城市列表index
  639. cityListTwo: [], //城市二级列表内容
  640. searchDown: { display: "inline-block" },
  641. checked: true,
  642. indexTop: "",
  643. imgBoxHeigth: "",
  644. SwiperHeigth: "",
  645. wrapList: [],
  646. wrapListType: true, //是否冻结窗口
  647. noticeStyleTop: "", //列表到顶部距离
  648. noticeStyle: "", //公告滑动样式变动
  649. footHide: false, //足迹是否显示
  650. };
  651. },
  652. watch: {
  653. searchVal(val) {
  654. console.log(val);
  655. },
  656. },
  657. filters: {
  658. areaName(val) {
  659. let str = val + "";
  660. if (str.length > 7) {
  661. return str.slice(0, 7) + "...";
  662. } else {
  663. return str;
  664. }
  665. return val
  666. .replace("省", "")
  667. .replace("特别行政区", "")
  668. .replace("壮族自治区", "")
  669. .replace("回族自治区", "")
  670. .replace("维吾尔自治区", "")
  671. .replace("自治区", "");
  672. },
  673. },
  674. components: {
  675. wLoad: wLoad,
  676. wMessageInput: wMessageInput,
  677. },
  678. onPageScroll: function (e) {
  679. //nvue暂不支持滚动监听,可用bindingx代替
  680. let this_ = this;
  681. // console.log("滚动距离为:" + e.scrollTop);
  682. if (!this.wrapListType && e.scrollTop > 10) {
  683. this.noticeStyle = "transition: height linear .1s;height:0rpx;";
  684. this.noticeStyleTop =
  685. "transition: margin-top linear .1s;margin-top:406rpx;";
  686. } else if (!this.wrapListType && e.scrollTop < 10) {
  687. this.noticeStyle = "transition: height linear .1s;height:80rpx;";
  688. this_.noticeStyleTop =
  689. "transition: margin-top linear .1s;margin-top:484rpx;";
  690. }
  691. if (e.scrollTop > this.SwiperHeigth - 20) {
  692. this.indexTop = "index";
  693. }
  694. if (e.scrollTop < 120) {
  695. this.indexTop = "";
  696. }
  697. },
  698. onShow() {
  699. if (this.mixin_type != "TOUTIAO" && this.mixin_type != "H5") {
  700. console.log(123, ks.getLaunchOptionsSync().scene);
  701. let scene = ks.getLaunchOptionsSync().scene;
  702. if (scene == "011041" || scene == "021041" || scene == "1041") {
  703. // 直播间
  704. this.shareHideText = "直播";
  705. this.shareBtn = true;
  706. } else if (scene == "011040" || scene == "021040" || scene == "1040") {
  707. // 视频
  708. this.shareHideText = "视频";
  709. this.shareBtn = true;
  710. }
  711. }
  712. // 足迹是否显示
  713. if (this.mixin_type != "H5") {
  714. this.footHide = true;
  715. } else {
  716. this.footHide = false;
  717. }
  718. console.log(this.mixin_type);
  719. console.log();
  720. },
  721. onLoad(option) {
  722. if (option.chanId) {
  723. this.chanId = option.chanId;
  724. uni.setStorageSync("chanId", option.chanId);
  725. } else {
  726. this.chanId = "";
  727. uni.removeStorageSync("chanId");
  728. }
  729. if (option.system_index_m1) {
  730. // if(option.system_index_m1==3){
  731. this.listData.is_offer = 1;
  732. this.phoneList();
  733. // }
  734. } else {
  735. this.phoneList();
  736. }
  737. this.ads();
  738. this.area_tree();
  739. this.config();
  740. this.ordered_show();
  741. this.commonConfig();
  742. this.orderMetList();
  743. if (option.type) {
  744. if (option.type == "phoneListInit") {
  745. this.phoneListInit();
  746. } else {
  747. this.loca();
  748. }
  749. }
  750. //#ifdef H5
  751. this.inputsMes = "inputsMes active";
  752. //#endif
  753. },
  754. onReachBottom() {
  755. // 下拉加载
  756. this.status = "loading";
  757. this.listData.limit = 100;
  758. this.listData.page = ++this.listData.page;
  759. this.$http.list(this.listData).then((res) => {
  760. // console.log(res)
  761. if (res.data.code == 1) {
  762. if (
  763. this.listData.page < res.data.data.per_page ||
  764. this.listData.page == res.data.data.per_page
  765. ) {
  766. let initArr = res.data.data.data;
  767. initArr.forEach((item) => {
  768. //hits 如果有是按照号码规则显示
  769. console.log(item.hists);
  770. if (item.hits) {
  771. console.log("hists");
  772. this.$set(
  773. item,
  774. "phoneHtml",
  775. "<div>" + this.numberTypeHits(item.hits, item.no) + "</div>"
  776. );
  777. } else {
  778. this.$set(
  779. item,
  780. "phoneHtml",
  781. "<div>" + this.numberType(item.no) + "</div>"
  782. );
  783. }
  784. this.$set(item, "TotalCity", item.province + "-" + item.city);
  785. });
  786. let arr = this.boxList.concat(initArr);
  787. this.boxList = arr;
  788. }
  789. this.status = "nomore";
  790. } else {
  791. this.status = "nomore";
  792. }
  793. });
  794. },
  795. onPullDownRefresh() {
  796. this.phoneList();
  797. console.log("refresh");
  798. },
  799. methods: {
  800. tohezuo() {
  801. if (uni.getStorageSync("chanId")) {
  802. uni.navigateTo({
  803. url:
  804. "/pageA/cooperation/cooperation?chanId=" +
  805. uni.getStorageSync("chanId"),
  806. });
  807. } else {
  808. uni.navigateTo({
  809. url: "/pageA/cooperation/cooperation",
  810. });
  811. }
  812. },
  813. // 列表地区长度超过7 点击弹框提示
  814. TotalCityHide(val) {
  815. let str = val + "";
  816. if (str.length > 7) {
  817. uni.showToast({
  818. title: val,
  819. duration: 1000,
  820. icon: "none",
  821. });
  822. }
  823. },
  824. // 跳转到直播设置界面
  825. Message() {
  826. uni.navigateTo({
  827. url: "/pages/Message/Message?url=" + "/pages/index/index",
  828. });
  829. },
  830. buttonType() {
  831. // #ifdef H5
  832. this.wx = true;
  833. // #endif
  834. // #ifdef MP-KUAISHOU
  835. this.copeHide = true;
  836. // #endif
  837. // if(this.mixin_type!='TOUTIAO' && this.mixin_type!='H5'){
  838. // this.copeHide=true;
  839. // }else if(this.mixin_type=='H5'){
  840. // this.wx=true;
  841. // }
  842. // if(this.platformType==1){
  843. // this.copeHide=true;
  844. // }
  845. // else if(this.platformType==2){
  846. // if(this.mixin_type=='H5'){
  847. // window.location.href=this.configAll.flow_service_link
  848. // }else{
  849. // uni.navigateTo({
  850. // url:'/pages/webview/webview?url='+encodeURIComponent(JSON.stringify(this.configAll.flow_service_link))
  851. // })
  852. // }
  853. // }
  854. // else if(this.platformType==3){
  855. // this.wx=true;
  856. // }
  857. },
  858. buttonTypePhone() {
  859. if (this.mixin_type != "TOUTIAO" && this.mixin_type != "H5") {
  860. ks.makePhoneCall({
  861. phoneNumber: this.configAll.service_mobile, // 仅为示例,并非真实的电话号码
  862. });
  863. } else {
  864. uni.makePhoneCall({
  865. phoneNumber: this.configAll.service_mobile,
  866. });
  867. }
  868. },
  869. cityShowHerf() {
  870. console.log(this.cityShow);
  871. this.cityShow = true;
  872. },
  873. // 自定义输入框值
  874. hideValue(val) {
  875. console.log(val);
  876. if (val == 0) {
  877. return;
  878. }
  879. this.keyShow = true;
  880. this.backspaceType = true;
  881. this.mesValueIndex = val;
  882. },
  883. // 自定义数字键盘删除按键
  884. backspace() {
  885. // 删除value的最后一个字符
  886. let str = parseFloat(this.mesValueIndex);
  887. if (str > 1) {
  888. // if(str==12)
  889. // if(this.backspaceType){
  890. // this.backspaceType=false
  891. // this.mesValue[str]=''
  892. // this.mesValueIndex = str - 1
  893. // this.listData.keyword = this.mesValue
  894. // }else{
  895. this.mesValue[str] = "";
  896. this.mesValueIndex = str - 1;
  897. console.log("减" + this.mesValue);
  898. console.log("减" + this.mesValueIndex);
  899. this.listData.keyword = this.mesValue;
  900. // }
  901. } else if (str == 1) {
  902. this.mesValue[str] = "";
  903. this.listData.keyword = this.mesValue;
  904. } else {
  905. console.log("还剩1位");
  906. }
  907. },
  908. valChange(val) {
  909. // 将每次按键的值拼接到value变量中,注意+=写法
  910. console.log(val);
  911. if (val == ".") {
  912. return;
  913. }
  914. let str = parseFloat(this.mesValueIndex);
  915. console.log(str);
  916. if (str < 10) {
  917. // this.mesValue.push(val);
  918. this.$set(this.mesValue, str, val + "");
  919. this.mesValueIndex = str + 1;
  920. this.listData.keyword = this.mesValue;
  921. console.log(this.mesValueIndex + "加");
  922. } else if (str == 10) {
  923. this.$set(this.mesValue, str, val + "");
  924. this.listData.keyword = this.mesValue;
  925. } else {
  926. console.log("已经11位");
  927. }
  928. },
  929. // 禁止滑动
  930. stopTouchMove() {
  931. console.log(e);
  932. return false;
  933. },
  934. // 按照账号规则匹配
  935. numberTypeHits(type, no) {
  936. let arrStr = "";
  937. type.forEach((item, index) => {
  938. if (item) {
  939. arrStr += '<span class="active">' + no[index] + "</span>";
  940. } else {
  941. arrStr += no[index];
  942. }
  943. });
  944. return arrStr;
  945. },
  946. // 搜索选中红色
  947. numberType(val) {
  948. let str = val;
  949. // console.log(str)
  950. let html, num;
  951. if (!this.keyword) {
  952. if (
  953. this.listData.keyword.toString() !=
  954. ["1", "", "", "", "", "", "", "", "", "", ""].toString()
  955. ) {
  956. let arrStr = "";
  957. let strArr = str.split("");
  958. let list = this.listData.keyword;
  959. strArr.forEach((item, index) => {
  960. if (item == list[index] && index != 0) {
  961. arrStr += '<span class="active">' + item + "</span>";
  962. } else {
  963. arrStr += item;
  964. }
  965. });
  966. return arrStr;
  967. } else {
  968. return (
  969. '<span class="active">' +
  970. str.substr(0, 3) +
  971. "</span>" +
  972. str.substr(3, 4) +
  973. '<span class="active">' +
  974. str.substr(7, str.length) +
  975. "</span>"
  976. );
  977. }
  978. } else {
  979. num = this.listData.keyword;
  980. }
  981. if (
  982. this.listData.keyword != "" &&
  983. this.listData.keyword.toString() !=
  984. ["1", "", "", "", "", "", "", "", "", "", ""].toString()
  985. ) {
  986. return str.replace(
  987. new RegExp(num, "g"),
  988. '<span class="active">' + num + "</span>"
  989. );
  990. } else {
  991. return (
  992. '<span class="active">' +
  993. str.substr(0, 3) +
  994. "</span>" +
  995. str.substr(3, 4) +
  996. '<span class="active">' +
  997. str.substr(7, str.length) +
  998. "</span>"
  999. );
  1000. }
  1001. },
  1002. // 跳转足迹
  1003. footList() {
  1004. if (uni.getStorageSync("token")) {
  1005. // 用户登录
  1006. uni.navigateTo({
  1007. url: "/pages/footList/footList",
  1008. });
  1009. }
  1010. },
  1011. onInputMin(e) {
  1012. console.log(e.detail.value);
  1013. this.input_price_min = e.detail.value;
  1014. this.listData.price_min = e.detail.value;
  1015. this.inputSelectIndex();
  1016. },
  1017. onInputMax(e) {
  1018. console.log(e.detail.value);
  1019. this.input_price_max = e.detail.value;
  1020. this.listData.price_max = e.detail.value;
  1021. this.inputSelectIndex();
  1022. },
  1023. // 价格限制最低最高 对于选择下标
  1024. inputSelectIndex() {
  1025. this.price = "100";
  1026. // 两个输入框为空
  1027. if (this.input_price_min == "" && this.input_price_max == "") {
  1028. this.price = 0;
  1029. }
  1030. this.priceList.forEach((item, index) => {
  1031. if (item.max && item.max != "") {
  1032. if (
  1033. (parseFloat(this.input_price_min) == item.min ||
  1034. parseFloat(this.input_price_min) > item.min) &&
  1035. (parseFloat(this.input_price_max) == item.max ||
  1036. parseFloat(this.input_price_max) < item.max)
  1037. ) {
  1038. this.price = index;
  1039. console.log(index);
  1040. }
  1041. }
  1042. });
  1043. },
  1044. payment(item) {
  1045. // val有值时候 是申请退款
  1046. uni.navigateTo({
  1047. url: "/pages/payment/payment?id=" + item,
  1048. });
  1049. },
  1050. childByValue: function (childValue) {
  1051. this.wx = childValue;
  1052. },
  1053. // 系统配置
  1054. commonConfig() {
  1055. this.$http.commonConfig().then((res) => {
  1056. if (res.data.code == 1) {
  1057. this.configAll = res.data.data;
  1058. if (this.configAll.index_no_type == "local") {
  1059. this.loca();
  1060. }
  1061. if (this.mixin_type != "TOUTIAO" && this.mixin_type != "H5") {
  1062. this.platformType = this.configAll.flow_service_ks;
  1063. } else if (this.mixin_type == "H5") {
  1064. this.platformType = this.configAll.flow_service_h5;
  1065. } else {
  1066. this.platformType = this.configAll.flow_service_dy;
  1067. }
  1068. }
  1069. });
  1070. },
  1071. // 轮播图
  1072. ads() {
  1073. this.$http.ads({ pos: "index" }).then((res) => {
  1074. if (res.data.code == 1) {
  1075. this.wrapList = res.data.data;
  1076. if (this.wrapList.length == 0) {
  1077. this.wrapListType = false;
  1078. this.noticeStyle = "height:80rpx;!important";
  1079. this.noticeStyleTop = "margin-top: 470rpx;";
  1080. } else {
  1081. this.wrapListType = true;
  1082. }
  1083. }
  1084. });
  1085. },
  1086. // 全国靓号
  1087. phoneListInit() {
  1088. this.initData();
  1089. this.phoneList();
  1090. },
  1091. // 查询按钮
  1092. query() {
  1093. if (this.keyword) {
  1094. this.listData.keyword = this.searchVal;
  1095. } else {
  1096. this.listData.keyword = this.listData.keyword;
  1097. }
  1098. this.phoneList();
  1099. },
  1100. // 是否是尾号
  1101. search_lastChange(e) {
  1102. this.listData.search_last = e.value ? 1 : 0;
  1103. this.phoneList();
  1104. },
  1105. wrapMet(e) {
  1106. console.log(e);
  1107. if (this.wrapList[e].link != null && this.wrapList[e].link != "") {
  1108. uni.navigateTo({
  1109. url: this.wrapList[e].link,
  1110. });
  1111. } else {
  1112. // 优惠查询
  1113. this.keywordMet(1);
  1114. }
  1115. },
  1116. // 模糊和精确搜索框切换
  1117. keywordMet(val) {
  1118. // val 有值是轮播图点击
  1119. this.mesValue = ["1", "", "", "", "", "", "", "", "", "", ""];
  1120. this.mesValueIndex = 12;
  1121. if (val) {
  1122. this.listData.is_activity = 1;
  1123. this.listData.keyword = "";
  1124. this.keyword = true;
  1125. this.listData.search_type = "fuzzy";
  1126. } else {
  1127. console.log(this.keyword);
  1128. this.keyword = !this.keyword;
  1129. this.searchChecked = true;
  1130. this.listData.search_last = 1;
  1131. if (this.keyword) {
  1132. this.listData.keyword = "";
  1133. this.listData.search_type = "fuzzy";
  1134. } else {
  1135. this.listData.keyword = ["1", "", "", "", "", "", "", "", "", "", ""];
  1136. this.listData.search_type = "precise";
  1137. }
  1138. }
  1139. this.phoneList();
  1140. },
  1141. // 初始化列表
  1142. phoneList() {
  1143. this.status = "loading";
  1144. this.listData.limit = 100;
  1145. // 初始化页数
  1146. this.listData.page = 1;
  1147. this.boxList = [];
  1148. this.$http.list(this.listData).then((res) => {
  1149. if (res.data.code == 1) {
  1150. console.log(123, res);
  1151. if (
  1152. res.data.data.has_more == true &&
  1153. res.data.data.data.length < 20
  1154. ) {
  1155. this.phoneList();
  1156. } else {
  1157. this.listData.limit = 20;
  1158. uni.stopPullDownRefresh();
  1159. this.boxList = res.data.data.data;
  1160. this.boxList.forEach((item) => {
  1161. if (item.hits) {
  1162. this.$set(
  1163. item,
  1164. "phoneHtml",
  1165. "<div>" + this.numberTypeHits(item.hits, item.no) + "</div>"
  1166. );
  1167. } else {
  1168. this.$set(
  1169. item,
  1170. "phoneHtml",
  1171. "<div>" + this.numberType(item.no) + "</div>"
  1172. );
  1173. }
  1174. this.$set(item, "TotalCity", item.province + "-" + item.city);
  1175. });
  1176. this.scroll();
  1177. }
  1178. this.status = "nomore";
  1179. }
  1180. });
  1181. },
  1182. // 初始化列表请求数据参数
  1183. initData() {
  1184. this.keyword = true;
  1185. this.searchChecked = true;
  1186. this.listData.search_last = 1;
  1187. this.searchVal = "";
  1188. this.mesValue = ["1", "", "", "", "", "", "", "", "", "", ""];
  1189. this.cityListTwo = [];
  1190. this.mesValueIndex = 12;
  1191. this.cityShowText = "归属地";
  1192. this.listData = {
  1193. city_id: "city_id",
  1194. exclude_num: [],
  1195. is_activity: 0,
  1196. keyword: "",
  1197. limit: 20,
  1198. network: "",
  1199. num_max: "",
  1200. page: 1,
  1201. price_max: "",
  1202. price_min: "",
  1203. rule_name: "",
  1204. rule_position: "tail",
  1205. search_last: 1,
  1206. search_type: "fuzzy",
  1207. sort: "",
  1208. is_offer: 0,
  1209. };
  1210. this.area_tree_init();
  1211. this.rule_tree_init();
  1212. this.codeHide();
  1213. this.sortHideLoad();
  1214. },
  1215. // 本地靓号
  1216. loca() {
  1217. this.initData();
  1218. let this_ = this;
  1219. console.log(this.mixin_type + "来源");
  1220. if (this.mixin_type != "TOUTIAO" && this.mixin_type != "H5") {
  1221. //提前向用户发起授权请求
  1222. ks.authorize({
  1223. scope: "scope.userLocation",
  1224. success() {
  1225. uni.getLocation({
  1226. type: "wgs84",
  1227. success: function (res) {
  1228. console.log(res);
  1229. console.log("当前位置的经度:" + res.longitude);
  1230. console.log("当前位置的纬度:" + res.latitude);
  1231. this_.loAcquire(res.longitude, res.latitude);
  1232. },
  1233. });
  1234. },
  1235. });
  1236. } else if (this.mixin_type == "H5") {
  1237. this.jsonp("https://apis.map.qq.com/ws/location/v1/ip", {
  1238. key: "O7NBZ-PTTCG-OEPQF-I6MTS-YEKCJ-OCFVO",
  1239. output: "jsonp",
  1240. }).then((res) => {
  1241. console.log(res);
  1242. console.log(res.result.ad_info);
  1243. this_.cityId(res.result.ad_info.city);
  1244. });
  1245. } else {
  1246. uni.getLocation({
  1247. type: "wgs84",
  1248. success: function (res) {
  1249. console.log("当前位置的经度:" + res.longitude);
  1250. console.log("当前位置的纬度:" + res.latitude);
  1251. this_.loAcquire(res.longitude, res.latitude);
  1252. },
  1253. });
  1254. }
  1255. },
  1256. // 根据经纬度查询城市
  1257. loAcquire(longitude, latitude) {
  1258. let this_ = this;
  1259. http('https://restapi.amap.com/v3/geocode/regeo',"GET",{
  1260. key: "08dceab59cbce678d07e89924e376f53",
  1261. location: longitude + ',' + latitude,
  1262. output: "JSON"
  1263. })
  1264. .then(res=>{
  1265. console.log(res)
  1266. if(res.statusCode == 200){
  1267. if(res.data.status == 1){
  1268. console.log({
  1269. province:res.data.regeocode.addressComponent.province,
  1270. city:res.data.regeocode.addressComponent.city,
  1271. district:res.data.regeocode.addressComponent.district,
  1272. });
  1273. let province = res.data.regeocode.addressComponent.province;
  1274. let city = res.data.regeocode.addressComponent.city;
  1275. let district = res.data.regeocode.addressComponent.district;
  1276. if(!isString(city)){
  1277. city = province;
  1278. }
  1279. uni.setStorage({
  1280. key: 'address',
  1281. data: JSON.stringify({
  1282. district:district,
  1283. city:city,
  1284. province:province,
  1285. })
  1286. });
  1287. this_.cityId(city)
  1288. }
  1289. }
  1290. })
  1291. // this.myAmapFun.reverseGeocoder({
  1292. // location: {
  1293. // latitude: latitude,
  1294. // longitude: longitude,
  1295. // },
  1296. // success: function (res) {
  1297. // console.log("解析地址成功");
  1298. // console.log(res);
  1299. // console.log({
  1300. // province: res.result.address_component.province,
  1301. // city: res.result.address_component.city,
  1302. // district: res.result.address_component.district,
  1303. // });
  1304. // uni.setStorage({
  1305. // key: "address",
  1306. // data: JSON.stringify({
  1307. // district: res.result.address_component.district,
  1308. // city: res.result.address_component.city,
  1309. // province: res.result.address_component.province,
  1310. // }),
  1311. // });
  1312. // // 根据名称筛选id
  1313. // this_.cityId(res.result.address_component.city);
  1314. // // 从本地缓存里面获取数据
  1315. // // let _this = this
  1316. // // uni.getStorage({
  1317. // // //key值为custom
  1318. // // key: `address`,
  1319. // // success: function(res) {
  1320. // // _this.active = [...res.data]; //这里也可以不使用es6的扩展运算符
  1321. // // console.log(_this.active, '_this.active');
  1322. // // },
  1323. // // })
  1324. // },
  1325. // fail: function (res) {
  1326. // uni.showToast({
  1327. // title: "定位失败",
  1328. // duration: 2000,
  1329. // icon: "none",
  1330. // });
  1331. // console.log(res);
  1332. // },
  1333. // complete: function (res) {
  1334. // console.log(res);
  1335. // },
  1336. // });
  1337. },
  1338. // 根据名称筛选id
  1339. cityId(val) {
  1340. let obj = val;
  1341. this.cityList.forEach((val, i) => {
  1342. val.children.forEach((item, l) => {
  1343. if (item.label == obj) {
  1344. console.log(item.label);
  1345. console.log(item.value);
  1346. this.cityShowText = item.label;
  1347. this.listData.city_id = item.value;
  1348. this.phoneList();
  1349. }
  1350. });
  1351. });
  1352. },
  1353. // 号码详情
  1354. ListClick(id) {
  1355. // 是H5 没有足迹接口
  1356. if (this.mixin_type == "H5") {
  1357. uni.navigateTo({
  1358. url:
  1359. "/pageA/order/order?id=" +
  1360. id +
  1361. "&chanId=" +
  1362. uni.getStorageSync("chanId"),
  1363. });
  1364. return;
  1365. }
  1366. this.$http.add({ id: id }).then((res) => {
  1367. if (res.data.code == 1) {
  1368. // #ifdef MP-KUAISHOU
  1369. uni.showToast({
  1370. title: "号码已添加到足迹",
  1371. duration: 500,
  1372. icon: "none",
  1373. });
  1374. // #endif
  1375. // #ifndef MP-KUAISHOU
  1376. uni.showToast({
  1377. title: "该号码已添加到我的足迹",
  1378. duration: 500,
  1379. icon: "none",
  1380. });
  1381. // #endif
  1382. setTimeout(function () {
  1383. uni.navigateTo({
  1384. url:
  1385. "/pageA/order/order?id=" +
  1386. id +
  1387. "&chanId=" +
  1388. uni.getStorageSync("chanId"),
  1389. });
  1390. }, 500);
  1391. } else {
  1392. uni.navigateTo({
  1393. url:
  1394. "/pageA/order/order?id=" +
  1395. id +
  1396. "&chanId=" +
  1397. uni.getStorageSync("chanId"),
  1398. });
  1399. }
  1400. });
  1401. },
  1402. // 排除 复选
  1403. checkboxGroupChange(e) {
  1404. console.log("e", e);
  1405. if (e.indexOf("all") == 0) {
  1406. this.listData.exclude_num = [];
  1407. } else {
  1408. this.listData.exclude_num = e;
  1409. }
  1410. },
  1411. // 价格选中值
  1412. numbersChange(e) {
  1413. console.log(e);
  1414. if (this.numbers == 0) {
  1415. this.listData.num_max = "";
  1416. } else {
  1417. this.listData.num_max = this.numbersList[this.numbers].num;
  1418. }
  1419. },
  1420. // 价格选中值
  1421. priceChange(e) {
  1422. console.log(e);
  1423. if (this.priceList[e].name == "全部") {
  1424. this.listData.price_max = "";
  1425. this.listData.price_min = "";
  1426. } else {
  1427. this.listData.price_max = this.priceList[this.price].max;
  1428. this.listData.price_min = this.priceList[this.price].min;
  1429. }
  1430. this.input_price_max = this.priceList[this.price].max;
  1431. this.input_price_min = this.priceList[this.price].min;
  1432. console.log(this.listData.price_max);
  1433. console.log(this.listData.price_min);
  1434. },
  1435. // 网络选中值
  1436. radioGroupChange(e) {
  1437. console.log(this.networkValue);
  1438. if (this.networkValue == "全部") {
  1439. this.listData.network = "";
  1440. } else {
  1441. this.listData.network = this.networkValue;
  1442. }
  1443. },
  1444. // 城市一级列表点击
  1445. scrollOneMeh(val) {
  1446. console.log(val);
  1447. if (val == "all") {
  1448. this.listData.city_id = "city_id";
  1449. this.cityListOneType = "all";
  1450. this.cityListTwoType = "all";
  1451. this.cityShowText = "归属地";
  1452. } else {
  1453. this.cityListTwo = this.cityList[val].children;
  1454. this.cityListOneType = val;
  1455. this.listData.city_id = this.cityList[val].value + "-all";
  1456. this.cityListTwoType = "all";
  1457. this.cityShowText = "归属地";
  1458. }
  1459. },
  1460. // 市区筛选搜索
  1461. scrollTwoMeh(index) {
  1462. if (index != "all") {
  1463. // 搜索框初始化
  1464. // this.searchVal=''
  1465. // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
  1466. // this.mesValueIndex=1
  1467. // this.keyword = true;
  1468. // this.listData.keyword=''
  1469. this.listData.city_id = this.cityListTwo[index].value;
  1470. this.cityShowText = this.cityListTwo[index].label;
  1471. this.cityListTwoType = index;
  1472. } else {
  1473. if (this.cityListOneType != "all") {
  1474. this.listData.city_id =
  1475. this.cityList[this.cityListOneType].value + "-all";
  1476. this.cityShowText = "归属地";
  1477. this.cityListTwoType = "all";
  1478. }
  1479. }
  1480. this.phoneList();
  1481. this.cityShow = false;
  1482. },
  1483. //归属地筛选 重置
  1484. area_tree_init() {
  1485. this.listData.city_id = "city_id";
  1486. this.cityListOneType = "all";
  1487. this.cityListTwoType = "all";
  1488. this.cityShowText = "归属地";
  1489. },
  1490. //归属地弹框 确认按钮
  1491. phoneConfirm() {
  1492. // 搜索框初始化
  1493. // this.searchVal=''
  1494. // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
  1495. // this.mesValueIndex=1
  1496. // this.keyword = true;
  1497. // this.listData.keyword=''
  1498. this.cityShow = false;
  1499. this.phoneList();
  1500. },
  1501. //号码类型弹框 一阶
  1502. ruleMameMeh(index) {
  1503. if (index == "all") {
  1504. this.ruleListOneType = "all";
  1505. this.listData.rule_position = "";
  1506. } else {
  1507. this.ruleListOneType = index;
  1508. this.listData.rule_position = index;
  1509. }
  1510. },
  1511. // 号码类型弹框 二阶
  1512. ruleMeh(index, val) {
  1513. // 搜索框初始化
  1514. // this.searchVal=''
  1515. // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
  1516. // this.mesValueIndex=1
  1517. // this.keyword = true;
  1518. // this.listData.keyword=''
  1519. if (index == "all") {
  1520. this.ruleListTwoType = "all";
  1521. this.listData.rule_name = "";
  1522. } else {
  1523. this.ruleListTwoType = index;
  1524. this.listData.rule_name = val;
  1525. }
  1526. this.phoneList();
  1527. this.rule = false;
  1528. },
  1529. //号码类型 弹框 重置
  1530. rule_tree_init() {
  1531. this.ruleListOneType = "tail";
  1532. this.ruleListTwoType = "all";
  1533. this.listData.rule_name = "";
  1534. this.listData.rule_position = "tail";
  1535. },
  1536. // 确定
  1537. ruleConfirm() {
  1538. // 搜索框初始化
  1539. // this.searchVal=''
  1540. // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
  1541. // this.mesValueIndex=1
  1542. // this.keyword = true;
  1543. // this.listData.keyword=''
  1544. this.rule = false;
  1545. this.phoneList();
  1546. },
  1547. // 号码筛选 重置
  1548. codeHide() {
  1549. this.networkValue = "全部";
  1550. this.listData.network = "";
  1551. this.price = 0;
  1552. this.input_price_min = 0;
  1553. this.input_price_max = 0;
  1554. this.listData.price_max = "";
  1555. this.listData.price_min = "";
  1556. this.excludeList = [
  1557. { name: "全部", val: "all", checked: true },
  1558. { name: "不带0", val: 0, checked: false },
  1559. { name: "不带1", val: 1, checked: false },
  1560. { name: "不带2", val: 2, checked: false },
  1561. { name: "不带3", val: 3, checked: false },
  1562. { name: "不带4", val: 4, checked: false },
  1563. { name: "不带5", val: 5, checked: false },
  1564. { name: "不带6", val: 6, checked: false },
  1565. { name: "不带7", val: 7, checked: false },
  1566. { name: "不带8", val: 8, checked: false },
  1567. { name: "不带9", val: 9, checked: false },
  1568. ];
  1569. this.listData.exclude_num = [];
  1570. this.listData.num_max = "";
  1571. this.numbers = 0;
  1572. },
  1573. // 号码筛选确定
  1574. codeConfirm() {
  1575. // 搜索框初始化
  1576. // this.searchVal=''
  1577. // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
  1578. // this.mesValueIndex=1
  1579. // this.keyword = true;
  1580. // this.listData.keyword=''
  1581. this.phoneList();
  1582. this.code = false;
  1583. },
  1584. // 价格重置
  1585. sortHideLoad() {
  1586. this.sortValue = "";
  1587. this.listData.sort = "";
  1588. },
  1589. // 价格筛选
  1590. sortConfirm() {
  1591. // 搜索框初始化
  1592. // this.searchVal=''
  1593. // this.mesValue=["1", "", "", "", "", "", "", "", "", "", ""]
  1594. // this.mesValueIndex=1
  1595. // this.keyword = true;
  1596. // this.listData.keyword=''
  1597. this.phoneList();
  1598. this.sortHide = false;
  1599. },
  1600. all() {
  1601. console.log("全国");
  1602. },
  1603. checkboxChange(e) {
  1604. console.log(e);
  1605. setTimeout(() => {
  1606. console.log(
  1607. "this.excludeList",
  1608. JSON.parse(JSON.stringify(this.excludeList))
  1609. );
  1610. if (e.name == "all") {
  1611. this.excludeList = [
  1612. { name: "全部", val: "all", checked: true },
  1613. { name: "不带0", val: 0, checked: false },
  1614. { name: "不带1", val: 1, checked: false },
  1615. { name: "不带2", val: 2, checked: false },
  1616. { name: "不带3", val: 3, checked: false },
  1617. { name: "不带4", val: 4, checked: false },
  1618. { name: "不带5", val: 5, checked: false },
  1619. { name: "不带6", val: 6, checked: false },
  1620. { name: "不带7", val: 7, checked: false },
  1621. { name: "不带8", val: 8, checked: false },
  1622. { name: "不带9", val: 9, checked: false },
  1623. ];
  1624. this.listData.exclude_num = [];
  1625. } else {
  1626. this.listData.exclude_num = [];
  1627. this.excludeList[0] = { name: "全部", val: "all", checked: false };
  1628. this.excludeList.forEach((item) => {
  1629. if (item.checked) {
  1630. if (item.name != "all") {
  1631. this.listData.exclude_num.push(item.val);
  1632. } else {
  1633. this.listData.exclude_num = [];
  1634. }
  1635. }
  1636. });
  1637. }
  1638. console.log("this.listData.exclude_num", this.listData.exclude_num);
  1639. // this.checked=!this.checked
  1640. }, 200);
  1641. },
  1642. // 价格筛选弹框确认
  1643. sortCon(val) {
  1644. this.sortValue = val;
  1645. this.listData.sort = val;
  1646. this.phoneList();
  1647. this.sortHide = false;
  1648. },
  1649. // 区域内容
  1650. area_tree() {
  1651. this.$http.area_tree().then((res) => {
  1652. if (res.data.code === 1) {
  1653. this.cityList = res.data.data;
  1654. }
  1655. });
  1656. },
  1657. // 系统基本配置
  1658. config() {
  1659. this.$http.config().then((res) => {
  1660. console.log(res);
  1661. if (res.data.code == 1) {
  1662. this.ruleList = res.data.data.rule;
  1663. this.networkList = res.data.data.network;
  1664. }
  1665. });
  1666. },
  1667. // 横幅播报
  1668. ordered_show() {
  1669. this.$http.ordered_show().then((res) => {
  1670. console.log(res);
  1671. if (res.data.code == 1) {
  1672. this.ordered_list = res.data.data.ordered_list;
  1673. }
  1674. });
  1675. },
  1676. // 特价号跳转
  1677. flow() {
  1678. if (this.configAll.system_index_m1 == 1) {
  1679. if (uni.getStorageSync("chanId")) {
  1680. uni.navigateTo({
  1681. url: "/pages/flow/flow?chanId=" + uni.getStorageSync("chanId"),
  1682. });
  1683. } else {
  1684. uni.navigateTo({
  1685. url: "/pages/flow/flow",
  1686. });
  1687. }
  1688. } else if (this.configAll.system_index_m1 == 3) {
  1689. this.listData.is_offer = 1;
  1690. this.phoneList();
  1691. } else {
  1692. uni.navigateTo({
  1693. url: "/pageA/customized/customized",
  1694. });
  1695. }
  1696. },
  1697. // 回到顶部
  1698. scroll() {
  1699. uni.pageScrollTo({
  1700. scrollTop: 0,
  1701. duration: 1,
  1702. });
  1703. },
  1704. // 查询订单数
  1705. orderMetList() {
  1706. console.log("查询订单数");
  1707. if (uni.getStorageSync("token")) {
  1708. let this_ = this;
  1709. this.$http.order_list().then((res) => {
  1710. console.log(res);
  1711. if (res.data.code == 1) {
  1712. this_.orderNum = res.data.data.total;
  1713. res.data.data.data.find((item, index) => {
  1714. if (item.status == 0) {
  1715. this_.orderNumArr = item;
  1716. this_.orderNumArrTpye = true;
  1717. }
  1718. });
  1719. }
  1720. });
  1721. }
  1722. // #ifdef H5
  1723. // H5 查询订单方式
  1724. console.log("H5" + 121111);
  1725. if (uni.getStorageSync("LH_H5_PHONE")) {
  1726. let this_ = this;
  1727. this.$http
  1728. .order_list({ phone: uni.getStorageSync("LH_H5_PHONE") })
  1729. // this.$http.order_list({phone:'18369588944'})
  1730. .then((res) => {
  1731. console.log(res);
  1732. if (res.data.code == 1) {
  1733. this_.orderNum = res.data.data.total;
  1734. res.data.data.data.find((item, index) => {
  1735. if (item.status == 0) {
  1736. this_.orderNumArr = item;
  1737. this_.orderNumArrTpye = true;
  1738. }
  1739. // if (index == 0) {
  1740. // this_.orderNumArr=item
  1741. // this_.orderNumArrTpye=true
  1742. // }
  1743. });
  1744. }
  1745. });
  1746. }
  1747. // #endif
  1748. },
  1749. // 是否有订单
  1750. order_List() {
  1751. let this_ = this;
  1752. this.orderMetList();
  1753. },
  1754. // 跳转订单查询
  1755. orderQuery() {
  1756. if (uni.getStorageSync("chanId")) {
  1757. uni.navigateTo({
  1758. url:
  1759. "/pageA/orderList/orderList?chanId=" + uni.getStorageSync("chanId"),
  1760. });
  1761. } else {
  1762. uni.navigateTo({
  1763. url: "/pageA/orderList/orderList",
  1764. });
  1765. }
  1766. },
  1767. // 复制
  1768. copyNumHandle() {
  1769. uni.setClipboardData({
  1770. data: "美美号源", // data的值为你要复制的内容
  1771. success: (res) => {},
  1772. });
  1773. },
  1774. funInputPhoneNum(e) {
  1775. console.log(e);
  1776. var index = e.target.id.replace("input-", "");
  1777. var value = e.detail.value;
  1778. if (index != "10" && value != "") {
  1779. this.focus_index = Number(index) + 1;
  1780. }
  1781. },
  1782. funDeletePhoneNum(e) {
  1783. console.log(e);
  1784. var index = e.target.id.replace("input-", "");
  1785. if (this.listData.keyword[index] == "" && index > 1) {
  1786. this.focus_index = Number(index) - 1;
  1787. }
  1788. },
  1789. funFocusInput(e) {
  1790. this.keyShow = true;
  1791. // var interval = setInterval(function(){
  1792. // uni.hideKeyboard();//隐藏软键盘
  1793. // console.log('刷新')
  1794. // },20);
  1795. // setTimeout(() => {
  1796. // clearInterval(interval);
  1797. // console.log('停止刷新')
  1798. // },3000);
  1799. var index = e.target.id.replace("input-", "");
  1800. if (this.listData.keyword[index] != "") {
  1801. this.listData.keyword[index] = "";
  1802. }
  1803. },
  1804. },
  1805. };
  1806. </script>
  1807. <style lang="scss">
  1808. @import "./index.scss";
  1809. </style>