Commit 5ac19883 authored by Mac's avatar Mac

1

parent 83d8af34
......@@ -151,6 +151,7 @@
showStart:false,//是否显示启动页
startData:{},
ComeFrom:'',
teacherId:0,
};
},
components: {
......@@ -185,6 +186,9 @@
educationteacher
},
onLoad(options) {
// options = {//模拟数据
// user_id:120746,SmallShopId:0,Up:0,teacherId:6,JumpType:10
// }
let that = this;
uni.getSystemInfo({
success(res) {
......@@ -279,6 +283,10 @@
if (options && options.storeId) {
this.fxstoreId = options.storeId;
}
if (options && options.teacherId) {//老师Id
this.teacherId = options.teacherId;
}
// #ifdef MP-WEIXIN
wx.showShareMenu({
withShareTicket: true,
......@@ -709,6 +717,9 @@
console.log(e)
}
uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + that.GoodsId });
}else if (that.JumpType == 10) {
//老师详情
uni.navigateTo({ url: "/pages/school/teacherDetails?ID=" + that.teacherId });
}
}, 500);
......
......@@ -177,6 +177,7 @@
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gob'></auth>
</view>
<u-modal v-model="showdelete" content="是否关注查看更多?" :show-cancel-button='true' @cancel='gourlfriend' @confirm='setFollowTeacher(1)'></u-modal>
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" @goLook="goLook" @closeBtn="closeBtn"></coupon>
</scroll-view>
</template>
......@@ -184,6 +185,7 @@
const innerAudioContext = uni.createInnerAudioContext();
import hParse from "@/components/u-parse/parse.vue";
import auth from "../../components/auth/index.vue";
import coupon from "@/components/coupons/coupons";
export default {
data(){
return{
......@@ -220,11 +222,14 @@
playindex:0,
showdelete:false,
showCoupons: false,
couponMessage: "",
}
},
components: {
hParse,
auth
auth,
coupon
},
onUnload(){
innerAudioContext.stop();
......@@ -241,8 +246,8 @@
},
onShareTimeline() {
setTimeout(() => {
// console.log("分享调用");
// this.getReceive();
// console.log("分享朋友圈调用");
this.getReceive();
}, 2500);
let uid = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserId :
......@@ -263,7 +268,7 @@
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
let teacherId = this.id;
let img = this.teacher.teacherResult.TeacherLogo?this.teacher.teacherResult.TeacherLogo:'';
let title = this.teacher.teacherResult.Name?this.teacher.teacherResult.Name:'甲鹤任教老师';
let title = this.teacher.teacherResult.Name? '甲鹤日本语培训学校 '+ this.teacher.teacherResult.Name +"老师":'甲鹤日本语培训学校任教老师';
return {
title: title,
query: "user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up+ "&teacherId=" + teacherId,
......@@ -272,8 +277,8 @@
},
onShareAppMessage(res) {
setTimeout(() => {
// console.log("分享调用");
// this.getReceive();
// console.log("分享朋友调用");
this.getReceive();
}, 2500);
let uid = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserId :
......@@ -293,13 +298,12 @@
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
let teacherId = this.id;
let img = this.teacher.teacherResult.TeacherLogo?this.teacher.teacherResult.TeacherLogo:'';
let title = this.teacher.teacherResult.Name?this.teacher.teacherResult.Name:'甲鹤任教老师';
let title = this.teacher.teacherResult.Name? '甲鹤日本语培训学校 '+ this.teacher.teacherResult.Name +"老师":'甲鹤日本语培训学校任教老师';
return {
title: title,
path: "/pages/index/index?user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up+ "&teacherId=" + teacherId,
path: "/pages/index/index?user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up+ "&teacherId=" + teacherId +'&JumpType=10',
imageUrl: img,
};
},
created() {
this.mc = this.$uiConfig.mainColor;
......@@ -508,7 +512,35 @@
uni.navigateTo({
url: '/pages/friendcircle/friendcircle?ID=' + this.id +'&barshow=1'
})
}
},
getReceive() {
//分享进入调取领券接口
// 1-分享,2-购买并付款
this.request2({
url: "/api/AppletUser/ShareCoupon",
data: {
TriggerType: 1,
},
},
(res) => {
console.log(res, "res");
if (res.couponResultCode == 1) {
this.couponMessage = res.couponMessage;
this.showCoupons = true;
}
},
(failed)=>{
}
);
},
goLook() {
this.showCoupons = false;
},
closeBtn() {
this.showCoupons = false;
},
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment