|
@@ -10,8 +10,7 @@
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="list" v-for="(item,index) in shoplist" :key="index">
|
|
<view class="list" v-for="(item,index) in shoplist" :key="index">
|
|
- <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''"
|
|
|
|
- mode=""></image>
|
|
|
|
|
|
+ <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode=""></image>
|
|
<view class="name">
|
|
<view class="name">
|
|
{{item.name}}
|
|
{{item.name}}
|
|
</view>
|
|
</view>
|
|
@@ -37,20 +36,17 @@
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
<view class="list-scroll-view">
|
|
<view class="list-scroll-view">
|
|
<view class="second_1">
|
|
<view class="second_1">
|
|
- <view :class="['list',condActive==index?'activeList':'']"
|
|
|
|
- v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
|
|
|
|
|
|
+ <view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
|
|
<view class="name">
|
|
<view class="name">
|
|
{{item.name}}
|
|
{{item.name}}
|
|
</view>
|
|
</view>
|
|
<view class="icon">
|
|
<view class="icon">
|
|
<view class="icon_1">
|
|
<view class="icon_1">
|
|
- <text :class="['iconfont',item.shangActive]"
|
|
|
|
- v-if="condActive==index&&shang=='1'"></text>
|
|
|
|
|
|
+ <text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
|
|
<text :class="['iconfont',item.shang]" v-else></text>
|
|
<text :class="['iconfont',item.shang]" v-else></text>
|
|
</view>
|
|
</view>
|
|
<view class="icon_1">
|
|
<view class="icon_1">
|
|
- <text :class="['iconfont', item.xiaActive]"
|
|
|
|
- v-if="condActive==index&&xia=='-1'"></text>
|
|
|
|
|
|
+ <text :class="['iconfont', item.xiaActive]" v-if="condActive==index&&xia=='-1'"></text>
|
|
<text :class="['iconfont', item.xia]" v-else></text>
|
|
<text :class="['iconfont', item.xia]" v-else></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -58,8 +54,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="second_2">
|
|
<view class="second_2">
|
|
<view class="list" v-for="(item,index) in list" :key="index">
|
|
<view class="list" v-for="(item,index) in list" :key="index">
|
|
- <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''"
|
|
|
|
- mode=""></image>
|
|
|
|
|
|
+ <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode=""></image>
|
|
<view class="sale" v-if="item.is_sale==true">
|
|
<view class="sale" v-if="item.is_sale==true">
|
|
<text>已售尽</text>
|
|
<text>已售尽</text>
|
|
</view>
|
|
</view>
|
|
@@ -104,9 +99,10 @@
|
|
<view class="second_2">
|
|
<view class="second_2">
|
|
<view class="second_2_bor" @tap="saveQrcode">
|
|
<view class="second_2_bor" @tap="saveQrcode">
|
|
<!-- <image class="image" :src="info.qrcode&&info.qrcode.length>0?info.qrcode[0].url:''" mode=""></image> -->
|
|
<!-- <image class="image" :src="info.qrcode&&info.qrcode.length>0?info.qrcode[0].url:''" mode=""></image> -->
|
|
- <tki-qrcode cid="qrcode1" ref="qrcode" :val="val" :size="size" :unit="unit"
|
|
|
|
|
|
+ <!-- <tki-qrcode cid="qrcode1" ref="qrcode" :val="val" :size="size" :unit="unit"
|
|
:background="background" :foreground="foreground" :pdground="pdground"
|
|
:background="background" :foreground="foreground" :pdground="pdground"
|
|
- :onval="onval" :loadMake="loadMake" :usingComponents="true" @result="qrR" />
|
|
|
|
|
|
+ :onval="onval" :loadMake="loadMake" :usingComponents="true" @result="qrR" /> -->
|
|
|
|
+ <canvas class="qrcode" canvas-id="myQrcode"></canvas>
|
|
</view>
|
|
</view>
|
|
<view class="txt">
|
|
<view class="txt">
|
|
店铺二维码
|
|
店铺二维码
|
|
@@ -134,11 +130,10 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
|
|
|
|
|
|
+ // import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
|
|
|
|
+ import QRCode from '@/common/weapp-qrcode.js'
|
|
export default {
|
|
export default {
|
|
- components: {
|
|
|
|
- tkiQrcode
|
|
|
|
- },
|
|
|
|
|
|
+ components: {},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
val: '', // 要生成的二维码值
|
|
val: '', // 要生成的二维码值
|
|
@@ -217,7 +212,6 @@
|
|
onLoad: async function(e) {
|
|
onLoad: async function(e) {
|
|
const that = this;
|
|
const that = this;
|
|
that.$set(that, `id`, e.id || '');
|
|
that.$set(that, `id`, e.id || '');
|
|
- that.$set(that, `val`, `https://broadcast.waityou24.cn/shopinfo?id=${e.id}`);
|
|
|
|
await that.watchLogin();
|
|
await that.watchLogin();
|
|
await that.search();
|
|
await that.search();
|
|
await that.searchOther();
|
|
await that.searchOther();
|
|
@@ -260,6 +254,8 @@
|
|
that.searchShopMarket();
|
|
that.searchShopMarket();
|
|
// 查询全部商品
|
|
// 查询全部商品
|
|
that.searchAll();
|
|
that.searchAll();
|
|
|
|
+ // 创建二维码
|
|
|
|
+ that.createQrcode(that.info);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 查询店铺商品
|
|
// 查询店铺商品
|
|
@@ -294,6 +290,21 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 创建二维码
|
|
|
|
+ createQrcode(e) {
|
|
|
|
+ // console.log(e);
|
|
|
|
+ const that = this;
|
|
|
|
+ const url = `${that.$config.serverUrl}/shopinfo?id=${e._id}`;
|
|
|
|
+ var qrcode = new QRCode(`myQrcode`, {
|
|
|
|
+ text: url,
|
|
|
|
+ width: 110,
|
|
|
|
+ height: 110,
|
|
|
|
+ padding: 3,
|
|
|
|
+ colorDark: "#000000",
|
|
|
|
+ colorLight: "#ffffff",
|
|
|
|
+ correctLevel: QRCode.CorrectLevel.L,
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 购买
|
|
// 购买
|
|
toBuy(item) {
|
|
toBuy(item) {
|
|
if (item && item._id) {
|
|
if (item && item._id) {
|