gengduozhixun.nvue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <view>
  3. <view class="">
  4. <image class="imageV" :src="shangjiaImage" mode="scaleToFill"></image>
  5. <view class="actimgeCT">
  6. <view class="buyBTact">
  7. <image class="actimge" src="/static/images/fanhuiy@3x.png" mode="aspectFit" @click="fanhui"></image>
  8. <view style="margin-left: auto;">
  9. <!-- <image class="actimge" style="margin-right: 20rpx;" src="/static/images/fenxiang@3x.png" mode="aspectFit" @click="shareToggle"></image> -->
  10. <!-- <image class="actimge" :src="shouchangIcon" mode="aspectFit" @click="shouchang"></image> -->
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. <weizhimap class="mapview" height="500" :covers="covers"></weizhimap>
  16. <view class="contentVv">
  17. <view style="display: flex;flex-direction: column;">
  18. <text class="posname">{{posName}}</text>
  19. <text class="drktext">{{i18n('mend.jyxkzheng')}}: {{mendianMs.hygienePermit}}</text>
  20. </view>
  21. <view class="viewinrow" style="padding-top: 16rpx;">
  22. <image style="width: 36rpx;" src="/static/images/time@3x.png" mode="widthFix"></image>
  23. <text style="font-size: 30rpx;color: black;padding-left: 6rpx;">{{i18n('mend.yingyeshijan')}}</text>
  24. </view>
  25. <view style="display: flex;flex-direction: column;padding-top: 16rpx;">
  26. <view class="contentColumn" v-for="(Ytime,index) in yingyeTime">
  27. <view class="contentInRowL">
  28. <text class="drktext">{{Ytime.startTime}}</text>
  29. <text class="drktext"> — </text>
  30. <text class="drktext">{{Ytime.endTime}}</text>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="viewinrow" style="margin-top: 16rpx;">
  35. <image style="width: 46rpx;" src="/static/images/Rdizhil60@3x.png" mode="widthFix"></image>
  36. <text class="addrText">{{mendianMs.address}}</text>
  37. </view>
  38. </view>
  39. <view>
  40. <!-- 分享示例 -->
  41. <uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
  42. <uni-popup-share v-on:select="fenxiang"></uni-popup-share>
  43. </uni-popup>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import api from "@/pages/api/api.js";
  49. export default {
  50. data() {
  51. return {
  52. mendid:'',
  53. userid:0,
  54. mendianMs:[],
  55. posName:'',
  56. shangjiaImage:'',
  57. isShouchang:0,
  58. shouchangIcon:'/static/images/faver@3x.png',
  59. option: {},
  60. covers: '',
  61. latitude:'',
  62. longitude:'',
  63. yingyeTime:[]
  64. }
  65. },
  66. onLoad(option) {
  67. this.mendid = option.mendid;
  68. },
  69. onShow() {
  70. this.getmendianDetail(this.mendid);
  71. },
  72. methods: {
  73. i18n(str){
  74. return getApp().globalData.$t(str);
  75. },
  76. fanhui(){
  77. uni.navigateBack();
  78. },
  79. shareToggle() {
  80. this.$refs.share.open()
  81. },
  82. fenxiang(item,index){
  83. this.option={
  84. //绘制海报内容
  85. //codeUrl: 'https://pic1.zhimg.com/80/v2-2714df42147132464a71af391ed04be4_720w.jpg', //小程序太阳码
  86. codeUrl: '/static/defimages/erweim.png', //小程序太阳码
  87. coverUrl: '/static/defimages/ddd.png', //题库图片
  88. headUrl: '/static/logo.png', //头像
  89. //bgUrl: 'https://pic3.zhimg.com/v2-8fbde0f9ac6a19a23aa839e73394618a_b.jpg', //图片背景填充,和 fillStyle 只能传一个,bgUrl 优先级高于 fillStyle
  90. fillStyle: '#00A6FF', //纯色背景填充颜色
  91. nickName: '跑腿王', //授权登录的用户名
  92. miniName: '不出门吃遍全世界', //小程序名称
  93. tkName:this.mendianMs.posName, //题库名称
  94. tkAuthor:'门店介绍', //题库作者
  95. tkType: '外送', //题库类型
  96. cost: '自取', //是否需要收费 免费/付费
  97. isPub: '堂食' //公开 还是 私有
  98. };
  99. this.$refs.draw.share_qrcode(this.option);
  100. },
  101. shouchang(){
  102. if(this.isShouchang==0){
  103. this.isShouchang=1;
  104. this.shouchangIcon='/static/images/faverr@3x.png'
  105. }
  106. else{
  107. this.isShouchang=0;
  108. this.shouchangIcon='/static/images/faver@3x.png'
  109. }
  110. },
  111. getmendianDetail(id){
  112. api('getmendianDetail',{
  113. id:id
  114. },r=>{
  115. console.log('getmendianDetail:',r);
  116. this.mendianMs=r.data.data;
  117. this.shangjiaImage= getApp().globalData.baseImagurl + this.mendianMs.image;
  118. this.userid=this.mendianMs.userId;
  119. this.posName=this.mendianMs.posName;
  120. this.covers=[{
  121. latitude: this.mendianMs.latitude,
  122. longitude: this.mendianMs.longitude,
  123. iconPath: '/static/images/Rdizhil100@3x.png'
  124. }];
  125. this.latitude=this.mendianMs.latitude;
  126. this.longitude=this.mendianMs.longitude;
  127. this.getYingyeshijian(id);
  128. },failc=>{
  129. //console.log('getadvertis----',failc)
  130. })
  131. },
  132. //营业时间====================
  133. getYingyeshijian(mid){//查询
  134. api('getHours',{
  135. mdId:mid,
  136. },res=>{
  137. console.log('getHours',res)
  138. if(res.data.code==200){
  139. this.yingyeTime=res.data.data;
  140. }
  141. },failc=>{
  142. //console.log('getadvertis----',failc)
  143. })
  144. },
  145. }
  146. }
  147. </script>
  148. <style>
  149. /* page{
  150. background-color: #F2F3F7;
  151. } */
  152. .contentVv{
  153. width: 700upx;
  154. margin-left:25upx;
  155. flex-direction: column;
  156. height:400rpx;
  157. }
  158. .viewinrow{
  159. display: flex;
  160. flex-direction: row;
  161. align-items: center;
  162. width: 740upx;
  163. }
  164. .imageV{
  165. width: 750upx;
  166. height: 400rpx;
  167. background-color:floralwhite;
  168. border-width: 1rpx;
  169. border-color: lightgray;
  170. }
  171. .actimgeCT{
  172. position: fixed;
  173. width: 740upx;
  174. left: 5upx;
  175. top: 100rpx;
  176. z-index: 999;
  177. }
  178. .buyBTact{
  179. display:flex;
  180. flex-direction: row;
  181. justify-content:space-between;
  182. align-items: center;
  183. width: 740upx;
  184. }
  185. .actimge{
  186. width: 60rpx;
  187. height: 60rpx;
  188. }
  189. .posname{
  190. font-size: 32rpx;
  191. color: black;
  192. }
  193. .drktext{
  194. font-size: 28rpx;
  195. color: darkgray;
  196. }
  197. .mapview{
  198. display: flex;
  199. width: 750upx;
  200. height: 500rpx;
  201. }
  202. .addrText{
  203. font-size: 26rpx;
  204. color: black;
  205. padding-left: 6rpx;
  206. width: 630upx;
  207. }
  208. </style>