Commit 5ac19883 authored by Mac's avatar Mac

1

parent 83d8af34
...@@ -151,6 +151,7 @@ ...@@ -151,6 +151,7 @@
showStart:false,//是否显示启动页 showStart:false,//是否显示启动页
startData:{}, startData:{},
ComeFrom:'', ComeFrom:'',
teacherId:0,
}; };
}, },
components: { components: {
...@@ -185,6 +186,9 @@ ...@@ -185,6 +186,9 @@
educationteacher educationteacher
}, },
onLoad(options) { onLoad(options) {
// options = {//模拟数据
// user_id:120746,SmallShopId:0,Up:0,teacherId:6,JumpType:10
// }
let that = this; let that = this;
uni.getSystemInfo({ uni.getSystemInfo({
success(res) { success(res) {
...@@ -279,6 +283,10 @@ ...@@ -279,6 +283,10 @@
if (options && options.storeId) { if (options && options.storeId) {
this.fxstoreId = options.storeId; this.fxstoreId = options.storeId;
} }
if (options && options.teacherId) {//老师Id
this.teacherId = options.teacherId;
}
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
wx.showShareMenu({ wx.showShareMenu({
withShareTicket: true, withShareTicket: true,
...@@ -709,6 +717,9 @@ ...@@ -709,6 +717,9 @@
console.log(e) console.log(e)
} }
uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + that.GoodsId }); uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + that.GoodsId });
}else if (that.JumpType == 10) {
//老师详情
uni.navigateTo({ url: "/pages/school/teacherDetails?ID=" + that.teacherId });
} }
}, 500); }, 500);
......
...@@ -177,6 +177,7 @@ ...@@ -177,6 +177,7 @@
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gob'></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gob'></auth>
</view> </view>
<u-modal v-model="showdelete" content="是否关注查看更多?" :show-cancel-button='true' @cancel='gourlfriend' @confirm='setFollowTeacher(1)'></u-modal> <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> </scroll-view>
</template> </template>
...@@ -184,6 +185,7 @@ ...@@ -184,6 +185,7 @@
const innerAudioContext = uni.createInnerAudioContext(); const innerAudioContext = uni.createInnerAudioContext();
import hParse from "@/components/u-parse/parse.vue"; import hParse from "@/components/u-parse/parse.vue";
import auth from "../../components/auth/index.vue"; import auth from "../../components/auth/index.vue";
import coupon from "@/components/coupons/coupons";
export default { export default {
data(){ data(){
return{ return{
...@@ -220,11 +222,14 @@ ...@@ -220,11 +222,14 @@
playindex:0, playindex:0,
showdelete:false, showdelete:false,
showCoupons: false,
couponMessage: "",
} }
}, },
components: { components: {
hParse, hParse,
auth auth,
coupon
}, },
onUnload(){ onUnload(){
innerAudioContext.stop(); innerAudioContext.stop();
...@@ -241,8 +246,8 @@ ...@@ -241,8 +246,8 @@
}, },
onShareTimeline() { onShareTimeline() {
setTimeout(() => { setTimeout(() => {
// console.log("分享调用"); // console.log("分享朋友圈调用");
// this.getReceive(); this.getReceive();
}, 2500); }, 2500);
let uid = uni.getStorageSync("mall_UserInfo") ? let uid = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserId : uni.getStorageSync("mall_UserInfo").UserId :
...@@ -263,7 +268,7 @@ ...@@ -263,7 +268,7 @@
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0; let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
let teacherId = this.id; let teacherId = this.id;
let img = this.teacher.teacherResult.TeacherLogo?this.teacher.teacherResult.TeacherLogo:''; 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 { return {
title: title, title: title,
query: "user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up+ "&teacherId=" + teacherId, query: "user_id=" + uid + "&SmallShopId=" + SmallShopId + "&Up=" + Up+ "&teacherId=" + teacherId,
...@@ -272,8 +277,8 @@ ...@@ -272,8 +277,8 @@
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
setTimeout(() => { setTimeout(() => {
// console.log("分享调用"); // console.log("分享朋友调用");
// this.getReceive(); this.getReceive();
}, 2500); }, 2500);
let uid = uni.getStorageSync("mall_UserInfo") ? let uid = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserId : uni.getStorageSync("mall_UserInfo").UserId :
...@@ -293,13 +298,12 @@ ...@@ -293,13 +298,12 @@
let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0; let Up = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
let teacherId = this.id; let teacherId = this.id;
let img = this.teacher.teacherResult.TeacherLogo?this.teacher.teacherResult.TeacherLogo:''; 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 { return {
title: title, 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, imageUrl: img,
}; };
}, },
created() { created() {
this.mc = this.$uiConfig.mainColor; this.mc = this.$uiConfig.mainColor;
...@@ -508,7 +512,35 @@ ...@@ -508,7 +512,35 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/friendcircle/friendcircle?ID=' + this.id +'&barshow=1' 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