Просмотр исходного кода

1.添加判断是否为最新版本 2.电影票详情,实际支付价格显示错误 3.商家店铺详情

DaMowang 2 лет назад
Родитель
Сommit
f0af26b6b3

+ 48 - 40
src/components/uqrcode/uqrcode.vue

@@ -1,52 +1,60 @@
 <template>
 <template>
-  <canvas canvas-id="qrcode" :style="{width: size * 2 +'rpx', height: size * 2 + 'rpx'}"></canvas>
+    <div class="con">
+        <canvas v-if="!canvasSrc" canvas-id="qrcode" :style="{width: size +'px', height: size + 'px'}"></canvas>
+        <image :src="canvasSrc" v-if="canvasSrc" :style="{width: size +'px', height: size + 'px'}"></image>
+    </div>
 </template>
 </template>
-
 <script>
 <script>
 import UQRCode from "uqrcodejs";
 import UQRCode from "uqrcodejs";
-var qr = new UQRCode();
 export default {
 export default {
-  name: "",
-  props: {
-    size: {
-        type: Number,
-        default: 200
+    name: "",
+    props: {
+        size: {
+            type: Number,
+            default: 200
+        },
+        code: {
+            type: String,
+            default: undefined
+        },
     },
     },
-    code: {
-        type: String,
-        default: undefined
+    components: {},
+    data() {
+        return {
+            ctx: null,
+            canvasSrc: ""
+        };
     },
     },
-  },
-  components: {},
-  data() {
-    return {};
-  },
-  methods: {
-    createCode(va) {
-      // 获取uQRCode实例
-      var qr = new UQRCode();
-      // 设置二维码内容
-      qr.data = va;
-      // 设置二维码大小,必须与canvas设置的宽高一致
-      qr.size = this.size;
-      // 调用制作二维码方法
-      qr.make();
-      // 获取canvas上下文
-      var canvasContext = uni.createCanvasContext("qrcode", this); // 如果是组件,this必须传入
-      // 设置uQRCode实例的canvas上下文
-      qr.canvasContext = canvasContext;
-      // 调用绘制方法将二维码图案绘制到canvas上
-      qr.drawCanvas();
+    methods: {
+        createCode(va) {
+            let qr = new UQRCode();
+            qr.data = va;
+            qr.size = this.size;
+            qr.make();
+            let canvasContext = uni.createCanvasContext("qrcode", this); // 如果是组件,this必须传入
+            qr.canvasContext = canvasContext;
+            let that = this;
+            qr.drawCanvas();
+            setTimeout(() => {
+                uni.canvasToTempFilePath({
+                    canvasId: 'qrcode',
+                    success(res) {
+                        that.canvasSrc = res.tempFilePath;
+                    },
+                    fail(err){
+                        console.log("canvasToTempFilePath", err);
+                    }
+                },that)
+            }, 500);
+        },
     },
     },
-  },
-  mounted() {
-    if(this.code) this.createCode(this.code);
-  },
-  watch: {},
-  computed: {},
-  filters: {},
+    mounted() {
+        if (this.code) this.createCode(this.code);
+    },
+    watch: {},
+    computed: {},
+    filters: {},
 };
 };
 </script>
 </script>
-
 <style scoped lang='scss'>
 <style scoped lang='scss'>
 </style>
 </style>

+ 1 - 3
src/main.js

@@ -47,6 +47,4 @@ App.mpType = 'app'
 const app = new Vue({
 const app = new Vue({
     ...App
     ...App
 })
 })
-app.$mount()
-
-console.log('版本构建时间:', BUILD_TIME);
+app.$mount()

+ 28 - 23
src/pagesB/cinema/cinemaTicket.vue

@@ -22,13 +22,13 @@
                 <div class="codebar" v-if="ticket.orderStatus=='GENERATE_SUCCESS'">
                 <div class="codebar" v-if="ticket.orderStatus=='GENERATE_SUCCESS'">
                     <swiper class="swiper" circular>
                     <swiper class="swiper" circular>
                         <swiper-item v-for="(i,s) in ticket.ticketCode" :key="s">
                         <swiper-item v-for="(i,s) in ticket.ticketCode" :key="s">
