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

.

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