no message
@@ -4,7 +4,7 @@
|
|||||||
{
|
{
|
||||||
"customPlaygroundType" : "local",
|
"customPlaygroundType" : "local",
|
||||||
"packageName" : "com.trustbridge.mm",
|
"packageName" : "com.trustbridge.mm",
|
||||||
"playground" : "standard",
|
"playground" : "custom",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
<template>
|
||||||
|
<up-popup
|
||||||
|
:show="show"
|
||||||
|
:round="24"
|
||||||
|
:closeOnClickOverlay="false"
|
||||||
|
mode="center"
|
||||||
|
>
|
||||||
|
<view class="home-popup-view" v-if="dataObj">
|
||||||
|
<view class="home-popup-head">
|
||||||
|
<image src="/static/new/logo.png" class="logo-img"></image>
|
||||||
|
<text class="text-28 text-zu" style="margin-left:14rpx">信任桥</text>
|
||||||
|
<text class="text-28 text-fu" style="margin-left:14rpx">分享商品</text>
|
||||||
|
</view>
|
||||||
|
<view class="home-popup-mid">
|
||||||
|
<image :src="dataObj.goodsGraph.split(',')[0]"></image>
|
||||||
|
</view>
|
||||||
|
<text class="text-32 text-zi text-bold" style="margin-top:16rpx">¥<text class="text-44">{{dataObj.minPrice}}</text>
|
||||||
|
</text>
|
||||||
|
<text class="text-32 text-zu1 text-overflow1" style="margin-top:16rpx">{{dataObj.name}}</text>
|
||||||
|
<MyBtn text="查看详情" wd="100%" br="44rpx" @ok="onOk" style="margin-top:24rpx"></MyBtn>
|
||||||
|
</view>
|
||||||
|
</up-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Func from '/utils/func'
|
||||||
|
import MyBtn from '@/components/common/my-btn.vue'
|
||||||
|
export default {
|
||||||
|
components:{MyBtn},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
show:{
|
||||||
|
type:Boolean,
|
||||||
|
default:false
|
||||||
|
},
|
||||||
|
dataObj:{
|
||||||
|
type:Object,
|
||||||
|
default:()=>{}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onOk(){
|
||||||
|
this.$emit('jumpShop');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.home-popup-view{
|
||||||
|
width:620rpx;
|
||||||
|
height:1000rpx;
|
||||||
|
min-height:1000rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
position: relative;
|
||||||
|
padding: 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.home-popup-mid{
|
||||||
|
width:100%;
|
||||||
|
height:540rpx;
|
||||||
|
min-height:540rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-top:28rpx;
|
||||||
|
image{
|
||||||
|
width:100%;
|
||||||
|
height:100%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.home-popup-head{
|
||||||
|
width:100%;
|
||||||
|
height:64rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
min-height:64rpx;
|
||||||
|
.logo-img{
|
||||||
|
width:64rpx;
|
||||||
|
height:64rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="my-btn" @click.stop="onClick"
|
<view class="my-btn" @click.stop="onClick"
|
||||||
:style="{
|
:style="{
|
||||||
'border-radius':br,'min-height':mh,'background':bg,width:wd
|
'border-radius':br,'min-height':mh,'background':bg,width:wd,'height':mh
|
||||||
}">
|
}">
|
||||||
<text :style="{
|
<text :style="{
|
||||||
color:color,'font-size':fz,'font-weight':fw
|
color:color,'font-size':fz,'font-weight':fw
|
||||||
|
|||||||
@@ -0,0 +1,244 @@
|
|||||||
|
<template>
|
||||||
|
<up-popup
|
||||||
|
:show="show"
|
||||||
|
:round="24"
|
||||||
|
:closeOnClickOverlay="false"
|
||||||
|
>
|
||||||
|
<view class="share-popup-view">
|
||||||
|
<view class="share-head">
|
||||||
|
<text class="text-28 text-zu1">分享信任桥</text>
|
||||||
|
</view>
|
||||||
|
<view class="share-btn-view">
|
||||||
|
<view class="share-box" @click="onBtn(index)" v-for="(item,index) in btnList" :key="index">
|
||||||
|
<image :src="`/static/new/share_${index}.png`" class="share-img"></image>
|
||||||
|
<text class="text-24 text-zu1">{{item}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="share-line" style="margin-top:40rpx;"></view>
|
||||||
|
<view class="qr-view" v-if="qrvalue">
|
||||||
|
<tki-qrcode ref="qrcode" :val="qrvalue" :size="252" />
|
||||||
|
</view>
|
||||||
|
<view class="share-line" style="min-height:16rpx;height:16rpx">
|
||||||
|
</view>
|
||||||
|
<view class="share-bottom" @click="onClose">
|
||||||
|
<text class="text-32 text-fu1">取消</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<view class="share-top-image-view">
|
||||||
|
<image :src="tu" class="tu-img"></image>
|
||||||
|
<view class="image-view-bottom">
|
||||||
|
<view class="image-view-bottom-left">
|
||||||
|
<text class="text-24 text-zu1 text-overflow1">{{text}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="image-view-bottom-right">
|
||||||
|
<text class="text-24 text-zi">¥{{price}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</up-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Func from '/utils/func'
|
||||||
|
import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue'
|
||||||
|
import {SHARE_URL} from '@/utils/config.js'
|
||||||
|
export default {
|
||||||
|
components:{tkiQrcode},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
btnList:['微信','朋友圈','复制链接','保存图片','QQ'],
|
||||||
|
qrvalue:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
show:{
|
||||||
|
type:Boolean,
|
||||||
|
default:false
|
||||||
|
},
|
||||||
|
id:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
tu:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
price:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
text:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
this.qrvalue = `${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=${this.id}`
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
if(this.qrvalue){
|
||||||
|
this.creatQrcode();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
creatQrcode() {
|
||||||
|
this.$refs.qrcode._makeCode();
|
||||||
|
},
|
||||||
|
onBtn(index){
|
||||||
|
if(index == 2){
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
uni.setClipboardData({
|
||||||
|
data:this.qrvalue,
|
||||||
|
success:function(res){
|
||||||
|
uni.getClipboardData({
|
||||||
|
success:function(res){
|
||||||
|
Func.myToast('复制成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
// #ifdef H5
|
||||||
|
this.$copyText(this.qrvalue).then(res=>{
|
||||||
|
console.log('resresresres',res)
|
||||||
|
Func.myToast('复制成功')
|
||||||
|
})
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
this.$emit('share',index)
|
||||||
|
|
||||||
|
},
|
||||||
|
onClose(){
|
||||||
|
this.$emit('close');
|
||||||
|
},
|
||||||
|
onOk(){
|
||||||
|
Func.debounce(this.dOk())
|
||||||
|
},
|
||||||
|
dOk(){
|
||||||
|
this.$emit('ok');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.share-top-image-view{
|
||||||
|
width:400rpx;
|
||||||
|
min-height:496rpx;
|
||||||
|
height:496rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding: 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
position: absolute;
|
||||||
|
background-color: #fff;
|
||||||
|
top:-638rpx;
|
||||||
|
.image-view-bottom{
|
||||||
|
width:100%;
|
||||||
|
flex:1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top:20rpx;
|
||||||
|
.image-view-bottom-left{
|
||||||
|
height:72rpx;
|
||||||
|
min-height:72rpx;
|
||||||
|
border-right: 2rpx solid #EBEBEB;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-right: 10rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.image-view-bottom-right{
|
||||||
|
// min-width:130rpx;
|
||||||
|
margin-left:10rpx;
|
||||||
|
height:72rpx;
|
||||||
|
min-height:72rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tu-img{
|
||||||
|
width:100%;
|
||||||
|
height:344rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.share-popup-view{
|
||||||
|
width:100%;
|
||||||
|
height:796rpx;
|
||||||
|
min-height:796rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 24rpx 24rpx 0 0;
|
||||||
|
position: relative;
|
||||||
|
.share-head{
|
||||||
|
width:100%;
|
||||||
|
height:88rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.share-bottom{
|
||||||
|
width:100%;
|
||||||
|
height:92rpx;
|
||||||
|
min-height:92rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.share-line{
|
||||||
|
display: flex;
|
||||||
|
width:100%;
|
||||||
|
height:2rpx;
|
||||||
|
min-height:2rpx;
|
||||||
|
background-color: #e7e7e7;
|
||||||
|
}
|
||||||
|
.qr-view{
|
||||||
|
width:100%;
|
||||||
|
height:332rpx;
|
||||||
|
min-height:332rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.share-btn-view{
|
||||||
|
width:100%;
|
||||||
|
height:124rpx;
|
||||||
|
min-height:124rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
// padding: 0 36rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top:36rpx;
|
||||||
|
.share-box{
|
||||||
|
flex:1;
|
||||||
|
height:100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.share-img{
|
||||||
|
width:80rpx;
|
||||||
|
height:80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,211 @@
|
|||||||
|
<template xlang="wxml" minapp="mpvue">
|
||||||
|
<view class="tki-qrcode">
|
||||||
|
<!-- #ifndef MP-ALIPAY -->
|
||||||
|
<canvas class="tki-qrcode-canvas" :canvas-id="cid" :style="{width:cpSize+'px',height:cpSize+'px'}" />
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-ALIPAY -->
|
||||||
|
<canvas :id="cid" :width="cpSize" :height="cpSize" class="tki-qrcode-canvas" />
|
||||||
|
<!-- #endif -->
|
||||||
|
<image v-show="show" :src="result" :style="{width:cpSize+'px',height:cpSize+'px'}" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import QRCode from "./qrcode.js"
|
||||||
|
let qrcode
|
||||||
|
export default {
|
||||||
|
name: "tki-qrcode",
|
||||||
|
props: {
|
||||||
|
cid: {
|
||||||
|
type: String,
|
||||||
|
default: 'tki-qrcode-canvas'
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: Number,
|
||||||
|
default: 200
|
||||||
|
},
|
||||||
|
unit: {
|
||||||
|
type: String,
|
||||||
|
default: 'upx'
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
val: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
background: {
|
||||||
|
type: String,
|
||||||
|
default: '#ffffff'
|
||||||
|
},
|
||||||
|
foreground: {
|
||||||
|
type: String,
|
||||||
|
default: '#000000'
|
||||||
|
},
|
||||||
|
pdground: {
|
||||||
|
type: String,
|
||||||
|
default: '#000000'
|
||||||
|
},
|
||||||
|
icon: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
iconSize: {
|
||||||
|
type: Number,
|
||||||
|
default: 40
|
||||||
|
},
|
||||||
|
lv: {
|
||||||
|
type: Number,
|
||||||
|
default: 3
|
||||||
|
},
|
||||||
|
onval: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
loadMake: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
usingComponents: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
showLoading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
loadingText: {
|
||||||
|
type: String,
|
||||||
|
default: '二维码生成中'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
result: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
_makeCode() {
|
||||||
|
let that = this
|
||||||
|
if (!this._empty(this.val)) {
|
||||||
|
qrcode = new QRCode({
|
||||||
|
context: that, // 上下文环境
|
||||||
|
canvasId:that.cid, // canvas-id
|
||||||
|
usingComponents: that.usingComponents, // 是否是自定义组件
|
||||||
|
showLoading: that.showLoading, // 是否显示loading
|
||||||
|
loadingText: that.loadingText, // loading文字
|
||||||
|
text: that.val, // 生成内容
|
||||||
|
size: that.cpSize, // 二维码大小
|
||||||
|
background: that.background, // 背景色
|
||||||
|
foreground: that.foreground, // 前景色
|
||||||
|
pdground: that.pdground, // 定位角点颜色
|
||||||
|
correctLevel: that.lv, // 容错级别
|
||||||
|
image: that.icon, // 二维码图标
|
||||||
|
imageSize: that.iconSize,// 二维码图标大小
|
||||||
|
cbResult: function (res) { // 生成二维码的回调
|
||||||
|
that._result(res)
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '二维码内容不能为空',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_clearCode() {
|
||||||
|
this._result('')
|
||||||
|
qrcode.clear()
|
||||||
|
},
|
||||||
|
_saveCode() {
|
||||||
|
let that = this;
|
||||||
|
if (this.result != "") {
|
||||||
|
uni.saveImageToPhotosAlbum({
|
||||||
|
filePath: that.result,
|
||||||
|
success: function () {
|
||||||
|
uni.showToast({
|
||||||
|
title: '二维码保存成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_result(res) {
|
||||||
|
this.result = res;
|
||||||
|
this.$emit('result', res)
|
||||||
|
},
|
||||||
|
_empty(v) {
|
||||||
|
let tp = typeof v,
|
||||||
|
rt = false;
|
||||||
|
if (tp == "number" && String(v) == "") {
|
||||||
|
rt = true
|
||||||
|
} else if (tp == "undefined") {
|
||||||
|
rt = true
|
||||||
|
} else if (tp == "object") {
|
||||||
|
if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
|
||||||
|
} else if (tp == "string") {
|
||||||
|
if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
|
||||||
|
} else if (tp == "function") {
|
||||||
|
rt = false
|
||||||
|
}
|
||||||
|
return rt
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
size: function (n, o) {
|
||||||
|
if (n != o && !this._empty(n)) {
|
||||||
|
this.cSize = n
|
||||||
|
if (!this._empty(this.val)) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this._makeCode()
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
val: function (n, o) {
|
||||||
|
if (this.onval) {
|
||||||
|
if (n != o && !this._empty(n)) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this._makeCode()
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
cpSize() {
|
||||||
|
if(this.unit == "upx"){
|
||||||
|
return uni.upx2px(this.size)
|
||||||
|
}else{
|
||||||
|
return this.size
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
if (this.loadMake) {
|
||||||
|
if (!this._empty(this.val)) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this._makeCode()
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.tki-qrcode {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.tki-qrcode-canvas {
|
||||||
|
position: fixed;
|
||||||
|
top: -99999upx;
|
||||||
|
left: -99999upx;
|
||||||
|
z-index: -99999;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
import App from './App'
|
import App from './App'
|
||||||
import messages from './locale/index'
|
import messages from './locale/index'
|
||||||
import uviewPlus from '@/uni_modules/uview-plus'
|
import uviewPlus from '@/uni_modules/uview-plus'
|
||||||
|
import VueClipboard from 'vue-clipboard2'
|
||||||
|
|
||||||
let i18nConfig = {
|
let i18nConfig = {
|
||||||
locale: uni.getLocale(),
|
locale: uni.getLocale(),
|
||||||
messages
|
messages
|
||||||
@@ -12,6 +14,7 @@ import VueI18n from 'vue-i18n'
|
|||||||
|
|
||||||
import '@/uni_modules/uview-plus/theme.scss' // 引入uView的样式
|
import '@/uni_modules/uview-plus/theme.scss' // 引入uView的样式
|
||||||
|
|
||||||
|
Vue.use(VueClipboard);
|
||||||
Vue.use(VueI18n)
|
Vue.use(VueI18n)
|
||||||
const i18n = new VueI18n(i18nConfig)
|
const i18n = new VueI18n(i18nConfig)
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
@@ -29,6 +32,7 @@ import { createI18n } from 'vue-i18n'
|
|||||||
const i18n = createI18n(i18nConfig)
|
const i18n = createI18n(i18nConfig)
|
||||||
export function createApp() {
|
export function createApp() {
|
||||||
const app = createSSRApp(App)
|
const app = createSSRApp(App)
|
||||||
|
app.use(VueClipboard);
|
||||||
app.use(i18n)
|
app.use(i18n)
|
||||||
app.use(uviewPlus)
|
app.use(uviewPlus)
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
"modules" : {
|
"modules" : {
|
||||||
"Payment" : {},
|
"Payment" : {},
|
||||||
"Camera" : {},
|
"Camera" : {},
|
||||||
"OAuth" : {}
|
"OAuth" : {},
|
||||||
|
"Share" : {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
@@ -84,7 +85,12 @@
|
|||||||
"UniversalLinks" : "https://app.tbmall.xin/uni-universallinks/__UNI__4910728/"
|
"UniversalLinks" : "https://app.tbmall.xin/uni-universallinks/__UNI__4910728/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"share" : {}
|
"share" : {
|
||||||
|
"weixin" : {
|
||||||
|
"appid" : "wx7a5902cd556d9396",
|
||||||
|
"UniversalLinks" : "https://app.tbmall.xin/uni-universallinks/__UNI__4910728/"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"icons" : {
|
"icons" : {
|
||||||
"android" : {
|
"android" : {
|
||||||
|
|||||||
@@ -1,9 +1,122 @@
|
|||||||
{
|
{
|
||||||
"name": "tb",
|
"name": "tb",
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "tb",
|
||||||
|
"version": "1.0.2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"crypto-js": "^4.2.0",
|
||||||
|
"dayjs": "^1.11.13",
|
||||||
|
"decimal.js": "^10.6.0",
|
||||||
|
"echarts": "^5.1.2",
|
||||||
|
"qs-canvas": "^1.0.11",
|
||||||
|
"tabber-component": "^1.0.0",
|
||||||
|
"vue-clipboard2": "^0.3.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/clipboard": {
|
||||||
|
"version": "2.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz",
|
||||||
|
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
|
||||||
|
"dependencies": {
|
||||||
|
"good-listener": "^1.2.2",
|
||||||
|
"select": "^1.1.2",
|
||||||
|
"tiny-emitter": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/crypto-js": {
|
||||||
|
"version": "4.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
|
||||||
|
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
|
||||||
|
},
|
||||||
|
"node_modules/dayjs": {
|
||||||
|
"version": "1.11.13",
|
||||||
|
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
|
||||||
|
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
|
||||||
|
},
|
||||||
|
"node_modules/decimal.js": {
|
||||||
|
"version": "10.6.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.6.0.tgz",
|
||||||
|
"integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg=="
|
||||||
|
},
|
||||||
|
"node_modules/delegate": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
|
||||||
|
},
|
||||||
|
"node_modules/echarts": {
|
||||||
|
"version": "5.6.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
|
||||||
|
"integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "2.3.0",
|
||||||
|
"zrender": "5.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/good-listener": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
|
||||||
|
"dependencies": {
|
||||||
|
"delegate": "^3.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/qs-canvas": {
|
||||||
|
"version": "1.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/qs-canvas/-/qs-canvas-1.0.11.tgz",
|
||||||
|
"integrity": "sha512-WJwLwrAA1++ZqT6eR2F4Qa42yowybDUtQ2TDPtDOwhD1i4DzEOotug5N20cDkHat9l69ThOWoxV4qJbLKAjkNg=="
|
||||||
|
},
|
||||||
|
"node_modules/select": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
|
||||||
|
},
|
||||||
|
"node_modules/tabber-component": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/tabber-component/-/tabber-component-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-tL1cMqSlus8DtxY/VGY2qZoe3wV/D/QcL6YVO7FZhXARmmNt5ztGmm0474pZ7UgNb7j2aPv29PLERH0s1xQW8w=="
|
||||||
|
},
|
||||||
|
"node_modules/tiny-emitter": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
|
||||||
|
},
|
||||||
|
"node_modules/tslib": {
|
||||||
|
"version": "2.3.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
|
||||||
|
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
|
||||||
|
},
|
||||||
|
"node_modules/vue-clipboard2": {
|
||||||
|
"version": "0.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
|
||||||
|
"integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
|
||||||
|
"dependencies": {
|
||||||
|
"clipboard": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/zrender": {
|
||||||
|
"version": "5.6.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
|
||||||
|
"integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "2.3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"clipboard": {
|
||||||
|
"version": "2.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz",
|
||||||
|
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
|
||||||
|
"requires": {
|
||||||
|
"good-listener": "^1.2.2",
|
||||||
|
"select": "^1.1.2",
|
||||||
|
"tiny-emitter": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"crypto-js": {
|
"crypto-js": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
|
||||||
@@ -19,6 +132,11 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.6.0.tgz",
|
||||||
"integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg=="
|
"integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg=="
|
||||||
},
|
},
|
||||||
|
"delegate": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
|
||||||
|
},
|
||||||
"echarts": {
|
"echarts": {
|
||||||
"version": "5.6.0",
|
"version": "5.6.0",
|
||||||
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
|
||||||
@@ -28,16 +146,47 @@
|
|||||||
"zrender": "5.6.1"
|
"zrender": "5.6.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"good-listener": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
|
||||||
|
"requires": {
|
||||||
|
"delegate": "^3.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"qs-canvas": {
|
||||||
|
"version": "1.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/qs-canvas/-/qs-canvas-1.0.11.tgz",
|
||||||
|
"integrity": "sha512-WJwLwrAA1++ZqT6eR2F4Qa42yowybDUtQ2TDPtDOwhD1i4DzEOotug5N20cDkHat9l69ThOWoxV4qJbLKAjkNg=="
|
||||||
|
},
|
||||||
|
"select": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
|
||||||
|
},
|
||||||
"tabber-component": {
|
"tabber-component": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/tabber-component/-/tabber-component-1.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/tabber-component/-/tabber-component-1.0.0.tgz",
|
||||||
"integrity": "sha512-tL1cMqSlus8DtxY/VGY2qZoe3wV/D/QcL6YVO7FZhXARmmNt5ztGmm0474pZ7UgNb7j2aPv29PLERH0s1xQW8w=="
|
"integrity": "sha512-tL1cMqSlus8DtxY/VGY2qZoe3wV/D/QcL6YVO7FZhXARmmNt5ztGmm0474pZ7UgNb7j2aPv29PLERH0s1xQW8w=="
|
||||||
},
|
},
|
||||||
|
"tiny-emitter": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
|
||||||
|
},
|
||||||
"tslib": {
|
"tslib": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
|
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
|
||||||
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
|
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
|
||||||
},
|
},
|
||||||
|
"vue-clipboard2": {
|
||||||
|
"version": "0.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
|
||||||
|
"integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
|
||||||
|
"requires": {
|
||||||
|
"clipboard": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"zrender": {
|
"zrender": {
|
||||||
"version": "5.6.1",
|
"version": "5.6.1",
|
||||||
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
|
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
|
||||||
|
|||||||
@@ -77,6 +77,8 @@
|
|||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"decimal.js": "^10.6.0",
|
"decimal.js": "^10.6.0",
|
||||||
"echarts": "^5.1.2",
|
"echarts": "^5.1.2",
|
||||||
"tabber-component": "^1.0.0"
|
"qs-canvas": "^1.0.11",
|
||||||
|
"tabber-component": "^1.0.0",
|
||||||
|
"vue-clipboard2": "^0.3.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,10 +201,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</up-overlay>
|
</up-overlay>
|
||||||
|
<HomePopup :show="homeShow" :dataObj="curData" @jumpShop="onJumpShop"></HomePopup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getGoodsDetail } from "@/api/product.js";
|
||||||
import choiceness from '@/components/choiceness/choiceness.vue';
|
import choiceness from '@/components/choiceness/choiceness.vue';
|
||||||
import { searchList } from '@/api/product.js';
|
import { searchList } from '@/api/product.js';
|
||||||
import { getCascadeCategory, checkAppVersion, getCarouselImage } from '@/api/common.js';
|
import { getCascadeCategory, checkAppVersion, getCarouselImage } from '@/api/common.js';
|
||||||
@@ -213,9 +215,14 @@ import CustomTabBar from '@/components/custom-tab-bar.vue'; // 引入自定义
|
|||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import useTabber from "tabber-component";
|
import useTabber from "tabber-component";
|
||||||
import { comparisonVersionHandler } from '@/utils/index.js';
|
import { comparisonVersionHandler } from '@/utils/index.js';
|
||||||
|
import HomePopup from '@/components/common/home-popup.vue'
|
||||||
|
|
||||||
|
import {
|
||||||
|
SHARE_URL,
|
||||||
|
} from "@/utils/config.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { choiceness, CustomTabBar },
|
components: { choiceness, CustomTabBar,HomePopup },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
swiperList: [
|
swiperList: [
|
||||||
@@ -244,6 +251,10 @@ export default {
|
|||||||
updateApkObj: {}, // 后台数据
|
updateApkObj: {}, // 后台数据
|
||||||
bannerPercentageShow: false,// 是否显示进度条
|
bannerPercentageShow: false,// 是否显示进度条
|
||||||
bannerPercentage: 0,// 进度条
|
bannerPercentage: 0,// 进度条
|
||||||
|
curId:null,
|
||||||
|
curData:null,
|
||||||
|
homeShow:false
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -262,10 +273,11 @@ export default {
|
|||||||
const time2 = dayjs();
|
const time2 = dayjs();
|
||||||
const diff = time2.diff(time1);
|
const diff = time2.diff(time1);
|
||||||
if (!versionUpdateTime || diff > 5 * 60 * 1000) {
|
if (!versionUpdateTime || diff > 5 * 60 * 1000) {
|
||||||
|
|
||||||
this.platformType = appUpdate == 'android' ? 'ANDROID' : 'IOS';
|
this.platformType = appUpdate == 'android' ? 'ANDROID' : 'IOS';
|
||||||
this.checkUpdate(); // 判断是否需要更新
|
this.checkUpdate(); // 判断是否需要更新
|
||||||
} else {
|
} else {
|
||||||
console.log("不需要更新...");
|
this.onClipboard();
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
this.getSortList();
|
this.getSortList();
|
||||||
@@ -273,9 +285,66 @@ export default {
|
|||||||
this.querySearchList(SEARCH_TYPE.EXPLOSIVE);// 爆单专区
|
this.querySearchList(SEARCH_TYPE.EXPLOSIVE);// 爆单专区
|
||||||
this.getCarouselImage();
|
this.getCarouselImage();
|
||||||
},
|
},
|
||||||
|
onLoad(){
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onJumpShop(){
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/other_package/productInfo/productInfo?id=${this.curId}`
|
||||||
|
})
|
||||||
|
|
||||||
|
this.curId = null;
|
||||||
|
this.curData = null;
|
||||||
|
this.homeShow = false;
|
||||||
|
},
|
||||||
|
onClipboard(){
|
||||||
|
let _this = this;
|
||||||
|
console.log('11111')
|
||||||
|
uni.getClipboardData({
|
||||||
|
success: function(res) {
|
||||||
|
// http://localhost:5173/#/pages/other_package/productInfo/productInfo?id=1038
|
||||||
|
console.log(res.data); // 剪贴板内容
|
||||||
|
if(res.data.indexOf(`${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=`) != -1){
|
||||||
|
|
||||||
|
uni.showModal({
|
||||||
|
title:'',
|
||||||
|
content:'当前APP想要粘贴商品详情,是否继续?',
|
||||||
|
success:(res1=>{
|
||||||
|
if(res1.confirm){
|
||||||
|
let arr = res.data.split('?id=');
|
||||||
|
console.log('arr')
|
||||||
|
_this.curId = Number(arr[1]);
|
||||||
|
_this.getShop();
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: '',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
fail:(res2=>{
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: '',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: function(err) {
|
||||||
|
console.error('获取剪贴板内容失败', err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getShop(){
|
||||||
|
const params = {
|
||||||
|
id: this.curId,
|
||||||
|
};
|
||||||
|
getGoodsDetail(params).then(res=>{
|
||||||
|
this.curData = res.data;
|
||||||
|
this.homeShow = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
onJumpYou(){
|
onJumpYou(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/rwa_package/shop/you-shop'
|
url:'/pages/rwa_package/shop/you-shop'
|
||||||
@@ -303,6 +372,9 @@ export default {
|
|||||||
self.bannerShow = true; // 显示弹窗
|
self.bannerShow = true; // 显示弹窗
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
console.log("wgt更新-2")
|
||||||
|
self.onClipboard();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="login_warp">
|
<view class="login_warp">
|
||||||
|
<u-icon size="30rpx" name="arrow-left" color="#333" @click="onBack"></u-icon>
|
||||||
<view class="login_logo_warp">
|
<view class="login_logo_warp">
|
||||||
<view style="text-align: center">
|
<view style="text-align: center">
|
||||||
<up-image src="/static/logo.png" width="90" height="118" bgColor="#f1f6ff00" radius="10"></up-image>
|
<up-image src="/static/logo.png" width="90" height="118" bgColor="#f1f6ff00" radius="10"></up-image>
|
||||||
@@ -126,6 +127,7 @@
|
|||||||
components: {
|
components: {
|
||||||
InputCodeComm,
|
InputCodeComm,
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
@@ -148,6 +150,12 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onBack(){
|
||||||
|
console.log('onBack',)
|
||||||
|
uni.switchTab({
|
||||||
|
url:'/pages/home/home'
|
||||||
|
})
|
||||||
|
},
|
||||||
aa() {
|
aa() {
|
||||||
const nativiPlugin = uni.requireNativePlugin('WITTestUniPlugin');
|
const nativiPlugin = uni.requireNativePlugin('WITTestUniPlugin');
|
||||||
console.log("隐藏原生tabbar", nativiPlugin)
|
console.log("隐藏原生tabbar", nativiPlugin)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="product_info_warp">
|
<view class="product_info_warp">
|
||||||
|
<!-- <image v-if="tmpImg" :src="tmpImg" style="width:620rpx;height:960rpx"></image> -->
|
||||||
<!-- 头部产品描述图 -->
|
<!-- 头部产品描述图 -->
|
||||||
<view class="product_info_header_warp">
|
<view class="product_info_header_warp">
|
||||||
<up-swiper
|
<up-swiper
|
||||||
@@ -22,11 +23,13 @@
|
|||||||
width="30"
|
width="30"
|
||||||
height="30"
|
height="30"
|
||||||
bgColor="#f1f6ff00"
|
bgColor="#f1f6ff00"
|
||||||
|
v-if="!isShareUrl"
|
||||||
@click="jumpLeft"
|
@click="jumpLeft"
|
||||||
></up-image>
|
></up-image>
|
||||||
</view>
|
</view>
|
||||||
<view class="img_comm right_warp">
|
<view class="img_comm right_warp">
|
||||||
<up-image
|
<up-image
|
||||||
|
v-if="!isShareUrl"
|
||||||
src="/static/common/share_st.png"
|
src="/static/common/share_st.png"
|
||||||
width="30"
|
width="30"
|
||||||
height="30"
|
height="30"
|
||||||
@@ -197,7 +200,7 @@
|
|||||||
<view>购物车</view>
|
<view>购物车</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="product_but_right">
|
<view class="product_but_right" v-if="!isShareUrl">
|
||||||
<view
|
<view
|
||||||
v-if="!ji"
|
v-if="!ji"
|
||||||
class="but_comm join_warp"
|
class="but_comm join_warp"
|
||||||
@@ -211,6 +214,7 @@
|
|||||||
>立即购买</view
|
>立即购买</view
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
|
<MyBtn v-if="isShareUrl" mh="88rpx" text="打开APP" wd="200rpx" @ok="onOpenApp"></MyBtn>
|
||||||
</view>
|
</view>
|
||||||
<!-- 选择规格的弹框 -->
|
<!-- 选择规格的弹框 -->
|
||||||
<up-popup
|
<up-popup
|
||||||
@@ -330,6 +334,7 @@
|
|||||||
@click="addCart(false)"
|
@click="addCart(false)"
|
||||||
>加入购物车</view
|
>加入购物车</view
|
||||||
>
|
>
|
||||||
|
|
||||||
<view v-else class="product_but_right popup_buts">
|
<view v-else class="product_but_right popup_buts">
|
||||||
<view class="but_comm join_warp" @click="addCart(false)"
|
<view class="but_comm join_warp" @click="addCart(false)"
|
||||||
>加入购物车</view
|
>加入购物车</view
|
||||||
@@ -419,6 +424,25 @@
|
|||||||
<view class="popup_but" @click="addressOk"> 确认 </view>
|
<view class="popup_but" @click="addressOk"> 确认 </view>
|
||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
|
<SharePopup
|
||||||
|
ref="share"
|
||||||
|
v-if="shareOpen"
|
||||||
|
:show="shareShow"
|
||||||
|
@close="onClose"
|
||||||
|
@share="onShare"
|
||||||
|
:id="id"
|
||||||
|
:text="orderInfo.name ? orderInfo.name : ''"
|
||||||
|
:price="orderInfo.minPrice ? orderInfo.minPrice : ''"
|
||||||
|
:tu="swiperList.length && swiperList[0]"></SharePopup>
|
||||||
|
<view class="hideCanvasView">
|
||||||
|
<canvas
|
||||||
|
id="myCanvas"
|
||||||
|
canvas-id="myCanvas"
|
||||||
|
:style="{
|
||||||
|
height: ((bgObj.height) + 'px'),
|
||||||
|
width: ((bgObj.width) + 'px')
|
||||||
|
}"></canvas>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -426,14 +450,22 @@
|
|||||||
import { getGoodsDetail, addGoods, getGoodsSpecs } from "@/api/product.js";
|
import { getGoodsDetail, addGoods, getGoodsSpecs } from "@/api/product.js";
|
||||||
import { getValue, PRODUCT_DELIVERY_TIME } from "@/utils/enumUtils.js";
|
import { getValue, PRODUCT_DELIVERY_TIME } from "@/utils/enumUtils.js";
|
||||||
import { copyData } from "@/utils/index.js";
|
import { copyData } from "@/utils/index.js";
|
||||||
|
import SharePopup from "@/components/common/share-popup.vue"
|
||||||
|
import MyBtn from '@/components/common/my-btn.vue'
|
||||||
import { getPostageQuery } from "@/api/cart.js";
|
import { getPostageQuery } from "@/api/cart.js";
|
||||||
import { assembleAddress } from "@/utils/index.js";
|
import { assembleAddress } from "@/utils/index.js";
|
||||||
|
// const QSCanvas = require('qs-canvas')
|
||||||
|
import QSCanvas from 'qs-canvas';
|
||||||
|
// import {getSharePoster} from "@/components/QuShe-SharerPoster/QS-SharePoster/QS-SharePoster.js";
|
||||||
|
import func from "@/utils/func.js";
|
||||||
import Address from "@/components/address.vue";
|
import Address from "@/components/address.vue";
|
||||||
import {
|
import {
|
||||||
CUSTOMER_SERVICE_PHONE_NUMBER,
|
CUSTOMER_SERVICE_PHONE_NUMBER,
|
||||||
CLOUD_SERVICE_PHONE_NUMBER,
|
CLOUD_SERVICE_PHONE_NUMBER,
|
||||||
|
SHARE_URL,
|
||||||
} from "@/utils/config.js";
|
} from "@/utils/config.js";
|
||||||
|
let qsc = null;
|
||||||
|
let timer = null;
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
PRODUCT_DELIVERY_TIME() {
|
PRODUCT_DELIVERY_TIME() {
|
||||||
@@ -448,11 +480,15 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Address,
|
Address,
|
||||||
|
SharePopup,
|
||||||
|
MyBtn
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: 0,
|
id: 0,
|
||||||
|
shareShow:false,
|
||||||
addressShow: false, // 收件地址选择
|
addressShow: false, // 收件地址选择
|
||||||
|
shareOpen:false,
|
||||||
swiperList: [],
|
swiperList: [],
|
||||||
currentNum: 0,
|
currentNum: 0,
|
||||||
specificationShow: false,
|
specificationShow: false,
|
||||||
@@ -469,6 +505,17 @@ export default {
|
|||||||
selectAddress: {}, // 选择的地址
|
selectAddress: {}, // 选择的地址
|
||||||
postage: null, // 邮费
|
postage: null, // 邮费
|
||||||
adressInfo: "",
|
adressInfo: "",
|
||||||
|
urlPath:'',
|
||||||
|
posterImage:'',
|
||||||
|
canvasId: 'default_PosterCanvasId',
|
||||||
|
poster:'',
|
||||||
|
bgObj: {
|
||||||
|
height: 480,
|
||||||
|
width: 310
|
||||||
|
},
|
||||||
|
draw:null,
|
||||||
|
tmpImg:'',
|
||||||
|
isShareUrl:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@@ -484,15 +531,292 @@ export default {
|
|||||||
this.getById();
|
this.getById();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #ifdef H5
|
||||||
|
let url = window.location.href;
|
||||||
|
if(url.indexOf(SHARE_URL) != -1){
|
||||||
|
this.isShareUrl = true;
|
||||||
|
}
|
||||||
|
console.log('url',url,SHARE_URL)
|
||||||
|
// #endif
|
||||||
|
qsc = new QSCanvas({
|
||||||
|
canvasId: 'myCanvas',
|
||||||
|
setCanvasWH: bg => {
|
||||||
|
this.bgObj = bg
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
onHide(){
|
||||||
|
timer && clearTimeout(timer);
|
||||||
|
timer = null;
|
||||||
|
},
|
||||||
|
onUnload(){
|
||||||
|
timer && clearTimeout(timer);
|
||||||
|
timer = null;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
assembleAddress,
|
assembleAddress,
|
||||||
|
onOpenApp(){
|
||||||
|
//https://download.tbmall.xin/1002/apppacket/20251113/20251113183449483.apk
|
||||||
|
let iphone = this.iosOrAnd();
|
||||||
|
window.location = 'trustbridgeapp://';
|
||||||
|
timer = setTimeout(()=>{
|
||||||
|
if(timer != null){
|
||||||
|
uni.showModal({
|
||||||
|
title:'未成功唤起APP',
|
||||||
|
content:'是否前往下载?',
|
||||||
|
success:(res=>{
|
||||||
|
if(res.confirm){
|
||||||
|
window.open('https://app.tbmall.xin')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},3000)
|
||||||
|
|
||||||
|
},
|
||||||
|
iosOrAnd() {
|
||||||
|
let userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
||||||
|
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
|
||||||
|
return "ios";
|
||||||
|
}
|
||||||
|
if (/Android/.test(userAgent)) {
|
||||||
|
return "and";
|
||||||
|
}
|
||||||
|
return "Other";
|
||||||
|
},
|
||||||
onZiXun() {
|
onZiXun() {
|
||||||
|
if(this.isShareUrl){
|
||||||
|
return;
|
||||||
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/rwa_package/setting/kefu?type=5260",
|
url: "/pages/rwa_package/setting/kefu?type=5260",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getValue,
|
getValue,
|
||||||
|
onShare(index){
|
||||||
|
if(index == 0){
|
||||||
|
// WXSceneTimeline
|
||||||
|
uni.share({
|
||||||
|
provider:'weixin',
|
||||||
|
scene:'WXSceneSession',
|
||||||
|
type:1,
|
||||||
|
summary:`${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=${this.id}`,
|
||||||
|
|
||||||
|
})
|
||||||
|
this.onClose()
|
||||||
|
}else if(index == 1){
|
||||||
|
uni.share({
|
||||||
|
provider:'weixin',
|
||||||
|
scene:'WXSceneTimeline',
|
||||||
|
type:1,
|
||||||
|
summary:`${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=${this.id}`,
|
||||||
|
|
||||||
|
})
|
||||||
|
}else if(index == 2){
|
||||||
|
|
||||||
|
this.onClose()
|
||||||
|
}else if(index == 3){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.onDraw();
|
||||||
|
},1000)
|
||||||
|
this.onClose()
|
||||||
|
}else if(index == 4){
|
||||||
|
func.myToast('暂未开放')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onDraw(){
|
||||||
|
let _this = this;
|
||||||
|
try {
|
||||||
|
let last
|
||||||
|
// qsc.setRect({ x: 0, y: 0,r:12, height: 960, width: 620});
|
||||||
|
|
||||||
|
qsc.setPaintbrush({
|
||||||
|
strokeStyle:'#EBEBEB',
|
||||||
|
font: {
|
||||||
|
fontSize: 16
|
||||||
|
}
|
||||||
|
})
|
||||||
|
last = await qsc.drawImg({
|
||||||
|
val: '../../../static/new/di.png',
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
height: 480,
|
||||||
|
width: 310,
|
||||||
|
})
|
||||||
|
|
||||||
|
last = await qsc.drawImg({
|
||||||
|
val: '../../../static/new/logo.png',
|
||||||
|
x: 228,
|
||||||
|
y: 393,
|
||||||
|
height: 62,
|
||||||
|
width: 62,
|
||||||
|
})
|
||||||
|
|
||||||
|
// last = await qsc.drawImg({
|
||||||
|
// val:'https://niu8.letaocm.top/17557729915067836.jpg',
|
||||||
|
// x: 20,
|
||||||
|
// y: 20,
|
||||||
|
// height: 270,
|
||||||
|
// width: 270,
|
||||||
|
// })
|
||||||
|
|
||||||
|
// #ifndef H5
|
||||||
|
last = await qsc.drawImg({
|
||||||
|
val:_this.swiperList[0],
|
||||||
|
x: 20,
|
||||||
|
y: 20,
|
||||||
|
height: 270,
|
||||||
|
width: 270,
|
||||||
|
})
|
||||||
|
|
||||||
|
// #endif
|
||||||
|
qsc.setPaintbrush({
|
||||||
|
strokeStyle:'#EBEBEB'
|
||||||
|
})
|
||||||
|
// { x1: obj.x, y1: y, x2: obj.x + tw, y2: y, style, gap, width, color }
|
||||||
|
last = await qsc.drawLine({
|
||||||
|
style:'solide',
|
||||||
|
x1:210,
|
||||||
|
y1:313,
|
||||||
|
x2:210,
|
||||||
|
y2:342,
|
||||||
|
width:1,
|
||||||
|
gap:1
|
||||||
|
})
|
||||||
|
|
||||||
|
last = await qsc.drawLine({
|
||||||
|
style:'solide',
|
||||||
|
x1:20,
|
||||||
|
y1:368,
|
||||||
|
x2:290,
|
||||||
|
y2:368,
|
||||||
|
width:1,
|
||||||
|
gap:1
|
||||||
|
})
|
||||||
|
|
||||||
|
// last = await qsc.drawImg({
|
||||||
|
// val:'https://hashmall-prod.oss-cn-shenzhen.aliyuncs.com/1002/image/20250818/20250818134614672.jpg',
|
||||||
|
// x: 20,
|
||||||
|
// y: 20,
|
||||||
|
// height: 270,
|
||||||
|
// width: 270,
|
||||||
|
// })
|
||||||
|
|
||||||
|
last = await qsc.drawText({
|
||||||
|
val: this.orderInfo.name,
|
||||||
|
x: 20,
|
||||||
|
y: 310,
|
||||||
|
maxWidth: 180,
|
||||||
|
line: 2
|
||||||
|
})
|
||||||
|
|
||||||
|
last = await qsc.drawText({
|
||||||
|
val: '1、保存图片到相册',
|
||||||
|
x: 93,
|
||||||
|
y: 397,
|
||||||
|
paintbrushProps: { fillStyle: '#7f7f7f',font: { fontSize: 12, fontWeight: 400 } } ,
|
||||||
|
})
|
||||||
|
|
||||||
|
last = await qsc.drawText({
|
||||||
|
val: '2、扫一扫下载信任桥',
|
||||||
|
x: 93,
|
||||||
|
y: 438,
|
||||||
|
paintbrushProps: { fillStyle: '#7f7f7f',font: { fontSize: 12, fontWeight: 400 } } ,
|
||||||
|
})
|
||||||
|
|
||||||
|
last = await qsc.drawText({
|
||||||
|
val: '¥:' + this.orderInfo.minPrice,
|
||||||
|
x: 230,
|
||||||
|
y: 317,
|
||||||
|
paintbrushProps: { fillStyle: '#7A35F6',font: { fontSize: 20, fontWeight: 700 } } ,
|
||||||
|
})
|
||||||
|
|
||||||
|
last = await qsc.drawQrCode({
|
||||||
|
val: `${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=${this.id}`,
|
||||||
|
x: 20,
|
||||||
|
y: 391,
|
||||||
|
size: 65,
|
||||||
|
})
|
||||||
|
|
||||||
|
// await qsc.updateCanvasWH({ width: '300px', height: '960px'})
|
||||||
|
await qsc.draw();
|
||||||
|
|
||||||
|
setTimeout(()=>{
|
||||||
|
|
||||||
|
uni.canvasToTempFilePath({
|
||||||
|
canvasId: 'myCanvas',
|
||||||
|
success: function (res) {
|
||||||
|
const tempFilePath = res.tempFilePath;
|
||||||
|
_this.tmpImg = tempFilePath;
|
||||||
|
|
||||||
|
// #ifdef H5
|
||||||
|
uni.downloadFile({
|
||||||
|
url: tempFilePath,
|
||||||
|
success: function () {
|
||||||
|
let link = document.createElement('a');
|
||||||
|
link.href = tempFilePath;
|
||||||
|
link.download = '分享图片';
|
||||||
|
link.click();
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存失败',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
|
// #ifndef H5
|
||||||
|
uni.saveImageToPhotosAlbum({
|
||||||
|
filePath: tempFilePath,
|
||||||
|
success: function () {
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.error('保存失败:', err);
|
||||||
|
uni.showModal({
|
||||||
|
title: '错误',
|
||||||
|
content: '保存图片到相册失败',
|
||||||
|
showCancel: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
fail: function (error) {
|
||||||
|
console.error('获取图片失败:', error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},200)
|
||||||
|
|
||||||
|
// let img = await qsc.toImage({x:0,y:0,width:620,height:960,
|
||||||
|
// destWidth:310 * 4,destHeight:480 * 4,fileType:'png'});
|
||||||
|
// uni.saveImageToPhotosAlbum({filePath:img});
|
||||||
|
// console.log('img',img)
|
||||||
|
} catch (e) {
|
||||||
|
//TODO handle the exception
|
||||||
|
console.log('绘制异常',e)
|
||||||
|
uni.showModal({
|
||||||
|
content: JSON.stringify(e)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onClose(){
|
||||||
|
this.shareShow = false;
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.shareOpen = false;
|
||||||
|
},1000)
|
||||||
|
},
|
||||||
onSwiper(index) {
|
onSwiper(index) {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
current: index,
|
current: index,
|
||||||
@@ -501,6 +825,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
jumpAddAddress() {
|
jumpAddAddress() {
|
||||||
|
if(this.isShareUrl){
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.addressShow = true;
|
this.addressShow = true;
|
||||||
},
|
},
|
||||||
// 地址选中
|
// 地址选中
|
||||||
@@ -553,6 +880,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
jumpOther(type) {
|
jumpOther(type) {
|
||||||
|
if(this.isShareUrl){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (type === "home") {
|
if (type === "home") {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
// 首页
|
// 首页
|
||||||
@@ -642,6 +972,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async checkSpecification(val, type) {
|
async checkSpecification(val, type) {
|
||||||
|
if(this.isShareUrl){
|
||||||
|
return;
|
||||||
|
}
|
||||||
const source = this.source;
|
const source = this.source;
|
||||||
if (type == "n" && this.ji == 1) {
|
if (type == "n" && this.ji == 1) {
|
||||||
type = "buy";
|
type = "buy";
|
||||||
@@ -827,7 +1160,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 跳转到分享页面
|
// 跳转到分享页面
|
||||||
jumpShare() {},
|
jumpShare() {
|
||||||
|
console.log('jumpShare')
|
||||||
|
this.shareOpen = true;
|
||||||
|
this.shareShow = true;
|
||||||
|
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -1300,4 +1638,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hideCanvasView{
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
position: fixed;
|
||||||
|
top:10000;
|
||||||
|
left:10000;
|
||||||
|
z-index: 1000000000000;
|
||||||
|
// background-color: rgba(0,0,0,0.2);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
@@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
export const BASE_URL = "https://api.tbmall.xin"; //生产
|
export const BASE_URL = "https://api.tbmall.xin"; //生产
|
||||||
// export const BASE_URL ='http://api.hm.a-d.work:6880' // 测试
|
// export const BASE_URL ='http://api.hm.a-d.work:6880' // 测试
|
||||||
// export const BASE_URL ='https://api.o.tbmall.xin' // 本地测试
|
// export const BASE_URL ='https://api.o.tbmall.xin'; // 本地测试
|
||||||
|
|
||||||
|
|
||||||
|
export const SHARE_URL = 'https://h.tbmall.xin';
|
||||||
|
|
||||||
export const PRIVACY_EN = "https://www.finecc.net/?Privacy-Agreement/";//隐私协议地址(英文版)
|
export const PRIVACY_EN = "https://www.finecc.net/?Privacy-Agreement/";//隐私协议地址(英文版)
|
||||||
export const PRIVACY_CN = "https://www.finecc.net/?Privac |y/";//隐私协议地址(中文版)
|
export const PRIVACY_CN = "https://www.finecc.net/?Privac |y/";//隐私协议地址(中文版)
|
||||||
|
|||||||
@@ -40,6 +40,27 @@ export default {
|
|||||||
}
|
}
|
||||||
return tmpTime;
|
return tmpTime;
|
||||||
},
|
},
|
||||||
|
myToast(str = '',time = 1000){
|
||||||
|
if(str){
|
||||||
|
uni.hideToast();
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.showToast({
|
||||||
|
icon:'none',
|
||||||
|
title:str,
|
||||||
|
mask:true,
|
||||||
|
duration:time
|
||||||
|
})
|
||||||
|
},100)
|
||||||
|
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon:'loading',
|
||||||
|
title:'请求中...',
|
||||||
|
mask:true,
|
||||||
|
duration:1000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
debounce(func,wait = 1000,immediate = true){
|
debounce(func,wait = 1000,immediate = true){
|
||||||
// 清除定时器
|
// 清除定时器
|
||||||
if (timeout !== null) clearTimeout(timeout)
|
if (timeout !== null) clearTimeout(timeout)
|
||||||
|
|||||||