|
@@ -9,7 +9,7 @@
|
|
|
<dataBank ref="资料库" v-show="page == '资料库'" />
|
|
|
<school ref="商学院" v-show="page == '商学院'" />
|
|
|
<product ref="单品" v-show="page == '单品'" />
|
|
|
-
|
|
|
+
|
|
|
<bottom-suspension-frame ref="pages" @onChange="pageChange" />
|
|
|
</view>
|
|
|
</template>
|
|
@@ -34,6 +34,62 @@ export default {
|
|
|
page: '首页'
|
|
|
}
|
|
|
},
|
|
|
+ onLoad(options) {
|
|
|
+ let user = {
|
|
|
+ wechatBindUserid: 0,
|
|
|
+ userName: ""
|
|
|
+ },
|
|
|
+ that = this;
|
|
|
+ if (options.wechatBindUserid) {
|
|
|
+ user.wechatBindUserid = options.wechatBindUserid;
|
|
|
+ user.userName = options.userName;
|
|
|
+ }
|
|
|
+ if (options.q) {
|
|
|
+ let params = this.getUrlParams(options.q);
|
|
|
+ user.wechatBindUserid = params.wechatBindUserid;
|
|
|
+ user.userName = params.userName;
|
|
|
+ }
|
|
|
+ if (user.wechatBindUserid) {
|
|
|
+ console.log("被邀请绑定账号", user);
|
|
|
+ uni.showModal({
|
|
|
+ title: '提醒',
|
|
|
+ content: `"${user.userName}"是否与当前微信号绑定`,
|
|
|
+ confirmText: '确定绑定',
|
|
|
+ success: function ({ confirm }) {
|
|
|
+ if (confirm) uni.login({
|
|
|
+ success(res) {
|
|
|
+ that.$Http.basic({
|
|
|
+ "id": 20240516090402,
|
|
|
+ "content": {
|
|
|
+ "wechat_code": res.code,
|
|
|
+ "isbinging": 1,
|
|
|
+ "wechatuserinfo": "",
|
|
|
+ "userid": user.wechatBindUserid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("绑定账号", res)
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: res.msg == '成功' ? '绑定成功' : res.msg,
|
|
|
+ showCancel: false,
|
|
|
+ success: function ({ confirm }) {
|
|
|
+ if (confirm) {
|
|
|
+ if (res.msg == '成功') that.$Login.wechatLogin().then(s => {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: '/pages/index/index'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (that.cutoff(res.msg, '绑定成功')) return;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
onShow() {
|
|
|
const systemInitIsComplete = this.$Http.systemInitIsComplete;
|
|
|
if (!systemInitIsComplete || typeof systemInitIsComplete == 'object') {
|
|
@@ -53,9 +109,6 @@ export default {
|
|
|
methods: {
|
|
|
updatePageData(itemId, page) {
|
|
|
if (this.$refs[this.page].updatePage) this.$refs.pages.onClick(itemId, page)
|
|
|
- },
|
|
|
- changePage(itemId, page, params) {
|
|
|
-
|
|
|
},
|
|
|
pageChange(detail) {
|
|
|
uni.setNavigationBarTitle({
|