|
|
@@ -53,7 +53,8 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { getCgItemInfo } from "@/api/purchase";
|
|
|
-import { batchChangePrice } from '@/api/product'
|
|
|
+import { batchChangePrice } from '@/api/product';
|
|
|
+import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
name: "AppResult",
|
|
|
data() {
|
|
|
@@ -89,6 +90,9 @@ export default {
|
|
|
this.$store.commit("setLoginInfo", {})
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['getDictionariesInfo']),
|
|
|
+ },
|
|
|
methods: {
|
|
|
init(){
|
|
|
|
|
|
@@ -141,16 +145,37 @@ export default {
|
|
|
},
|
|
|
goBack(){
|
|
|
uni.navigateBack()
|
|
|
+ this.subscribe()
|
|
|
},
|
|
|
goHome () {
|
|
|
uni.removeStorageSync('ghsCgScene')
|
|
|
uni.removeStorageSync('ghsCgOption')
|
|
|
this.pageTo({url:"/admin/home/workbench",type:4})
|
|
|
+ this.subscribe()
|
|
|
},
|
|
|
goDetail() {
|
|
|
uni.removeStorageSync('ghsCgScene')
|
|
|
uni.removeStorageSync('ghsCgOption')
|
|
|
this.pageTo({url: '/pagesPurchase/purDetails?id='+this.option.id+'&status=2',type:2})
|
|
|
+ this.subscribe()
|
|
|
+ },
|
|
|
+ subscribe(){
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ if(this.getDictionariesInfo && this.getDictionariesInfo.subscribeMessage && this.getDictionariesInfo.subscribeMessage == 1 && this.getDictionariesInfo.hdMiniMessage && this.getDictionariesInfo.hdMiniMessage.cgSuccess && this.getDictionariesInfo.hdMiniMessage.remindHdClear && this.getDictionariesInfo.hdMiniMessage.giveCoupon){
|
|
|
+ uni.requestSubscribeMessage({
|
|
|
+ tmplIds: [this.getDictionariesInfo.hdMiniMessage.cgSuccess.msgId,this.getDictionariesInfo.hdMiniMessage.giveCoupon.msgId,this.getDictionariesInfo.hdMiniMessage.remindHdClear.msgId],
|
|
|
+ success(res) {
|
|
|
+ console.log(res)
|
|
|
+ },
|
|
|
+ fail(err) {
|
|
|
+ console.log(err)
|
|
|
+ },
|
|
|
+ complete() {
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // #endif
|
|
|
}
|
|
|
},
|
|
|
};
|