index.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283
  1. <template>
  2. <view class="app">
  3. <view class="app-top">
  4. <view class="atop1">
  5. <view class="top2-bg"></view>
  6. </view>
  7. <view class="atop2"></view>
  8. </view>
  9. <view class="top" id="mtop">
  10. <view class="top-body">
  11. <view class="statusBar" :style="'height:' + statusBarHeight + 'px'"></view>
  12. <view class="panel fx-r fx-bc fx-ac">
  13. <image src="/static/img/index-logo.png" mode="aspectFill" class="index-img"></image>
  14. <view class="fx-g1"></view>
  15. <image src="/static/img/ic_information.png" class="information"></image>
  16. </view>
  17. </view>
  18. </view>
  19. <scroll-view scroll-y :style="{height:'calc(100vh - 80rpx - ' + statusBarHeight + 'px - ' + h5Foot + 'px)'}">
  20. <view class="app-body">
  21. <view class="swiper-img">
  22. <u-swiper :list="topData.banner" keyName="img" bgColor="transparent" indicator
  23. indicatorActiveColor="#DB292B" indicatorInactiveColor="#B7B7B7" previousMargin="15"
  24. nextMargin="15" indicatorMode="line"></u-swiper>
  25. </view>
  26. <view class="grid-bg">
  27. <!--九宫格-->
  28. <view class="grid fx-r fx-bc fx-ac" v-if="sysData.is_audit == 0">
  29. <view class="item fx-h fx-bc fx-ac" @tap="tapOpen2" data-url="/pages/user/order/index">
  30. <image class="icon" mode="aspectFill" src="/static/ad/1.png"></image>
  31. <view class="label">提货订单</view>
  32. </view>
  33. <view class="item fx-h fx-bc fx-ac" @tap="$refs.customer.open()">
  34. <image class="icon" mode="aspectFill" src="/static/ad/2.png"></image>
  35. <view class="label">联系客服</view>
  36. </view>
  37. <view class="item fx-h fx-bc fx-ac" @tap="tapOpen" data-url="/pages/merchant/list">
  38. <image class="icon" mode="aspectFill" src="/static/ad/3.png"></image>
  39. <view class="label">附近门店</view>
  40. </view>
  41. <view class="item fx-h fx-bc fx-ac" @tap="tapOpen2" data-url="/pages/guild/order/order">
  42. <image class="icon" mode="aspectFill" src="/static/ad/4.png"></image>
  43. <view class="label">抢购订单</view>
  44. </view>
  45. <view class="item fx-h fx-bc fx-ac" @tap="tapOpen" data-url="/pages/news/about">
  46. <image class="icon" mode="aspectFill" src="/static/ad/5.png"></image>
  47. <view class="label">关于我们</view>
  48. </view>
  49. </view>
  50. <!--消息通知-->
  51. <view class="news-panel fx-r fx-bc">
  52. <image src="/static/img/news-icon.png" class="icon"></image>
  53. <view class="label">消息通知</view>
  54. <view class="fx-g1" style="height: 30px;">
  55. <maoScroll :data="topData.notice" :showNum="1" :lineHeight="60" :animationScroll="800"
  56. :animation="4000">
  57. <template v-slot="{line}">
  58. <view @tap="tapOpen" :data-url="'../news/index?id=' + line.id" class="line">
  59. {{ line.title }}</view>
  60. </template>
  61. </maoScroll>
  62. </view>
  63. <image @tap="tapNews" src="/static/img/news-right.png" class="icon-right"></image>
  64. </view>
  65. </view>
  66. <view v-if="sysData.is_audit == 0">
  67. <!--CBB潮贝抢货通道-->
  68. <view class="team-buy" @tap="tapOpen" data-url="/pages/guild/itemIndex" v-if="guData!= null">
  69. <view class="top fx-r fx-bc">
  70. <view class="label">CBB潮贝抢货通道</view>
  71. <view class="fx-g1"></view>
  72. <!-- <view class="sbtn">更多CBB代理团队 ></view> -->
  73. </view>
  74. <view class="team-show">
  75. <view class="bg">
  76. <image src="../../static/ad/team-bg.png" mode="aspectFill"></image>
  77. <view class="h"></view>
  78. </view>
  79. <view class="body fx-h fx-bc fx-ac">
  80. <view class="top-input">
  81. <image src="/static/img/team-top-title.png" class="tbg"></image>
  82. <view class="inner fx-r fx-bc fx-ac">
  83. <image src="/static/img/team-top-location.png"></image>
  84. <view class="label">{{ guData.name }}</view>
  85. </view>
  86. </view>
  87. <view class="info fx-r fx-g1 fx-bc fx-ac">
  88. <view class="item fx-h fx-bc fx-ac">
  89. <view class="label" v-if="guData.status == 1">开放中</view>
  90. <view class="label" style="color: red;" v-else>闭馆中</view>
  91. <view class="name">状态</view>
  92. </view>
  93. <view class="halving"></view>
  94. <view class="item fx-h fx-bc fx-ac">
  95. <view class="label">{{ guData.nickname }}</view>
  96. <view class="name">部门总监</view>
  97. </view>
  98. <view class="halving"></view>
  99. <view class="item fx-h fx-bc fx-ac">
  100. <view class="people fx-r">
  101. <image
  102. :src="index == 0 ? '/static/img/hong_people.png' : '/static/img/while_people.png'"
  103. v-for="(item,index) in 5"></image>
  104. </view>
  105. <view class="name">流畅</view>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. <!--文票系统-->
  112. <!-- <view class="tradeweb">
  113. <view class="bg">
  114. <image src="/static/img/wen_bg.png"></image>
  115. </view>
  116. <view class="ibody fx-h fx-bc">
  117. <view class="t1">{{ wenAr.fullname || "" }}</view>
  118. <view class="name">CBB文票系统</view>
  119. <view class="wname">价格(CNY):{{ wenAr.openPrice || "0.00" }}</view>
  120. </view>
  121. <view class="ivpop fx-h fx-bc fx-ac">
  122. <view class="lv">
  123. {{ wenAr.lv || '0' }}%
  124. </view>
  125. <view class="v">近24小时涨跌幅</view>
  126. </view>
  127. </view> -->
  128. </view>
  129. <!--提货好物-->
  130. <view class="goods">
  131. <view class="top fx-r fx-bc fx-ac">
  132. <image class="icon" src="/static/img/goods-icon.png"></image>
  133. <view class="label">货款提货</view>
  134. <view class="fx-g1"></view>
  135. <view class="more fx-r fx-bc fx-ac" @tap="tapOpen" data-url="../goods/list">
  136. <view class="text">更多</view>
  137. <image class="prv" src="/static/img/ic-pev.png"></image>
  138. </view>
  139. </view>
  140. <view class="goods-items fx-r">
  141. <view @tap="tapOpen" :data-url="'../goods/index?id=' + item.id" class="item"
  142. v-for="(item,index) in topData.product">
  143. <image :src="item.img" mode="aspectFill" class="nimg"></image>
  144. <view class="title">
  145. {{ item.title }}
  146. </view>
  147. <view class="iview fx-r">
  148. <view class="score fx-r fx-be">
  149. {{ item.commission }}
  150. <view class="tag" v-if="sysData.is_audit == 0">积分</view>
  151. <view class="tag" v-else>参考价</view>
  152. </view>
  153. <view class="fx-g1"></view>
  154. <view class="btn" v-if="sysData.is_audit == 0">提货</view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. <!--最新门店-->
  160. <view class="shop" v-if="sysData.is_audit == 0">
  161. <view class="top fx-r fx-bc fx-ac">
  162. <image class="icon" src="/static/img/shop-icon.png"></image>
  163. <view class="label">易趣C果园({{merchantCount}}家)</view>
  164. <view class="fx-g1"></view>
  165. <view class="more fx-r fx-bc fx-ac" @tap="tapOpen" data-url="../merchant/list">
  166. <view class="text">更多</view>
  167. <image class="prv" src="/static/img/ic-pev.png"></image>
  168. </view>
  169. </view>
  170. <view class="shop-items">
  171. <view class="item fx-r" @tap="tapOpen" :data-url="'../merchant/index?id=' + item.id"
  172. v-for="item in merchantData">
  173. <image :src="item.logo" class="img" mode="aspectFill"></image>
  174. <view class="info">
  175. <view class="iview-top fx-r">
  176. <view class="title">{{ item.name }}</view>
  177. <view class="fx-g1"></view>
  178. <view class="ii fx-r fx-bc">
  179. <image src="/static/img/shop-small-location.png"></image>
  180. 距离{{ item.dis_km }}
  181. </view>
  182. </view>
  183. <view class="address fx-r fx-bc">
  184. <image src="/static/img/address-shop.png" class="icon"></image>
  185. <view class="value">{{ item.address }}</view>
  186. </view>
  187. <view class="tel fx-r fx-bc">
  188. <image src="/static/img/tel-shop.png" class="icon"></image>
  189. <view class="value">{{ item.tel }}</view>
  190. </view>
  191. <view class="business">
  192. 营业时间: {{ item.business }}
  193. </view>
  194. <view class="wiget fx-r">
  195. <view class="witem fx-h fx-bc fx-ac" @tap.stop="tapTel(item)">
  196. <image src="/static/img/shop-tel.png"></image>
  197. <view class="text">电话</view>
  198. </view>
  199. <view class="wline"></view>
  200. <view class="witem fx-h fx-bc fx-ac" @tap.stop="tapLbs(item)">
  201. <image src="/static/img/shop-location.png"></image>
  202. <view class="text">导航</view>
  203. </view>
  204. </view>
  205. </view>
  206. </view>
  207. </view>
  208. </view>
  209. </view>
  210. </scroll-view>
  211. <customer-wiget ref="customer"></customer-wiget>
  212. <view class="popwin fx-h fx-bc fx-ac" v-if="isGg">
  213. <view class="bg"></view>
  214. <view class="body fx-h fx-bc fx-ac">
  215. <image src="/static/img/index_bg.png" class="bgimg"></image>
  216. <view class="inner-top"></view>
  217. <view class="inner">
  218. <view style="text-align: center;color: #FC2D47;padding: 25rpx 0rpx;font-size: 36rpx;font-weight: bold;">{{title}}</view>
  219. <scroll-view scroll-y class="max-he">
  220. <u-parse :content="content" :noData="content" />
  221. </scroll-view>
  222. <view class="fx-r fx-bc fx-ac foot" style="margin-top: 60rpx;">
  223. <view class="btn" @tap="tapYGdBtn">未阅读,去查看></view>
  224. </view>
  225. </view>
  226. <view class="m-close">
  227. <image src="/static/img/btn-close.png" @tap="isGg = false" class="icon"></image>
  228. </view>
  229. </view>
  230. </view>
  231. </view>
  232. </template>
  233. <script>
  234. import uParse from '@/components/gaoyia-parse/parse.vue';
  235. import maoScroll from '@/components/mao-scroll/mao-scroll.vue';
  236. import customerWiget from '@/components/ui-public/customer-wiget.vue';
  237. import {
  238. mapState,
  239. mapMutations
  240. } from 'vuex';
  241. export default {
  242. computed: mapState(['user', 'lbs', 'sysData']),
  243. components: {
  244. uParse,
  245. maoScroll,
  246. customerWiget
  247. },
  248. data() {
  249. return {
  250. statusBarHeight: 20,
  251. h5Foot: 0, //h5端
  252. topData: {
  253. banner: [],
  254. notice: [],
  255. product: []
  256. },
  257. content: "",
  258. title:'',
  259. isGg: false,
  260. gGid: 0,
  261. merchantData: [],
  262. guData: null,
  263. merchantCount:0,
  264. page: {
  265. page: 1,
  266. isLoad: false,
  267. isFoot: false
  268. },
  269. wenAr: {},
  270. isLoad: false
  271. }
  272. },
  273. onLoad() {
  274. this.initView();
  275. },
  276. onReachBottom() {
  277. if (this.page.isFoot || this.page.isLoad) {
  278. return;
  279. }
  280. this.page.page++;
  281. this.getData();
  282. },
  283. methods: {
  284. ...mapMutations(['setSys', 'getGps']),
  285. initView: function() {
  286. // #ifdef H5
  287. this.h5Foot = 50;
  288. // #endif
  289. uni.getSystemInfo({
  290. success: (res) => {
  291. this.statusBarHeight = res.statusBarHeight;
  292. }
  293. });
  294. this
  295. .request
  296. .post("indexInit")
  297. .then(res => {
  298. uni.hideLoading();
  299. if (res.code == 200) {
  300. this.isLoad = true;
  301. this.topData = res.data;
  302. this.getData(true);
  303. //获取文票系统
  304. this.wenpiao();
  305. if (this.user != null) {
  306. //获取自己场馆
  307. this.getGu();
  308. }
  309. let gongId = uni.getStorageSync('gonggao') || '';
  310. if (this.topData.notice.length > 0 && gongId != this.topData.notice[0].id) {
  311. this.gGid = this.topData.notice[0].id;
  312. this.getNoticPop(this.topData.notice[0].id);
  313. }
  314. }
  315. })
  316. .catch(err => {
  317. this.utils.Tip("加载失败,重新点击尝试!" + JSON.stringify(error));
  318. uni.hideLoading();
  319. });
  320. // #ifdef APP
  321. this.initSys();
  322. // #endif
  323. // #ifndef APP
  324. this.setSys({
  325. is_audit: 0
  326. });
  327. this.getGps({
  328. page: this,
  329. fn: (res) => {
  330. console.log(res);
  331. this.getData(true);
  332. },
  333. err: (err) => {
  334. this.getData(true);
  335. }
  336. });
  337. // #endif
  338. },
  339. /**
  340. * 基本逻辑
  341. */
  342. initSys: function() {
  343. const appType = uni.getSystemInfoSync().platform;
  344. if (plus != null) {
  345. plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
  346. let versionCode = wgtinfo.versionCode;
  347. if (appType == "ios") {
  348. const getIosUpAppUrl = 'https://itunes.apple.com/cn/lookup?id=6474850968'
  349. const iosAppStroeUrl ='https://apps.apple.com/cn/app/%E6%98%93%E8%B6%A3cbb/id6474850968';
  350. uni.setStorageSync("showData", true)
  351. uni.request({
  352. url: getIosUpAppUrl,
  353. method: 'POST',
  354. data: {},
  355. success: res => {
  356. let version = res.data.results[0].version;
  357. if (wgtinfo.versionCode < version) {
  358. uni.showModal({
  359. title: '提示',
  360. content: '请更新应用',
  361. showCancel: false,
  362. success(e) {
  363. plus.runtime.openURL(
  364. iosAppStroeUrl
  365. );
  366. }
  367. });
  368. } else if (wgtinfo.versionCode > version) {
  369. uni.setStorageSync("showData", false)
  370. } else {
  371. uni.setStorageSync("showData", true)
  372. }
  373. },
  374. fail: res => {
  375. // store.commit('changeState', true);
  376. console.log(res, 'shib');
  377. }
  378. });
  379. } else {
  380. uni.setStorageSync("showData", false)
  381. this.request.post("sysInit", {
  382. code: versionCode
  383. })
  384. .then(res => {
  385. console.log(res, 'res')
  386. if (res.code == 200) {
  387. this.setSys(res.data);
  388. if (wgtinfo.versionCode < res.data.app_code) {
  389. uni.setStorageSync("showData", true)
  390. const upDater = uni.requireNativePlugin("CL-UpDater");
  391. let options = {
  392. title: "升级",
  393. con: res.data.app_update,
  394. downUrl: this.$device.platform == 'ios' ? encodeURI(res
  395. .data.ios_url) : encodeURI(res.data.android_url), //必填
  396. hidCancelbtn: true, //是否隐藏取消按钮;
  397. btnBgColor: "#ff3300", //设置按钮背景色颜色
  398. updateBtnText: "升级", //升级按钮文字,默认为立即升级
  399. topImgBg: "", //非必填,用于自定义;自定义方法请参考demo,
  400. hidBackBtn: true, //可选 默认为false(即会显示后台更新按钮), 设置android 整包更新弹框是否显示后台更新按钮,这个只有android整包更新才有这个参数,热更新是是无法设置的。
  401. verCode: res.data
  402. .app_version, //最新apk版本号 可选 用于Android整包升级,避免用户取消安装apk时,重复下载问题,如果不传的话,apk将会重新下载,
  403. downMsgTip: "资源下载中,请稍后...", //可选(android)
  404. goBackBtnText: "进入后台", //可选(android)
  405. };
  406. //必需提供下载地址;
  407. upDater.startUpdate(options, () => {});
  408. } else if (wgtinfo.versionCode > res.data.app_code) {
  409. uni.setStorageSync("showData", false)
  410. } else {
  411. uni.setStorageSync("showData", true)
  412. }
  413. if (res.data.is_audit == 0) {
  414. this.getGps({
  415. page: this,
  416. fn: (res) => {
  417. console.log(res);
  418. this.getData(true);
  419. },
  420. err: (err) => {
  421. this.getData(true);
  422. }
  423. });
  424. }
  425. }
  426. });
  427. }
  428. });
  429. }
  430. },
  431. /**
  432. * 重要提示
  433. * @param {Object} id
  434. */
  435. getNoticPop: function(id) {
  436. this
  437. .request
  438. .post("getContent", {
  439. id: id
  440. })
  441. .then(res => {
  442. console.log(res);
  443. if (res.code == 200) {
  444. this.title = res.data.title;
  445. this.content = res.data.content;
  446. this.isGg = true;
  447. }
  448. })
  449. .catch(err => {
  450. this.utils.Tip("网络错误,请稍后尝试");
  451. });
  452. },
  453. /**
  454. * 确认阅读公告
  455. */
  456. tapYGdBtn: function() {
  457. this.isGg = false;
  458. uni.setStorageSync('gonggao', this.gGid);
  459. uni.navigateTo({
  460. url: '../news/index?id=' + this.gGid
  461. });
  462. },
  463. wenpiao: function() {
  464. this
  465. .request
  466. .get("tradeweb")
  467. .then(res => {
  468. uni.hideLoading();
  469. if (res.code == 200) {
  470. this.wenAr = res.data;
  471. }
  472. });
  473. },
  474. /**
  475. * 最新门店
  476. */
  477. getData: function(isPull = false) {
  478. if (this.page.isLoad) return;
  479. this.page.isLoad = true;
  480. var post = {};
  481. post.page = this.page.page;
  482. //gps位置
  483. console.log(this.lbs);
  484. if (this.lbs != null) {
  485. post.lat = this.utils.isDefine(this.lbs.latitude) ? this.lbs.latitude : 0;
  486. post.lng = this.utils.isDefine(this.lbs.longitude) ? this.lbs.longitude : 0;
  487. }
  488. this
  489. .request
  490. .post("merchants", post)
  491. .then(res => {
  492. uni.hideLoading();
  493. if (res.code == 200) {
  494. this.merchantData = res.data.result;
  495. this.merchantCount = res.data.count;
  496. this.page.isFoot = true;
  497. this.isLoad = true;
  498. }
  499. })
  500. .catch(error => {
  501. console.log(error);
  502. uni.hideLoading();
  503. this.utils.Tip("加载失败,重新点击尝试!");
  504. });
  505. },
  506. getGu: function() {
  507. this
  508. .request
  509. .get("indexGu")
  510. .then(res => {
  511. uni.hideLoading();
  512. if (res.code == 200) {
  513. this.guData = res.data.guData;
  514. }
  515. });
  516. },
  517. /**
  518. * 更多
  519. */
  520. tapNews: function() {
  521. uni.navigateTo({
  522. url: "../news/list"
  523. });
  524. },
  525. /**
  526. * 打开
  527. * @param {Object} ev
  528. */
  529. tapOpen: function(ev) {
  530. let url = ev.currentTarget.dataset.url;
  531. this.utils.navigateTo(url);
  532. },
  533. /**
  534. * 打开
  535. * @param {Object} ev
  536. */
  537. tapOpen2: function(ev) {
  538. let url = ev.currentTarget.dataset.url;
  539. if (!this.utils.isDefine(this.user)) {
  540. uni.navigateTo({
  541. url: "/pages/login/index"
  542. });
  543. return;
  544. }
  545. this.utils.navigateTo(url);
  546. },
  547. /**
  548. * 拨打电话
  549. */
  550. tapTel: function(item) {
  551. if (item.tel == null) {
  552. this.utils.showAlert({
  553. title: "系统提示",
  554. content: "暂无联系方式"
  555. });
  556. return;
  557. }
  558. const info = uni.getSystemInfoSync();
  559. if (info.platform == 'android') {
  560. uni.showModal({
  561. content: "确认拨打" + item.tel,
  562. confirmText: "确定",
  563. cancelText: "取消",
  564. success: (res) => {
  565. if (res.confirm) {
  566. this.$store.dispatch('permission/requestPermissions', 'CALL_PHONE').then(
  567. res => {
  568. if (res !== 1) return;
  569. uni.makePhoneCall({
  570. phoneNumber: item.tel,
  571. fail: (res) => {
  572. console.log("aaaaa");
  573. uni.showModal({
  574. content: JSON.stringify(res)
  575. });
  576. },
  577. complete: (xx) => {
  578. console.log(xx);
  579. console.log("ad");
  580. }
  581. });
  582. });
  583. }
  584. }
  585. });
  586. } else {
  587. uni.makePhoneCall({
  588. phoneNumber: item.tel,
  589. });
  590. }
  591. },
  592. tapLbs: function(item) {
  593. uni.openLocation({
  594. latitude: Number(item.lat),
  595. longitude: Number(item.lng),
  596. name: item.name,
  597. address: item.address,
  598. scale: 12,
  599. success: function() {
  600. console.log('success');
  601. },
  602. fail: function(res) {
  603. },
  604. })
  605. },
  606. }
  607. }
  608. </script>
  609. <style lang="scss">
  610. .app-top {
  611. position: fixed;
  612. height: 500rpx;
  613. width: 100%;
  614. background: #fff;
  615. .atop1 {
  616. height: 300rpx;
  617. overflow: hidden;
  618. position: relative;
  619. .top2-bg {
  620. width: 400vw;
  621. height: 400vw;
  622. background: #DB292B;
  623. border-radius: 50%;
  624. position: absolute;
  625. left: -150vw;
  626. bottom: 0;
  627. }
  628. }
  629. .atop2 {
  630. background: #fff;
  631. }
  632. }
  633. .top {
  634. .top-body {
  635. .panel {
  636. height: 80rpx;
  637. padding: 0 35rpx;
  638. .index-img {
  639. width: 80rpx;
  640. height: 48rpx;
  641. }
  642. .information {
  643. width: 38rpx;
  644. height: 38rpx;
  645. }
  646. }
  647. }
  648. }
  649. //消息信息
  650. .grid-bg {
  651. padding: 32rpx;
  652. margin-top: 20rpx;
  653. background: #fff;
  654. //9宫格
  655. .grid {
  656. .item {
  657. width: 20%;
  658. .icon {
  659. width: 90rpx;
  660. height: 90rpx;
  661. }
  662. .label {
  663. font-size: 12px;
  664. color: #0C1732;
  665. margin-top: 16rpx;
  666. }
  667. }
  668. }
  669. //消息通知
  670. .news-panel {
  671. margin-top: 40rpx;
  672. background: #F8F8FA;
  673. border-radius: 8rpx;
  674. padding: 15rpx 20rpx;
  675. .icon {
  676. width: 28rpx;
  677. height: 28rpx;
  678. }
  679. .label {
  680. margin: 0px 10rpx;
  681. font-weight: bold;
  682. font-size: 26rpx;
  683. color: #FF4C4C;
  684. }
  685. .icon-right {
  686. width: 30rpx;
  687. height: 6rpx;
  688. }
  689. .line {
  690. height: 60rpx;
  691. line-height: 32px;
  692. color: #575656;
  693. font-size: 26rpx;
  694. width: calc(100vw - 184rpx - 68rpx - 40rpx);
  695. overflow: hidden;
  696. text-overflow: ellipsis;
  697. white-space: nowrap;
  698. }
  699. }
  700. }
  701. //抢货通道
  702. .team-buy {
  703. background: #F8F8FA;
  704. padding: 20rpx 50rpx;
  705. .top {
  706. .label {
  707. color: #DB292B;
  708. font-size: 30rpx;
  709. font-weight: bold;
  710. }
  711. .sbtn {
  712. border: 2rpx solid #DB292B;
  713. border-radius: 10rpx;
  714. color: #DB292B;
  715. font-size: 24rpx;
  716. padding: 14rpx 16rpx;
  717. }
  718. }
  719. .team-show {
  720. width: 100%;
  721. height: 260rpx;
  722. border-radius: 20rpx;
  723. margin-top: 20rpx;
  724. position: relative;
  725. .bg {
  726. width: 100%;
  727. height: 260rpx;
  728. position: absolute;
  729. image {
  730. width: 100%;
  731. height: 100%;
  732. border-radius: 20rpx;
  733. }
  734. .h {
  735. background-color: rgba(0, 0, 0, 0.2);
  736. position: absolute;
  737. z-index: 9;
  738. width: 100%;
  739. height: 100%;
  740. border-radius: 20rpx;
  741. top: 0;
  742. }
  743. }
  744. .body {
  745. position: relative;
  746. z-index: 10;
  747. height: 100%;
  748. .top-input {
  749. position: relative;
  750. .tbg {
  751. width: 250rpx;
  752. height: 70rpx;
  753. }
  754. .inner {
  755. width: 100%;
  756. height: 100%;
  757. position: absolute;
  758. top: 0;
  759. left: 0;
  760. image {
  761. width: 28rpx;
  762. height: 28rpx;
  763. }
  764. .label {
  765. color: #fff;
  766. font-weight: bold;
  767. font-size: 36rpx;
  768. margin-left: 6rpx;
  769. }
  770. }
  771. }
  772. .info {
  773. width: 100%;
  774. .item {
  775. width: calc(33% - 1px);
  776. .name {
  777. color: #fff;
  778. font-size: 30rpx;
  779. margin-top: 24rpx;
  780. }
  781. .label {
  782. color: #fff;
  783. width: 80%;
  784. font-size: 30rpx;
  785. font-weight: bold;
  786. overflow: hidden;
  787. text-overflow: ellipsis;
  788. white-space: nowrap;
  789. text-align: center;
  790. }
  791. .people {
  792. image {
  793. width: 26rpx;
  794. height: 34rpx;
  795. }
  796. }
  797. }
  798. .halving {
  799. width: 2rpx;
  800. height: 80rpx;
  801. background: #fff;
  802. }
  803. }
  804. }
  805. }
  806. }
  807. //文票系统
  808. .tradeweb {
  809. padding: 20rpx 50rpx;
  810. background: #fff;
  811. position: relative;
  812. .bg {
  813. image {
  814. width: calc(100vw - 100rpx);
  815. height: calc(27vw - 27rpx);
  816. }
  817. }
  818. .ivpop {
  819. position: absolute;
  820. right: 60rpx;
  821. top: 6vw;
  822. .lv {
  823. width: 100rpx;
  824. height: 100rpx;
  825. border-radius: 50%;
  826. border: 1px solid #FFFFFF;
  827. text-align: center;
  828. line-height: 100rpx;
  829. color: #fff;
  830. font-size: 14px;
  831. }
  832. .v {
  833. font-size: 20rpx;
  834. color: #FFFFFF;
  835. }
  836. }
  837. .ibody {
  838. position: absolute;
  839. top: 20rpx;
  840. left: 50rpx;
  841. width: calc(100% - 100rpx);
  842. height: calc(100% - 27rpx);
  843. z-index: 1;
  844. .t1 {
  845. border-radius: 16rpx;
  846. font-size: 10px;
  847. color: #fff;
  848. padding: 0px 20rpx;
  849. border: 1px solid #FFFFFF;
  850. margin-top: 20rpx;
  851. }
  852. .name {
  853. font-weight: 800;
  854. font-size: 52rpx;
  855. color: #FFFFFF;
  856. }
  857. .wname {
  858. color: #CA3236;
  859. font-size: 12px;
  860. position: absolute;
  861. bottom: 5vw;
  862. left: 21vw;
  863. }
  864. }
  865. }
  866. //产品中心
  867. .goods {
  868. background: #fff;
  869. padding: 20rpx;
  870. .top {
  871. .icon {
  872. width: 36rpx;
  873. height: 36rpx;
  874. }
  875. .label {
  876. color: #000000;
  877. font-weight: bold;
  878. font-size: 34rpx;
  879. margin-left: 12rpx;
  880. }
  881. .more {
  882. .text {
  883. color: #9A9A9A;
  884. font-size: 24rpx;
  885. }
  886. .prv {
  887. width: 10rpx;
  888. height: 20rpx;
  889. margin-left: 8rpx;
  890. }
  891. }
  892. }
  893. .goods-items {
  894. .item {
  895. width: calc(50% - 10rpx);
  896. margin-right: 10rpx;
  897. margin-top: 20rpx;
  898. box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.1);
  899. border-radius: 20rpx;
  900. &:nth-child(2n) {
  901. margin-left: 10rpx;
  902. margin-right: 0;
  903. }
  904. .nimg {
  905. width: 100%;
  906. height: calc(50vw - 20rpx - 10rpx);
  907. border-radius: 20rpx 20rpx 0 0;
  908. }
  909. .title {
  910. padding: 20rpx;
  911. height: 80rpx;
  912. overflow: hidden;
  913. text-overflow: ellipsis;
  914. display: -webkit-box;
  915. -webkit-box-orient: vertical;
  916. -webkit-line-clamp: 2;
  917. color: #333333;
  918. font-weight: bold;
  919. font-size: 30rpx;
  920. }
  921. .iview {
  922. padding: 20rpx;
  923. .score {
  924. color: #FF4C4C;
  925. font-weight: bold;
  926. font-size: 36rpx;
  927. .tag {
  928. font-weight: bold;
  929. font-size: 18rpx;
  930. color: #FF4C4C;
  931. }
  932. }
  933. .btn {
  934. background: linear-gradient(143.2747deg, #FF6A00, #EE0979);
  935. border-radius: 40rpx;
  936. padding: 10rpx 28rpx;
  937. font-size: 22rpx;
  938. color: #FFFFFF;
  939. }
  940. }
  941. }
  942. }
  943. }
  944. //最新门店
  945. .shop {
  946. background: #fff;
  947. padding: 20rpx;
  948. margin-top: 40rpx;
  949. .top {
  950. .icon {
  951. width: 36rpx;
  952. height: 36rpx;
  953. }
  954. .label {
  955. color: #000000;
  956. font-weight: bold;
  957. font-size: 34rpx;
  958. margin-left: 12rpx;
  959. }
  960. .more {
  961. .text {
  962. color: #9A9A9A;
  963. font-size: 24rpx;
  964. }
  965. .prv {
  966. width: 10rpx;
  967. height: 20rpx;
  968. margin-left: 8rpx;
  969. }
  970. }
  971. }
  972. .shop-items {
  973. .item {
  974. margin-top: 30rpx;
  975. .img {
  976. width: 180rpx;
  977. height: 180rpx;
  978. border-radius: 10rpx;
  979. }
  980. .info {
  981. position: relative;
  982. margin-left: 20rpx;
  983. width: calc(100% - 200rpx);
  984. border-bottom: 1px solid #F8F8F8;
  985. .title {
  986. font-weight: bold;
  987. font-size: 34rpx;
  988. color: #333333;
  989. width: calc(60%);
  990. overflow: hidden;
  991. text-overflow: ellipsis;
  992. white-space: nowrap;
  993. }
  994. .ii {
  995. image {
  996. width: 20rpx;
  997. height: 28rpx;
  998. margin-right: 8rpx
  999. }
  1000. font-weight: 400;
  1001. font-size: 22rpx;
  1002. color: #666666;
  1003. }
  1004. .address {
  1005. .icon {
  1006. width: 28rpx;
  1007. height: 28rpx;
  1008. }
  1009. .value {
  1010. font-size: 22rpx;
  1011. color: #666666;
  1012. opacity: 0.5;
  1013. margin-left: 10rpx;
  1014. }
  1015. margin-top: 20rpx;
  1016. }
  1017. .tel {
  1018. margin-top: 16rpx;
  1019. .icon {
  1020. width: 28rpx;
  1021. height: 28rpx;
  1022. }
  1023. .value {
  1024. font-size: 22rpx;
  1025. color: #666666;
  1026. opacity: 0.5;
  1027. margin-left: 10rpx;
  1028. }
  1029. }
  1030. .business {
  1031. font-weight: bold;
  1032. font-size: 24rpx;
  1033. color: #FF6F0F;
  1034. background: rgba(252, 243, 240, 0.8);
  1035. border-radius: 16rpx 16rpx 16rpx 0px;
  1036. padding: 10rpx 10rpx;
  1037. display: inline-block;
  1038. margin-bottom: 20rpx;
  1039. }
  1040. .wiget {
  1041. position: absolute;
  1042. right: 0;
  1043. bottom: 20rpx;
  1044. .wline {
  1045. margin: 0px 24rpx;
  1046. height: 40rpx;
  1047. width: 1px;
  1048. background: #eee;
  1049. }
  1050. .witem {
  1051. image {
  1052. width: 46rpx;
  1053. height: 46rpx;
  1054. }
  1055. .text {
  1056. font-size: 14px;
  1057. color: #666666;
  1058. margin-top: 8rpx;
  1059. }
  1060. }
  1061. }
  1062. }
  1063. }
  1064. }
  1065. }
  1066. /**弹出框 **/
  1067. .popwin {
  1068. position: fixed;
  1069. width: 100%;
  1070. height: 100%;
  1071. top: 0;
  1072. left: 0;
  1073. z-index: 88;
  1074. }
  1075. .popwin .bg {
  1076. background: rgba(0, 0, 0, 0.5);
  1077. height: 100%;
  1078. width: 100%;
  1079. position: absolute;
  1080. left: 0;
  1081. top: 0;
  1082. }
  1083. .popwin .body {
  1084. position: relative;
  1085. border-radius: 8px;
  1086. width: 100%;
  1087. width: 80vw;
  1088. }
  1089. .popwin .body .bgimg {
  1090. width: 80vw;
  1091. height: 120vw;
  1092. position: absolute;
  1093. top: 0;
  1094. }
  1095. .popwin .body .inner {
  1096. position: relative;
  1097. z-index: 99;
  1098. width: calc(100% - 80rpx);
  1099. padding: 0px 40rpx;
  1100. }
  1101. .inner-top {
  1102. height: 30vw;
  1103. }
  1104. .max-he {
  1105. height: 43vw;
  1106. }
  1107. .foot {
  1108. height: 26vw;
  1109. }
  1110. .popwin .btn {
  1111. background: linear-gradient(0deg, #FAC37B, #FFF5B0);
  1112. box-shadow: 2px 7px 7px 0px rgba(161, 23, 36, 0.4);
  1113. border-radius: 15rpx;
  1114. height: 66rpx;
  1115. width: 45vw;
  1116. font-size: 38rpx;
  1117. color: #97000E;
  1118. text-align: center;
  1119. line-height: 66rpx
  1120. }
  1121. .popwin .m-close {
  1122. margin-top: 10px;
  1123. }
  1124. .popwin .m-close image {
  1125. width: 120rpx;
  1126. height: 120rpx;
  1127. }
  1128. </style>