提交 738dc14f 编写于 作者: zhangzhiwei's avatar zhangzhiwei

.

上级 5287b8e4
......@@ -49,7 +49,7 @@
}
}
console.log(window.location.port,'window.location.port ');
uni.setStorageSync('subdomain',(window.location.port === '3000'||window.location.host === 'etaoh5dz-pre.edstao.com')?'alisa1':'jinyanxia')
uni.setStorageSync('subdomain',(window.location.port === '3000'||window.location.host === 'etaoh5dz-pre.edstao.com')?'jinyanxia':'jinyanxia')
});
onShow(() => {
console.log("App Show");
......
......@@ -4,6 +4,11 @@ export default {
return request({
url: "/api/product/dzResource",
});
},
storeInfo(data) {
return request({
url: "/api/store/info",data
});
},
indexModule() {
return request({
......
......@@ -6,6 +6,12 @@ export default {
url: "/api/product/dzResource",
});
},
storeInfo() {
return request({
url: "/api/store/info",
data
});
},
indexModule() {
return request({
url: "/api/index/module",
......
......@@ -18,14 +18,14 @@
<view class="card-div">
<van-row gutter="12" class="pd-h-px-10" style="padding-top: 26rpx">
<van-col span="6" >
<van-image style="border-radius: 50%;border: 2rpx solid #DDDDDD;width: 140rpx;height: 140rpx" radius="20rpx" src="../../static/img/dz/jyx-logo.jpg"
<van-image style="border-radius: 50%;border: 2rpx solid #DDDDDD;width: 140rpx;height: 140rpx" radius="20rpx" :src="state.useInfo.headImg"
/>
</van-col>
<van-col span="18" style="text-align: left">
<view style="font-size: 34rpx;font-weight: bold">金燕侠科技旗舰店</view>
<view style="color: #666666;font-size: 26rpx;letter-spacing: 1rpx;margin-top: 6rpx">浙江省杭州市杭州市莫干山路1418-66号3幢12层 1203 室</view>
<view style="font-size: 26rpx;margin-top: 4px"> <van-icon name="manager-o" color="#707070" size="16px" style="margin-right: 10rpx"/>金燕侠 <span style="margin: 0 16rpx;color: #DDDDDD">|</span><van-icon name="phone-o" color="#707070" size="16px" /> 13613613666 <span style="float: right;border-radius: 8rpx;
border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBtn(13613613666)">拨打</span> </view>
<view style="font-size: 34rpx;font-weight: bold">{{state.useInfo.storeName}}</view>
<view style="color: #666666;font-size: 26rpx;letter-spacing: 1rpx;margin-top: 6rpx">{{state.useInfo.areaAddress}}</view>
<view style="font-size: 26rpx;margin-top: 4px"> <van-icon name="manager-o" color="#707070" size="16px" style="margin-right: 10rpx"/>{{state.useInfo.contacts}} <span style="margin: 0 16rpx;color: #DDDDDD">|</span><van-icon name="phone-o" color="#707070" size="16px" /> {{state.useInfo.contactPhone}} <span style="float: right;border-radius: 8rpx;
border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBtn(state.useInfo.contactPhone)">拨打</span> </view>
</van-col>
</van-row>
<van-row class="pd-h-px-10 dianpu" >
......@@ -137,6 +137,7 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt
import ShopCard from '@/components/ShopCard.vue';
import popupBanner from '@/components/tool/popupBanner.vue';
const state = reactive({
useInfo:{},
show:false,
actHotSell:null,
actEight:null,
......@@ -179,6 +180,7 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt
})
const isAPP = ref(false)
onMounted(() => {
getStoreInfo()
window._wx.miniProgram.getEnv((res) => {
if (res.miniprogram) {
isAPP.value=true
......@@ -190,6 +192,11 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt
state.inited = true
}, 1000)
});
function getStoreInfo() {
api.storeInfo({ link: uni.getStorageSync("subdomain") }).then(res=>{
state.useInfo=res
})
}
function goUrl(type) {
if(type==1){
uni.navigateTo({
......
......@@ -3,37 +3,73 @@
<van-sticky>
<view class="justify-center bg-white sh pd-px-20 mg-b-20" >
<van-icon class="top-left" name="arrow-left" @tap="goBack" />
<view class="top-center">店铺名片</view>
<view class="top-center" >店铺名片</view>
</view>
</van-sticky>
<view id="aa" style="position: relative;margin: 20rpx 30rpx">
<van-image src="../../static/haibao2.png"/>
<!--<view style="position: absolute;top: 120px;left: 450rpx">-->
<!--<van-image src="../../static/img/dz/jyx-logo.jpg" alt=""/>-->
<!--</view>-->
<view id="aa" style="position: relative;margin: 20rpx 30rpx" v-if="!state.temIMg">
<van-image src="../../static/img/dz/info-bg.png"/>
<view style="position: absolute; left: 50%;top: 50%;transform: translate(-50%, -50%);">
<view style="text-align: center">
<van-image style="border-radius: 50%;border: 2rpx solid #DDDDDD;width: 140rpx;height: 140rpx" radius="20rpx" :src="state.useInfo.headImg"
/>
<view style="font-size: 34rpx;font-weight: bold;margin-top: 20rpx">{{state.useInfo.storeName}}</view>
</view>
<view class="e-card">
<van-row class="pd-h-px-10">
<van-col span="2" >
<van-icon name="phone-o" />
</van-col>
<van-col span="18" style="text-align: left;font-size: 26rpx;">
{{state.useInfo.contactPhone}}
</van-col>
</van-row>
<van-row class="pd-h-px-10" style="margin-top: 10rpx">
<van-col span="2" >
<van-icon name="location-o" />
</van-col>
<van-col span="22" style="text-align: left;font-size: 26rpx;font-weight: 400">
{{state.useInfo.areaAddress}}
</van-col>
</van-row>
<van-row class="e-logo" >
<van-image style="width: 300rpx;height: 300rpx"
:src="state.useInfo.appletCode" />
</van-row>
</view>
<view class="e-text">
长按或扫码进入小程序商城
</view>
</view>
</view>
<view style="margin: 20rpx 30rpx" v-else>
<img :src="state.temIMg" alt="" style="width: 100%">
</view>
<!--<view style="margin: 20rpx 30rpx">-->
<!--<img :src="state.temIMg" alt="" style="width: 100%">-->
<!--</view>-->
</view>
</template>
<script setup lang="ts">
import { reactive } from 'vue';
import api from "@/api";
import { reactive ,onMounted} from 'vue';
const state = reactive({
temIMg:''
temIMg:'',
useInfo:{},
})
import html2Canvas from "html2canvas"
import { PageUtils } from '@/utils/utils';
function goBack() {
PageUtils.goBack()
}
onMounted(()=>{
getStoreInfo()
})
function getStoreInfo() {
api.storeInfo({ link: uni.getStorageSync("subdomain") }).then(res=>{
state.useInfo=res
})
}
// 再画卡片
function drawBg() {
const ctx = uni.createCanvasContext('cardbg')
ctx.drawImage('../../static/haibao1.png', 0, 0, 320, 314)
ctx.draw()
// 等待1s画完卡片
setTimeout(() => {
const cardDom = document.getElementById("aa")
......@@ -46,6 +82,32 @@
</script>
<style lang="scss" scoped>
.e-logo {
display: flex;
justify-content: center;
margin-top: 100rpx;
text-align: center;
width: 500rpx;
}
.e-text{
margin-top: 40rpx;
height: 24rpx;
font-weight: 400;
font-size: 26rpx;
color: #606266;
line-height: 24rpx;
text-align: center;
font-style: normal;
}
.e-card{
margin-top: 50rpx;
padding: 30rpx 20rpx;
width: 500rpx;
height: 586rpx;
background: #FFFFFF;
box-shadow: 0rpx 8rpx 24rpx 4rpx rgba(0,0,0,0.06);
border-radius: 16rpx;
}
.card{
background: #ffffff;
height: 400rpx;
......
......@@ -9,17 +9,17 @@
<view class="card" id="capture">
<van-row gutter="12" class="pd-h-px-10" style="padding-top: 26rpx">
<van-col span="6" >
<van-image style="border-radius: 50%;border: 2rpx solid #DDDDDD;width: 140rpx;height: 140rpx" radius="20rpx" src="../../static/img/dz/jyx-logo.jpg"
<van-image style="border-radius: 50%;border: 2rpx solid #DDDDDD;width: 140rpx;height: 140rpx" radius="20rpx" :src="state.useInfo.headImg"
/>
</van-col>
<van-col span="18" style="text-align: left">
<view style="font-size: 34rpx;font-weight: bold">金燕侠科技旗舰店</view>
<view style="font-size: 26rpx;margin-top: 4px"> <van-icon name="manager-o" color="#707070" size="16px" style="margin-right: 10rpx"/>金燕侠 <span style="margin: 0 16rpx;color: #DDDDDD">|</span><van-icon name="phone-o" color="#707070" size="16px" /> 13613613666 <span style="float: right;border-radius: 8rpx;
border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBtn(13613613666)">拨打</span> </view>
<view style="font-size: 34rpx;font-weight: bold">{{state.useInfo.storeName}}</view>
<view style="font-size: 26rpx;margin-top: 4px"> <van-icon name="manager-o" color="#707070" size="16px" style="margin-right: 10rpx"/>{{state.useInfo.contacts}} <span style="margin: 0 16rpx;color: #DDDDDD">|</span><van-icon name="phone-o" color="#707070" size="16px" /> {{state.useInfo.contactPhone}} <span style="float: right;border-radius: 8rpx;
border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBtn(state.useInfo.contactPhone)">拨打</span> </view>
</van-col>
</van-row>
<van-row gutter="12" class="pd-h-px-10" style="padding-top: 26rpx">
<view style="color: #666666;font-size: 26rpx;letter-spacing: 1rpx;margin-top: 6rpx"><van-icon name="location-o" />浙江省杭州市杭州市莫干山路1418-66号3幢12层 1203 室</view>
<view style="color: #666666;font-size: 26rpx;letter-spacing: 1rpx;margin-top: 6rpx"><van-icon name="location-o" />{{state.useInfo.areaAddress}}</view>
</van-row>
<!--<view class="pd-h-px-10" style="padding-top: 40rpx;text-align: center">-->
<!--<van-button style="width: 90%" icon="photo-o" type="primary" @click="goto('/pages/index/userCard')">店铺海报</van-button>-->
......@@ -29,11 +29,24 @@ border: 1rpx solid #EBA926;color: #EBA926;padding: 2rpx 10rpx" @click="goPhoneBt
</template>
<script setup lang="ts">
import api from "@/api";
import { reactive ,onMounted} from 'vue';
import html2Canvas from "html2canvas"
import { PageUtils } from '@/utils/utils';
function goBack() {
PageUtils.goBack()
}
const state = reactive({
useInfo:{},
})
onMounted(()=>{
getStoreInfo()
})
function getStoreInfo() {
api.storeInfo({ link: uni.getStorageSync("subdomain") }).then(res=>{
state.useInfo=res
})
}
function goto(url: any) {
url && uni.navigateTo({ url })
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册