|
@@ -39,7 +39,7 @@
|
|
|
<view style="width: 60%;">
|
|
|
<text style="color: #2979ff;white-space: nowrap;text-overflow: ellipsis;">{{ item.beforeName }}</text>
|
|
|
</view>
|
|
|
- <view><u-button type="primary" size="mini" >进入刷题</u-button></view>
|
|
|
+ <view><u-button type="primary" size="mini" @click="appBeforeAddress(item.goodsId)">进入刷题</u-button></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</navigator>
|
|
@@ -70,6 +70,25 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ appBeforeAddress(goodsId) {
|
|
|
+ this.$api.appBeforeAddress({
|
|
|
+ goodsId
|
|
|
+ }).then(res => {
|
|
|
+ if(res.data.code == 200) {
|
|
|
+ uni.navigateToMiniProgram({
|
|
|
+ appId: res.data.data.url,
|
|
|
+ success(res) {
|
|
|
+ // 打开成功
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.msg,
|
|
|
+ icon: 'none',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
courseGoodsList() {
|
|
|
let self = this;
|
|
|
this.$api.courseGoodsList(this.param).then(res => {
|