兼容列表用户头像与昵称
parent
dea606c274
commit
3f00d3c0ac
1
App.vue
1
App.vue
|
@ -24,6 +24,7 @@
|
|||
uni.removeStorageSync('quanImg');
|
||||
uni.removeStorageSync('quanId');
|
||||
uni.removeStorageSync('isQuan');
|
||||
uni.removeStorageSync('firstTime');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -165,7 +165,8 @@
|
|||
city: userInfo.city,//用户所在城市
|
||||
gender: userInfo.gender,//用户性别
|
||||
language:userInfo.language,//语言
|
||||
is_active:1
|
||||
is_active:1,
|
||||
channel:uni.getStorageSync('channel')
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
|
@ -178,6 +179,7 @@
|
|||
ya.successAfterEv(userInfo);
|
||||
ya.isAnimation++;
|
||||
ya.userInfo_mobile = false;
|
||||
ya.$emit('onload');
|
||||
}
|
||||
},error => {})
|
||||
},
|
||||
|
@ -199,6 +201,9 @@
|
|||
if(res.code==0){
|
||||
this.$toolAll.tools.showToast('手机号绑定成功','success');
|
||||
this.visible = false;
|
||||
uni.reLaunch({
|
||||
url:'/pages/tabbar/my/staffDuan'
|
||||
})
|
||||
}
|
||||
},error=>{})
|
||||
} else {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<view>
|
||||
<scroll-view scroll-x >
|
||||
<view class="" :class="isCenter?'disac':'disjb'">
|
||||
<view @tap="choosecate(index)" v-if="item.title!='日记分享' && item.title!='效果模拟'"
|
||||
<view @tap="choosecate(index)" v-if="item.title!='仿真设计'"
|
||||
:style="{
|
||||
background : newCurrent==index ? activeb:newbmo,
|
||||
fontSize:newfmo+'px',
|
||||
|
|
|
@ -117,7 +117,6 @@
|
|||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
console.log('第一次登录');
|
||||
uni.setStorageSync('params',params)
|
||||
uni.setStorageSync('userId',res.data.account_id)
|
||||
uni.setStorageSync('token',res.data.token)//缓存token
|
||||
|
|
|
@ -63,7 +63,11 @@
|
|||
},
|
||||
methods:{
|
||||
backEvent(){//返回事件
|
||||
if(this.whereCome==1){
|
||||
if(this.whereCome==0 && uni.getStorageSync('firstTime')==''){
|
||||
uni.reLaunch({
|
||||
url:'/pages/tabbar/pagehome/pagehome'
|
||||
})
|
||||
} else if(this.whereCome==1){
|
||||
uni.reLaunch({
|
||||
url:'/pages/tabbar/pagehome/pagehome'
|
||||
})
|
||||
|
|
|
@ -979,10 +979,11 @@ var QRCode;
|
|||
|
||||
// QRCode object
|
||||
QRCode = function(canvasId, vOption) {
|
||||
console.log(123);
|
||||
this._htOption = {
|
||||
width: 256,
|
||||
height: 256,
|
||||
typeNumber: 4,
|
||||
width: 162,
|
||||
height: 162,
|
||||
typeNumber: 2,
|
||||
colorDark: "#000000",
|
||||
colorLight: "#ffffff",
|
||||
correctLevel: QRErrorCorrectLevel.H
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
created() {
|
||||
setTimeout(() => {
|
||||
this.couponQrCode()
|
||||
}, 50)
|
||||
}, 0)
|
||||
},
|
||||
methods: {
|
||||
// 二维码生成工具
|
||||
|
|
|
@ -4,8 +4,8 @@ console.log('当前环境', process.env.NODE_ENV)
|
|||
const apiHub = {
|
||||
//开发环境
|
||||
development: {
|
||||
BASE_URL: `https://hengmei.scdxtc.cn/api/`,
|
||||
// BASE_URL: "https://hm.hmzfyy.cn/api/",
|
||||
// BASE_URL: `https://hengmei.scdxtc.cn/api/`,
|
||||
BASE_URL: "https://hm.hmzfyy.cn/api/",
|
||||
IMG_URL: "https://xx",
|
||||
BASE_UPLOAD_URL: "",
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const domainName = 'https://hengmei.scdxtc.cn/api/'//域名配置
|
||||
// const domainName = 'https://hm.hmzfyy.cn/api/'//域名配置
|
||||
// const domainName = 'https://hengmei.scdxtc.cn/api/'//域名配置
|
||||
const domainName = 'https://hm.hmzfyy.cn/api/'//域名配置
|
||||
// 统一给参数
|
||||
const dataObj = (url, params) => {
|
||||
let options = params
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
export default {
|
||||
onShareAppMessage(res) { //发送给朋友
|
||||
return {}
|
||||
},
|
||||
onShareTimeline(res) {//分享到朋友圈
|
||||
return {}
|
||||
},
|
||||
}
|
|
@ -291,7 +291,7 @@ const tools = {
|
|||
language:obj.language
|
||||
}
|
||||
uni.request({
|
||||
url: `https://hengmei.scdxtc.cn/api/user/login`,
|
||||
url: `https://hm.hmzfyy.cn/api/user/login`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
header: {
|
||||
|
@ -383,7 +383,7 @@ const tools = {
|
|||
},
|
||||
isVedio(){//是否显示视频内容
|
||||
uni.request({
|
||||
url: `https://hengmei.scdxtc.cn/api/index/base-config`,
|
||||
url: `https://hm.hmzfyy.cn/api/index/base-config`,
|
||||
method: 'get',
|
||||
header: {
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
|
@ -397,7 +397,7 @@ const tools = {
|
|||
} else {
|
||||
uni.setStorageSync('isVedio',true);
|
||||
}
|
||||
// console.log(uni.getStorageSync('isVedio/'));
|
||||
console.log(uni.getStorageSync('isVedio'));
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
4
main.js
4
main.js
|
@ -22,7 +22,9 @@ import empower from './components/empower.vue'//引入用户授权组件
|
|||
Vue.component('empower',empower)//全局注册用户授权组件
|
||||
import authUserInfoMobile from './components/auth-userInfo-mobile.vue'//引入授权用户信息,授权手机号组件
|
||||
Vue.component('auth-userInfo-mobile',authUserInfoMobile)//全局注册授权用户信息,授权手机号组件
|
||||
|
||||
// 全局注册分享事件
|
||||
import share from './jsFile/share.js'
|
||||
Vue.mixin(share)
|
||||
|
||||
// 常用工具
|
||||
import tools from '@/jsFile/tools.js'
|
||||
|
|
|
@ -412,7 +412,7 @@
|
|||
is_hot:1
|
||||
}
|
||||
uni.request({
|
||||
url:`https://hengmei.scdxtc.cn/api/spu/list`,
|
||||
url:`https://hm.hmzfyy.cn/api/spu/list`,
|
||||
data:params,
|
||||
method:'post',
|
||||
header:{
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
<view class="disjbac">
|
||||
<view class="disac colf">
|
||||
<!-- 头像 -->
|
||||
<image class="mar-sx30" :src="userInfo.headimgurl || ''" mode="aspectFill"></image>
|
||||
<image @tap="openXiao" class="mar-sx30" :src="userInfo.headimgurl || ''" mode="aspectFill"></image>
|
||||
<view class="mar-z30">
|
||||
<!-- 昵称 -->
|
||||
<view class="disac">
|
||||
<view class="fon36 bold">{{userInfo.nickname || ''}}</view>
|
||||
<view class="fon36 bold clips1" style="max-width: 260rpx;">{{userInfo.nickname || ''}}</view>
|
||||
<view class="gao-name">{{userInfo.level.name}}</view>
|
||||
</view>
|
||||
<view class="disac mar-s10" v-if="userPhone!==''">
|
||||
|
@ -283,10 +283,12 @@
|
|||
},error=>{})
|
||||
},
|
||||
onUnload() {
|
||||
// 关闭我的二维码弹框
|
||||
this.closeqr();
|
||||
},
|
||||
onLoad(options) {
|
||||
this.optionObj = options;
|
||||
uni.setStorageSync('channel',options.channel);
|
||||
if(uni.getStorageSync('gao')==''){
|
||||
const query = wx.createSelectorQuery()
|
||||
query.select('.gao').boundingClientRect((rect) => {
|
||||
|
@ -393,6 +395,7 @@
|
|||
clearInterval(this.timer);
|
||||
},60000)
|
||||
},
|
||||
// 关闭我的二维码弹框
|
||||
closeqr(){
|
||||
this.isQrcode = false;
|
||||
clearInterval(this.timer);
|
||||
|
@ -571,7 +574,7 @@
|
|||
onlyFromCamera: false, //是否只能从相机扫码,不允许从相册选择图片,这里是只允许相机扫码
|
||||
scanType: ['qrCode'], // scanType:扫码类型 : 二维码
|
||||
success: (rt) => { // 接口调用成功的回调函数
|
||||
let narr = rt.result.split(',');
|
||||
let narr = rt.result.split('H');
|
||||
if(narr[1]=='true'){//体验券核销
|
||||
this.$requst.post('staff/coupon/write-off-experience-coupon',{coupon_id:narr[0],secret:narr[2],account_id:narr[3]}).then(res=>{
|
||||
this.isQian = true
|
||||
|
|
|
@ -156,6 +156,7 @@
|
|||
this.isAutoPlay = false;
|
||||
},
|
||||
onShow() {
|
||||
uni.setStorageSync('firstTime',1);
|
||||
log('输出的解构')
|
||||
this.checkNet()
|
||||
this.$toolAll.tools.isLogin()
|
||||
|
@ -185,6 +186,7 @@
|
|||
return shareObj;
|
||||
},
|
||||
onLoad(options) {
|
||||
this.$toolAll.tools.isVedio();
|
||||
if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv(options);
|
||||
} else if(options.q!=undefined){
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<view v-if="showDoctor" class="posia" style="top: 52px;left: 0;right: 0;border: 1rpx solid #E6E6E6;padding: 20rpx;background: #FFFFFF;">
|
||||
<view @tap="chooseDoctor(index)" class="disjbac fon28 col9" v-for="(item,index) in doctorList" :key="index">
|
||||
<span>姓名:{{item.doctor_extra.name}}</span>
|
||||
<span>部门:{{item.doctor_extra.skill}}</span>
|
||||
<!-- <span>部门:{{item.doctor_extra.skill}}</span> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -221,8 +221,8 @@
|
|||
if(res.code==0){
|
||||
this.doctor_name = '';
|
||||
if(res.data.list.length!=0){
|
||||
this.doctorList = res.data.list;
|
||||
this.showDoctor = true;
|
||||
this.doctorList = res.data.list;
|
||||
} else this.$toolAll.tools.showToast('暂无医生可选');
|
||||
} else this.$toolAll.tools.showToast(res.msg);
|
||||
})
|
||||
|
@ -311,7 +311,7 @@
|
|||
disease_id:this.disease_id//病种ID
|
||||
}
|
||||
uni.request({
|
||||
url:`https://hengmei.scdxtc.cn/api/spu/list`,
|
||||
url:`https://hm.hmzfyy.cn/api/spu/list`,
|
||||
data:params,
|
||||
method:'post',
|
||||
header:{
|
||||
|
|
|
@ -158,19 +158,19 @@
|
|||
this.$requst.post('user/exhibition-experience-coupon',{coupon_id:this.dataList[index].id}).then(res=>{
|
||||
if(res.code==0){
|
||||
this.isTY = true;
|
||||
this.text = `${this.dataList[index].id},true,${res.data.secret},${uni.getStorageSync('userId')}`;
|
||||
this.text = `${this.dataList[index].id}HtrueH${res.data.secret}H${uni.getStorageSync('userId')}`;
|
||||
this.secret = res.data.secret;
|
||||
} else this.$toolAll.tools.showToast(res.msg);
|
||||
},error=>{})
|
||||
this.timer = setInterval(()=>{
|
||||
this.$requst.post('staff/coupon/write-off-experience-couponQuery',{coupon_id:this.dataList[index].id,secret:this.secret}).then(res=>{
|
||||
if(res.code==0){
|
||||
if(res.data.result==0){
|
||||
// if(res.data.result==0){
|
||||
this.$toolAll.tools.showToast('使用成功');
|
||||
this.isTY = false;
|
||||
clearInterval(this.timer);
|
||||
this.checkAllList(0);
|
||||
}
|
||||
// }
|
||||
}
|
||||
})
|
||||
},3000)
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<!-- 快递费用 -->
|
||||
<view v-if="isExpress" class="bacf radius20 mar-s20 disjbac pad-sx27-zy20">
|
||||
<view class="bold">快递费用</view>
|
||||
<view class="fon28 colf8 bold">¥{{expressInfo.default_price}}.00</view>
|
||||
<view class="fon28 colf8 bold">¥{{expressInfo.default_price}}</view>
|
||||
</view>
|
||||
<view class="disjbac posixzy bacf pad-zy32" style="height: 124rpx;line-height: 124rpx;">
|
||||
<!-- 去支付 -->
|
||||
|
@ -264,7 +264,7 @@
|
|||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
this.checkexpress();//查询快递
|
||||
this.checkeList();//查询订单列表
|
||||
this.checkeList(options.isNei);//查询订单列表
|
||||
this.checkOrderDetail();//查询订单信息
|
||||
this.isNei = options.isNei;
|
||||
if(this.isNei==3) {
|
||||
|
@ -342,7 +342,7 @@
|
|||
this.payFS[index].isActive = !this.payFS[index].isActive;
|
||||
if(this.isNei==3){//积分
|
||||
if(!this.payFS[0].isActive && !this.payFS[2].isActive){
|
||||
this.$toolAll.tools.showToast('请选择支付方式')
|
||||
this.$toolAll.tools.showToast('请选择支付方式');
|
||||
this.allPrice = this.zanAllPrice;
|
||||
this.isKq = false;
|
||||
return;
|
||||
|
@ -383,6 +383,11 @@
|
|||
this.zf_kqPrice = 0;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if(this.expressInfo.default_price==0){
|
||||
this.$toolAll.tools.showToast('暂不可微信支付');
|
||||
this.payFS[index].isActive = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(this.payFS[index].title=='孔雀币') {
|
||||
|
@ -511,7 +516,7 @@
|
|||
this.$toolAll.tools.showToast('正在调起支付','loading',1500);
|
||||
}
|
||||
uni.request({
|
||||
url:`https://hengmei.scdxtc.cn/api/order/create`,
|
||||
url:`https://hm.hmzfyy.cn/api/order/create`,
|
||||
data:parmas,
|
||||
method:'post',
|
||||
header:{
|
||||
|
@ -673,12 +678,16 @@
|
|||
} else this.$toolAll.tools.showToast(res.msg);
|
||||
})
|
||||
},
|
||||
checkeList(){
|
||||
checkeList(isJfen){
|
||||
this.orderList.forEach(item=>{
|
||||
this.allPrice += item.price*item.num;
|
||||
this.allNum += item.num;
|
||||
})
|
||||
this.zanAllPrice = this.$toolAll.tools.addXiaoShu(this.allPrice);
|
||||
if(isJfen==3){
|
||||
this.zanAllPrice = this.allPrice;
|
||||
} else {
|
||||
this.zanAllPrice = this.$toolAll.tools.addXiaoShu(this.allPrice);
|
||||
}
|
||||
this.quanEv(0);//查询优惠券列表
|
||||
},
|
||||
quanEv(index){//调起优惠券弹框事件
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<view class="bacf width100 radius20 pad30 posir" style="margin: 0 128rpx;" @tap.stop="isHeyan=true">
|
||||
<view class="fon28 col3">订单二维码</view>
|
||||
<view class="mar-sx30">
|
||||
<yz-qr ref="qrPath" :text="text" :size="size" :colorDark="colorDark" :colorLight="colorLight"></yz-qr>
|
||||
<yz-qr ref="qrPath" :text="text" :size="qsize" :colorDark="colorDark" :colorLight="colorLight"></yz-qr>
|
||||
<!-- <image src="/static/public/member-head.png" class="order-hx-img" mode="aspectFill"></image> -->
|
||||
</view>
|
||||
<view class="fon24 col3">
|
||||
|
@ -140,8 +140,8 @@
|
|||
remarks:'',//原因
|
||||
times:0,//点击次数
|
||||
canvasQrPath: '',
|
||||
text: 'hello',
|
||||
size: 162,
|
||||
text: '',
|
||||
qsize: 162,
|
||||
colorDark: '#000000',
|
||||
colorLight: '#ffffff',
|
||||
timer:null,
|
||||
|
@ -205,7 +205,7 @@
|
|||
},
|
||||
make(index,index2){
|
||||
this.isHeyan = true;
|
||||
this.text = `${this.orderList[index].orderNum},${this.orderList[index].childrenList[index2].id}`;
|
||||
this.text = `${this.orderList[index].orderNum}H${this.orderList[index].childrenList[index2].id}`;
|
||||
let params = {
|
||||
order_coding:this.orderList[index].orderNum,
|
||||
id:this.orderList[index].childrenList[index2].id,
|
||||
|
|
|
@ -90,7 +90,6 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin();
|
||||
this.isAutoPlay = true;
|
||||
},
|
||||
onUnload() {
|
||||
|
@ -100,7 +99,7 @@
|
|||
this.isAutoPlay = false;
|
||||
},
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;this.whereCome = 2;}
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;this.whereCome = 2;} else {this.$toolAll.tools.isLogin();}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
|
|
|
@ -109,20 +109,18 @@
|
|||
};
|
||||
return shareObj;
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad(options) {
|
||||
this.checkDetail(options.id)
|
||||
this.detailId = options.id
|
||||
this.category_id = options.category_id
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
|
||||
console.log(options,'参数');
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
this.loginEv('',options.source_code,options.channel);
|
||||
}
|
||||
ckAbout(this.category_id)
|
||||
this.checkAbout(this.category_id)
|
||||
},
|
||||
onReachBottom() {//触底事件
|
||||
if(this.total!=this.dataList.length){
|
||||
|
|
|
@ -24,18 +24,20 @@
|
|||
<!-- 列表 -->
|
||||
<view v-if="dataList.length!=0" class="dis bacf radius10 pad20 mar-x20 posir" v-for="(item,index) in dataList" :key="index">
|
||||
<image class="mar-y20 flexs" :src="item.imgSrc" style="width: 98rpx;height: 98rpx;" mode="aspectFill"></image>
|
||||
<view class="fon24 col3 width100 mar-x40" style="margin-bottom: 80rpx;">
|
||||
<view class="fon24 col3 width100 mar-x40" style="margin-bottom: 120rpx;">
|
||||
<view class="bold disjbac">
|
||||
<view class="fon28 clips1">{{item.name}}</view>
|
||||
<view class="flexs">来源:{{item.come}}</view>
|
||||
</view>
|
||||
<view style="margin: 15rpx 0;">联系方式:{{item.phone || '暂无'}}</view>
|
||||
<view style="margin: 15rpx 0;" @tap="copyPhone(item.phone)">联系方式:{{item.phone || '暂无'}}</view>
|
||||
<view>客服:{{item.service || '暂无'}}</view>
|
||||
<view class="col80 disjbac" style="margin: 15rpx 0 0 0;">
|
||||
<view>{{item.time}}</view>
|
||||
<view class="col3">{{item.qudao}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 真实姓名 -->
|
||||
<view class="posia col3 fon24 radius10 tc" style="left: 20rpx;bottom: 100rpx;">姓名:{{item.real_name || '暂无'}}</view>
|
||||
<!-- 分配客服 -->
|
||||
<view @tap="fenCustomer(index)" class="posia colf fon24 radius10 tc customer-btn" style="right: 20rpx;top: 80rpx;z-index: 1;" v-if="item.customer=='' || item.customer==null" :style="{background:publicColor}">分配客服</view>
|
||||
<!-- 设置标签 -->
|
||||
|
@ -152,6 +154,15 @@
|
|||
this.obtainTag();//获取标签列表
|
||||
},
|
||||
methods: {
|
||||
// 复制电话号码
|
||||
copyPhone(e){
|
||||
uni.setClipboardData({
|
||||
data: e,//要被复制的内容
|
||||
success:(res) => {
|
||||
uni.showToast({title:'复制成功' })
|
||||
}
|
||||
});
|
||||
},
|
||||
// 关闭下拉
|
||||
closeXial(){
|
||||
// this.isShowTag = false;
|
||||
|
@ -286,7 +297,8 @@
|
|||
service:item.service,
|
||||
source_detail:item.source_detail,
|
||||
tags:item.tag,
|
||||
isTag:!item.tag.includes('员工')
|
||||
isTag:!item.tag.includes('员工'),
|
||||
real_name:item.real_name
|
||||
}
|
||||
this.dataList.push(cuObj);
|
||||
})
|
||||
|
|
|
@ -78,10 +78,10 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
|
||||
},
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
|
|
|
@ -110,12 +110,11 @@
|
|||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
this.checkConList(this.category_id)
|
||||
},
|
||||
onLoad(options) {
|
||||
this.checkDoD(options.doctor_id)
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
|
|
|
@ -185,12 +185,11 @@
|
|||
clearInterval(this.collectionTime);
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
this.checkConList(this.category_id);
|
||||
this.shopCollection();
|
||||
},
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
|
@ -238,7 +237,7 @@
|
|||
if(index==1){
|
||||
this.isWen = false;
|
||||
uni.request({
|
||||
url:`https://hengmei.scdxtc.cn/api/spu/collection`,
|
||||
url:`https://hm.hmzfyy.cn/api/spu/collection`,
|
||||
data:{page:this.page,size:this.size},
|
||||
method:'post',
|
||||
header:{
|
||||
|
|
|
@ -83,11 +83,8 @@
|
|||
this.isZanw = false
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
|
@ -108,22 +105,20 @@
|
|||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
@ -166,11 +166,8 @@
|
|||
onUnload() {
|
||||
this.closeEv();
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin();
|
||||
},
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin();}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
|
@ -183,22 +180,20 @@
|
|||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
},
|
||||
});
|
||||
},
|
||||
|
@ -227,7 +222,7 @@
|
|||
},
|
||||
make(index){
|
||||
this.isHeyan = true;
|
||||
this.text = `${this.orderInfo.coding},${this.orderInfo.skus[index].id}`;
|
||||
this.text = `${this.orderInfo.coding}H${this.orderInfo.skus[index].id}`;
|
||||
let params = {
|
||||
order_coding:this.orderInfo.coding,
|
||||
id:this.orderInfo.skus[index].id,
|
||||
|
|
|
@ -55,12 +55,8 @@
|
|||
isShowP:false,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
this.haved = true;
|
||||
},
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin() ;this.haved = true;}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
|
@ -77,22 +73,20 @@
|
|||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
@ -247,8 +247,6 @@
|
|||
this.isAutoPlay = false;
|
||||
},
|
||||
onLoad(options) {
|
||||
//查询过期时间和是否有token,并调用登录事件
|
||||
this.$toolAll.tools.overdue();
|
||||
if (options.category_id != undefined) {
|
||||
this.category_id = options.category_id
|
||||
if(options.invite_code!=undefined){this.invite_code = options.invite_code;}
|
||||
|
@ -263,6 +261,9 @@
|
|||
if(uni.getStorageSync('phone_active')!=1){
|
||||
this.vision = true;
|
||||
this.loginEv(options);
|
||||
} else {
|
||||
//查询过期时间和是否有token,并调用登录事件
|
||||
this.$toolAll.tools.overdue();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -271,21 +272,19 @@
|
|||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res) => {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code: res.code,
|
||||
invite_code: options.invite_code || '', //用户邀请码
|
||||
source_code: options.source_code || '',
|
||||
channel: options.channel || ''
|
||||
}
|
||||
this.$requst.post('user/login', params).then(res => {
|
||||
if (res.data.token != '') {
|
||||
if (res.data.is_active == 0) {
|
||||
this.haveImg = false;
|
||||
}
|
||||
}
|
||||
}, error => {})
|
||||
var params = {
|
||||
code: res.code,
|
||||
invite_code: options.invite_code || '', //用户邀请码
|
||||
source_code: options.source_code || '',
|
||||
channel: options.channel || ''
|
||||
}
|
||||
this.$requst.post('user/login', params).then(res => {
|
||||
if (res.data.token != '') {
|
||||
if (res.data.is_active == 0) {
|
||||
this.haveImg = false;
|
||||
}
|
||||
}
|
||||
}, error => {})
|
||||
},
|
||||
});
|
||||
},
|
||||
|
@ -454,8 +453,9 @@
|
|||
if (res.data.diary.length != 0) {
|
||||
res.data.diary.forEach(item => {
|
||||
let fabImg = '';
|
||||
if (item.published_headimgurl != '' && item.published_headimgurl != null)
|
||||
if (item.published_headimgurl != '' && item.published_headimgurl != null) {
|
||||
fabImg = this.$http + item.published_headimgurl
|
||||
}
|
||||
let tObj = {
|
||||
category_id: item.category_id, //栏目ID
|
||||
id: item.id,
|
||||
|
@ -560,6 +560,9 @@
|
|||
let num = item.video.search(".mp4")
|
||||
let isVideo = false
|
||||
if (num != '-1') isVideo = true
|
||||
let fabImg = '';
|
||||
if (item.published_headimgurl != '' && item.published_headimgurl != null)
|
||||
fabImg = this.$http + item.published_headimgurl
|
||||
let arrObj = {
|
||||
category_id: item.category_id, //栏目ID
|
||||
id: item.id,
|
||||
|
@ -570,8 +573,8 @@
|
|||
video: this.$http + item.video, //视频地址
|
||||
title: item.title, //标题
|
||||
content: item.subtitle, //副标题
|
||||
head_img: '/static/public/logo.png', //发布者头像
|
||||
name: '恒美植发', //发布者昵称
|
||||
head_img: fabImg || '/static/public/logo.png', //发布者头像
|
||||
name: item.published_by || '恒美植发', //发布者昵称
|
||||
isVideo: isVideo //是否是视频
|
||||
}
|
||||
if (item.cover != '') {
|
||||
|
|
|
@ -127,22 +127,20 @@
|
|||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
@ -80,11 +80,8 @@
|
|||
};
|
||||
return shareObj;
|
||||
},
|
||||
onShow() {
|
||||
this.$toolAll.tools.isLogin()
|
||||
},
|
||||
onLoad(options) {
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;}
|
||||
if(uni.getStorageSync('is_active')!=1){this.vision = true;} else {this.$toolAll.tools.isLogin()}
|
||||
if(options.invite_code!='' && options.invite_code!=undefined){
|
||||
this.loginEv(options.invite_code);
|
||||
} else if(options.source_code!='' && options.source_code!=undefined){
|
||||
|
@ -97,22 +94,20 @@
|
|||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
@ -343,7 +343,9 @@
|
|||
size:20,
|
||||
total:0,
|
||||
isZanw:true,
|
||||
allList:[]
|
||||
allList:[],
|
||||
isactivity:0,//是不是活动商品0:不是,1:是
|
||||
orderId:''//商品id
|
||||
}
|
||||
},
|
||||
onReachBottom() { //触底事件
|
||||
|
@ -372,7 +374,7 @@
|
|||
if(ya.detailObj.share_img==null) ya.detailObj.share_img = ya.detailObj.cover;
|
||||
var shareObj = {
|
||||
title: `${ya.detailObj.name}`, // 默认是小程序的名称(可以写slogan等)
|
||||
path: `/pagesB/shopDetail/shopDetail?id=${this.detailObj.spu_id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
path: `/pagesB/shopDetail/shopDetail?id=${this.detailObj.is_activity==1?this.detailObj.activity_id:this.detailObj.id}&category_id=${this.category_id}&is_activity=${this.detailObj.is_activity==0 ? 0 : 1}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
imageUrl: ya.$http + ya.detailObj.share_img//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
};
|
||||
return shareObj;
|
||||
|
@ -391,11 +393,14 @@
|
|||
this.isAutoPlay = false;
|
||||
},
|
||||
onLoad(options) {
|
||||
//查询过期时间和是否有token,并调用登录事件
|
||||
this.$toolAll.tools.overdue();
|
||||
if(uni.getStorageSync('is_active')!=1){
|
||||
this.vision = true;
|
||||
this.loginEv(options);
|
||||
} else {
|
||||
this.checkDetail(options.id,options.is_activity);
|
||||
this.cartNumEv();
|
||||
//查询过期时间和是否有token,并调用登录事件
|
||||
this.$toolAll.tools.overdue();
|
||||
}
|
||||
if(options.category_id!=undefined) {
|
||||
this.category_id = options.category_id
|
||||
|
@ -403,8 +408,8 @@
|
|||
}
|
||||
if(options.share_id!=undefined) this.share_id = options.share_id
|
||||
if(options.isIntegral=="true"){this.isScore = 3;}
|
||||
this.checkDetail(options.id,options.is_activity);
|
||||
this.cartNumEv();
|
||||
this.isactivity = options.is_activity;
|
||||
this.orderId = options.id;
|
||||
// 如果链接是拼团链接,则调起发起拼团人的商品
|
||||
if(options.shareCate==1) {
|
||||
// options.checkGrounpI商品id
|
||||
|
@ -439,29 +444,28 @@
|
|||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:options.invite_code || '',//用户邀请码
|
||||
source_code:options.source_code || '',
|
||||
channel:options.channel || ''
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:options.invite_code || '',//用户邀请码
|
||||
source_code:options.source_code || '',
|
||||
channel:options.channel || ''
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
},
|
||||
});
|
||||
},
|
||||
buttonH(e){//授权成功
|
||||
this.haveImg = e
|
||||
if(e) {
|
||||
this.vision = false
|
||||
this.isShowP = true
|
||||
this.vision = false;
|
||||
this.isShowP = true;
|
||||
this.checkDetail(this.orderId,this.isactivity);
|
||||
}
|
||||
},
|
||||
cartNumEv(){//购物车数量
|
||||
|
@ -475,7 +479,7 @@
|
|||
},
|
||||
checkPTList(id){//查询正在拼团的人数
|
||||
uni.request({
|
||||
url:`https://hengmei.scdxtc.cn/api/spu/group-list`,
|
||||
url:`https://hm.hmzfyy.cn/api/spu/group-list`,
|
||||
data:{id:id},
|
||||
method:'post',
|
||||
header:{
|
||||
|
@ -520,7 +524,7 @@
|
|||
// {id:1,imgSrc:'/static/tabbar/mya.png',title:'【99皮皮节】【种植发际线】',price:3888,num:1,isActive:false},
|
||||
let nprice = '';
|
||||
if(this.isNei==3) {
|
||||
nprice = this.detailObj.score;
|
||||
nprice = this.skuDetail.score;
|
||||
} else nprice = this.skuDetail.price/100;
|
||||
this.ispt = index;
|
||||
if(index==2){nprice = this.skuDetail.original_price/100;}
|
||||
|
@ -599,7 +603,7 @@
|
|||
this.daoTime = '';
|
||||
},
|
||||
chooselei(index){//类型选择
|
||||
this.leiIndex = index
|
||||
this.leiIndex = index;
|
||||
this.skuDetail = this.allRes.sku[index];
|
||||
},
|
||||
lianK(){//客服
|
||||
|
@ -652,8 +656,9 @@
|
|||
}
|
||||
},
|
||||
checkDetail(newId,is_activity){
|
||||
console.log(newId,is_activity,'参数');
|
||||
uni.request({
|
||||
url:`https://hengmei.scdxtc.cn/api/spu/detail`,
|
||||
url:`https://hm.hmzfyy.cn/api/spu/detail`,
|
||||
data:{id:newId,is_activity:is_activity},
|
||||
method:'post',
|
||||
header:{
|
||||
|
@ -661,6 +666,7 @@
|
|||
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
|
||||
},
|
||||
success: (res) => {
|
||||
console.log(res,'结果');
|
||||
if(res.data.code==0){
|
||||
this.allRes = res.data.data;
|
||||
this.zhuImg = this.$http + res.data.data.detail.cover;
|
||||
|
@ -744,7 +750,6 @@
|
|||
// 存图片
|
||||
this.bannerList.push(newImgObj)
|
||||
})
|
||||
console.log(this.bannerList);
|
||||
// 存视频
|
||||
if(this.detailObj.video!=''){
|
||||
this.bannerList[0] = {
|
||||
|
@ -776,6 +781,8 @@
|
|||
this.checkPTList(this.detailObj.id);//查询商品正在拼团列表
|
||||
}
|
||||
this.checkShopList();
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -791,7 +798,7 @@
|
|||
disease_id:''//病种ID
|
||||
}
|
||||
uni.request({
|
||||
url:`https://hengmei.scdxtc.cn/api/spu/list`,
|
||||
url:`https://hm.hmzfyy.cn/api/spu/list`,
|
||||
data:params,
|
||||
method:'post',
|
||||
header:{
|
||||
|
@ -874,6 +881,9 @@
|
|||
let num = item.video.search(".mp4")
|
||||
let isVideo = false
|
||||
if (num != '-1') isVideo = true
|
||||
let fabImg = '';
|
||||
if (item.published_headimgurl != '' && item.published_headimgurl != null)
|
||||
fabImg = this.$http + item.published_headimgurl
|
||||
let arrObj = {
|
||||
category_id: item.category_id, //栏目ID
|
||||
id: item.id,
|
||||
|
@ -884,8 +894,8 @@
|
|||
video: this.$http + item.video, //视频地址
|
||||
title: item.title, //标题
|
||||
content: item.subtitle, //副标题
|
||||
head_img: '/static/public/logo.png', //发布者头像
|
||||
name: '恒美植发', //发布者昵称
|
||||
head_img: fabImg || '/static/public/logo.png', //发布者头像
|
||||
name: item.published_by || '恒美植发', //发布者昵称
|
||||
isVideo: isVideo //是否是视频
|
||||
}
|
||||
if (item.cover != '') {
|
||||
|
|
|
@ -233,22 +233,20 @@
|
|||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
},
|
||||
});
|
||||
},
|
||||
|
@ -274,7 +272,7 @@
|
|||
size:this.size,
|
||||
}
|
||||
uni.request({
|
||||
url:`https://hengmei.scdxtc.cn/api/spu/list`,
|
||||
url:`https://hm.hmzfyy.cn/api/spu/list`,
|
||||
data:params,
|
||||
method:'post',
|
||||
header:{
|
||||
|
|
|
@ -86,22 +86,20 @@
|
|||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (res)=> {
|
||||
if (res.code) {
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
var params = {
|
||||
code:res.code,
|
||||
invite_code:invite_code,//用户邀请码
|
||||
source_code:source,
|
||||
channel:channel
|
||||
}
|
||||
this.$requst.post('user/login',params).then(res => {
|
||||
if(res.data.token!=''){
|
||||
if(res.data.is_active==0) {
|
||||
this.haveImg = false;
|
||||
this.vision = true;
|
||||
}
|
||||
}
|
||||
},error => {})
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<div class="">
|
||||
<div style="width:100%;overflow-x:hidden;">
|
||||
<image class="" @tap="backEv" :style="{top:statusHNH/2+'px'}" src="/static/public/videoBack.png" style="width: 33rpx;height: 33rpx;position: fixed;z-index: 10;left: 20rpx;" mode="aspectFill"></image>
|
||||
<video id="myVideo" style="width: 100%;" :style="{height:newHeight+'px'}" autoplay="true"
|
||||
:src="videoSrc" :enable-play-gesture="dans" :poster="posterSrc"
|
||||
:controls="isControls" :show-center-play-btn="isCenterImg" :show-play-btn="isBottomImg" :show-fullscreen-btn="isFull"
|
||||
@play="comePlay" @pause="comePause"></video>
|
||||
<!-- 封面图 -->
|
||||
<!-- <image v-if="isPlayImg" @tap="playEv" src="/static/public/video.png" style="position: fixed;top: 50%;left: 50%;
|
||||
width: 126rpx;height: 126rpx;transform: translate(-50%, -50%);" mode="aspectFill"></image> -->
|
||||
<image v-if="isPlayImg" @tap="playEv" src="/static/public/video.png" style="position: fixed;top: 50%;left: 50%;
|
||||
width: 126rpx;height: 126rpx;transform: translate(-50%, -50%);" mode="aspectFill"></image>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -18,13 +18,13 @@
|
|||
statusHNH:uni.getStorageSync('statusHNH'),
|
||||
newHeight:uni.getSystemInfoSync().windowHeight,
|
||||
videoSrc:'',
|
||||
isPlayImg:true,
|
||||
isPlayImg:false,
|
||||
autoplay:true,
|
||||
videoContext:'',
|
||||
title:'',//视频的标题,全屏时在顶部展示
|
||||
posterSrc:'',//视频封面的图片网络资源地址,如果 controls 属性值为 false 则设置 poster 无效
|
||||
isControls: false,//是否显示默认播放控件(播放/暂停按钮、播放进度、时间)
|
||||
dans:false,//是否开启播放手势,即双击切换播放/暂停
|
||||
dans:true,//是否开启播放手势,即双击切换播放/暂停
|
||||
isCenterImg:false,//是否显示视频中间的播放按钮
|
||||
isBottomImg:true,//是否显示视频底部控制栏的播放按钮
|
||||
isFull:true//是否显示全屏按钮
|
||||
|
@ -44,16 +44,16 @@
|
|||
})
|
||||
},
|
||||
playEv(){
|
||||
this.isPlayImg = false
|
||||
this.autoplay = false
|
||||
this.videoContext.play()
|
||||
this.isPlayImg = false;
|
||||
this.autoplay = false;
|
||||
this.videoContext.play();
|
||||
},
|
||||
comePlay(){//当开始/继续播放时触发play事件
|
||||
this.isControls = true
|
||||
this.isControls = true;
|
||||
},
|
||||
comePause(){
|
||||
this.isPlayImg = true
|
||||
this.isControls = false
|
||||
this.isPlayImg = true;
|
||||
this.isControls = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue