@@ -31,4 +31,10 @@ module.exports = {
// 分享时调用,判断分享作品是不是活动作品
// wx/activityJoinRead/isActivityRead/{readId}2月17日 16:52
isActivityWork: data => request(`/activityJoinRead/isActivityRead/${data}`, 'get'),
-}
+}
+
+/*
+postWorksScore挑战分数上传
+publishRankWorks朗读赛分数上传
+publishWorks普通朗读结果上传
+*/
@@ -121,10 +121,11 @@ Component({
uploadSuccess: true,
userReadId: res.id,
})
+ wx.disableAlertBeforeUnload();
},
jumpWork() {
wx.redirectTo({
- url:'/pages/userWorks/index'
+ url: '/pages/userWorks/index'
}
@@ -622,6 +622,7 @@ Page({
wsEngine.reset()
this.resetReading()
this.storeBindings.destroyStoreBindings()
backReading() {
wx.navigateBack({
@@ -1,4 +1,3 @@
-
import {
createStoreBindings
} from 'mobx-miniprogram-bindings'
@@ -15,7 +14,7 @@ Page({
readingType: '',
uploadHide: '',
// 朗读赛的id
- activityId: ''
+ activityId: '',
/**
@@ -23,6 +22,15 @@ Page({
*/
async onLoad(options) {
console.log(options);
+ wx.enableAlertBeforeUnload({
+ message: "未完成上传,是否退出?",
+ success: function (res) {
+ console.log(res)
+ },
+ fail: function (e) {
+ console.log(e)
+ }
+ })
this.storeBindings = createStoreBindings(this, {
store,
fields: {