-                            <block v-for="(a,b) in i.code" :key="b" v-show="a.text=='取票码'">
+                            <div v-for="(a,b) in i.code" :key="b" v-show="a.text=='取票码'" class="code-item">
                                 <Uqrcode ref="uqcode" :code="a.value" :size="150" :class="['code-img',HaveBeenShown?'opacity':'']" />
                                 <Uqrcode ref="uqcode" :code="a.value" :size="150" :class="['code-img',HaveBeenShown?'opacity':'']" />
                                 <div class="ticketCode">取票码:<span class="dinB">{{ a.value }}</span></div>
                                 <div class="ticketCode">取票码:<span class="dinB">{{ a.value }}</span></div>
-                            </block>
+                                <span class="ico" v-show="HaveBeenShown">已放映</span>
+                            </div>
                         </swiper-item>
                         </swiper-item>
                     </swiper>
                     </swiper>
-                    <span class="ico" v-show="HaveBeenShown">已放映</span>
                 </div>
                 </div>
                 <div class="await" v-else-if="ticket.orderStatus=='DEALING'">
                 <div class="await" v-else-if="ticket.orderStatus=='DEALING'">
                     <img class="await_img" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/416c89124df9a69bb1cbfb55b1007b086031a57fpng" alt="">
                     <img class="await_img" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/416c89124df9a69bb1cbfb55b1007b086031a57fpng" alt="">
