index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927
  1. <template>
  2. <view>
  3. <public-module></public-module>
  4. <service-widget @btnClick="btn_click"></service-widget>
  5. <view class="header dis a-c j-s" :style="transitionStyle">
  6. <view class="city dis a-c " :style="{opacity:featureHideHandling?1:0}">
  7. <image src="../../static/image/index/img/cityicon.png" mode=""></image>
  8. <text>{{city}}</text>
  9. <image src="../../static/image/index/img/jiantou.png" mode="" style="width: 12px;height: 12px;"></image>
  10. </view>
  11. <view class="search" :style="{opacity:featureHideHandling?1:0}">
  12. <u-search :show-action="true" action-text="搜索" bg-color="#fff" maxlength="10" placeholder="请输入关键词"
  13. :clearabled="false" :action-style="{position: 'absolute',right:'10px'}" search-icon="0">
  14. </u-search>
  15. <image class="search-Scan" src="../../static/image/index/img/Scan.png" mode="" @click="scan">
  16. </image>
  17. </view>
  18. </view>
  19. <!-- 占位块 -->
  20. <view class="place"></view>
  21. <view class="swiperelement" :style="transitionStyle">
  22. <view class="swiper">
  23. <u-swiper :list="swiperlist" height="258" duration="400" interval="4000" mode="rect" border-radius="12"
  24. @change="swiperChange" @click="swiperClick"></u-swiper>
  25. </view>
  26. </view>
  27. <view class="pagebody">
  28. <index-nav :resdata="categoryList" :row="featureHideHandling?2:1" @authModal="authModal"></index-nav>
  29. <template v-if="featureHideHandling">
  30. <u-tabs :list="itemCategorylist" :is-scroll="false" :current="current" @change="change"
  31. style="background: transparent;" active-color="#000"></u-tabs>
  32. <view class="mt-1 dis j-s a-c">
  33. <view class="activity dis f-c " @click="activity('/pages/index/checkIn')">
  34. <text>签到有礼</text>
  35. <text>福利多多</text>
  36. <image src="../../static/image/index/pick-img/1.png" mode="" style="width: 32px;height: 32px;">
  37. </image>
  38. </view>
  39. <view class="activity dis f-c " @click="activity('/pages/index/task')">
  40. <text>精彩任务</text>
  41. <text>奖励多多</text>
  42. <image src="../../static/image/index/pick-img/2.png" mode="" style="width: 36px;height: 32px;">
  43. </image>
  44. </view>
  45. <view class="activity dis f-c " @click="activity('/pages/index/flashSale')">
  46. <text>限时秒杀</text>
  47. <text>9.9元起</text>
  48. <image src="../../static/image/index/pick-img/3.png" mode="" style="width: 32px;height: 32px;">
  49. </image>
  50. </view>
  51. </view>
  52. <view class="mt-3 dis j-s ">
  53. <view class="flashSale dis f-c">
  54. <image class="bg1" src="../../static/image/index/pick-img/bg1.png" mode=""></image>
  55. <view class="title dis j-s">
  56. <image src="../../static/image/index/pick-img/4.png" mode="widthFix"
  57. style="width: 73px;height: 25px;"></image>
  58. <view class="dis a-c">
  59. <image src="../../static/image/index/pick-img/loding.png" mode=""
  60. style="width: 12px;height: 12px;"></image>
  61. <text>换一批</text>
  62. </view>
  63. </view>
  64. <view class="dis j-s a-c mt-2">
  65. <image src="../../static/image/index/pick-img/5.png" mode=""
  66. style="width: 56px;height: 56px;">
  67. </image>
  68. <image src="../../static/image/index/pick-img/8.png" mode=""
  69. style="width: 80px;height: 56px;">
  70. </image>
  71. </view>
  72. <view class="dis j-s a-c mt-2">
  73. <image src="../../static/image/index/pick-img/6.png" mode=""
  74. style="width: 56px;height: 56px;">
  75. </image>
  76. <image src="../../static/image/index/pick-img/9.png" mode=""
  77. style="width: 80px;height: 56px;">
  78. </image>
  79. </view>
  80. <view class="dis j-s a-c mt-2">
  81. <image src="../../static/image/index/pick-img/7.png" mode=""
  82. style="width: 56px;height: 56px;">
  83. </image>
  84. <image src="../../static/image/index/pick-img/8.png" mode=""
  85. style="width: 80px;height: 56px;">
  86. </image>
  87. </view>
  88. </view>
  89. <view class="hotSaleList dis f-c">
  90. <image class="bg1" src="../../static/image/index/pick-img/bg2.png" mode=""></image>
  91. <view class="title dis j-s">
  92. <text style="font-size: 17px;color: #333;font-weight: bold;">热销榜</text>
  93. <view class="dis a-c">
  94. <image src="../../static/image/index/pick-img/loding.png" mode=""
  95. style="width: 12px;height: 12px;"></image>
  96. <text>换一批</text>
  97. </view>
  98. </view>
  99. <view class="mt-2 dis a-c j-s content" style="position: relative;">
  100. <image src="../../static/image/index/pick-img/10.png" mode=""
  101. style="width: 53px;height: 53px;margin-right: 8px;">
  102. </image>
  103. <view class="dis f-c " style="width: 55%;">
  104. <text style="font-size: 12px;color: #333;line-height: 1.2;">车仆后视镜弹水剂 新升级...</text>
  105. <text style="color: #FF476C;font-size: 12px;">¥ <text
  106. style="font-size: 15px;font-weight: bold;line-height: 1.2;">79</text> </text>
  107. </view>
  108. </view>
  109. <view class="mt-2 dis a-c j-s " style="position: relative;">
  110. <image src="../../static/image/index/pick-img/11.png" mode=""
  111. style="width: 53px;height: 53px;margin-right: 8px;">
  112. </image>
  113. <view class="dis f-c " style="width: 55%;">
  114. <text style="font-size: 12px;color: #333;line-height: 1.2;">朗龙汽车香水车载香薰摆...</text>
  115. <text style="color: #FF476C;font-size: 12px;">¥ <text
  116. style="font-size: 15px;font-weight: bold; line-height: 1.2;">65.9</text> </text>
  117. </view>
  118. </view>
  119. <view class=" dis a-c j-s mt-2" style="position: relative;">
  120. <image src="../../static/image/index/pick-img/12.png" mode=""
  121. style="width: 53px;height: 53px;margin-right: 8px;">
  122. </image>
  123. <view class="dis f-c a-start " style="width: 55%;">
  124. <text style="font-size: 12px;color: #333;line-height: 1.2;">新车除甲醛除异味车内除...</text>
  125. <text style="color: #FF476C;font-size: 12px;">¥ <text
  126. style="font-size: 15px;font-weight: bold;line-height: 1.2;">29.5</text> </text>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. </template>
  132. </view>
  133. <auth-Modal :authShow="authShow" @btnClick="authShow=false" @maskClick="authShow=false"></auth-Modal>
  134. </view>
  135. </template>
  136. <script>
  137. import authModal from '@/components/modules/user/authModal.vue'; //实名认证弹窗
  138. import swiperImage from "@/components/modules/index/swiper-image.vue"
  139. import indexNav from "@/components/modules/index/index-nav.vue"
  140. import bankBin from "@/common/bankcardinfo.js"
  141. import store from '@/store';
  142. import {
  143. pathToBase64,
  144. base64ToPath
  145. } from '@/common/image-tools-base64.js';
  146. import {
  147. mapState
  148. } from "vuex"
  149. import base from '@/config/baseUrl';
  150. export default {
  151. components: {
  152. swiperImage,
  153. indexNav,
  154. authModal,
  155. },
  156. data() {
  157. return {
  158. itemCategorylist: [{
  159. name: '推荐'
  160. }, {
  161. name: '美食'
  162. }, {
  163. name: '玩乐',
  164. }, {
  165. name: '出游',
  166. }, {
  167. name: '亲子',
  168. },
  169. {
  170. name: '运动',
  171. }
  172. ],
  173. current: 0,
  174. authShow: false,
  175. locationshow: false,
  176. avatar: "",
  177. xuelishow: false,
  178. border: false,
  179. form: {
  180. name: "", //姓名
  181. identity: "", //身份证号
  182. birthday: "", //出生日期
  183. addressnow: "", //居住地址
  184. education: "", //学历
  185. bankname: "", //开户行
  186. accountno: "", //银行卡号
  187. },
  188. labelPosition: 'left',
  189. errorType: ['message'],
  190. rules: {
  191. name: [{
  192. required: true,
  193. message: '请输入姓名',
  194. trigger: 'blur',
  195. }, ]
  196. },
  197. contentSlot: true,
  198. showTitle: false,
  199. asyncClose: false,
  200. isShow: false,
  201. banben: {},
  202. bgColor: "#4B75EB",
  203. //轮播
  204. categoryList: [{
  205. cat_id: 0,
  206. img: '/static/image/index/category-img/1.png',
  207. title: '车险',
  208. src: '/pages/carInsure/entry',
  209. width: '92rpx',
  210. height: '69rpx',
  211. },
  212. {
  213. cat_id: 1,
  214. img: '/static/image/index/category-img/2.png',
  215. title: '车损测算',
  216. width: '92rpx',
  217. height: '69rpx',
  218. // src: '/pages/carInsure2/entry'
  219. },
  220. {
  221. cat_id: 2,
  222. img: '/static/image/index/category-img/3.png',
  223. title: '道路救援',
  224. // src: '/pages/roadRescue/index',
  225. width: '92rpx',
  226. height: '69rpx',
  227. },
  228. {
  229. cat_id: 3,
  230. img: '/static/image/index/category-img/4.png',
  231. title: '司法鉴定',
  232. width: '92rpx',
  233. height: '69rpx',
  234. src: '',
  235. },
  236. {
  237. cat_id: 4,
  238. img: '/static/image/index/category-img/5.png',
  239. title: '掌柜商城',
  240. width: '92rpx',
  241. height: '69rpx',
  242. // src: '/pages/shoppingMall/index'
  243. },
  244. {
  245. cat_id: 5,
  246. img: '/static/image/index/category-img/6.png',
  247. title: '洗车',
  248. width: '68rpx',
  249. height: '68rpx',
  250. // src: '/pages/carWash/carWash'
  251. },
  252. {
  253. cat_id: 6,
  254. img: '/static/image/index/category-img/7.png',
  255. title: '车检代办',
  256. width: '68rpx',
  257. height: '68rpx',
  258. // src: '/pages/caragent/index'
  259. },
  260. {
  261. cat_id: 7,
  262. img: '/static/image/index/category-img/8.png',
  263. title: '审车',
  264. width: '68rpx',
  265. height: '68rpx',
  266. src: ''
  267. },
  268. {
  269. cat_id: 8,
  270. img: '/static/image/index/category-img/9.png',
  271. title: '代驾',
  272. width: '68rpx',
  273. height: '68rpx',
  274. src: ''
  275. },
  276. {
  277. cat_id: 9,
  278. img: '/static/image/index/category-img/10.png',
  279. title: '一键挪车',
  280. width: '68rpx',
  281. height: '68rpx',
  282. // src: '/pages/ticket/ticket'
  283. }
  284. ],
  285. //推荐商品 3个
  286. pickList: [{
  287. goods_id: 0,
  288. img: '../../static/image/index/pick-img/1.png',
  289. price: '25.8元',
  290. slogan: [{
  291. name: "明星产品",
  292. back: "rgba(255,153,0,0.1)",
  293. color: "#FF9900"
  294. },
  295. {
  296. name: "刚需保障",
  297. back: "rgba(255,46,0,0.1)",
  298. color: "#FF2E00"
  299. },
  300. {
  301. name: "专家推荐",
  302. back: "rgba(0,82,255,0.1)",
  303. color: "#0052FF"
  304. }
  305. ],
  306. sum: "1235",
  307. title: "平安个人意外险"
  308. },
  309. {
  310. goods_id: 1,
  311. img: '../../static/image/index/pick-img/2.png',
  312. price: '88元',
  313. sum: "588",
  314. slogan: [{
  315. name: "专家推荐",
  316. back: "rgba(0,82,255,0.1)",
  317. color: "#0052FF"
  318. }],
  319. title: "儿童综合医疗保险"
  320. },
  321. {
  322. goods_id: 0,
  323. img: '../../static/image/index/pick-img/1.png',
  324. price: '25.8元',
  325. slogan: [{
  326. name: "明星产品",
  327. back: "rgba(255,153,0,0.1)",
  328. color: "#FF9900"
  329. },
  330. {
  331. name: "刚需保障",
  332. back: "rgba(255,46,0,0.1)",
  333. color: "#FF2E00"
  334. },
  335. {
  336. name: "专家推荐",
  337. back: "rgba(0,82,255,0.1)",
  338. color: "#0052FF"
  339. }
  340. ],
  341. sum: "1235",
  342. title: "平安行.国内自助游旅行意..."
  343. },
  344. {
  345. goods_id: 1,
  346. img: '../../static/image/index/pick-img/2.png',
  347. price: '88元',
  348. sum: "588",
  349. slogan: [{
  350. name: "专家推荐",
  351. back: "rgba(0,82,255,0.1)",
  352. color: "#0052FF"
  353. }],
  354. title: "平安行.境内节假日出行意..."
  355. },
  356. ],
  357. swiperlist: [{
  358. image: '/static/image/index/ad-img/ad1.png',
  359. backgroundColor: '#3385F5'
  360. },
  361. // {
  362. // image: '/static/image/index/ad-img/ad2.png',
  363. // backgroundColor: '#F5B333'
  364. // },
  365. // {
  366. // image: '/static/image/index/ad-img/ad3.png',
  367. // backgroundColor: '#FF6591'
  368. // }
  369. ],
  370. headerPosition: "fixed",
  371. getApplicationStatus: "",
  372. socketOpen: false,
  373. latitude: "",
  374. longitude: "",
  375. province: "",
  376. city: "",
  377. district: "",
  378. street: "",
  379. streetNum: "",
  380. poiName: "",
  381. cityCode: "",
  382. messageInterval: null,
  383. transitionStyle: {
  384. backgroundColor: '#3385F5',
  385. }
  386. };
  387. },
  388. async onLoad() {},
  389. computed: {
  390. ...mapState(['userInfo', 'featureHideHandling'])
  391. },
  392. onPageScroll(e) {
  393. //兼容iOS端下拉时顶部漂移
  394. if (e.scrollTop >= 0) {
  395. this.headerPosition = "fixed";
  396. } else {
  397. this.headerPosition = "absolute";
  398. }
  399. },
  400. onShow() {
  401. this.loginUser();
  402. if (this.userInfo.sysUser.headSculpture) {
  403. this.avatar = this.$base.baseUrl + this.userInfo.sysUser.headSculpture;
  404. } else {
  405. this.avatar = "/static/image/my/avatar1.png"
  406. }
  407. const arr = uni.getStorageSync('historyInfo');
  408. if (arr) {
  409. uni.removeStorageSync('historyInfo');
  410. }
  411. this.initializeCategoryList();
  412. // #ifdef APP-PLUS
  413. // this.getCurrentLocation();
  414. // this.soketInit();
  415. // #endif
  416. },
  417. async onPullDownRefresh() {
  418. await this.loginUser();
  419. uni.stopPullDownRefresh();
  420. },
  421. methods: {
  422. initializeCategoryList() {
  423. this.categoryList.map(val => {
  424. if (!val.src) {
  425. val["featureHideHandling"] = this.featureHideHandling;
  426. } else {
  427. val["featureHideHandling"] = true;
  428. }
  429. return val;
  430. })
  431. },
  432. activity(url) {
  433. uni.navigateTo({
  434. url: url,
  435. })
  436. },
  437. change(index) {
  438. this.current = index;
  439. },
  440. swiperChange(index) {
  441. let color = this.swiperlist.find((val, ele) => ele == index);
  442. this.transitionStyle.backgroundColor = color.backgroundColor;
  443. },
  444. swiperClick() {
  445. uni.navigateTo({
  446. url: '/pages/carInsure/entry'
  447. })
  448. },
  449. async loginUser() {
  450. let userInfoRes = await this.$http.get('/user/loginUser')
  451. store.commit('setUserModules', {
  452. title: 'userInfo',
  453. data: {
  454. sysUser: {
  455. ...userInfoRes.data
  456. }
  457. }
  458. })
  459. },
  460. authModal(res) {
  461. this.authShow = res;
  462. },
  463. btn_click() {
  464. uni.navigateTo({
  465. url: '/pages/chat/chat'
  466. })
  467. },
  468. //初始化websoket连接
  469. // soketInit() {
  470. // uni.connectSocket({
  471. // url: base.socketUrl + '/' + this.userInfo.sysUser.id,
  472. // method: 'GET',
  473. // });
  474. // uni.onSocketOpen((res) => {
  475. // console.log(res, '已打开');
  476. // this.socketOpen = true;
  477. // this.sendMessage();
  478. // });
  479. // },
  480. //发送信息
  481. // sendMessage() {
  482. // if (this.longitude) {
  483. // const dataToSend = {
  484. // userId: this.userInfo.sysUser.id,
  485. // longitude: this.longitude,
  486. // latitude: this.latitude,
  487. // province: this.province,
  488. // city: this.city,
  489. // district: this.district,
  490. // street: this.street,
  491. // streetNum: this.streetNum,
  492. // poiName: this.poiName,
  493. // cityCode: this.cityCode
  494. // };
  495. // console.log("首次消息", dataToSend);
  496. // if (this.socketOpen) {
  497. // uni.sendSocketMessage({
  498. // data: JSON.stringify(dataToSend)
  499. // })
  500. // if (this.messageInterval) {
  501. // clearInterval(this.messageInterval);
  502. // }
  503. // this.messageInterval = setInterval(async () => {
  504. // await this.getCurrentLocation();
  505. // await this.updatesendMessage();
  506. // }, 120000); // 120000毫秒 = 2分钟
  507. // }
  508. // }
  509. // },
  510. getCurrentLocation() {
  511. //获取当前的地理位置
  512. let vthis = this;
  513. uni.getStorage({
  514. key: 'location',
  515. success: function(res) {
  516. vthis.latitude = res.data.latitude;
  517. vthis.longitude = res.data.longitude;
  518. vthis.province = res.data.province;
  519. vthis.city = res.data.city;
  520. vthis.district = res.data.district;
  521. vthis.street = res.data.street;
  522. vthis.streetNum = res.data.streetNum;
  523. vthis.poiName = res.data.poiName;
  524. vthis.cityCode = res.data.cityCode;
  525. }
  526. });
  527. },
  528. updatesendMessage() {
  529. const dataToSend = {
  530. userId: this.userInfo.sysUser.id,
  531. longitude: this.longitude,
  532. latitude: this.latitude,
  533. province: this.province,
  534. city: this.city,
  535. district: this.district,
  536. street: this.street,
  537. streetNum: this.streetNum,
  538. poiName: this.poiName,
  539. cityCode: this.cityCode
  540. };
  541. console.log("持续消息", dataToSend);
  542. if (this.socketOpen) {
  543. uni.sendSocketMessage({
  544. data: JSON.stringify(dataToSend)
  545. })
  546. }
  547. },
  548. back() {
  549. uni.navigateTo({
  550. url: '/pages/carInsure/entry',
  551. })
  552. },
  553. nameClick() {
  554. this.navigate({
  555. url: "/pages/realname/realname"
  556. }, "navigateTo", true)
  557. },
  558. async chooseImage() {
  559. var _this = this;
  560. uni.chooseImage({
  561. count: 1,
  562. sizeType: "compressed",
  563. success(res) {
  564. pathToBase64(res.tempFilePaths[0])
  565. .then(async base64 => {
  566. var paramImg = {
  567. "image": base64, //图片base64
  568. "imgType": "1" //1身份证 2行驶证
  569. }
  570. let res2 = await _this.$http.post('/api/huanong/imgAI', paramImg);
  571. var data = res2.data.customerInfo;
  572. data.identifyValidDate = data.identifyValidDate.substr(0, 4) + '-' +
  573. data.identifyValidDate.substr(4, 2) + "-" + data.identifyValidDate
  574. .substr(6, 2)
  575. _this.form.name = data.name;
  576. _this.form.identifyNumber = data.identifyNumber;
  577. _this.form.identifyValidDate = data.identifyValidDate;
  578. })
  579. }
  580. });
  581. },
  582. //扫一扫
  583. scan() {
  584. uni.scanCode({
  585. success: async (res) => {
  586. let uuid = this.getParameterByName("uuid", res.result)
  587. let resCode = await this.$http.get('/scanQrCode?uuid=' + uuid);
  588. }
  589. });
  590. },
  591. //搜索跳转
  592. toSearch() {
  593. // uni.showToast({title: "建议跳转到新页面做搜索功能"});
  594. },
  595. //推荐商品跳转
  596. toPick(e) {
  597. // uni.showToast({title: '推荐商品'+e.goods_id});
  598. },
  599. //商品跳转
  600. toGoods(e) {
  601. // uni.showToast({title: '商品'+e.goods_id});
  602. },
  603. getParameterByName(name, url) {
  604. if (!url) url = window.location.href;
  605. name = name.replace(/[\[\]]/g, '\\$&');
  606. var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
  607. results = regex.exec(url);
  608. if (!results) return null;
  609. if (!results[2]) return '';
  610. return decodeURIComponent(results[2].replace(/\+/g, ' '));
  611. }
  612. }
  613. };
  614. </script>
  615. <style lang="scss" scoped>
  616. @import '@/style/mixin.scss';
  617. /deep/ {
  618. .u-tab-bar {
  619. background: linear-gradient(90deg, rgba(245, 128, 71, 0.8) 20%, rgba(242, 49, 78, 1) 100%) !important;
  620. border-radius: 4px 4px 4px 4px;
  621. }
  622. .u-content {
  623. padding-left: 40px;
  624. }
  625. .u-indicator-item-rect-active {
  626. background-color: #fff;
  627. }
  628. .u-indicator-item-rect {
  629. border-radius: 2px;
  630. height: 3px;
  631. }
  632. }
  633. page {
  634. background-color: #EEF1F7;
  635. }
  636. .status {
  637. width: 100%;
  638. height: 0;
  639. /* #ifdef APP-PLUS */
  640. height: var(--status-bar-height);
  641. /* #endif */
  642. position: fixed;
  643. top: 0;
  644. z-index: 999;
  645. }
  646. .header {
  647. width: 100%;
  648. display: flex;
  649. position: fixed;
  650. left: 0;
  651. right: 0;
  652. z-index: 996;
  653. padding: 60px 16px 16px;
  654. transition: background-color 0.5s;
  655. .city {
  656. color: #fff;
  657. font-size: 15px;
  658. image {
  659. width: 22px;
  660. height: 22px;
  661. }
  662. text {
  663. color: #fff;
  664. font-size: 13px;
  665. margin: 0 5px;
  666. }
  667. .icon {
  668. font-size: 10px;
  669. margin-left: 5px;
  670. }
  671. }
  672. .search {
  673. position: relative;
  674. width: 70%;
  675. .search-Scan {
  676. width: 20px;
  677. height: 20px;
  678. position: absolute;
  679. left: 10px;
  680. top: 0;
  681. bottom: 0;
  682. margin: auto;
  683. padding-right: 5px;
  684. ::after {
  685. content: "";
  686. width: 0px;
  687. height: 13px;
  688. border: 1px solid #DDDDDD;
  689. position: absolute;
  690. right: 0;
  691. top: 0;
  692. bottom: 0;
  693. margin: auto;
  694. }
  695. }
  696. }
  697. }
  698. .swiperelement {
  699. height: 70px;
  700. border-radius: 0px 0px 20px 0px;
  701. padding: 10px 12px 0;
  702. position: relative;
  703. transition: background-color 0.5s;
  704. /* 渐变效果 */
  705. ::after {
  706. content: "";
  707. display: table;
  708. clear: both;
  709. }
  710. .swiper {
  711. height: 258rpx;
  712. box-shadow: 0px 2px 5px 0px rgba(95, 107, 132, 0.2);
  713. position: absolute;
  714. left: 12px;
  715. right: 12px;
  716. top: 10px;
  717. border-radius: 6px;
  718. border-bottom: 1px solid #E2E6EC;
  719. }
  720. }
  721. .pagebody {
  722. padding: 83px 12px 12px;
  723. height: calc(100vh - 180px);
  724. background-color: #F8F8FA;
  725. .activity {
  726. width: 31.5%;
  727. background: #FFFFFF;
  728. box-shadow: 0px 1px 3px 0px rgba(95, 107, 132, 0.05);
  729. padding: 8px;
  730. border-radius: 6px;
  731. position: relative;
  732. text:nth-child(1) {
  733. font-size: 14px;
  734. color: #333333;
  735. font-weight: bold;
  736. }
  737. text:nth-child(2) {
  738. font-size: 12px;
  739. color: #999;
  740. }
  741. image {
  742. position: absolute;
  743. right: 0;
  744. bottom: 0;
  745. }
  746. }
  747. .flashSale {
  748. width: 48.5%;
  749. background: #FFFFFF;
  750. box-shadow: 0px 2px 5px 0px rgba(95, 107, 132, 0.05);
  751. border-radius: 6px;
  752. position: relative;
  753. padding: 8px;
  754. .bg1 {
  755. position: absolute;
  756. top: 0;
  757. left: 0;
  758. width: 100%;
  759. height: 67px;
  760. }
  761. .title {
  762. position: relative;
  763. text {
  764. font-size: 22rpx;
  765. color: #999;
  766. margin-left: 3px;
  767. }
  768. }
  769. }
  770. .hotSaleList {
  771. width: 48.5%;
  772. background: #FFFFFF;
  773. box-shadow: 0px 2px 5px 0px rgba(95, 107, 132, 0.05);
  774. border-radius: 6px;
  775. position: relative;
  776. padding: 8px;
  777. .bg1 {
  778. position: absolute;
  779. top: 0;
  780. left: 0;
  781. width: 100%;
  782. height: 67px;
  783. }
  784. .title {
  785. position: relative;
  786. text {
  787. font-size: 22rpx;
  788. color: #999;
  789. margin-left: 3px;
  790. }
  791. }
  792. }
  793. }
  794. /* 占位 */
  795. .place {
  796. height: 108px;
  797. }
  798. .goods-list {
  799. background-color: #f4f4f4;
  800. }
  801. .goods-list .title {
  802. width: 100%;
  803. display: flex;
  804. justify-content: center;
  805. align-items: center;
  806. height: 60upx;
  807. color: #979797;
  808. font-size: 24upx;
  809. }
  810. .goods-list .loading-text {
  811. width: 100%;
  812. display: flex;
  813. justify-content: center;
  814. align-items: center;
  815. height: 60upx;
  816. color: #979797;
  817. font-size: 24upx;
  818. }
  819. .goods-list .product-list {
  820. padding: 0 2.5% 2.5vw 2.5%;
  821. display: flex;
  822. justify-content: space-between;
  823. flex-wrap: wrap;
  824. }
  825. .goods-list .product-list .product {
  826. width: 48.75%;
  827. border-radius: 20upx;
  828. background-color: #fff;
  829. margin: 0 0 15upx 0;
  830. }
  831. .goods-list .product-list .product image {
  832. width: 100%;
  833. border-radius: 20upx 20upx 0 0;
  834. }
  835. .goods-list .product-list .product .name {
  836. width: 92%;
  837. padding: 10upx 4%;
  838. display: -webkit-box;
  839. -webkit-box-orient: vertical;
  840. -webkit-line-clamp: 1;
  841. text-align: justify;
  842. overflow: hidden;
  843. font-size: 30upx;
  844. }
  845. .goods-list .product-list .product .info {
  846. display: flex;
  847. justify-content: space-between;
  848. align-items: flex-end;
  849. width: 92%;
  850. padding: 10upx 4% 10upx 4%;
  851. }
  852. .goods-list .product-list .product .info .price {
  853. color: #e65339;
  854. font-size: 30upx;
  855. font-weight: 600;
  856. }
  857. .goods-list .product-list .product .info .slogan {
  858. color: #807c87;
  859. font-size: 24upx;
  860. }
  861. </style>