enter.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. <template>
  2. <view>
  3. <u-navbar
  4. title="入驻"
  5. placeholder='true'
  6. >
  7. <view
  8. class="u-nav-slot"
  9. slot="left"
  10. >
  11. </view>
  12. </u-navbar>
  13. <view>
  14. <u-swiper :list="fileList"
  15. autoplay
  16. imgMode='aspectFit'
  17. height='200'
  18. radius='0'
  19. :circular="true"
  20. @change="e => current = e.current" @click="click">
  21. <view slot="indicator" class="indicator">
  22. <view
  23. class="indicator__dot"
  24. v-for="(item, index) in fileList"
  25. :key="index"
  26. :class="[index === current && 'indicator__dot--active']">
  27. </view>
  28. </view>
  29. </u-swiper>
  30. </view>
  31. <view>
  32. <luyj-grid-link :list="list" @gridExc="clickGrid"></luyj-grid-link>
  33. <u-modal :show="showAuthorizePhone" :showConfirmButton="false">
  34. <view class="slot-content">
  35. <view class="auth-card">
  36. <view class="img">
  37. <img class="avatar-img" src="@/static/logo.png" mode="widthFix">
  38. </view>
  39. <view class="content">手机登录后才能查看名片哦~</view>
  40. </view>
  41. <view class="auth-btncard">
  42. <view class="btn-unok">
  43. <u-button :customStyle="customStyleUnOk" @click="showAuthorizePhone=false" :plain="true">
  44. 拒绝</u-button>
  45. </view>
  46. <view class="btn-ok">
  47. <u-button :customStyle="customStyleOk" open-type="getPhoneNumber"
  48. @getphonenumber="getPhoneNumber"> 立即登录</u-button>
  49. </view>
  50. </view>
  51. </view>
  52. </u-modal>
  53. <u-modal :show="showAuthorizeUser" :showConfirmButton="false">
  54. <view class="slot-content">
  55. <view class="auth-card">
  56. <view class="img">
  57. <img class="avatar-img" src="/static/image/logo.png" mode="widthFix">
  58. </view>
  59. <view class="content">邀请您补全个人信息<br></br>(昵称、头像)</view>
  60. <view style="margin-left: 100rpx;margin-right: 100rpx">
  61. <u-form :model="userInfo" ref="uForm">
  62. <u-form-item label="头像">
  63. <button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"
  64. slot="right">
  65. <image class="avatar"
  66. :src="userInfo.head?userInfo.head:'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'">
  67. </image>
  68. </button>
  69. </u-form-item>
  70. <u-form-item label="昵称">
  71. <u-input inputAlign='right' v-model="userInfo.nickname" class="weui-input"
  72. @blur="userNameInput" placeholder="请输入昵称" border="false" />
  73. <!-- <input type="nickname" :value="userInfo.nickname" class="weui-input" @blur="userNameInput" placeholder="请输入昵称"/> -->
  74. </u-form-item>
  75. </u-form>
  76. </view>
  77. </view>
  78. <view class="auth-btncard">
  79. <view class="btn-unok"><u-button :customStyle="customStyleUnOk" @click="authUser(0)">
  80. 拒绝</u-button>
  81. </view>
  82. <view class="btn-ok">
  83. <u-button :customStyle="customStyleOk" @click="authUser(1)"> 允许</u-button>
  84. </view>
  85. </view>
  86. </view>
  87. </u-modal>
  88. </view>
  89. <u-tabbar
  90. :value="tabbarCheck"
  91. @change="name => tabbarCheck = name"
  92. activeColor="#5F7DE9"
  93. >
  94. <u-tabbar-item name="team" text="加入">
  95. <image
  96. class="u-page__item__slot-icon"
  97. slot="active-icon"
  98. src="@/static/image/nav-icon/antOutline-team Copy.png"
  99. ></image>
  100. <image
  101. class="u-page__item__slot-icon"
  102. slot="inactive-icon"
  103. src="@/static/image/nav-icon/antOutline-team.png"
  104. ></image>
  105. </u-tabbar-item>
  106. <u-tabbar-item name="notification" text="通知">
  107. <image
  108. class="u-page__item__slot-icon"
  109. slot="active-icon"
  110. src="@/static/image/nav-icon/md-notifications_none Copy.png"
  111. ></image>
  112. <image
  113. class="u-page__item__slot-icon"
  114. slot="inactive-icon"
  115. src="@/static/image/nav-icon/md-notifications_none.png"
  116. ></image>
  117. </u-tabbar-item>
  118. <u-tabbar-item name="user" text="我的">
  119. <image
  120. class="u-page__item__slot-icon"
  121. slot="active-icon"
  122. src="@/static/image/nav-icon/antOutline-user1 Copy.png"
  123. ></image>
  124. <image
  125. class="u-page__item__slot-icon"
  126. slot="inactive-icon"
  127. src="@/static/image/nav-icon/antOutline-user1.png"
  128. ></image>
  129. </u-tabbar-item>
  130. </u-tabbar>
  131. </view>
  132. </template>
  133. <script>
  134. var that
  135. import luyjGridLink from '@/uni_modules/lxm-fold-link/luyj-grid-link/components/luyj-grid-link/luyj-grid-link.vue'
  136. export default {
  137. components: {
  138. "luyjGridLink": luyjGridLink
  139. },
  140. data() {
  141. return {
  142. fileList:[],
  143. tabbarCheck:'team',
  144. showAuthorizePhone:false,
  145. showAuthorizeUser:false,
  146. userInfo: {
  147. head: '',
  148. nickname: '',
  149. phone: '',
  150. },
  151. customStyleUnOk: {
  152. marginTop: '20rpx',
  153. color: '#5F7DE9',
  154. border: '2px solid #5F7DE9',
  155. "border-radius": "10px",
  156. fontSize: "32rpx"
  157. },
  158. customStyleOk: {
  159. marginTop: '20rpx',
  160. color: '#fff',
  161. border: '2px solid #5F7DE9',
  162. "border-radius": "10px",
  163. fontSize: "32rpx",
  164. background: "#5F7DE9"
  165. },
  166. list: [
  167. {
  168. title: '全部分类',
  169. // cur: 'basic',
  170. bgColor: '', // 背景颜色
  171. color: 'blue',
  172. title_show: true,
  173. showAll: false,
  174. colNumber: 4, // 显示的列数
  175. iconsList: [
  176. {
  177. cuIcon: '1_canyin-35',
  178. color: 'blue',
  179. name: '餐饮',
  180. url: '/pageA/enter/cateringindustry'
  181. },
  182. {
  183. cuIcon: 'zufang',
  184. color: 'blue',
  185. name: '民宿',
  186. url: '/pageA/enter/homestay'
  187. },
  188. {
  189. cuIcon: 'jiudian-38',
  190. color: 'blue',
  191. name: '酒店',
  192. url: '/pageA/enter/hotel'
  193. }
  194. ]
  195. },
  196. {
  197. title: '我的入驻',
  198. // cur: 'basic',
  199. bgColor: '', // 背景颜色
  200. color: 'blue',
  201. title_show: true,
  202. showAll: false,
  203. colNumber: 4, // 显示的列数
  204. iconsList: [
  205. {
  206. cuIcon: '1_canyin-35',
  207. color: 'blue',
  208. name: '餐饮',
  209. url: '/pageA/enter/myCateringdustry/index'
  210. },
  211. {
  212. cuIcon: 'zufang',
  213. color: 'blue',
  214. name: '民宿',
  215. url: '/pageA/enter/myHomestay/index'
  216. },
  217. {
  218. cuIcon: 'jiudian-38',
  219. color: 'blue',
  220. name: '酒店',
  221. url: '/pageA/enter/hotel'
  222. }
  223. ]
  224. },
  225. ],
  226. }
  227. },
  228. onLoad(){
  229. that = this
  230. this.getList()
  231. },
  232. onShow: function() {
  233. let _isLoad = uni.getStorageSync("scanAddCardToIndex")
  234. if (uni.getStorageSync("userInfo").phone) {
  235. // that.$request.baseRequest('admin.unimall.cardNewsInfo', 'list', {
  236. // receiveId: uni.getStorageSync("userInfo").id,
  237. // }, failres => {
  238. // console.log('res+++++', failres.errmsg)
  239. // that.$refs.uToast.show({
  240. // type: 'error',
  241. // message: failres.errmsg,
  242. // })
  243. // }).then(res => {
  244. // that.noticeList = res.data.items
  245. // if (that.noticeList.length > 0) {
  246. // var data = that.noticeList.filter((item) => {
  247. // return item.newsFlag == 0
  248. // })
  249. // that.unread = data ? data.length : 0
  250. // }
  251. // console.log(that.unread)
  252. // })
  253. } else {
  254. this.showAuthorizePhone = true
  255. }
  256. },
  257. methods: {
  258. getList(){
  259. this.$request.baseRequest('admin.tourism.carouselManagement', 'list', {
  260. page: 1,
  261. limit: 9999,
  262. classify:'商家版首页'
  263. }, failres => {
  264. uni.showToast({
  265. icon: "none",
  266. title: failres.errmsg,
  267. duration: 3000
  268. });
  269. }).then(res => {
  270. this.fileList=res.data.items
  271. })
  272. },
  273. toDetail(url){
  274. uni.navigateTo({
  275. url:url
  276. })
  277. },
  278. async getPhoneNumber(e) {
  279. that.userInfo = await this.$request.wxlogin()
  280. that.userInfo.phone = await this.$request.getPhone(e, that.userInfo)
  281. this.showAuthorizePhone = false
  282. this.showAuthorizeUser = true
  283. },
  284. async authUser(type) {
  285. //同步信息,没有头像和昵称自动生成
  286. this.userInfo = await this.$request.syncInfo(this.userInfo)
  287. if (this.userInfo.openId) {
  288. uni.setStorageSync("userInfo", that.userInfo)
  289. that.showAuthorizeUser = false
  290. // that.mescroll.resetUpScroll()
  291. }
  292. },
  293. }
  294. }
  295. </script>
  296. <style lang="scss" scoped>
  297. .slot-content {
  298. width: 100%;
  299. }
  300. /deep/.u-checkbox-group {
  301. position: absolute;
  302. right: 20px;
  303. z-index: 99;
  304. top: 30px;
  305. }
  306. /deep/.u-checkbox__icon-wrap.u-checkbox__icon-wrap--square {
  307. border-color: #D7DEEB !important;
  308. }
  309. /deep/.mescroll-body {
  310. min-height: 558px !important;
  311. height: 558px !important;
  312. background-color: green;
  313. overflow: scroll !important;
  314. }
  315. .auth-btncard {
  316. display: flex !important;
  317. justify-content: space-between !important;
  318. .btn-unok {
  319. width: 40%;
  320. }
  321. .btn-ok {
  322. width: 40%;
  323. }
  324. }
  325. .auth-card {
  326. text-align: center;
  327. .avatar-img {
  328. width: 250rpx;
  329. }
  330. .title {
  331. font-size: 20rpx;
  332. }
  333. .content {
  334. font-size: 32rpx;
  335. font-weight: bold;
  336. color: #1A1A1A;
  337. margin-bottom: 30rpx;
  338. }
  339. }
  340. .avatar-wrapper {
  341. color: #333 !important;
  342. border: none !important;
  343. border-radius: 0 !important;
  344. background-color: transparent !important;
  345. padding: 0;
  346. }
  347. .avatar-wrapper::after {
  348. border: none !important;
  349. }
  350. .avatar {
  351. width: 100rpx;
  352. height: 100rpx;
  353. overflow: hidden;
  354. border-radius: 100%;
  355. }
  356. /deep/.u-popup__content {
  357. border-radius: 20rpx !important;
  358. }
  359. /deep/.u-tabbar-item image{
  360. width:40rpx;
  361. height:40rpx;
  362. }
  363. </style>