@@ -237,17 +237,35 @@ export default {
 }
 }
 
 
 .qupiao {
 .qupiao {
-    position: relative;
+
+    .opacity {
+        opacity: 0.25;
+    }
+
+    .swiper {
+        height: 360rpx;
+
+        .ticketCode {
+            font-size: 25rpx;
+            margin-top: 20rpx;
+            text-align: center;
+
+            .dinB {
+                font-size: 28rpx;
+            }
+        }
+    }
+
+    .code-item{
+        position: relative;
+        height: 360rpx;
+    }
     .code-img {
     .code-img {
         display: flex;
         display: flex;
         flex-direction: row;
         flex-direction: row;
         justify-content: center;
         justify-content: center;
         margin: 0 auto;
         margin: 0 auto;
     }
     }
-
-    .opacity {
-        opacity: 0.25;
-    }
     .ico{
     .ico{
         padding: 5rpx 16rpx;
         padding: 5rpx 16rpx;
         color: #EB5A5F;
         color: #EB5A5F;
@@ -257,8 +275,9 @@ export default {
         font-weight: bold;
         font-weight: bold;
         position: absolute;
         position: absolute;
         left: calc(50% - 65rpx);
         left: calc(50% - 65rpx);
-        top: 210rpx;
+        top: 132rpx;
     }
     }
+
     .await{
     .await{
         text-align: center;
         text-align: center;
         .await_img{
         .await_img{
@@ -348,18 +367,4 @@ export default {
         border-left: 6rpx solid #EB5A5F;
         border-left: 6rpx solid #EB5A5F;
     }
     }
 }
 }
-
-.swiper {
-    height: 360rpx;
-
-    .ticketCode {
-        font-size: 25rpx;
-        margin-top: 30rpx;
-        text-align: center;
-
-        .dinB {
-            font-size: 28rpx;
-        }
-    }
-}
 </style>
 </style>

+ 52 - 1
src/pagesC/settledMerchant/merchantDetail.vue

@@ -21,6 +21,25 @@
                 <div class="r" @click="copyText(detail.user_mobile)"><span class="iconfont">&#xe9d3;</span>电话:{{detail.user_mobile}}<span class="iconfont copy">&#xe602;</span></div>
                 <div class="r" @click="copyText(detail.user_mobile)"><span class="iconfont">&#xe9d3;</span>电话:{{detail.user_mobile}}<span class="iconfont copy">&#xe602;</span></div>
             </div>
             </div>
         </div>
         </div>
+            <div class="card detail">
+                <div class="tit">关联信息</div>
+                <view class="label">
+                    <view class="title">开户银行:</view>
+                    <view class="nums">{{ detail.bank }}</view>
+                </view>
+                <view class="label">
+                    <view class="title">开户名称:</view>
+                    <view class="nums">{{ detail.account_name }}</view>
+                </view>
+                <view class="label">
+                    <view class="title">银行卡号:</view>
+                    <view class="nums">{{ detail.card_no }}</view>
+                </view>
+                <view class="label flex_r flex_js">
+                    <view class="title">店铺地址:</view>
+                    <view class="nums ellipsis2">{{ detail.address }}</view>
+                </view>
+            </div>
     </div>
     </div>
 </template>
 </template>
 
 
@@ -39,7 +58,7 @@ export default {
     },
     },
     methods: {
     methods: {
         loadData(){
         loadData(){
-            post("v1/merchant/detail", { shop_id: this.shopID }).then((res) => {
+            post("v1/merchant/shopDetail", { shop_id: this.shopID }).then((res) => {
                 if (res.code == 0) {
                 if (res.code == 0) {
                     let da = res.data;
                     let da = res.data;
                     if(da.atlas) da.atlas = JSON.parse(da.atlas)
                     if(da.atlas) da.atlas = JSON.parse(da.atlas)
@@ -120,4 +139,36 @@ export default {
         }
         }
     }
     }
 }
 }
+.card {
+    background-color: #fff;
+    border-radius: 16rpx;
+    margin-top: 30rpx;
+    padding: 28rpx 30rpx;
+    font-size: 32rpx;
+
+    .tit {
+        height: 30rpx;
+        line-height: 30rpx;
+        font-size: 30rpx;
+        margin-bottom: 30rpx;
+        padding-left: 12rpx;
+        border-left: 6rpx solid #EB5A5F;
+    }
+}
+.detail {
+    .label {
+        margin-top: 15rpx;
+    }
+
+    .title,
+    .nums {
+        display: inline-block;
+        font-size: 26rpx;
+    }
+
+    .title {
+        color: #888;
+        width: 160rpx;
+    }
+}
 </style>
 </style>

+ 1 - 1
src/pagesC/settledMerchant/myShop.vue

@@ -72,7 +72,7 @@ export default {
         },
         },
         // 跳转到店铺详情
         // 跳转到店铺详情
         goDetail(id) {
         goDetail(id) {
-            // this.goto("/pagesC/settledMerchant/merchantDetail", { id })
+            this.goto("/pagesC/settledMerchant/merchantDetail", { id })
         },
         },
         showcode(da) {
         showcode(da) {
             if(da.id) this.$refs.createCode.showCanvas(da)
             if(da.id) this.$refs.createCode.showCanvas(da)

+ 2 - 2
src/request/config.js

@@ -15,6 +15,6 @@ if (process.env.UNI_PLATFORM === "h5") {
 export default apis == 1 ? {
 export default apis == 1 ? {
 	Hhost: "https://shop-api.haocha13.cn/",
 	Hhost: "https://shop-api.haocha13.cn/",
 } : {
 } : {
-	Hhost: "https://shop-api.haocha13.cn/",  //正式接口
-	// Hhost: "https://test-api.haocha13.cn/",
+	// Hhost: "https://shop-api.haocha13.cn/",  //正式接口
+	Hhost: "https://test-api.haocha13.cn/",
 }
 }

+ 3 - 0
src/utils/run_now.js

@@ -1,5 +1,8 @@
 import { post, getStableAccessToken } from "@/request/api.js";
 import { post, getStableAccessToken } from "@/request/api.js";
 import { setCache, getCache } from "@/utils/storage.js"
 import { setCache, getCache } from "@/utils/storage.js"
+
+console.log('版本构建时间:', BUILD_TIME);
+
 // 此执行为获取实名认证的开关状态
 // 此执行为获取实名认证的开关状态
 post("v1/isAuthentication").then(res => {
 post("v1/isAuthentication").then(res => {
     if (res.code === 0) {
     if (res.code === 0) {