storeIntroduction.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. <template>
  2. <view class="store_introduction">
  3. <view class="content">
  4. <view class="store_con" :style="'background-image:url( ' + store_banner + ');background-size:100% 100%;background-repeat:no-repeat'">
  5. <!-- 店铺详情 -->
  6. <view class="info_left" v-if="vender_detail">
  7. <image class="avat" :src="vender_detail.storeLogoUrl" mode="aspectFill"></image>
  8. <view class="info_des">
  9. <view class="info_top">
  10. <text>{{vender_detail.storeName}}</text>
  11. <text v-if="vender_detail.isOwnShop == 1">{{$L('自营')}}</text>
  12. </view>
  13. <view class="info_bot">
  14. <image :src="imgUrl+'store/renqizhi.png'"></image>
  15. <text>人气:{{vender_detail.followNumber}}</text>
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 店铺二维码 -->
  20. <view class="store_code">
  21. <view class="store_code_top">
  22. <text>{{$L('店铺二维码')}}</text>
  23. <image :src="imgUrl+'store/erweima.png'" @tap="handleShare"></image>
  24. </view>
  25. <view class="store_code_des">
  26. <view class="des_pre">
  27. <text>{{$L('描述相符')}}</text>
  28. <text>{{vender_detail.descriptionScore?vender_detail.descriptionScore:''}}</text>
  29. </view>
  30. <view class="des_pre">
  31. <text>{{$L('服务态度')}}</text>
  32. <text>{{vender_detail.serviceScore?vender_detail.serviceScore:''}}</text>
  33. </view>
  34. <view class="des_pre">
  35. <text>{{$L('发货速度')}}</text>
  36. <text>{{vender_detail.deliverScore?vender_detail.deliverScore:''}}</text>
  37. </view>
  38. </view>
  39. </view>
  40. <!-- 公司相关 -->
  41. <view class="company_related">
  42. <view class="related_pre">
  43. <text>{{$L('公司名称')}}</text>
  44. <text>{{vender_detail.companyName ? vender_detail.companyName : '--'}}</text>
  45. </view>
  46. <view class="related_pre">
  47. <text>{{$L('公司所在地')}}</text>
  48. <text>{{vender_detail.address ? vender_detail.address : '--'}}</text>
  49. </view>
  50. <view class="related_pre">
  51. <text>{{$L('开店时间')}}</text>
  52. <text>{{vender_detail.createTime ? vender_detail.createTime : '--'}}</text>
  53. </view>
  54. <view class="related_yewu">
  55. <text>{{$L('主营商品')}}</text>
  56. <text>{{vender_detail.mainBusiness ? vender_detail.mainBusiness : '--'}}</text>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- 遮罩层 -->
  62. <view class="mask" catchtouchmove="preventTouchMove" v-if="modalDlg" @tap="close"></view>
  63. <!-- 二维码分享弹框 -->
  64. <view class="modalDlg" v-if="modalDlg">
  65. <text>{{vender_detail.storeName}}</text>
  66. <text>{{$L('邀请好友来扫一扫分享店铺给TA')}}</text>
  67. <image :src="'data:image/png;base64,'+vender_detail.storeQRCode"></image>
  68. </view>
  69. </view>
  70. </template>
  71. <script>
  72. export default {
  73. data() {
  74. return {
  75. bid: '',
  76. vid: '',
  77. store_list: [],
  78. vender_detail: '',
  79. //店铺详情
  80. modalDlg: false,
  81. //模态框
  82. imgUrl: getApp().globalData.imgUrl,
  83. //图片地址
  84. store_banner: '', //店铺首页banner图
  85. city_site_open: "",
  86. searchList: [],
  87. show: false
  88. };
  89. },
  90. components: {},
  91. props: {},
  92. onLoad: function (options) {
  93. this.vid=options.vid
  94. this.venderDetail(); //店铺详情
  95. },
  96. methods: {
  97. // 商铺详情
  98. venderDetail(e) {
  99. let key = uni.getStorageSync('token');
  100. let that = this;
  101. let {
  102. vid
  103. } = that;
  104. let client=''
  105. // #ifdef MP
  106. client='wx_xcx'
  107. // #endif
  108. if (vid) {
  109. let param={}
  110. param.data = {}
  111. param.data.storeId = vid
  112. param.url = 'v3/seller/front/store/detail';
  113. this.$request(param).then(res => {
  114. if (res.state == 200) {
  115. let vender_detail = res.data;
  116. this.vender_detail = vender_detail
  117. this.store_banner = vender_detail.storeBackdropUrl
  118. } else {
  119. this.$api.msg(res.msg);
  120. }
  121. }).catch((e) => {
  122. //异常处理
  123. })
  124. }
  125. },
  126. //点击二维码分享
  127. handleShare(e) {
  128. this.modalDlg= true
  129. },
  130. // 禁止屏幕滚动
  131. preventTouchMove: function () {},
  132. //关闭弹框
  133. close(e) {
  134. this.modalDlg= false
  135. },
  136. back() {
  137. this.searchList= [],
  138. this.show= false
  139. this.searchPn = 1;
  140. this.search_hasmore = true;
  141. }
  142. }
  143. };
  144. </script>
  145. <style>
  146. /* pages/storeIntroduction/storeIntroduction.wxss */
  147. .store_introduction{
  148. width: 100%;
  149. height: 100%;
  150. background: #F5F5F5;
  151. }
  152. .content{
  153. width: 751rpx;
  154. height: 100%;
  155. background-size: 100%;
  156. background: #F5F5F5;
  157. position: absolute;
  158. left: 50%;
  159. transform: translateX(-50%);
  160. }
  161. .store_top{
  162. width: 100%;
  163. height: 47rpx;
  164. color: #FFFFFF;
  165. display: flex;
  166. align-items: center;
  167. justify-content: flex-end;
  168. padding: 0 18rpx;
  169. box-sizing: border-box;
  170. position: fixed;
  171. top: 0;
  172. }
  173. .store_top text{
  174. font-size:36rpx;
  175. font-family:PingFang SC;
  176. font-weight:500;
  177. color:rgba(255,255,255,1);
  178. line-height:32rpx;
  179. }
  180. .store_top image{
  181. width: 48rpx;
  182. height: 40rpx;
  183. margin-left: 239rpx;
  184. }
  185. .store_con{
  186. width: 100%;
  187. height: 566rpx;
  188. padding-top: 40rpx;
  189. background: #F8F8F8;
  190. padding-left: 21rpx;
  191. box-sizing: border-box;
  192. }
  193. .info_left{
  194. width: 100%;
  195. display: flex;
  196. align-items: center;
  197. }
  198. .info_left .avat{
  199. width:80rpx;
  200. height:80rpx;
  201. border-radius:50%;
  202. margin-right: 16rpx;
  203. }
  204. .info_des{
  205. display: flex;
  206. flex-direction: column;
  207. justify-content: center;
  208. align-items: space-between;
  209. }
  210. .info_top{
  211. display: flex;
  212. align-items: center;
  213. }
  214. .info_top text:nth-of-type(1){
  215. font-size:30rpx;
  216. font-family:PingFang SC;
  217. font-weight:bold;
  218. color:rgba(255,255,255,1);
  219. line-height:32rpx;
  220. margin-right: 20rpx;
  221. }
  222. .info_top image{
  223. width: 40rpx;
  224. height: 40rpx;
  225. margin-right: 14rpx;
  226. }
  227. .info_top text:nth-of-type(2){
  228. width:60rpx;
  229. height:30rpx;
  230. background:rgba(252,28,28,1);
  231. border-radius:15rpx;
  232. font-size:24rpx;
  233. font-family:PingFang SC;
  234. font-weight:400;
  235. color:rgba(255,255,255,1);
  236. line-height: 30rpx;
  237. text-align: center;
  238. }
  239. .info_bot{
  240. display: flex;
  241. align-items: center;
  242. margin-top: 13rpx;
  243. }
  244. .info_bot image{
  245. width: 40rpx;
  246. height: 40rpx;
  247. margin-right: 8rpx;
  248. }
  249. .info_bot text{
  250. font-size:24rpx;
  251. font-family:PingFang SC;
  252. font-weight:500;
  253. color:rgba(255,255,255,1);
  254. line-height:32rpx;
  255. }
  256. .store_code{
  257. width:710rpx;
  258. height:283rpx;
  259. background:rgba(255,255,255,1);
  260. border-radius:15rpx;
  261. margin: 30rpx 0 20rpx;
  262. }
  263. .store_code_top{
  264. /* width: 100%; */
  265. height: 89rpx;
  266. padding: 0 20rpx;
  267. box-sizing: border-box;
  268. display: flex;
  269. justify-content: space-between;
  270. align-items: center;
  271. border-bottom: 1rpx solid #F2F2F2;
  272. border-radius: 15rpx 15rpx 0 0;
  273. }
  274. .store_code_top text{
  275. font-size:28rpx;
  276. font-family:PingFang SC;
  277. font-weight:bold;
  278. color:rgba(45,45,45,1);
  279. line-height:32rpx;
  280. }
  281. .store_code_top image{
  282. width: 35rpx;
  283. height: 35rpx;
  284. }
  285. .store_code_des{
  286. width: 100%;
  287. height: 193rpx;
  288. display: flex;
  289. flex-direction: column;
  290. justify-content: space-between;
  291. padding: 25rpx 0;
  292. box-sizing: border-box;
  293. }
  294. .des_pre{
  295. display: flex;
  296. align-items: center;
  297. padding-left: 20rpx;
  298. box-sizing: border-box;
  299. }
  300. .des_pre text:nth-child(1){
  301. font-size:26rpx;
  302. font-family:PingFang SC;
  303. font-weight:500;
  304. color:rgba(102,102,102,1);
  305. line-height:32rpx;
  306. }
  307. .des_pre text:nth-child(2){
  308. font-size:26rpx;
  309. font-family:PingFang SC;
  310. font-weight:500;
  311. color:#FE811C;
  312. line-height:32rpx;
  313. margin-left: 200rpx;
  314. }
  315. .company_related{
  316. width:710rpx;
  317. /* height:476rpx; */
  318. padding-bottom: 29rpx;
  319. background:rgba(255,255,255,1);
  320. border-radius:15rpx;
  321. }
  322. .related_pre{
  323. /* width: 100%; */
  324. height: 89rpx;
  325. display: flex;
  326. align-items: center;
  327. justify-content: space-between;
  328. margin-left:20rpx;
  329. padding-right: 20rpx;
  330. box-sizing: border-box;
  331. border-bottom: 1rpx solid #F2F2F2;
  332. }
  333. .related_pre text:nth-child(1){
  334. font-size:28rpx;
  335. font-family:PingFang SC;
  336. font-weight:bold;
  337. color:rgba(45,45,45,1);
  338. line-height:32rpx;
  339. }
  340. .related_pre text:nth-child(2){
  341. font-size:26rpx;
  342. font-family:PingFang SC;
  343. font-weight:400;
  344. color:rgba(102,102,102,1);
  345. line-height:32rpx;
  346. width: 500rpx;
  347. white-space: nowrap;
  348. text-overflow: ellipsis;
  349. overflow: hidden;
  350. word-break: break-all;
  351. text-align: right;
  352. }
  353. .related_yewu{
  354. display: flex;
  355. flex-direction: column;
  356. padding: 0 20rpx;
  357. box-sizing: border-box;
  358. }
  359. .related_yewu text:nth-child(1){
  360. font-size:28rpx;
  361. font-family:PingFang SC;
  362. font-weight:bold;
  363. color:rgba(45,45,45,1);
  364. line-height:32rpx;
  365. display: flex;
  366. height: 88rpx;
  367. padding: 32rpx 0 0 0;
  368. box-sizing: border-box;
  369. }
  370. .related_yewu text:nth-child(2){
  371. font-size:26rpx;
  372. font-family:PingFang SC;
  373. font-weight:400;
  374. color:rgba(102,102,102,1);
  375. line-height:36rpx;
  376. }
  377. .mask{
  378. width:750rpx;
  379. height:100%;
  380. position:fixed;
  381. top:0;
  382. left:0;
  383. right: 0;
  384. margin: 0 auto;
  385. background:#000;
  386. z-index:9000;
  387. opacity:0.5;
  388. }
  389. /* 弹出层 */
  390. .modalDlg{
  391. width:620rpx;
  392. height:650rpx;
  393. background:rgba(255,255,255,1);
  394. border:1px solid rgba(187,187,187,1);
  395. border-radius:15px;
  396. position:fixed;
  397. top:359rpx;
  398. left:0;
  399. right:0;
  400. z-index:9999;
  401. margin:0 auto;
  402. display: flex;
  403. flex-direction: column;
  404. align-items:center;
  405. }
  406. .modalDlg text:nth-child(1){
  407. font-size:30rpx;
  408. font-family:PingFang SC;
  409. font-weight:bold;
  410. color:rgba(45,45,45,1);
  411. line-height:32rpx;
  412. margin: 48rpx 0 20rpx;
  413. }
  414. .modalDlg text:nth-child(2){
  415. font-size:26rpx;
  416. font-family:PingFang SC;
  417. font-weight:500;
  418. color:rgba(102,102,102,1);
  419. line-height:32rpx;
  420. }
  421. .modalDlg image{
  422. width:388rpx;
  423. height:389rpx;
  424. margin-top: 59rpx;
  425. }
  426. </style>