gengduozhixun.vue 5.7 KB

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