index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  1. <template>
  2. <view class="container">
  3. <!--header-->
  4. <!-- #ifdef MP-WEIXIN || APP-PLUS -->
  5. <view class="tui-header-box" :style="pagebase.base ? pagebase.base.titleBackground.bgstyle : ''">
  6. <view :style="{ height: height + 'px' }">
  7. <view class="tui-header"
  8. :style="{ 'color': pagebase.base ? pagebase.base.titleTextColor : '', paddingTop: top + 'px' }">
  9. <text v-if="config.sys_title">{{ config.sys_title }}</text>
  10. </view>
  11. </view>
  12. </view>
  13. <view class="topheight" :style="{ height: height + 'px' }">.</view>
  14. <!-- #endif -->
  15. <!--header-->
  16. <Pengpai-FadeInOut v-if="config.is_broadcast == 1" :top="198" :loop="true" :info="item"
  17. v-for="(item, index) in list" :key="index">
  18. </Pengpai-FadeInOut>
  19. <view>
  20. <view class="diybox" :style="pagebase.base ? pagebase.base.bgstyle : ''">
  21. <view v-if="configtuanzhang.tuanzhang_open==1 && housingName"
  22. :style="pagebase.base ? pagebase.base.titleBackground.bgstyle : ''">
  23. <view @tap="onChangehousingestate" class="housingestate"
  24. :style="{ 'color': pagebase.base ? pagebase.base.titleTextColor : ''}">
  25. {{ housingName }} 站长:{{tuanzhangName}}
  26. <tui-icon name="arrowright" color="#fff" :size="30" unit="rpx">
  27. </tui-icon>
  28. </view>
  29. </view>
  30. <block v-for="(diyitem, itemindex) in modulelist" :key="itemindex">
  31. <!-- banner -->
  32. <block v-if="diyitem.type === 'banner'">
  33. <view class="bannerbox" :style="diyitem.base.bgstyle">
  34. <view class="tui-banner-bg"
  35. :style="{ height: bannerHeight[itemindex].swiperHeight + 'px' }">
  36. <!--banner-->
  37. <view class="tui-banner-box">
  38. <swiper :style="{ height: bannerHeight[itemindex].swiperHeight + 'px' }"
  39. :indicator-dots="true" :autoplay="true" :interval="5000" :duration="150"
  40. class="tui-banner-swiper" :circular="true"
  41. indicator-color="rgba(255, 255, 255, 0.8)" indicator-active-color="#fff">
  42. <swiper-item v-for="(banner, index) in diyitem.list" :key="index">
  43. <image @tap="navigateTo" :data-url="banner.link" :src="banner.img"
  44. class="tui-slide-image" mode="widthFix" :data-itemindex="itemindex"
  45. @load="setswiperHeight" />
  46. </swiper-item>
  47. </swiper>
  48. </view>
  49. </view>
  50. <view class="bannerbottom"></view>
  51. </view>
  52. </block>
  53. <search v-if="diyitem.type === 'search'" :diyitem="diyitem" :cityName="cityName" :opacity="opacity"
  54. @onChangePosition="onSelectoperatingcity" />
  55. <!-- 导航组 -->
  56. <navbar v-if="diyitem.type === 'navBar'" :diyitem="diyitem" />
  57. <!-- 单图组 -->
  58. <imagesingle v-if="diyitem.type === 'imageSingle'" :diyitem="diyitem" />
  59. <!-- 多图组 -->
  60. <duo v-if="diyitem.type === 'duo'" :diyitem="diyitem" />
  61. <!-- 图片橱窗 -->
  62. <window v-if="diyitem.type === 'window'" :diyitem="diyitem" />
  63. <!-- 图文组 -->
  64. <tuwen v-if="diyitem.type === 'tuwen'" :diyitem="diyitem" />
  65. <!-- 视频组 -->
  66. <diyvideo v-if="diyitem.type === 'video'" :diyitem="diyitem" />
  67. <!-- 公告组 -->
  68. <notice v-if="diyitem.type === 'notice'" :diyitem="diyitem" />
  69. <!-- 空白组 -->
  70. <blank v-if="diyitem.type === 'blank'" :diyitem="diyitem" />
  71. <!-- 辅助线 -->
  72. <guide v-if="diyitem.type === 'guide'" :diyitem="diyitem" />
  73. <!-- 富文本 -->
  74. <richtext v-if="diyitem.type === 'richText'" :diyitem="diyitem" />
  75. <!--秒杀-->
  76. <miaosha v-if="diyitem.type === 'miaosha'" :diyitem="diyitem" :pagestyleconfig="pagestyleconfig" />
  77. <!--会员礼包-->
  78. <membergoods v-if="diyitem.type === 'membergoods'" :diyitem="diyitem"
  79. :pagestyleconfig="pagestyleconfig" />
  80. <!--超值拼团-->
  81. <tuan v-if="diyitem.type === 'tuan'" :diyitem="diyitem" :pagestyleconfig="pagestyleconfig" />
  82. <!-- 商品组 -->
  83. <goods v-if="diyitem.type === 'goods'" :diyitem="diyitem" :pagestyleconfig="pagestyleconfig" />
  84. <!-- 师傅组 -->
  85. <technical v-if="diyitem.type === 'technical'" :diyitem="diyitem" />
  86. <!-- 优惠券组 -->
  87. <coupon v-if="diyitem.type === 'coupon'" :diyitem="diyitem" :itemindex="itemindex"
  88. @receiveTap="receiveTap" />
  89. <!--排行榜-->
  90. <block v-if="diyitem.type === 'ranking'">
  91. <view class="tui-product-box">
  92. <view class="tui-block__box" :style="diyitem.base.bgstyle">
  93. <view class="tui-group-name" @tap="more">
  94. <view>
  95. <text>排行榜</text>
  96. <text class="tui-sub__desc">大家都在买</text>
  97. </view>
  98. <view class="tui-more__box">
  99. <text>更多</text>
  100. <tui-icon name="arrowright" :size="36" unit="rpx" color="#999"></tui-icon>
  101. </view>
  102. </view>
  103. <view class="tui-new-box">
  104. <view class="tui-new-item" :class="[index != 0 && index != 1 ? 'tui-new-mtop' : '']"
  105. v-for="(item, index) in newProduct" :key="index" @tap="detail">
  106. <image
  107. :src="'/static/images/mall/new/' + (item.type == 1 ? 'new' : 'discount') + '.png'"
  108. class="tui-new-label" v-if="item.isLabel"></image>
  109. <view class="tui-title-box">
  110. <view class="tui-new-title">{{ item.name }}</view>
  111. <view class="tui-new-price">
  112. <text class="tui-new-present">¥{{ item.present }}</text>
  113. <text class="tui-new-original">¥{{ item.original }}</text>
  114. </view>
  115. </view>
  116. <image :src="'/static/images/mall/new/' + item.pic" class="tui-new-img"></image>
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. </block>
  122. </block>
  123. </view>
  124. </view>
  125. <!--加载loadding-->
  126. <tui-loadmore v-if="loadding" :index="3" type="red"></tui-loadmore>
  127. <!-- <tui-nomore v-if="!pullUpOn"></tui-nomore> -->
  128. <!--加载loadding-->
  129. <view @tap="tokefuTel">
  130. <view class="img-tel-style zindex100 yc"></view>
  131. <image class="img-tel-style" src="/static/images/kefutel.png"></image>
  132. </view>
  133. <view>
  134. <!-- #ifdef MP-WEIXIN -->
  135. <button v-if="configkefu.minionline == 1 || configkefu.minionline == 3" @click="toim"
  136. class="img-plus-style zindex100 yc aaa"></button>
  137. <button v-else-if="configkefu.minionline == 2" @click="toimwebview(configkefu.kefuurl)"
  138. class="img-plus-style zindex100 yc aaa"></button>
  139. <button v-else open-type="contact" class="img-plus-style zindex100 yc"></button>
  140. <!-- #endif -->
  141. <!-- #ifndef MP-WEIXIN -->
  142. <button v-if="configkefu.minionline == 1 || configkefu.minionline == 2 || configkefu.minionline == 3"
  143. @click="toim" class="img-plus-style zindex100 yc aaa"></button>
  144. <!-- #endif -->
  145. <image src="/static/images/kefulink.png" class="img-plus-style"></image>
  146. </view>
  147. <tui-modal custom :show="modalShow" backgroundColor="transparent" padding="0" @cancel="hideModal">
  148. <view class="tui-poster__box" :style="{ marginTop: height + 'px' }">
  149. <image src="/static/images/mall/icon_popup_closed.png" class="tui-close__img" @tap.stop="hideModal">
  150. </image>
  151. <image :show-menu-by-longpress="true" :src="config.kefuqrcode" class="tui-poster__img"></image>
  152. </view>
  153. </tui-modal>
  154. <tui-modal :show="selectOperatingcityShow" @cancel="hideOperatingcityModal" :custom="true" fadeIn>
  155. <image src="/static/images/mall/icon_popup_closed.png" class="tui-close__img"
  156. @tap.stop="hideOperatingcityModal">
  157. </image>
  158. <view class="tui-modal-custom">
  159. <view class="tui-prompt-title">您所在的城市还没开通运营</view>
  160. <view class="tui-modal__btn">
  161. <view class="tui-box">
  162. <button class="tui-btn-danger" @click="onSelectoperatingcity">选择附近的城市</button>
  163. </view>
  164. <view class="tui-box">
  165. <tui-button type="white" shape="circle" height="80rpx" :size="34"
  166. @click="onregoperatingcity">申请当地运营商</tui-button>
  167. </view>
  168. </view>
  169. </view>
  170. </tui-modal>
  171. <tui-modal :show="selecttuanzhangShow" @cancel="hidetuanzhangModal" :custom="true" fadeIn>
  172. <image src="/static/images/mall/icon_popup_closed.png" class="tui-close__img"
  173. @tap.stop="hidetuanzhangModal">
  174. </image>
  175. <view class="tui-modal-custom">
  176. <view class="tui-prompt-title">请选择社区服务点</view>
  177. <view class="tui-modal__btn">
  178. <view class="tui-box">
  179. <button class="tui-btn-danger" @click="onChangehousingestate">选择社区服务点</button>
  180. </view>
  181. </view>
  182. </view>
  183. </tui-modal>
  184. <view class="tui-safearea-bottom"></view>
  185. <tui-tabbar :current="current" :pageid="id">
  186. </tui-tabbar>
  187. </view>
  188. </template>
  189. <script>
  190. import uniNoticeBar from "@/components/uni-notice-bar/uni-notice-bar.vue"
  191. import PengpaiFadeInOut from "@/components/Pengpai-FadeInOut/Pengpai-FadeInOut.vue"
  192. import search from '@/components/views/diyitem/search.vue';
  193. import navbar from '@/components/views/diyitem/navbar.vue';
  194. import imagesingle from '@/components/views/diyitem/imagesingle.vue';
  195. import duo from '@/components/views/diyitem/duo.vue';
  196. import window from '@/components/views/diyitem/window.vue';
  197. import tuwen from '@/components/views/diyitem/tuwen.vue';
  198. import diyvideo from '@/components/views/diyitem/diyvideo.vue';
  199. import miaosha from '@/components/views/diyitem/miaosha.vue';
  200. import membergoods from '@/components/views/diyitem/membergoods.vue';
  201. import tuan from '@/components/views/diyitem/tuan.vue';
  202. import goods from '@/components/views/diyitem/goods.vue';
  203. import notice from '@/components/views/diyitem/notice.vue';
  204. import blank from '@/components/views/diyitem/blank.vue';
  205. import guide from '@/components/views/diyitem/guide.vue';
  206. import richtext from '@/components/views/diyitem/richtext.vue';
  207. import technical from '@/components/views/diyitem/technical.vue';
  208. import coupon from '@/components/views/diyitem/coupon.vue';
  209. export default {
  210. components: {
  211. uniNoticeBar,
  212. PengpaiFadeInOut,
  213. search,
  214. navbar,
  215. imagesingle,
  216. duo,
  217. window,
  218. tuwen,
  219. diyvideo,
  220. miaosha,
  221. membergoods,
  222. tuan,
  223. goods,
  224. notice,
  225. blank,
  226. guide,
  227. richtext,
  228. technical,
  229. coupon
  230. },
  231. data() {
  232. return {
  233. list: [],
  234. uid: '',
  235. config: {},
  236. configkefu: {},
  237. configtuanzhang: {},
  238. pagestyleconfig: {},
  239. is_submitaudit: 1,
  240. selecttuanzhangShow: false,
  241. selectOperatingcityShow: false,
  242. modalShow: false,
  243. height: 64, //header高度
  244. top: 26, //标题图标距离顶部距离
  245. scrollH: 0, //滚动总高度
  246. bannerHeight: [],
  247. windowWidth: 0,
  248. current: '',
  249. cityName: '',
  250. housingName: '',
  251. community_title: '',
  252. tuanzhangName: '',
  253. tuanzhangtouxiang: '',
  254. latitude: "",
  255. longitude: "",
  256. id: "0",
  257. //diy数据
  258. modulelist: [],
  259. pagebase: [],
  260. newProduct: [{
  261. name: '时尚舒适公主裙高街修身长裙',
  262. present: 198,
  263. original: 298,
  264. pic: '1.jpg',
  265. type: 1,
  266. isLabel: true
  267. }],
  268. pageIndex: 1,
  269. loadding: false,
  270. pullUpOn: true,
  271. opacity: 1,
  272. timer: null,
  273. num: 0,
  274. currentid: 0,
  275. cumulative: 0
  276. };
  277. },
  278. onLoad: function(e) {
  279. let _this = this
  280. let obj = {};
  281. // #ifdef MP-WEIXIN
  282. this.current = "/" + this.__route__;
  283. // #endif
  284. //#ifdef H5
  285. this.current = '/pages/index/index';
  286. //#endif
  287. uni.showLoading({
  288. title: '数据加载中'
  289. });
  290. if (uni.getStorageInfoSync().currentSize > 8000) {
  291. uni.clearStorageSync();
  292. console.log('清理本地数据缓存');
  293. }
  294. setTimeout(() => {
  295. uni.getSystemInfo({
  296. success: res => {
  297. //console.log(res);
  298. this.width = obj.left || res.windowWidth;
  299. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight +
  300. 44;
  301. this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res
  302. .statusBarHeight + 6;
  303. this.scrollH = res.windowWidth;
  304. this.windowWidth = res.windowWidth;
  305. }
  306. });
  307. }, 0);
  308. if (e.jump) {
  309. uni.reLaunch({
  310. url: e.jump
  311. });
  312. }
  313. _this.$request.post('config', {
  314. mo: 'pagestyle'
  315. }).then(res => {
  316. if (res.errno == 0) {
  317. _this.pagestyleconfig = res.data
  318. }
  319. });
  320. //console.log(e);
  321. setTimeout(function() {
  322. uni.hideLoading();
  323. }, 2000);
  324. if (e.id) {
  325. _this.id = e.id;
  326. }
  327. if (!e.reid) {
  328. if (e && e.scene) {
  329. e.reid = e.scene;
  330. }
  331. }
  332. if (e.reid) {
  333. uni.setStorageSync('reid', e.reid)
  334. }
  335. _this.getdiypage();
  336. _this.sam.login().then(res => {
  337. //console.log(res);
  338. //console.log(e);
  339. if (res.uid > 0) {
  340. _this.uid = res.uid;
  341. if (uni.getStorageSync('reid')) {
  342. _this.$request.get('member.bindpid', {
  343. samkey: (new Date()).valueOf(),
  344. pid: uni.getStorageSync('reid')
  345. }).then(res => {
  346. if (res.errno == 0) {
  347. console.log('pid绑定成功');
  348. }
  349. })
  350. }
  351. }
  352. });
  353. setTimeout(() => {
  354. uni.getSystemInfo({
  355. success: res => {
  356. //console.log(res);
  357. this.hieghtS = res.windowHeight;
  358. this.windowWidth = res.windowWidth;
  359. }
  360. });
  361. }, 0);
  362. if (_this.$siteInfo.design_method == 3) {
  363. _this.getNewMessage();
  364. _this.timer = setInterval(() => {
  365. setTimeout(() => {
  366. _this.getNewMessage()
  367. }, 0)
  368. }, 5000)
  369. }
  370. if (_this.id > 0) {
  371. this.current = this.current + '?id=' + _this.id;
  372. }
  373. uni.setStorageSync('gotopage', this.current);
  374. },
  375. onShow() {
  376. let _this = this;
  377. //#ifdef H5 || APP-PLUS
  378. uni.getLocation({
  379. type: 'wgs84',
  380. success: function(res) {
  381. console.log(res);
  382. },
  383. })
  384. //#endif
  385. //只在app实时定位
  386. // #ifdef APP-PLUS
  387. uni.startLocationUpdate({
  388. success: res => console.log('开启小程序接收位置消息成功', res),
  389. fail: err => console.error('开启小程序接收位置消息失败:', err),
  390. complete: msg => console.log('调用开启小程序接收位置消息 API 完成')
  391. });
  392. // #endif
  393. _this.$request.post('Config.audit', {
  394. samkey: (new Date()).valueOf()
  395. }).then(res => {
  396. if (res.data.is_submitaudit != 1) {
  397. if (_this.$siteInfo.multiid == 1) {
  398. uni.reLaunch({
  399. url: '/pagesA/my/admintechnical/index'
  400. });
  401. }
  402. }
  403. });
  404. uni.setStorageSync('NewMessage', '1')
  405. this.sam.onShowlogin();
  406. //获取地置位置
  407. _this.sam.getCityPosition({
  408. is_index: 1
  409. }).then(res => {
  410. _this.getdiypage();
  411. _this.cityName = res.cityName;
  412. _this.housingName = res.housingName;
  413. _this.community_title = res.community_title;
  414. _this.tuanzhangName = res.tuanzhangName;
  415. _this.tuanzhangtouxiang = res.tuanzhangtouxiang;
  416. _this.tuanzhangtouxiang = res.tuanzhangtouxiang;
  417. console.log(res);
  418. if (!res.ocid && res.operatingcityis_limit == 1) {
  419. _this.selectOperatingcityShow = true;
  420. } else {
  421. _this.selectOperatingcityShow = false;
  422. if (_this.configtuanzhang.tuanzhang_open == 1) {
  423. if (res.he_id) {
  424. _this.selecttuanzhangShow = false;
  425. } else {
  426. _this.selecttuanzhangShow = true;
  427. }
  428. }
  429. }
  430. });
  431. },
  432. destroyed() {
  433. clearInterval(this.timer)
  434. },
  435. methods: {
  436. toimwebview(url) {
  437. this.tui.href("/pages/webview/h5?url=" + url)
  438. },
  439. toim() {
  440. if (this.configkefu.minionline == 2 && this.configkefu.kefuurl) {
  441. this.tui.href(this.configkefu.kefuurl);
  442. } else if (this.configkefu.minionline == 3) {
  443. var telstr = this.configkefu.kefutel;
  444. uni.makePhoneCall({
  445. phoneNumber: telstr
  446. });
  447. } else {
  448. this.tui.href("/pages/im/h5");
  449. }
  450. },
  451. getNewMessage: function() {
  452. let _this = this;
  453. if (uni.getStorageSync('NewMessage') == '1') {
  454. _this.$request.post('broadcast.index', {
  455. cumulative: _this.cumulative,
  456. currentid: _this.currentid,
  457. }).then(res => {
  458. if (res.errno == 0) {
  459. if (res.data) {
  460. if (_this.num > 3) {
  461. _this.list = [];
  462. _this.num = 0;
  463. }
  464. _this.currentid = res.data.id;
  465. //追加一条数据
  466. _this.list = _this.list.concat(res.data);
  467. _this.num++;
  468. _this.cumulative++;
  469. } else {
  470. _this.currentid = 0;
  471. }
  472. }
  473. })
  474. }
  475. },
  476. setswiperHeight(e) {
  477. console.log(e);
  478. this.bannerHeight = this.modulelist;
  479. this.bannerHeight[e.currentTarget.dataset.itemindex].swiperHeight = e.detail.height * ((this.windowWidth -
  480. 20) / e.detail.width);
  481. },
  482. //获取后台数据
  483. getdiypage: function() {
  484. let _this = this;
  485. _this.$request.get('diypage.indexv2', {
  486. samkey: (new Date()).valueOf(),
  487. id: _this.id
  488. }).then(res => {
  489. if (res.errno == 0) {
  490. _this.config = res.data.config;
  491. if (res.data.config) {
  492. _this.configkefu = res.data.config.kefu || {};
  493. }
  494. if (res.data.config) {
  495. _this.configtuanzhang = res.data.config.tuanzhang || {};
  496. }
  497. if (_this.config.kefuqrcode && _this.is_submitaudit != 1) {
  498. _this.modalShow = true;
  499. }
  500. if (res.data.modulelist) {
  501. _this.modulelist = res.data.modulelist;
  502. _this.pagebase = res.data.pagebase;
  503. if (_this.bannerHeight.length == 0) {
  504. //console.log(_this.bannerHeight.length);
  505. _this.bannerHeight = _this.modulelist;
  506. }
  507. uni.setNavigationBarTitle({
  508. title: res.data.config.sys_title
  509. });
  510. /*
  511. uni.setNavigationBarColor({
  512. frontColor: res.data.pagebase.base.titleTextColor,
  513. backgroundColor: res.data.pagebase.base.titleBackgroundColor,
  514. animation: { //动画效果
  515. duration: 400,
  516. timingFunc: 'easeIn'
  517. }
  518. });*/
  519. }
  520. }
  521. })
  522. },
  523. /**
  524. * 领取优惠券
  525. */
  526. receiveTap: function(e) {
  527. let _this = this,
  528. dataset = e.currentTarget.dataset;
  529. if (!dataset.state) {
  530. return false;
  531. }
  532. _this.$request.post('Couponreceive.fetch', {
  533. id: dataset.couponId
  534. }).then(res => {
  535. wx.showToast({
  536. title: res.message,
  537. icon: 'none'
  538. })
  539. _this.modulelist[dataset.itemindex].list[dataset.index].state = {
  540. value: 0,
  541. text: '已领取'
  542. };
  543. })
  544. },
  545. navigateTo: function(e) {
  546. this.sam.diynavigateTo(e);
  547. },
  548. coupon() {
  549. this.sam.navigateTo('/pages/coupon/coupon');
  550. },
  551. category: function() {
  552. this.sam.navigateTo('../category/category');
  553. },
  554. selectCity: function() {
  555. this.sam.navigateTo('/pages/selectCity/selectCity');
  556. },
  557. onChangehousingestate: function(e) {
  558. this.sam.navigateTo("/pages/housingestate/list");
  559. },
  560. onSelectoperatingcity: function(e) {
  561. this.sam.navigateTo("/pages/operatingcity/list");
  562. },
  563. onregoperatingcity: function(e) {
  564. this.sam.navigateTo("/pages/login/reg?ptype=operatingcity");
  565. },
  566. onChangePosition: function() {
  567. const _this = this;
  568. uni.chooseLocation({
  569. success(res) {
  570. _this.$request.post('operatingcity.getcity', {
  571. samkey: (new Date()).valueOf(),
  572. address: res.address,
  573. latitude: res.latitude,
  574. longitude: res.longitude
  575. }).then(res => {
  576. if (res.data) {
  577. _this.cityName = res.data.cityName;
  578. _this.community_title = res.data.community_title;
  579. _this.housingName = res.data.housingName;
  580. _this.tuanzhangName = res.data.tuanzhangName;
  581. _this.tuanzhangtouxiang = res.data.tuanzhangtouxiang;
  582. }
  583. });
  584. }
  585. });
  586. },
  587. tokefuTel: function(e) {
  588. //客服电话
  589. const _this = this;
  590. var telstr = _this.config.TELEPHONE;
  591. uni.makePhoneCall({
  592. phoneNumber: telstr
  593. });
  594. },
  595. hideModal() {
  596. this.modalShow = false;
  597. },
  598. hidetuanzhangModal() {
  599. this.selecttuanzhangShow = false;
  600. },
  601. hideOperatingcityModal() {
  602. this.selectOperatingcityShow = false;
  603. }
  604. },
  605. onPullDownRefresh: function() {
  606. this.getdiypage()
  607. uni.stopPullDownRefresh();
  608. },
  609. onReachBottom: function() {
  610. },
  611. onPageScroll(e) {
  612. // #ifdef APP-PLUS
  613. let scrollTop = e.scrollTop;
  614. if (scrollTop < 0) {
  615. if (this.opacity > 0)
  616. this.opacity = 1 - Math.abs(scrollTop) / 30;
  617. } else {
  618. this.opacity = 1
  619. }
  620. // #endif
  621. },
  622. //发送给朋友
  623. onShareAppMessage: function() {
  624. let _this = this;
  625. //console.log(_this.uid);
  626. let path = "/pages/index/index?reid=" + _this.uid;
  627. if (_this.id > 0) {
  628. path = path + '&id=' + _this.id;
  629. }
  630. return {
  631. title: _this.pagebase.params.share_title || "",
  632. path: path,
  633. };
  634. },
  635. onShareTimeline(res) { //分享到朋友圈
  636. return {}
  637. },
  638. };
  639. </script>
  640. <style>
  641. @import '@/components/views/diyitem/diyapge.css';
  642. </style>